As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label Gentoo. Show all posts

I first knew Firefox's special release ESR (Extended Support Release) via an error during system update, which is intentionally for being used in mass deployment of organizations. A few days ago, Blogger dashboard display this message:

Your browser is no longer supported by Blogger. Some parts of Blogger will not work and you may experience problems.
If you are having problems, try Google Chrome. | Dismiss

Aside: I really don't like Google has been prompting Chrome more and more whenever it has a chance, though I can't really blame it since Chrome is its own product.


At first, I believed it's a mistake because I didn't think ESR was out-of-date. But after reading about ESR's proposal, I realized that the releases of ESR weren't what I thought. Originally, I thought their functionality somewhat matches normal releases, but they don't. Every point release (##.0.x) matches the version number of normal release, e.g. Firefox 15 for Firefox ESR 10.0.5, 16 for ESR 10.0.6. There has nothing to do with normal release except the release time. So, Firefox ESR 10.0.x is based on Firefox 10, that means Firefox ESR 10.0.x has only Firefox 10 functionality.

On Gentoo, the latest stable version of Firefox (both source and binary) is Firefox ESR 10, the unstable version is Firefox 13, which is the currently official stable version of Firefox.

If I want to get rid of that message, I can use Google Chrome (from official binary package) or I can upgrade to Firefox 13. But I don't use Chrome and don't like unstable packages.

The message is not annoying to me, just don't exactly know what functionality will not work properly. Since I haven't encountered any problems, I guess I will just live with that message for now.

Keep Calm and Sync Again Wallpaper Dark   Keep Calm and Sync Again Poster Dark

Keep Calm and Sync Again Wallpaper   Keep Calm and Sync Again Poster

Keep Calm and Sync Again Wallpaper Gradient   Keep Calm and Sync Again Poster Gradient

You know what it is, you can download the images on Bitbucket. I didnt notice how bad looking that gradient in wallpaper form is, the poster with gradient looks fine. Dont know why I made these wallpapers and posters, even I dont use wallpaper and have no artistic genes. Last time, I made sketch-like wallpapers. I love embarrassing myself.

I saw there was a Google+ post via a post on Arch Linux forums, someone made a wallpaper for Ubuntu, which reads:

KEEP CALM AND RUN ubuntu.

I feel its lack of something, directly saying RUN ubuntu seems a bit of too tasteless or plain. Things like making a parody of Keep Calm and Carry On, you need to enrich it or spice it up if you will.

You must have a twist or a point makes viewer think before they get the idea, or it can easily be read as a joke. But RUN ubuntu is nothing like those.

I thought about what I would write for Gentoo Linux, then I made these. SYNC AGAIN doesnt mean something bad about Gentoo, hope you dont misinterpret it. If you are not a Gentoo user, then you probably dont even know what SYNC means here, its like updating your binary-base package managers database.

Still dont get it, go download Gentoo and try it out! Who would know? Maybe you will fall for the Magical Mighty Purple Power!

(I think I just coined something, MMPP, M2P2, M2P2, double-M-double-P, dMdP, DMDP)

I still can't believe it's been three years when I checked the date of installation of my Gentoo, I thought it was only two years. Time flies by fast, I guess. During this period, Gentoo hardly had disappointed me and it was never broken by updating. By broken, it means system doesn't get unbootable or something oopsie which needs some special hacks in order to fix. It works nicely for me.

It's no argue from me that Gentoo isn't suitable for everyone, especially people who don't RTFM and/or STFW, or update system in regular basis. Gentoo requires your attention, but that is same for all systems in my opinion.

From time to time, there are some posts about leaving Gentoo or suggesting it is dying. A leave is really up to the user, when he or she feels it is not the distribution they like, then that's what it is. I never got to understand what those leaving posts were for. If you want to leave, then just do it, why do you show up and mumble things without much constructive effect added to community? It's not like you would be able to give more feedback sine you were not be using Gentoo anymore.

Furthermore, if you've used Gentoo for a year and you want to leave, I don't think it's wise unless you don't actually use or utilize it well. Flexibility of merging is one major attraction from it, you can't find such thing on binary-based distribution. Only thing you need to pay is the compilation time. I don't agree that would be really an issue if you are already a one-year user. The fact is merging doesn't really take long time, you can't argue that compilation time takes a lot of your time. Nowadays, 1 CPU has multiple core, you only need to spare one core for compilation. Computer is old? My laptop is more than five years old, long compilation time is just for an excuse and nothing more from it.

As you may have heard about USE flag, it's the main reason of why I like Gentoo. If you have compiled from source tarball on you own and have checked out the build script of the source, you would know there usually are some switches to enable/disable features, which would be regarding the dependency you will need to compile the source. Generally, a well-written ebuild will pass those switches to Gentoo users as USE flags. That is not something binary-based distribution can give you.

Stability is another point, but this vary with the environment and packages you merge. I dare to say as long as you use stable packages, i.e. no ~arch, your system should be 99% stable. 0.5% unstable is the bugs, another 0.5% is your stupidity. (these numbers are just from my feelings)

This brings up the question: Do you really need up-to-date version?

To be honest, the stable packages in Portage tree isn't so out of date. They get updated very often certainly for common packages and almost immediately after a significant security hole being exposed and upstream has a quick fix.

If you really need to use latest version, then ~arch on the package or use those definitely-straight-out-source-repository 9999 ebuilds. From my experiences, I rarely needed to use latest version, simply because you don't even know what latest version has provided features which don't exist in previous version. Latest version is just for feeding your ego, not your actual need.

As I learn more and more about Gentoo, I have my own way to do the update and I stick with it, never got myself into troubles. One thing very important for Gentoo users about maintenance is to update in regular basis, I would say at least once a month, weekly is the best in my opinion.

If you think using Gentoo can make you learn more about a package or Linux, well, I don't think that's entirely true. For configuration file (RC), it's just as same as other distribution, RC files are processed by the programs, not Gentoo. It's hardly for you to learn from Gentoo instead of from manpage or some documentation. You still need to read documentations if you read other distributions. What distribution you use isn't very important for learning a package. The important factor of leaning Linux is you, not the distribution.

And Gentoo actually has some custom programs or scripts in order to help some packages run smoothly, e.g. multi-slots, webapp setups, Bash completion files, font-config, etc. You actually don't need to touch some configuration files, just run the helper and press 1 or 2 or 3 or whatever the option is numbered with.

Nevertheless, you still have chance to learn a little when you first install Gentoo. But you have Gentoo documentation to help you out, you only need to read once and do once. At least, I only did once because I have never broken my Gentoo, never had a chance to do the second time.

The fact in it is that it's not much difference from other distributions, they just have some fancy GUI or TUI to help with those. Some basically are still configuration files, and you can edit with text editor. If you really want to learn, then do it from source tarball, that's how you learn things the most.

For a Gentoo newbie, the biggest obstacle is actually configuring kernel in my opinion if you don't want to use default/safe settings. There are like a million options to choose in kernel. But once you successfully compile your first working kernel, you wouldn't have anymore problem. And you will and can do it at once as long as your RTFM, which is the famous Gentoo handbook.

I haven't checked newly added option in newer versions of kernel for very long time. Every time, a new version is marked stable, I just copied the old configuration to newer kernel and compiled it. It has too many new stuff, so I stopped checking out the new options and just went straight to compile with old configuration file. So, that 0.5% comes from this kind of behavior, user's stupidity. But it only counts when things is broken due to this kind of laziness.

As of dying of Gentoo, I would say that's unlikely. You can't find one like it, that's unique, which means market that others can't take from it. It owns a portion and that always is there, even thought it's just a small portion.

What actually would die is a derivation of a distribution without uniqueness. They come and disappear. For long life of a derivation, you just can't cut it with only some fancy default background or pre-selected packages. Fundamentally, it's still the same as the original.

Three years, I've learned a lot more about Linux. Even though it's not directly about Gentoo, but it was with me and will still be for many years. I can tell you this, Gentoo is getting better and it's already awesome.

Wanna try Gentoo? Do you read?

I made a login issue file from my Gentoo logo sketch which I created almost two years ago. I converted the image to ASCII using libcaca. I probably wont use this, but someone may want to.

http://1.bp.blogspot.com/-l9_xPuhhwrs/T4IXEk4t17I/AAAAAAAADN8/hfPWzD4di5g/s1600/2012-04-09--06:53:40.png

(Standing far away from the monitor)

Two years ago, when I posted about this, I didnt license it. Today, I found out the original images I uploaded to imgur were gone. Sigh, just another bad image hosting service. I thought it was a good one and would last forever, but it was just the same.

Luckily, I still have original image files and source. I created the repository and licensed the work under the CC-BY-SA/3.0 Unported. The files should last, even it doesnt I can just push the repository to other place.

There are few different approaches for displaying a message to user around the logging screen, /etc/issue (prelogin message and identification file), /etc/motd (message of the day), or the fortune files, and probably more. If you use Graphical Login interface (Display Manager), those will not work for you, your system may go into X window environment before you can even catch a glimpse of issue.

I use Console Display Manager (CDM), the issue file works better for me among those options and I already have it showing gentoo in purple text for almost three years since I started using Gentoo.

I wanted to make it more interesting, seeing the same purple text everyday had got me bored. Need to spice it up! Dont you think? This is what I have now:

http://2.bp.blogspot.com/-oBtPxQQMJWk/T4FWHIz4nfI/AAAAAAAADNM/SeQDlDUCSY0/s1600/2012-04-08--06:20:42.png

Gotta hear something Thats What She Said from TWSS.

The code is not so complicated, basically a one-liner:

cat /etc/issue.logo \
    <(echo -e '\e[1;34m') \
    <(xmllint --xpath '//item[1]/description/text()' <(wget -q -O - http://www.twssstories.com/rss.xml) |
      sed 's/&lt;\/\?p&gt;//g;q' |
      fold -s) \
    <(echo -e '\e[0m') \
    /etc/issue.orig \
    > /etc/issue

I use xmllint to extract text of the first description node, remove unwanted escaped HTML tag, wordwrap the text, then produce the file with color code and the purple text.

Generally, I only log in once a day, so I put this script to daily system cron job since I will only see this one-time everyday. Besides, TWSS doesnt have many entries a day, not even one a day.

Originally, I wasnt planning using TWSS but xkcd comics. Hoping img2txt of libcaca can magically output good ASCII from image, but thats just impossible with only 80 characters in width. I am thinking if you have framebuffer, then it might have a chance with rendering of the image.

TWSS is the first source for the text, I am planning to include more sources, randomly pick one, something like quotes or some ASCII-art. As long as websites provide API or RSS feed, I will try to add to my issue file generation script.

There is an interesting post on Arch Linux about Unixness. It is intended to measure the degree of Unixness. The short version of explanation of Unixness is if there are more smaller executables in all executables, then the Unixness is a larger number.

A larger number is better (more smaller executables) by the OPs definition. For which, I cant agree or disagree. I would say its still depending on users behaviors and comfortableness for the programs, users normally do pay attention to the filesizes of executables they use.

Anyway, its fun and I am inspired to create the Gentoo USEness. It has similar way to measure the number of enabled USE flags. The less enabled, the higher number. You can not definitely say more enabled is worse or better, because it depends on what users need. The number only indicates the degree of USE flags enabled.

Beside the USEness, I also put in some numbers. This is the output on my system:

USE flags in total = 2707
The Gentoo USEness = 3.49927

Installed Packages = 826
Unstable  Packages = 3
Unstableness       = 0.363196%
Upgradab' Packages = 78
Upgradableness     = 9.443099%
Obsolete  Packages = 52
Obsoleteness       = 6.295400%

Again, this is just for fun, feel free to improve this. Also my Unixness is 7.87855.

This is a good example why that's good idea to check bug reports or forums before emerge/upgrade big package (long build time or long list of upgrading dependencies).

I had been holding up on libreoffice since version 3.3.4, the next stable version 3.4.x which I masked because it has long dependencies list which was required by 3.3.4. But yesterday, I decided to upgrade libreoffice to 3.4.5.2 even the dependencies list is still long.

Almost 20 packages were new installs on my system and I have to have CUPS and gstreamer and all other sorts I don't use. Merging from the source is too overwhelming for me. The last version I built was openoffice-3.0.0, 3 hours, 30 minutes and 12 seconds.

After finished, I did not run it right away and I just knew it has a bug report (and a thread) which you will see this error message:
~ $ loffice 
/usr/bin/loffice: line 2: 29884 Illegal instruction     /usr/lib64/libreoffice/program/soffice "$@"

Apparently, it only affects AMD64 arch and I am using that.

For now, I am uncommenting this line in /etc/portage/packages.mask:
=app-office/libreoffice-bin-3.4.5.2

and re-emerging for downgrading. Shouldn't have commented out that line. ;)

I am doing my weekly system update, GCC is being pulled in by revdep-rebuild for dev-libs/gmp. I forgot to supply the quiet flag and I have no idea how many are pulled. Didn't pay much attention but I do know two slots of GCC I have both are pulled, and I know GCC takes time to compile. But I really need to know when the emerge began.

So I use qlop and genlop because I still remember they both have such option, just didn't have chance to utilize them.


genlop gives a nice ETA as it can already give you an estimation of emerge time if you pipe the emerge's output to it.

10 more minutes to go... for 4.4.5, still have 4.3.x to be emerged. That would probably be another hour.

I recently found out I could use qlop -gH package or qlop -tH package to get merge time:

http://farm2.static.flickr.com/1010/5190755414_3fef86bebf.jpg

But it doesnt have an option to list packages merged in a session. So I wrote one to parse /var/log/emerge.log on its own, last-merge-time.sh:

http://farm2.static.flickr.com/1039/5190755456_e4530fd6a5.jpg

I tried to mimic the result format.

The merge time calculation is different than qlop, you might see difference in a few seconds. The script uses sed to filter unwanted merge log and keeps the last merge, then uses awk to format the output. You probably noticed that interrupted in the screenshot1 above, its a result of user interruption (pressing Ctrl+C) while merging. The timestamp is the start time, not the end time of merging as shown by qlop, I am just too lazy to change my code.

Of course, there is also the last sync time.

[1]The screenshot shows the result by feeding the script with hand-modified raw log.

Since I started to use eix-sync for Portage tree synchronization. I always found annoyed when eix-sync runs with emerge --sync, I used to run emerge --sync -q. I really dont need to see a long list of directories.

At first, I didnt find the solution and I still have no idea why I missed these from eix-sync -h:

-c CMD Run CMD instead of emerge --sync.
-C OPT Add OPT to the emerge --sync command (or whatever is used instead). This option can be used accumulatively.

So, the solution is clear:

eix-sync -C -q

If you need more options to be appended, run with -C '--foo --bar'. If you need to run emerge without --sync, use -c '--whatever'.

If you are lazy like me, add the following line to ~/etc/eixrc:

EIX_SYNC_OPTS="-C -q"

-C -q will be appended when you run eix-sync.

I am currently synchronize Portage tree with weekly basis. I used to show the timestamp (/usr/portage/metadata/timestamp.chk) directly in Conky and synchronize when its been more than 24 hours. I want to have a easy way to know if I should update. So, I wrote:

${color lightblue}Portage:$color ${execpi 600 thres=$((7*24*60*60));ts="$(cat /usr/portage/metadata/timestamp.chk)";dur=$(($(date +%s) - $(date -d "$ts" +%s)));((dur>=thres)) && echo $(date -d "$ts" +%F\ %T) || echo "\${execbar echo $((100*dur/thres))}"}

The command is:

thres=$((7*24*60*60))
ts="$(cat /usr/portage/metadata/timestamp.chk)"
dur=$(($(date +%s) - $(date -d "$ts" +%s)))
((dur>=thres))
  && echo $(date -d "$ts" +%F\ %T)
  || echo "\${execbar echo $((100*dur/thres))}"

It calculates the seconds since last update. If its been seven days, then it shows the time of last update, otherwise a conky execbar for showing how far away from seven days.

Gentoo is a source-based distribution. The main benefit of using Gentoo is you pick features of a software you need to compile if its configurable. Here is an example I just saw:

% emerge -pvuDNt world

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R   ] www-client/chromium-7.0.503.1  USE="sse2 -cups -gnome -gnome-keyring%" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

The developer just made GNOME Keyring dependency optional if you use gnome USE flag. That cups USE tag is an example, too. When Chromium just added printing support, they have made CUPS dependency necessary. It got fixed quite fast, in just a few days, Gentoo developer fixed it.

Note

I couldnt find an issue about it on Chromium issues, but it seems fixed in upstream because I dont see any patch in Portage tree.

Anyway, after CUPS, GNOME Keyring suddenly jumped out from nowhere. I already had GNOME Keyring on my system, but I didnt have CUPS. So, I let Chromium to compile with it, I didnt have a choice. Now, we have new USE flag.

If you are using any binary-based distribution, unless you try to build on your own or with some tools, your system is always with a bunch of stuff you dont need. And you never could have even a vague idea what have been made.

I still have some packages depends on GNOME Keyring, I should check them up again, some are optional, some might have no need to be on my system.

% equery d gnome-keyring
[ Searching for packages depending on gnome-keyring... ]
dev-vcs/subversion-1.6.12 (gnome-keyring? gnome-base/gnome-keyring)
gnome-base/gnome-mount-0.8-r1 (<gnome-base/gnome-keyring-2.29.4)
gnome-base/libgnome-keyring-2.30.1 (>=gnome-base/gnome-keyring-2.29)
net-libs/libsoup-gnome-2.28.2 (gnome-base/gnome-keyring)
sys-auth/pambase-20100310 (gnome-keyring? &gt;=gnome-base/gnome-keyring-2.20[pam])
www-client/chromium-7.0.503.1 (&gt;=gnome-base/gnome-keyring-2.28.2)
                              (gnome-keyring? &gt;=gnome-base/gnome-keyring-2.28.2)

A few hours ago, Gmail announced a new video and chat plugin for Linux users. I am a 64-bit user, pure one, there is no 32-bit library on my system. I wasnt going to try because 1) I am not into online IM chatting not to mention this voice and video chatting and 2) I dont believe that Google would release a 64-bit stuff.

But you know curiosity killed the cat, so I went to download, just to file to find out if they are 64-bit build or just 32-bit as my expectation. I ran

ar -x google-talkplugin_current_amd64.deb
tar xf data.tar.gz
cd opt/google/talkplugin

Now, its about to see the truth:

% file * */*
GoogleTalkPlugin:         ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
cron:                     directory
lib:                      directory
libnpgoogletalk64.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
libnpgtpo3dautoplugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
cron/google-talkplugin:   POSIX shell script text executable
lib/libCg.so:             ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
lib/libCgGL.so:           ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped</pre>

(Side note: you can see there is a cron, Google installs a cron job to update .deb package, so this plugin would never get outdated. I really can not agree with this automatic method. (I assume that its automatic, I didnt read that script))

I was shocked, twice! First shock was there did have 64-bit shared library and the second shock was why the hell this GoogleTalkPlugin is a 32-bit build? I couldnt understand. As far as I know, the browser plugin uses shared library, so that 32-bit stuff shouldnt be a problem, it must be some kind of desktop manager for the plugin, its worth trying. (I was wrong. :()

So, I tried to install it:

chmod +x *.so lib/*.so
cp *.so ~/.mozilla/plugins/
sudo cp lib/* /usr/lib64/

I installed them in Mozillas (Firefoxs) plugin directory, so Chromium can also use it. After restarted browser, I got a good sign from Chromium and Firefox.

http://farm5.static.flickr.com/4078/4909533786_c24758bf5c_z.jpg
http://farm5.static.flickr.com/4075/4908936395_89c9ce9cef_z.jpg

So, I recompiled my kernel with required modules. Rebooted, got into Gmail in Chromium, went to setting. Nothing!? Switched to Firefox, still nothing.

Then, I ran Chromium from command-line, I got this log:

[000:017] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[000:022] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[000:022] Warning(optionsfile.cc:22): Load: Could not open file
[000:022] Warning(clientchannel.cc:553): Failed to get GoogleTalkPlugin path. Trying default.
[000:025] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin
[000:025] Waiting for GoogleTalkPlugin to start...
[001:098] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[001:099] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[001:099] Waiting for GoogleTalkPlugin to start...
[002:190] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[002:191] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[002:191] Waiting for GoogleTalkPlugin to start...

I could only say !#$%^, Google!

If your system is multilib, I think you have good chance to get it running, just move that 32-bit stuff to /opt/google/talkplugin/GoogleTalkPlugin.

Google, please re-build GoogleTalkPlugin for 64-bit! Pretty please?

I always run emerge -pvuD world to check updates, then sudo emerge -quD world to update my Gentoo. Sometimes, I would see packages showing up but I couldnt understand why they were pulled for update. Here is a case:

https://farm5.staticflickr.com/4138/4886199841_fdd3a34807_o.png

chromium package is no doubt that it needs to be updated since its in world (rendered in bold style). But for eventlog, you would not think its a dependency of Chromium; and for librsvg, its not one because itd be updated after Chromium.

So, why do they show up? After reading the man page, --tree (or -t) option would tell you the reason.

https://farm5.staticflickr.com/4117/4886199913_e2da2e382c_o.png

I can see clearly now.

Few days ago (2010-07-16), Arch Linux Forums started to redirect unencrypted connection to encrypted connection, in other words, it is now SSL connection only.

My current web browser is Chromium and it told me CAcert.org is not trusted, the certificate issuer that Arch Linux Forums uses. It only takes one click for a browsing session to get rid of that message. Before this, I sometimes stumbled upon Gentoo Bugs redirected via Gentoo Packages.

I am not actually a reader of Arch Linux Forums, but I read it regularly. So its time to get rid of it once for all.

Its fairly simple. Firstly, you need certutil tool from NSS package, if you dont have then add the following line to your /etc/portage/packages.use:

dev-libs/nss utils

Re-emerge NSS. Next step is to add the root certificate:

certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n cacert -i /etc/ssl/certs/cacert.org.pem

Then check if we add successfully with:

% certutil -d sql:$HOME/.pki/nssdb -L

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI

cacert                                                       C,,

Restart browser and say hello to that little green lock.

The steps are actually from this Chromium wiki page

Note that the root certificate /etc/ssl/certs/cacert.org.pem is a symbolic link to /usr/share/ca-certificates/cacert.org/cacert.org.crt, which is a file part of ca-certificates package and your Gentoo system should already have it because OpenSSL depends on it and openssl is unlikely not installed.

My Gentoo updated xinit and X to 1.2.0-r3 and 1.6.5 (I am not sure if the change were made in them, the changes should be made around after 2009-12-08), then XDM didn't bring up fluxbox but the twm.

Here is a related post on Gentoo Forums. In simple words, XSESSION in rc.conf won't be working anymore. You have to do this, in case of fluxbox, as root:
echo "XSESSION=fluxbox" > /etc/env.d/90xsession
env-update

Once you click on shutdown in xsm and login again, it should be working.

PS. I have to reboot, one of my monitors didn't work after turning on using xrandr but fluxbox does.