Playing with IPFS to act as a RPM repo

This is a short howto get IPFS running on a vm to play around and discover. You should not do this on a machine with sensitive information on it nor on a production server…

This is a pretty straight forward howto, if you want to know how IPFS work it’s not the right place, I might make another post on this later.

Download and Install IPFS binary.

[arsenick@rpm-distro-build ipfs]$ wget https://dist.ipfs.io/go-ipfs/v0.4.13/go-ipfs_v0.4.13_linux-amd64.tar.gz
--2018-03-13 14:39:08-- https://dist.ipfs.io/go-ipfs/v0.4.13/go-ipfs_v0.4.13_linux-amd64.tar.gz
Resolving dist.ipfs.io (dist.ipfs.io)... 147.135.130.181, 217.182.195.23, 2001:41d0:303:27b5::, ...
Connecting to dist.ipfs.io (dist.ipfs.io)|147.135.130.181|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12635297 (12M) [application/x-gzip]
Saving to: ‘go-ipfs_v0.4.13_linux-amd64.tar.gz’

go-ipfs_v0.4.13_linux-amd64.tar. 100%[=========================================================>] 12.05M 2.84MB/s in 4.6s

2018-03-13 14:39:13 (2.63 MB/s) - ‘go-ipfs_v0.4.13_linux-amd64.tar.gz’ saved [12635297/12635297]

[arsenick@rpm-distro-build ipfs]$ tar -xzvf go-ipfs_v0.4.13_linux-amd64.tar.gz 
go-ipfs/build-log
go-ipfs/install.sh
go-ipfs/ipfs
go-ipfs/LICENSE
go-ipfs/README.md
[arsenick@rpm-distro-build ipfs]$ cd go-ipfs/
[arsenick@rpm-distro-build go-ipfs]$ ls
build-log install.sh ipfs LICENSE README.md
[arsenick@rpm-distro-build go-ipfs]$ sudo ./install.sh 
Moved ipfs to /usr/local/bin
[arsenick@rpm-distro-build ipfs]$

 

Initialize and configure CORS

I used * and 0.0.0.0 to permit all host, remember this is a lab setup just to play around, don’t do this if you want to keep the daemon running 24/7 on a machine with important documents.

$ ipfs init
$ ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
$ ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080
$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'

If you want to check the current config run ipfs config Addresses:

[arsenick@rpm-distro-build mylivecrypto]$ ipfs config Addresses

{
 "API": "/ip4/0.0.0.0/tcp/5001",
 "Announce": [],
 "Gateway": "/ip4/0.0.0.0/tcp/8080",
 "NoAnnounce": [],
 "Swarm": [
 "/ip4/0.0.0.0/tcp/4001",
 "/ip6/::/tcp/4001"
 ]
}

Starting the daemon

$ ipfs daemon

If you have problem launch the daemon with –debug

$ ipfs daemon --debug

 

Verify that we are connected to other peers in the swarm:

$ ipfs swarm peers

First publish

Let’s create a directory in which we’ll put a picture, wathever the picture you have, really… If you don’t have any you can get the classic IPFS hosted cat here.

$ mkdir test-ipfs
$ cp Images/cat.jpg test-ipfs/

Let’s add the entire folder:

$ ipfs add -r test-ipfs

IPFS will generate a hash for each and every files that is in this directory. The -r mean recursive.

You can now test using a public gateway like ipfs.io just add the site hash you got after adding the directory.

https://ipfs.io/ipfs/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Let’s try to use it as a RPM repo

First we’ll copy some rpm inside a directory. I want to share those files with apache too so I’ll put them in /var/www/html

$ cd /var/www/html
$ sudo mkdir mylivecrypto
$ sudo cp /home/arsenick/rpmbuild/RPMS/noarch/*.rpm /var/www/html/mylivecrypto/
$ sudo createrepo -v /var/www/html/mylivecrypto/

Then we’ll add the directory we’ve just created with it’s content to the swarm:

$ ipfs add -r mylivecrypto/
added QmSsDvYbXzqo9X3F5Vz1kunSsznPJJWmzbd16PNVSumPH1 mylivecrypto/etherwallet-3.20.03-1.fc27.noarch.rpm
added QmaizchR1MFu5cvtYD52KBrghJzuZGV3ZHUzCZmgu7EyWL mylivecrypto/mycrypto-3.12.0-1.fc27.noarch.rpm
added QmU7y5uycimDRK92Bu2hrBkYz858S9VP4k1sZZ5jJtb3ey mylivecrypto/repodata/1b18985381e6e801dd30895d83ff1a60b4e251238bf54b7d964607fae6fee6ff-other.sqlite.bz2
added QmTZnzS5yHBo39ESDvsg73KhmmsuhX4b4wH8QTGfDqbXBu mylivecrypto/repodata/26902cfa30e1b791faadbd1bb745e7803c07a6733450d88625788d53de9baee9-primary.sqlite.bz2
added QmZTV2j774nuvb8NaW31FvHVGdehtsURpxxmFA1Dc8Wn9h mylivecrypto/repodata/4d5e514c7bbf4ea0593a7b0e33ffef97ff6739b0803ad84b699c72f87ae9ce5e-primary.xml.gz
added QmfRcKNTi65hRRseE2NM81iSefjffQfUG6S9nfd6HcUrGC mylivecrypto/repodata/4f0c27f652c56e97ce1ac06941d80c083f1a52cd85b5f24d335ecc167b362a2e-filelists.sqlite.bz2
added QmNjS1MoQCphNC9E8mmJUR2aXAzMN1QNAs1qaJrimVivoT mylivecrypto/repodata/5a1a69e89862cb338a014a1fc513626f4104b23fa0c41c1a961d8ced92be6dcc-other.xml.gz
added QmeGAVXs3wGq2LSPcQy1bji7id9BeVBULLt8m95gjJCAdu mylivecrypto/repodata/ce3dea1b7bd0f02f95a5858873b6370c1aa592a0e5508ce8297f94c8e125231a-filelists.xml.gz
added QmegVtiYKzCRHin3FhEqzFDLytXTT83cya1ZEAAfPFjNWg mylivecrypto/repodata/repomd.xml
added QmX8od9tRccsbVPwchjjsB24Q38piNbkDXonQwRqfHLen9 mylivecrypto/repodata
added QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo mylivecrypto

That’s it our directory and it’s content has been added to the swarm! In the example above QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo is the folder hash.

If you want to add this repo to your host you should then add the repo url: https://ipfs.io/ipfs/QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo

[arsenick@rpm-distro-build ~]$ sudo yum-config-manager --add-repo https://ipfs.io/ipfs/QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo
[sudo] password for arsenick:

Yum-utils package has been deprecated, use dnf instead.
See 'man yum2dnf' for more information.

adding repo from: https://ipfs.io/ipfs/QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo

[ipfs.io_ipfs_QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo]
name=added from: https://ipfs.io/ipfs/QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo
baseurl=https://ipfs.io/ipfs/QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo
enabled=1

[arsenick@rpm-distro-build ~]$ yum search myether
added from: https://ipfs.io/ipfs/QmXXoZCjQHxZxRAxbRTQtGQ4jwQjHJ8YjxvGWLWCpgfKEo 3.5 kB/s | 2.4 kB 00:00 
Last metadata expiration check: 0:00:00 ago on Thu 15 Mar 2018 11:35:07 AM EDT.
================================================== Description Matched: myether ===================================================
etherwallet.noarch : Packaged version of MEW. Package maintained by Rene Jr Purcell

It’s working! The big problem with that is, I can’t update the files once it’s added… I’ll make another post soon about IPNS which should enable us to use the same hash to access the folder, when you need to update the files, you just point the IPNS to the new IPFS hash.

Accessing the WebUI

If you want to access the WebUI from the localhost then you can just go to: http://127.0.0.1:5001/webui

If you are trying to access the WebUI from a remote machine it’s not gonna work, even if you changed the ip address on which the API listen… It seems like for now even if you configure CORS correctly, the localhost is still hardcoded in the webui as a “Security measure”. You should be able to call the API remotely with the correct CORS config we did (more info here: https://github.com/INFURA/tutorials/wiki/IPFS-and-CORS ). So if you really want this to work remotely with the WebUI you’ll have to use ssh to forward port.

$ ssh -L 5001:localhost:5001 arsenick@192.168.X.X

$ ssh -L 8080:localhost:8080 arsenick@192.168.X.X

 

And then use http://127.0.0.1:5001/webui SSH will forward 5001 and 8080 to the machine running IPFS daemon.

Create service for easy and automatic startup (mandatory)

$ vim /lib/systemd/system/ipfs.service
[Unit]
Description=ipfs daemon

[Service]
ExecStart=/usr/local/bin/ipfs daemon
Restart=always
User=root
Group=root

[Install]
WantedBy=multi-user.target

Let’s reload systemd and enable IPFS service.

$ systemctl daemon-reload
$ systemctl enable ipfs.service

That’s it, you can now play around with IPFS. I’m curently testing how this could work for a RPM repository!

 

Ressources:

https://ipfs.io/docs/install/

https://ipfs.io/docs/getting-started/

https://discuss.ipfs.io/t/how-can-i-enable-remote-connection-to-webui/698/3

https://github.com/INFURA/tutorials/wiki/IPFS-and-CORS

Related to remote access of webui:

https://github.com/ipfs/webui/issues/591

https://github.com/ipfs/webui/issues/594

https://github.com/ipfs/go-ipfs/issues/1807

View at Medium.com

Use multiple monitor and full screen with Citrix receiver on Linux

Hi, here’s a quick post with the instruction I used to fix this. My employer give access to different ressources via Citrix. One of them was starting full screen and using my 3 monitor. The other one was starting in a windows 1024×768 ..

 

I assume you already have installed citrix reciever ( located in /opt/Citrix/ICAClient/ ) and everything is already working.. So here’s how I fixed the multiple monitor thing.

Create a new script:

$ sudo vim /opt/Citrix/ICAClient/xdg-open-wfica.sh

Put this content in it:

#!/bin/sh
FILEA=$1 ; sed -i 's/DesiredVRES.*/DesiredVRES=4294967295/' $FILEA ; sed -i 's/DesiredHRES.*/DesiredHRES=4294967295/' $FILEA ; export WFICA_OPTS="-span a" ; /opt/Citrix/ICAClient/wfica -span h -icaroot /opt/Citrix/ICAClient $FILEA

Change the permissions

$ sudo chmod +x /opt/Citrix/ICAClient/xdg-open-wfica.sh

Allright, now you can try if this work!

$ /opt/Citrix/ICAClient/xdg-open-wfica.sh /path/to/your/launch.ica

The session should start on all your monitor. There’s nothing really complex here, we are just replacing the DesiredVRES and DesiredHRES the Citrix server preset in the .ica file…

Now if you want to launch all the ica file using this script you can just modify the .desktop entry and point the Exec= to the script we just created and add %f at the end which is the variable referencing the filename.

$ cat /usr/share/applications/wfica.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Citrix Receiver Engine
StartupWMClass=Wfica
NoDisplay=true
MimeType=application/x-ica;
Categories=Application;Network;X-Red-Hat-Base;X-SuSE-Core-Internet;
Icon=/opt/Citrix/ICAClient/icons/manager.png
TryExec=/opt/Citrix/ICAClient/wfica
Exec=/opt/Citrix/ICAClient/xdg-open-wfica.sh %f

I’m not sure if this is necessary, but if it doesn,t work yet, try it:

sudo update-desktop-database && sudo update-mime-database /usr/share/mime

So after that you should be able to doublecheck an .ica file in your nautilus or maybe open it right in firefox. I wanted to use xdg-open in forefox to open the file directly but I’m using the snap version of firefox and there seems to have a problem opening files..

This is far from perfect, I don’t have a lot of time and I wanted to work quick so it might be a bit dirty, but it’s a good start.

Hope this will help!

 

Building a fedora spin

 

Install and Configure mock

# dnf install mock
# usermod -a -G mock <user>

Here’s how you setup a Fedora 27 x86_64 environment.

$ mock -r fedora-27-x86_64 --init
$ mock -r fedora-27-x86_64 --install lorax-lmc-novirt git vim-minimal pykickstart

For a different arch or release modify the mock configuration file.

Enable network access in mock. Modify config_opts[‘rpmbuild_networking’] to True.

$ sudo vi /etc/mock/site-defaults.cfg

Kickstart files

Inside the mock chroot or container, clone the kickstarts git repository. If your system is using SELinux it needs to be set to Permissive mode while running lorax. The –old-chroot might not be needed for you. I had to use it because I had problem with loop device inside mock.

$ sudo setenforce 0
$ mock -r fedora-27-x86_64 --shell --old-chroot
<mock-chroot> sh-4.4# git clone https://pagure.io/fedora-kickstarts.git

Modify the fedora-repo.ks. You’ll have to comment the rawhide repo and uncomment this line:

 %include fedora-repo-not-rawhide.ks

ksflatten

change directory into fedora-kickstarts and flatten a kickstart

<mock-chroot> sh-4.4# cd fedora-kickstarts
<mock-chroot> sh-4.4# ksflatten --config fedora-live-workstation.ks -oFedora-MyLiveCrypto.ks --version F27

You should see a warning about redundant “part /”, go edit the flat-fedora-live-workstation.ks and remove one of them. If you want to remove packages or group of packages, add stuff etc.. That’s where you’ll do it. For the first time I suggest you just go with the original kickstart file just to verify everything is working.

livemedia-creator

<mock-chroot> sh-4.4# livemedia-creator --ks Fedora-MyLiveCrypto.ks --no-virt --resultdir /var/lmc --project Fedora-work-mylivecrypto --make-iso --volid Fedora-mylivecrypto-27 --iso-only --iso-name Fedora-mylivecrypto-27-x86_64-1.iso --releasever 27 --title Fedora-MyLiveCrypto-live --macboot

<mock-chroot> sh-4.4# livemedia-creator --ks Fedora-MyLiveCrypto.ks --no-virt --resultdir /var/lmc --project Fedora-work-mylivecrypto --make-iso --volid Fedora-mylivecrypto-27 --iso-only --iso-name Fedora-mylivecrypto-27-x86_64-1.iso --releasever 27 --title Fedora-MyLiveCrypto-live --macboot
2018-03-05 21:02:02,319: livemedia-creator v27.11-1
2018-03-05 21:02:02,554: disk_img = /var/lmc/lmc-disk-_zch_o2a.img
2018-03-05 21:02:02,555: Using disk size of 6658MiB
X2018-03-05 21:02:06,314: Running anaconda.
2018-03-05 21:02:07,567: 
2018-03-05 21:02:07,568: ** (process:1703): WARNING **: Kernel module 'btrfs' not available
2018-03-05 21:02:07,570: 
2018-03-05 21:02:07,571: ** (process:1703): WARNING **: Cannot load the BTRFS plugin
2018-03-05 21:02:10,302: Starting installer, one moment...
2018-03-05 21:02:10,304: terminal size detection failed, using default width
2018-03-05 21:02:10,304: anaconda 27.20.4-1 for Fedora-work-mylivecrypto 27 (pre-release) started.
2018-03-05 21:02:10,324: Traceback (most recent call last):
2018-03-05 21:02:10,325: File "/usr/sbin/anaconda", line 603, in <module>
2018-03-05 21:02:10,325: display.setup_display(anaconda, opts, addon_paths=addon_paths)
2018-03-05 21:02:10,326: File "/usr/lib64/python3.6/site-packages/pyanaconda/display.py", line 258, in setup_display
2018-03-05 21:02:10,327: vnc_can_be_started, vnc_error_messages = check_vnc_can_be_started(anaconda)
2018-03-05 21:02:10,328: File "/usr/lib64/python3.6/site-packages/pyanaconda/display.py", line 120, in check_vnc_can_be_started
2018-03-05 21:02:10,328: if not nm_is_connecting() and not nm_is_connected():
2018-03-05 21:02:10,329: File "/usr/lib64/python3.6/site-packages/pyanaconda/nm.py", line 173, in nm_is_connecting
2018-03-05 21:02:10,330: return nm_state() == NM.State.CONNECTING
2018-03-05 21:02:10,330: File "/usr/lib64/python3.6/site-packages/pyanaconda/nm.py", line 149, in nm_state
2018-03-05 21:02:10,331: return NM.State.CONNECTED_GLOBAL
2018-03-05 21:02:10,331: AttributeError: type object 'State' has no attribute 'CONNECTED_GLOBAL'
2018-03-05 21:02:10,468: Running anaconda failed: process '['anaconda', '--kickstart', '/fedora-kickstarts/Fedora-MyLiveCrypto.ks', '--cmdline', '--dirinstall', '--remotelog', '127.0.0.1:54649']' exited with status 1
2018-03-05 21:03:08,338: Install failed: novirt_install failed
2018-03-05 21:03:08,346: Removing bad disk image
2018-03-05 21:03:08,360: ERROR: Image creation failed: novirt_install failed
<mock-chroot> sh-4.4# livemedia-creator --ks Fedora-MyLiveCrypto.ks --no-virt --resultdir /var/lmc --project Fedora-work-mylivecrypto --make-iso --volid Fedora-mylivecrypto-27 --iso-only --iso-name Fedora-mylivecrypto-27-x86_64-1.iso --releasever 27 --title Fedora-MyLiveCrypto-live --macboot
2018-03-05 22:16:30,299: livemedia-creator v27.11-1
2018-03-05 22:16:30,300: The results_dir (/var/lmc) should not exist, please delete or move its contents
<mock-chroot> sh-4.4# rm -rf /var/lmc/
<mock-chroot> sh-4.4# livemedia-creator --ks Fedora-MyLiveCrypto.ks --no-virt --resultdir /var/lmc --project Fedora-work-mylivecrypto --make-iso --volid Fedora-mylivecrypto-27 --iso-only --iso-name Fedora-mylivecrypto-27-x86_64-1.iso --releasever 27 --title Fedora-MyLiveCrypto-live --macboot
2018-03-05 22:16:34,188: livemedia-creator v27.11-1
2018-03-05 22:16:34,250: disk_img = /var/lmc/lmc-disk-d6h69eot.img
2018-03-05 22:16:34,251: Using disk size of 6658MiB
2018-03-05 22:16:37,432: Running anaconda.
2018-03-05 22:16:37,754: 
2018-03-05 22:16:37,754: ** (process:1825): WARNING **: Kernel module 'btrfs' not available
2018-03-05 22:16:37,755: 
2018-03-05 22:16:37,755: ** (process:1825): WARNING **: Cannot load the BTRFS plugin
2018-03-05 22:16:38,869: Starting installer, one moment...
2018-03-05 22:16:38,870: terminal size detection failed, using default width
2018-03-05 22:16:38,870: anaconda 27.20.4-1 for Fedora-work-mylivecrypto 27 (pre-release) started.
2018-03-05 22:16:38,870: 22:16:38 Not asking for VNC because of an automated install
2018-03-05 22:16:38,871: 22:16:38 Not asking for VNC because of an automated install
2018-03-05 22:16:38,871: 22:16:38 Not asking for VNC because we don't have Xvnc
2018-03-05 22:16:38,874: 22:16:38 Not asking for VNC because we don't have Xvnc
2018-03-05 22:16:39,630: Processing logs from ('127.0.0.1', 39458)
2018-03-05 22:18:08,849: Starting automated install.......................................................................................
2018-03-05 22:18:08,850: ================================================================================
2018-03-05 22:18:08,851: ================================================================================
2018-03-05 22:18:08,851: Installation
2018-03-05 22:18:08,852: 
2018-03-05 22:18:08,853: 1) [x] Language settings 2) [x] Time settings
2018-03-05 22:18:08,854: (English (United States)) (US/Eastern timezone)
2018-03-05 22:18:08,854: 3) [x] Installation source 4) [x] Software selection
2018-03-05 22:18:08,855: (https://mirrors.fedoraproject.o (Custom software selected)
2018-03-05 22:18:08,856: rg/mirrorlist?repo=fedora-$relea
2018-03-05 22:18:08,856: sever&arch=$basearch)
2018-03-05 22:18:08,857: 5) [x] Network configuration 6) [ ] User creation
2018-03-05 22:18:08,857: (No network devices available) (No user will be created)
2018-03-05 22:18:08,858: 
2018-03-05 22:18:08,858: ================================================================================
2018-03-05 22:18:08,859: ================================================================================
2018-03-05 22:18:08,860: Progress
2018-03-05 22:18:08,861: 
2018-03-05 22:18:08,864: Setting up the installation environment
2018-03-05 22:18:09,545: .
2018-03-05 22:18:09,545: Configuring storage
2018-03-05 22:18:09,547: .
2018-03-05 22:18:09,547: Running pre-installation scripts
2018-03-05 22:18:09,772: .
2018-03-05 22:18:09,773: Running pre-installation tasks
2018-03-05 22:23:03,040: .
2018-03-05 22:23:03,040: Installing.
2018-03-05 22:23:03,041: Starting package installation process
2018-03-05 22:23:03,041: Downloading packages
2018-03-05 22:23:03,042: Downloading 1686 RPMs, 0 B / 1.48 GiB (0%) done.
2018-03-05 22:23:03,042: Downloading 1686 RPMs, 5.52 MiB / 1.48 GiB (0%) done.
2018-03-05 22:23:03,043: Downloading 1686 RPMs, 11.56 MiB / 1.48 GiB (0%) done.
2018-03-05 22:23:03,043: Downloading 1686 RPMs, 17.84 MiB / 1.48 GiB (1%) done.
2018-03-05 22:23:03,044: Downloading 1686 RPMs, 23.42 MiB / 1.48 GiB (1%) done.
2018-03-05 22:23:03,044: Downloading 1686 RPMs, 29.77 MiB / 1.48 GiB (1%) done.
[...]
2018-03-05 15:51:31,853: Verifying hunspell-en-GB.noarch (1558/1559)
2018-03-05 15:51:31,853: Verifying perl-libnet.noarch (1559/1559)
2018-03-05 15:51:31,854: .
2018-03-05 15:51:31,854: Configuring storage
2018-03-05 15:51:31,855: .
2018-03-05 15:51:31,855: Performing post-installation setup tasks
2018-03-05 15:51:36,506: .
2018-03-05 15:51:36,507: 
2018-03-05 15:51:36,507: Configuring installed system
2018-03-05 15:51:38,665: .
2018-03-05 15:51:38,667: Creating users
2018-03-05 15:51:38,669: .
2018-03-05 15:51:38,670: Configuring addons
2018-03-05 15:52:04,568: .
2018-03-05 15:52:04,569: Generating initramfs
2018-03-05 15:53:15,788: .
2018-03-05 15:53:15,789: Running post-installation scripts
2018-03-05 15:53:15,792: .
2018-03-05 15:53:15,793: Storing configuration files and kickstarts
2018-03-05 15:53:15,801: .
2018-03-05 15:55:49,196: Shutting down log processing
2018-03-05 15:55:52,559: Disk Image install successful
2018-03-05 15:55:52,561: working dir is /var/tmp/lmc-work-_4z0sq47
2018-03-05 16:29:59,226: Rebuilding initrds
2018-03-05 16:29:59,227: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2018-03-05 16:29:59,229: rebuilding boot/initramfs-4.15.6-300.fc27.x86_64.img
2018-03-05 16:31:12,965: Building boot.iso
2018-03-05 16:31:13,084: running x86.tmpl
2018-03-05 16:31:53,990: Creating image file /var/tmp/lmc-work-_4z0sq47/images/product.img from contents of /var/tmp/lorax.imgutils.nzcr8i5_/usr/share/lorax//product/
2018-03-05 16:32:34,309: Disk image erased
2018-03-05 16:32:42,993: SUMMARY
2018-03-05 16:32:42,998: -------
2018-03-05 16:32:42,999: Logs are in /fedora-kickstarts
2018-03-05 16:32:42,999: Results are in /var/lmc
<mock-chroot> sh-4.4#

Get the iso and test it

You’ll find the iso in “/var/lib/mock/fedora-27-x86_64/root/var/lmc” just copy it somewhere else and test it using Virtualbox, kvm or qemu.

If you want to build a new iso you’ll have to delete the “/var/lmc” inside your mock, otherwise livemedia-creator won’t start.

 

Special thanks to Southern_Gentlem, dowdle and sfix for their help on Freenode #fedora and #fedora-respins

Sources:

https://fedoraproject.org/wiki/Livemedia-creator-_How_to_create_and_use_a_Live_CD

https://github.com/rhinstaller/pykickstart/blob/master/docs/kickstart-docs.rst

https://fedoraproject.org/wiki/Spins_Guidelines

New project, MyLiveCrypto

Edit of original post:

After a lot of discussion and reading on the numerous standard and rules of Fedora packaging I’ve decided to not go forward with this project. I’m really sad, I think it’s a great idea but the main problem is with all the rules and guideline I have to follow while packaging MEW/mycrypto and other wallets. I cannot include dependency in a single package, so just for mew/mycrypto I had to package all the node dependency and the list was crazy.

I could be doing it anyway and not being part of the fedora project but it would mean people using my spin would have to trust me 100% for not tampering with code or anything inside the OS. So I know I wouldn’t put that amount of trust into someone I don’t know, why would you ? Anyway you shouldn’t! So it’s on hold for now, I’ll follow the guideline updates few folks told me there could be some adjustment soon regarding the kind of dependency I had in my packages..

If anyone reading this have experience in packaging in Fedora and think they can help I would be more than happy to revive this project. Send me an email at arsenick@fedoraproject.org


 

It’s been a long time since my last post here. A lot of things have changed and getting older with more responsibility mean less time to play around and update my internet life!

So a little recap of the last year for my digital life, I’m now a full time Openstack administrator and a lot of my time last year has been used to learn about the Openstack platform and read about blockchains and distributed ledger technology. I really liked the connection blockchain made with the opensource and the decentralized and fair way of doing things.

With Crypto you are responsible for your own security, the blockchain is deemed secure, but you have to handle and keep your private key in a safe place. That’s the weak point for most people, this and not sending eth to scammer impersonating vitalik on twitter…

So here I am, and here’s my new project, MyLiveCrypto. The idea is pretty simple, a readonly Live Fedora spin with CryptoCurrency wallet already installed. Anybody running windows could reboot their PC/Laptop, boot into the live image and at the very least they won’t have to worry about getting their private key stoled by a virus or a malware. I understand that using this spin put the trust on the creator, I don’t have yet a good way to mitigate this but as the project advance I hope to find ways of being transparent enough so other people could look into the details and verify everything.

This is the first draft so I would like to have comments and idea, here’s a recap of the main feature I aim for the V0.1 release, this is gonna be a small start as I have to learn the spin process and create few packages, follow fedora guideline etc…

  • Live image with graphical desktop
  • Firefox and Brave already installed
  • Basic packaging of MEW and MyCrypto. The first release will only contain Ethereum wallet.
  • Basic packaging for a local version of ethaddress.org offline paper wallet generator (https://www.reddit.com/r/ethereum/comments/3jz85n/ethaddressorg_paper_wallets_for_ethereum/)
  • Basic packaging of offline paperwallet generator for Bitcoin (https://github.com/pointbiz/bitaddress.org)
  • Basic rebrand of the visual of background and plymouth splash screen
  • Documentation with best practice, hint and rule of thumb regarding the use of the live image. I want this to open automatically when the X Session start.

Todo for V0.2

  • Find a way to pre-install few browser extensions, metamask, Cryptonite, EtherAddressLookup
  • Make few posts on reddit to see what people think of the ideas and create a poll to see which wallet should I add into the distro for other blockchain
  • Add more Ethereum wallet.
  • Add more Bitcoin wallet.
  • Try to see if Parity could be installed, with geth 1.8 fast sync on a usd key to provite a metamask alternative ?

Ideas for later

  • Grub menu with a selection for booting completely offline to generate transaction with “offline wallet” (at least MEW or MyCrypto).
  • Offer easy usb key encryption to store private keys. Careful with the FS used, people might want to read this key on windows.
  • Package and install Ledger wallet desktop app once it’s released.
  • Look into different solution to verify the integrity of the live image.

That’s it for now, I’ll update this blog when I reach certain milestone, like completing a package etc.. For now I’m working to generate a basic live media image, once everything work as I’d like to and I’m comfortable with the process, I’ll put more work into the MEW and MyCrypto packaging.

Let me know if you are interested in the project!

Fedora 15 problem with Empathy and you are unable to connect to msn ?

LAST UPDATE #2: An update as been pushed in the Fedora Testing repo and correct this problem. If you want to install this update you just have to use the enablerepo feature just like that:

#yum install papyon --enablerepo=updates-testing

The repository is enabled only for this update!


UPDATE #1: This has worked for me yesterday, but it’s not working anymore.. I haven’t been able to fix the issue… Please report your test and problems in the bug report at: https://bugzilla.redhat.com/show_bug.cgi?id=750884



Papyon : Can't login in Windows live : accountab.py:202:_HandleABFindAllResponse:AttributeError: 'NoneType' object has no attribute 'find'

If you get this erorr reported by ABRT on Fedora 15 and you are unable to connect to msn with empathy, here’s a workaround.

Here’s the bug report if you want to share your problem regarding this issue:

https://bugzilla.redhat.com/show_bug.cgi?id=750884

The workaround consist of a upstram patch that has been released. It will probably work it’s way to fedora soon but for now you need to do some work by hand.

Here you can get the code to update: http://cgit.collabora.com/git/user/maiku/papyon.git/commit/?h=bug-42689&id=011201e47004538e732f247bfeb21634c6e1d97f

As you can see you have to edit three files. The path I will give you is the exact path under Fedora 15 but can change with other distrib. The line with “-” need to be commented with a “#” at the beginning of the line, and the line with a + need to be added..

1 – /usr/lib/python2.7/site-packages/papyon/service/description/SingleSignOn/RequestMultipleSecurityTokens.py

- CONTACTS = ("contacts.msn.com", "MBI")
+ CONTACTS = ("local-bay.contacts.msn.com", "MBI")
2 – /usr/lib/python2.7/site-packages/papyon/service/description/AB/__init__.py
-url = "http://contacts.msn.com/abservice/abservice.asmx"
+url = "http://local-bay.contacts.msn.com/abservice/abservice.asmx"
3 – /usr/lib/python2.7/site-packages/papyon/service/description/Sharing/__init__.py
-url = "http://contacts.msn.com/abservice/SharingService.asmx"
+url = "http://local-bay.contacts.msn.com/abservice/SharingService.asmx"

That’s it!

S2LQ Fedora presence report

The S2LQ is now over. We had two great days and a lot of people had come! There was more than 600 persons who sign up for the free event which make this event one of the top 3 biggest event in the computer industry in Quebec, Canada!

First, sorry for the delay of this report, there’s a lot of thing happening in my life those last weeks and unfortunately I don’t have all the time I want to invest in my community activities..

That said, here’s a picture of the booth ( and me ) at the S2LQ

Unfortunately we haven’t received the  Fedora 14 DVD and there was a bunch of F13 DVD/Live cd, so I gave those media to people and tell them to download the lastest version if they like it! I almost gave an entire box of DVD and LiveCD, I can’t tell you how many, but during those two days a lot of people come back home with Fedora media to try it :)The stickers and button were pretty popular too!

So what can I say regarding the event..

My main goal was:

  1. Position Fedora in Quebec city. Show to the people that there are people using Fedora and there’s help here in Quebec city if they have trouble!
  2. Put some visibility for the Fedora Project. This one was a success with all the media distributed and with the big Fedora vertical banner
  3. Explain to people the relationship between Redhat and the Fedora Project
  4. Create some connection between the member of other community in the Quebec area ( other distribution, project etc… )
  5. Publicize the fact that there’s two Fedora ambassadors in Quebec city, and where to look if they want to be informed of release party and other events.
  6. Explain what are the main goal of the Fedora as a Linux distribution, what are the differences with the other distributions etc..

All those objectives has been achieved! I’m really proud of this event, I’ve met a lot of people involved in very different way in Opensource and heard of project born here and we didn’t even know!

I event get a picture with Richard Stallman! Again not the best picture ever.. I don’t know what’s wrong with me an pictures ;)

Thanks for everyone who helped me for this event, I think about Larry Cafiero who sent me the vertical banner and the button, Jean-Francois Saucier who gave me the F13 media, ng who sent me Fedora t-shirt which I didn’t receive on time unfortunately :( ,Michael Lessard and Claude Reeves for all the talk during spare time between presentation! ;) Ho, and Thanks the Laurent Bounin and everyone from the APELL who make this event a success!

More photos of the event:

http://www.flickr.com/search/?q=s2lq&m=tags

http://s2lq.com/photos

Videos:

http://s2lq.com/zone-vid%C3%A9o

Fedora 13 Release party – Québec

Yesterday it was my first release party as an organizer. I was a little bit nervous, because I had to burn few live cd by hand because our official Fedora 13 media are stuck at the custom by UPS. I’ve made a quick presentation assisted by Jean-Francois with the new features of Fedora 13 and videos was playing during people was talking to each other.

Jean-Francois and me arrived at 16h to install the setup and wait for people to come. Around 17h people start to show up and everyone was naturally talking together. I would like to thanks RedHat folks, Michael Lessard and Claude Reeves, for taking time to come and talk with people, Michael come often to other LUG or release party it’s a little bit easier for him, he’s from Québec city.. But Claude is from Montreal so it was really great to see both of them at our event! Thanks again to both of you for your presence!

I think the event was a success, there was around 12-13 persons at the peak, it’s a little bit less than Ubuntu release get here in Québec city, but they are doing release party since few years, so they already have their “returning people”. This is what Jean-Francois and me will focus on the next year, trying to bring more new peoples and new faces to release party and other events!

Here are few pictures I took:

This it the “chat” room! Oops empty pitcher… Need refill!

I’ve installed my laptop with a projector, playing different videos from RedHat YouTube channel I’ve downloaded using youtube-dl. Fedora 13 Launch as you can see Paul Frields on the screen, the famous Truth Happens, How code makes it into RHEL, RedHat MRG demo and a remix of truth happens was playing in a loop on the screen. It was the first time we tried this approach and I think people liked it, the video was playing when people was talking, not too loud so people who want to listen was able to and other people around are able to talk with each other without problem. So this is definitely a “Will do it again”. Plus as you can see on the picture we had a “live usb station” which enabled us to create bootable usb stick for people. This wasn’t a really popular approach, but it’s not really a big setup, so I think we will provide it anyways in the next events.

I was trying to find a new way to provide url to people after a presentation or if they ask us on how to get involved in Fedora project or anything else. I bought a Motorola Milestone few months ago which led me to test few software available on the Android market, and I discovered few bar code reader apps after that I started to read about bar code and “how it worked”. I’ve discovered the possibility of new generation of 2D bar code, so I created few QR Code pointing to Fedora 13 Release notes, How to get involved in Fedora project etc… Plus a QR Code for my contact information. To be honest, this way to share url have made a lot of hand to rise, people was asking how it works etc… It was the first time we used this, so I explained to a lot of person how it worked and how they can probably get a barcode reader for their phone, for yesterday this wasn’t a lot helpful and people didn’t really used it. But I’m pretty sure the next time a lot of people will have downloaded the software needed to read those and they will probably start to use it! I think this is a really good way to make a presentation “Interactive” or to share our contact information, a new kind of business card… And a new way to give people “readable stuff” after the presentation!

Here’s another goodies, the Cheat Cube. Not so helpful for long-time Linux user, but new comer tend to like this one really bad! I wasn’t able to translate the whole thing in french, it’s almost always longer to write something in french… But I’ll try to finish this at least for the next release because people really like this, even if they don’t really use it, they build it and let it on their desk, so it make people talk about Fedora and Linux overall, which is not a bad thing at all! ;)

So this is it for my report of our Fedora 13 Release party. I’m pleased to see that people liked it and we really had good feedback regarding the organisation, we will certainly continue in this way for the next release!

@++

René Jr Purcell

Fedora 13 liveusb-creator problem, can’t download fedora 13 direct from the app.

I’ve installed liveusb-creator prior to a Fedora release party where we will provide people the possibility to install fedora 13 on their usb stick. I didn’t have any live cd iso so I tried to select the “Download Fedora” option, but I was surprised to see that there’s not option to install Fedora 13. So here’s the workaround.

Edit the file /usr/lib/python2.6/site-packages/liveusb/releases.py

# vim /usr/lib/python2.6/site-packages/liveusb/releases.py

and add those line:

{
 'name': 'Fedora 13 (i686)',
 'url': 'http://download.fedora.redhat.com/pub/fedora/linux/releases/13/Live/i686/Fedora-13-i686-Live.iso',
 'sha256': '47ccc37db256387b70857f53a6067e8d50e692c9aa85e45e63e5190c5d1e0942',
 },

 {
 'name': 'Fedora 13 KDE (i686)',
 'url': 'http://download.fedora.redhat.com/pub/fedora/linux/releases/13/Live/i686/Fedora-13-i686-Live-KDE.iso',
 'sha256': '6828c02f2bce4ec3bd1ca488df8662640bf53fe7724913310295a5f5f6502cf8',
 },

 {
 'name': 'Fedora 13 (x86_64)',
 'url': 'http://download.fedora.redhat.com/pub/fedora/linux/releases/13/Live/x86_64/Fedora-13-x86_64-Live.iso',
 'sha256': 'c16923e9c2f04af3609c9534f32ea280e4d2c3af50e704344ccb35090f87065a',
 },

 {
 'name': 'Fedora 13 KDE (x86_64)',
 'url': 'http://download.fedora.redhat.com/pub/fedora/linux/releases/13/Live/x86_64/Fedora-13-x86_64-Live-KDE.iso',
 'sha256': '789d7090d39230f0e9b16ed3276974223c120db3120c48e53fa95a6f1604c650',
 },

Save this and restart liveusb-creator, you should have the option to download Fedora 13. This is a temporary workaround, untill the package get fixed.

For your information, the file has been updated few weeks ago on https://fedorahosted.org/liveusb-creator/browser/liveusb/releases.py but the packages included in Fedora 13 didn’t include this updated file. I’ve submitted the information to the maintainer, the fixed package should come soon.

@+

——-

Update :

This bug is fixed there’s an update for Fedora 13 https://admin.fedoraproject.org/updates/liveusb-creator-3.9.2-1.fc13 and Fedora 12 https://admin.fedoraproject.org/updates/liveusb-creator-3.9.2-1.fc12

Forget about the workaround, you can just update to the lastest version of the package!

Fedora 13 – Evolution problem – Program terminated with signal 6, Aborted. or [abrt] crash in evolution-2.30.1-5.fc13: malloc_consolidate: Process /usr/bin/evolution was killed by signal 11 (SIGSEGV)

After the installation of Fedora13 finished on my laptop. I started to restore files, email accounts etc… Everything worked well untill I restored my evolution backup. Evolution was really unstable, I mean I was away from the keyboard and it was crashing. I was unable to read/write any email..

So I reported a bug on the redhat bugzilla using ABRT the tool in fedora, it detect when something crash and offer you to report the bug and send a backtrace here’s the bug report: https://bugzilla.redhat.com/show_bug.cgi?id=596916

So Evolution was crashing with message like this:

crash  in evolution-2.30.1-5.fc13: malloc_consolidate: Process  /usr/bin/evolution was killed by signal 11 (SIGSEGV)
or
Program terminated with signal 6, Aborted.

I’ve talked with folks from Fedora project and nobody seems to have big problem with Evolution. So I started to look what’s wrong with my install! First, I started evolution in a shell to see the output… Here’s the result I got:

[rpurcell@t61ig ~]$ evolution
(evolution:15208): e-data-server-DEBUG: Loading categories from "/home/rpurcell/.evolution/categories.xml"
(evolution:15208): e-data-server-DEBUG: Loaded 31 categories

Untill here Evolution work fine. And…

bbdb: Buddy list has changed since last sync.
bbdb: Synchronizing buddy list to contacts...
bbdb: Done syncing buddy list to contacts.
*** glibc detected *** evolution: corrupted double-linked list: 0x09c873a0 ***
======= Backtrace: =========
/lib/libc.so.6(+0x7511e1)[0xe851e1]
/lib/libc.so.6(+0x7539b3)[0xe879b3]
/lib/libglib-2.0.so.0(g_free+0x37)[0xd57ff7]
/usr/lib/evolution/2.30/plugins/liborg-gnome-evolution-bbdb.so(+0x454a)[0x2f5c54a]
/lib/libglib-2.0.so.0(g_list_foreach+0x27)[0xd4cc17]
/usr/lib/evolution/2.30/plugins/liborg-gnome-evolution-bbdb.so(+0x4724)[0x2f5c724]
/usr/lib/evolution/2.30/plugins/liborg-gnome-evolution-bbdb.so(+0x4a30)[0x2f5ca30]
/lib/libglib-2.0.so.0(+0x944210)[0xd7a210]
/lib/libpthread.so.0[0x876919]
/lib/libc.so.6(clone+0x5e)[0xef3e5e]

[…]

I’ve cut some text.. But the important part is that once evolution start to sync the buddy list contact, it crashed.. So I removed the option from the preference menu => Mail preferences => Synchronize contact info and images from Pidgin buddy lists.

And voila! No more crash, Evolution is rock stable…

So if you have the same problem with your evolution on Fedora13, and this option is activated, disable this!! And if this fix your problem please post it on the bug report!

@++

Fedora 13 – Goddard Release

Voila!

We was waiting for this new release and now the wait is over! Here’s the link to the release note: https://fedoraproject.org/wiki/F13_one_page_release_notes

Here’s are few link to download the release:

Fedora 13 – i686 Live CD – Desktop edition

Fedora 13 – 32 bit DVD

Fedora 13 – 64 bit DVD

Different spins:

Fedora 13 Other desktop spins; KDE, XFCE, LXDE

Different Fedora “spins” on spins.fedoraproject.org

If you want to know more about Fedora spins start here: http://spins.fedoraproject.org/about

Enjoy!! :)

Fedora Cheat Cube

I just found this “Cheat Cube” created by the Fedora marketing team. Thanks to Planet Fedora and especially to Juan Rodriguez who post it ;) You can find it in English, Español and Russian on the Marketting page of the Fedora wiki.

This was intended to be distributed in fedora event, but you can print it for you or for someone else who’s new with Linux and they will have a small, cute and easy to find Cheat sheet!

Howto: Sar and Ksar ( Part two )

This is the part two of my test with sar and ksar. I tested the remote feature in ksar. In short, you use ksar to execute the same command that got executed just before midnight in the second post, in other words, the daily summary.

Having spare time tonight, here’s few screenshot..

Ksar remote connection

Click on: Data => “Launch SSH Command”

Enter the login information: user@ip-address, and click on yes.

You can click on yes here.

After you are asked to enter the SAR command. The default will be good. Click on Yes.

After that you can see the classic view, the same on we’ve got when we loaded text files.

I’d like to show you another sweet things with ksar. You can open few windows within ksar and arrange them, so you can compare your server stats. Open more than one window ( click on file => New window  ) and then click on Window => Tile

That’s it! It not harder than loading a local text file.. I’ll post a third post on Sar and kSar this week for people who would like to get a multiple day report.

Thanks for reading!

++

Error: inconsistent raid set nvidia_djfaedbj

Today I was installing a fresh fedora 12 x64 on a computer having a msi k9n platinum as a motherboard.

First I had to disable apic and acpi, otherwise I was getting a “ht msi mapping”  error and the boot stopped there but sometimes the system was booting fine..

After “fixing” this issue, I was able to enter the Anaconda installer. Everything went fine untill the disk partitioning. Anaconda was unable to see the drive, but my test on the console (hitting ctrl+alt F2) and typing # fdisk -l  I was able to see my drive.. So the system was able to see it, but anaconda was unable. After looking at logs I found few error about the nvidia raid.

inconsistent raid set nvidia_djfaedbj

Bizzar… Can’t find anything on google regarding this error.. The motherboard have Raid support, but it’s disabled. After few minutes I finally enabled the raid, and then I was able to enter the RAID configuration screen.. Then I saw there was a FAILED RAID. This computer is for testing.. someone pick a a hard disk. I deleted the raid..

After a reboot, everything was fine.. It looks like Anaconda was able to read the raid information, even if the raid was disabled in the bios…

This post could be more helpful with all the error but I was in a hurry to test something and I was unable to store the exact error and document it.. I hope this can help someone!

@+