g-octave 0.3 was released today and come with some cool features:
The announcement is here:
http://article.gmane.org/gmane.linux.gentoo.science/1339
Please test it and share your thoughts with us :)
Thanks!
All important modules are ported. Some need a few tweaks but generally Dracut provides the same functionality Genkernel initramfs generator does.
Here's summary (new things are bold):
Module Status Required pkgs 00dash OK app-shells/dash 01fips FIXED¹ app-crypt/hmaccalc 10redhat-i18n FIXED: 10i18n 10i18n NEW 10rpmversion OK 40network OK >=dhcp-4.0Moreover I've refectored the ebuild, added new USE flags and updated dependencies. There's just kernel config check left. Ebuild works with my repo. When new version of Dracut will be released (with things I've submitted) just small details will have to be changed.
Now I'm switching to Genkernel integration.
References:
Hi folks,
here is my weekly report #7.
GSoC report: g-Octave (Improve Octave/Matlab support) July 6That's all for now.
Since my original post from two years ago didn’t reach yet all the users, and some of the developers as well, I would like to reiterate that you should not be enabling ccache unconditionally.
It seems like our own (Gentoo’s) documentation is still reporting that using ccache makes build “10 to 5 times faster”. I’ll call this statement for what it is: bullshit. The rebuild of the same package might have such a hit, but not the normal emerge process of a standard user with Gentoo. If anything at all, the use of ccache will slow your build down, and even add further failure cases and make it difficult to identify errors.
Now, since the approach last time might not have been clear enough, let me try a different one, by describing the steps it takes when you call it:
Now, we can identify three main time-consuming operations: preprocessing, hashing and copying; all of them are executed whether this is a hit or a miss; if it’s a miss you add to that the actual build. How do they fare about the kind of resources used? Hashing, just like compiling, is a CPU-intensive operation; preprocessing is mixed (you got to read the header files from around the disk); copying is I/O-intensive. Given that nowadays most systems have multiple CPU and find themselves slowing down on I/O (the tinderbox taught me that the hard way), the copying of files around is going to slow down the build quite a bit. Even more so when the hit-to-miss ration is high. The tinderbox, when rebuilding the same failing packages over and over again (before I started masking the packages that failed at any given time), had a 40% hit-to-miss ratio and was slowed down by using ccache.
Now, as I already wrote, there is no reason to expect that the same exact code is going to be rebuilt so often on a normal Gentoo system… even if minor updates to the same package were to share most of the source code (without touching the internal header files), for ccache to work you’d have to leave untouched compiler, flags, and all the headers of all the dependent libraries… and this often includes the system header files from linux-headers. And even if all these conditions were to hold true, you’d have to have rebuilt object files for a total size smaller than the cache size, in-between, or the objects would have had expired. If you think that 2GB is a lot, think again, if you were to use -ggdb especially.
Okay now there are some cases where you might care about ccache because you are rebuilding the same package; that includes patch-testing and live ebuilds. In these cases you should not simply set FEATURES=ccache, but you can instead make use of the per-package environment files. You can then choose two options: you can do what Portage does (setting PATH so that the ccache wrappers are found before the compilers themselves) or you can simply re-set the CC variable, such as export CC="ccache gcc". Just set it in /etc/portage/env/$CATEGORY/$PN and you’re done.
Now it would be nice if our terrific Documentation team – instead of deciding once again (the last time was with respect to alsa-drivers) that they know better what the developers should support – would understand that stating in the handbook that ccache somehow magically makes normal updates “5 to 10 times faster” is foolish and should be avoided. Unfortunately upon my request the answer hasn’t been what you’d expect from logic.
Comprookie clones a failing hard drive. Meet the new Gentoo Council members.
LINKS:
http://www.gentoo.org/proj/en/council/
GParted Live
http://gparted.sourceforge.net/livecd.php
Clonezilla
http://clonezilla.org/
Podcast Headphones
http://linuxcrazy.com/downloads/headphones.jpg
Download
Today, I am gonna rant a little bit wrt the QA status of many packages residing in Gentoo portage tree. Few of my fellow colleagues think that all that matters is the # of ebuilds in our portage tree. Adding more and more ebuilds in our tree is a good way to prove that Gentoo is an active and cutting-edge distro. Sorry, but you failed :-)
Looking through our QA bugs[1] it looks pretty obvious ( at least to me ) that the ebuild QA level has lower priority than it should be. The most common bugs are
Whilst I do understand that it is not possible to always spot these type of QA errors, this looks quite bad to the rest of the community. Honestly I would prefer a much lower ebuild number on portage but with QA level than having broken ebuilds everywhere just to claim that “Gentoo has the latest version of each package” available.
The lack of manpower problem is more than obvious, so do not be afraid to ask help from our user community. Let them become proxy-maintainers[2] for the packages that you have little or no interest in maintain them anymore. Teach some of them to write proper ebuilds and/or bring them to developer family by mentoring them. Furthermore, if you do not care for a package anymore, just say it out loud and let somebody else maintain it :)
[1]: QA bugs
[2]: proxy-maintainer
Without further ado… the change log:
MPlayer just very recently got support for playback of unencrypted Blu-Ray discs using libbluray. (Thanks to all the devs and testers! ) Apparently development for the library is being hosted on VLC's git servers now, something I had no idea about. I thought the project was dead upstream.
I'm adding an ebuild for libbluray to the gentoo multimedia overlay if someone wants to access it. It's something I plan on pushing into the mainline tree soon enough, once it's properly finished.
If you are building MPlayer from SVN, it will automatically detect the new library, and build against it. You can use the -9999 ebuild in the portage tree.
To playback some of your Blu-Ray content, you will first need to extract it to your harddrive. I use MakeMKV, also in the multimedia overlay, to accomplish that.
Here's a simple way using the CLI to dump the contents:
$ makemkvcon backup --decrypt disc:/mnt/bluray/ <location to dump content>
The syntax for playback is:
$ mplayer br:// -bluray-device <path to dumped content>
By default, it will play the longest playlist (I think). If you can get the list of playlists available, you can pass that as an optional parameter to br:// (fex: list_titles /home/steve/bluray/src; mplayer br://5 -bluray-device /home/steve/bluray/src).
libbluray also ships with a few example programs that do basic stuff like listing the titles (list_titles), dumping information about the playlists (mpls_dump), and a few more (sound_dump, index_dump, mobj_dump, libbluray_test, bdsplice, clpi_dump).
Have fun with it.
Simplified, Layman’s main job is to make calls to version control utilities. A larger portion of that invocation code has been rewritten: no more os.system(), no more shell interpretation in between. Here’s the change log since 1.3.4:
Please report bugs for it. Thank you!
Last two weeks were crazy at university. Now I shall have time to work on gpypi2 full-time until the end of program.
Install gpypi2 $ sudo pip install http://bitbucket.org/iElectric/g-pypi2/get/tip.zip or $ sudo easy_install http://bitbucket.org/iElectric/g-pypi2/get/tip.zip Create an ebuild $ sudo gpypi2 create flask * Generating ebuild: Flask 0.4 * Your ebuild is here: /usr/local/portage/dev-python/flask/flask-0.4.ebuild * Dependency needed: Werkzeug * Dependency needed: Jinja2 * Generating ebuild: Werkzeug 0.6.2 * Your ebuild is here: /usr/local/portage/dev-python/werkzeug/werkzeug-0.6.2.ebuild * Generating ebuild: Jinja2 2.5 * Your ebuild is here: /usr/local/portage/dev-python/jinja2/jinja2-2.5.ebuild * Dependency needed: Babel * Generating ebuild: Babel 0.9.5 * Your ebuild is here: /usr/local/portage/dev-python/babel/babel-0.9.5.ebuild NOTE: ebuilds will probably not function yet, features are yet to be completed/added. Report bugs to issue tracker. Previous week (21st June - 5th July) Task: Use SrcUriNamer gpypi2.enamer.SrcUriNamer is awaiting for quite 2 weeks now to be finally used. It's basically factory that generates SRC_URI and HOMEPAGE according to mirror provider. A lot of additional refactoring will be needed to Enamer to use this utility instead of current guessing/parsing. Not done. With Jesus we decided to postpone this for one of the last tasks, since it's not that big benefit to gpypi2 and there are more important details to be implemented. It's also a big blocker for good unittest coverage, but that shall be sorted out. Task: Fix bugs reported by users Lot of bugs are going to pop up; fix bugs, write tests and add documentation. None reported :( Task: Increase test coverage I'm still not satisfied with test coverage. I'll try to increase it a bit more. It's 10 days week of exams on my university, soon I will be able to put in more effort in implementing features. Unittest coverage is about 75%. Won't get further than that until SrcUriNamer is properly implemented and tested. Few additional tests can be made at PortageUtils, but that's a minor issue.Here is a rundown of additional changes to code:
Most of modules are checked. Some of them needed fixes, some only needed dependency updates in ebuild. Checking involved going through install and check scripts which operate on host system, analyzing if result image looks as expected, running test if available. Sometimes problems are more or less deeply hidden. I had some with networking. Stable and ~arch dhclient gets DHCP info but doesn't assign address to interface (at least under qemu). Moreover Dracut relies on dhcp-4 and invocations are quite hardcoded. To make it work well I had to use hardmasked dhcp-4 package. I also spent quite much time (and wonder if it's not completely wasted time…) debugging fips module. Probably found the reason. Dracut installs binaries with its library dependencies. Needed sha512hmac depends on libnspr4.so.8 (ldd says so), but in fact, as strace says, it searches only for libnspr4.so (on host system there's symlink libnspr4.so → libnspr4.so.8). Dracut relies on ldd output and doesn't create reverse symlinks, so we have to enhance inst_binary function… but anyway it's strange case, especially as it has never occurred before.
Shortly and clearly. Here's what's done (new things are bolded):
Module Status Required pkgs 00dash OK app-shells/dash 01fips SMALL PROBLEMS app-crypt/hmaccalc 10redhat-i18n FIXED: 10i18n 10i18n NEW 10rpmversion OK 40network OK >=dhcp-4.0 sys-apps/iproute2There are some modules left and I'm working on them:
Somehow checked and rather working:
Moreover I've updated Ramereth's Dracut ebuild to release 006 and he's going to put it into portage tree today. There's also ebuild using my git repo in my git repo at branch gentoo in gentoo directory. :-)
References:
Hi folks,
here is my weekly report #6.
GSoC report: g-Octave (Improve Octave/Matlab support) June 30That's all for now.
If you want to find out which capabilities a binary needs, you have several options:
The first method is quite simple, but you have to deduct the caps from the error messages, which can be a bit difficult.
The second method is more convenient and simple, so I’m going to describe this method further.
capable_probe is a loadable kernel module developed by Serge Hallyn [0]. It uses the kprobe kernel mechanism [1] to insert a Jprobe. And what does it do exactly?
When this kernel module is inserted, any calls to cap_capable() are replaced by a call to the cr_capable() function. This function prints the name of the program that requires capabilities and the capability being checked. It then continues executing the actual cap_capable() call through the call to jprobe_return(). [0]
The signature of cr_capable has to be the same as the signature of cap_capable. The signature changed from
int cap_capable (struct task_struct *tsk, int cap)
to
int cr_capable (struct task_struct *tsk, const struct cred *cred, int cap, int audit).
So to get capable_probe to work you need to change the signature or use the one from my repository [2].
There is a good README by Chris Friedhoff [3], which describes how to install and use it.
Important: Don’t forget to unload capable_probe after you determined the caps, as it will spam your /var/log/messages extremely.
To see capable_probe in action here is how to determine the caps for passwd:
/* Override all DAC access, including ACL execute access if
[_POSIX_ACL] is defined. Excluding DAC access covered by
CAP_LINUX_IMMUTABLE. */
#define CAP_DAC_OVERRIDE 1
/* Overrides all DAC restrictions regarding read and search on files
and directories, including ACL restrictions if [_POSIX_ACL] is
defined. Excluding DAC access covered by CAP_LINUX_IMMUTABLE. */
#define CAP_DAC_READ_SEARCH 2
...
/* Override resource limits. Set resource limits. */
/* Override quota limits. */
/* Override reserved space on ext2 filesystem */
/* Modify data journaling mode on ext3 filesystem (uses journaling
resources) */
/* NOTE: ext2 honors fsuid when checking for resource overrides, so
you can override using fsuid too */
/* Override size restrictions on IPC message queues */
/* Allow more than 64hz interrupts from the real-time clock */
/* Override max number of consoles on console allocation */
/* Override max number of keymaps */
#define CAP_SYS_RESOURCE 24
This example is a little more complicated than the standard ping-example, but I wanted to do a different one. Hope that helps :).
[0] http://www.ibm.com/developerworks/library/l-posixcap.html
[1] You need CONFIG_KPROBES=y in your kernel
[2] http://github.com/constanze/GSoC2010_Gentoo_Capabilities/tree/master/capable_probe/
[3] http://www.friedhoff.org/posixfilecaps.html
A couple months ago, Facebook announced announced that their chat system would also be available through XMPP. So it is possible to just configure it like any other Jabber server on a N900. And then to merge Facebook contacts with other contacts and it the address book will store it as a field of type « X-JABBER ». Since the PR1.2 version of Maemo5, Nokia has added a specific profile for Facebook to the N900 software. But instead of calling the address book field « X-JABBER », they created a « X-FACEBOOK » field (since Facebook Chat is not XMPP in the backend, it can not talk to other Jabber servers). So if you remove your old Jabber account and re-add it as a Facebook account and use Marco’s contact merger to merge back the contacts. You’re still stuck with a bunch of extra « X-JABBER » fields in your contacts. So to clean them up, I wrote a really simple program to remove them. It is based on Marco’s jid-to-email program. You can get the source code or a precompiled binary. You can just put the binary on your N900 and run it from the Terminal as « ~/MyDocs/remove-old-facebook » (if you put it in the N900’s documents root). Be warned that is is not a good example like Marco’s code, I stripped all error handling and it never frees anything. If you want a good example, look at Marco’s code.
I have to thank Arfrerver for making me notice this with the bug about Ruby 1.9 he reported.
The GNU project released autoconf 2.66 two days ago. Very few notable changes are present in it, just like a few were listed before, so I didn’t go out of my way to test it beforehand. My bad! Indeed there is one big nasty change with it for which I’d say to all of you to put off the update until I write it so. Hopefully it won’t get unmasked in Gentoo for a while either.
There are two main problems with this release; the first is due to the implementation of a stricter macro to ensure the parameters given to it is not variable over executions:
well, whatever the idea about this was, it seems to have broken the AC_CHECK_SIZEOF macro: if you pass it [void*] as parameter, it’ll report it not being a literal (while it is) causing the following error:
flame@yamato test % cat configure.ac AC_INIT([foo], [0]) AC_CHECK_SIZEOF([void*]) AC_OUTPUT flame@yamato test % autoconf configure.ac:3: error: AC_CHECK_SIZEOF: requires literal arguments ../../lib/autoconf/types.m4:765: AC_CHECK_SIZEOF is expanded from... configure.ac:3: the top level autom4te-2.66: /usr/bin/m4 failed with exit status: 1This would be bad enough. But the nastier surprise I got when running autoreconf over the feng sources, the build system of which I wrote myself, and if I may say so, is very well engineered:
flame@yamato feng % autoreconf -fis configure:6275: error: possibly undefined macro: AS_MESSAGE_LOG_FDdnl If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf-2.66: /usr/bin/autoconf-2.66 failed with exit status: 1The problem here is almost obvious, and it’s related to the dnl entry at end of the macro name; the dnl keyword is used as (advanced) comment delimiter in autoconf scripts, meaning “Discard up to New Line” and is often used to keep on multiple lines commands that should be kept togever, like \ is in many languages. A quick check at the configure files brings in this:
as_fn_error $? "Package requirements (glib-2.0 >= 2.16 gthread-2.0) were not met: $GLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLIB_CFLAGS and GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" AS_MESSAGE_LOG_FDdnlYou can easily see that the problem here is with the pkg-config macros (pkg.m4). Funnily enough there is no change related to the errors reporting that is listed in the autoconf news file so I wasn’t expecting this. The problem is further down the path of pkg-config files but it’s not important to fully debug it right now, it’s actually quite easy to fix, in pkg-config itself, but here’s the catch.
Since the pkg.m4 macro file is way too often bundled with the upstream packaging, and its presence overrides the copy from the system, even fixing pkg-config will not fix all the software that carries outdated copies of the macro file.
This is almost the same problem with libtool 1 vs libtool 2 macro files with the difference that this is going to be much much more common. If you’re a package maintainer, you can do something already before this even hits the users: remove the pkg.m4 file during the src_prepare() phase; you’re already depending on pkg-config in the ebuild for it to work at build-time, and since we don’t split the macro file from the command itself, you can simply rely on its presence on the system.
In the mean time, I’m not sure if I want to start testing with it just yet or if we should be waiting for 2.67…
In spite of my exams-period beginning next week, I managed to do something useful for GSoC :).
What did I do this week:
In order to do some better testing I wanted to patch some ebuilds, as I said last week. The question there is, how do you find out which caps the file needs to function? I consulted Friedhoffs page [0] again and downloaded capable_probe. This neat loadable kernel module detects when a program asks for caps and prints it in /var/log/messages. All you need is CONFIG_KPROBES=y in your kernel.
I tried it out and unfortunately it didn’t work. I remembered vaguely, that the caps-format had been changed recently, but I was busy with learning so I didn’t bother to look for the problem (but I came back later :)).
Friedhoff has some example caps-sets on his page and there are also some on [1], so I used these and patched shadow, pam and util-linux.
The patched binaries are:
After testing them, all worked except umount. So to investigate what was missing I turned back to capable_probe. After a bit of digging through kernel docs and sources, the problem was quite clear: The signature of cap_capable had changed (the method which was used to place the Jprobe-hook on). After adapting the signature it worked!
Using capable_probe I detected that umount was asking for CAP_CHOWN, which was not in its set. Because umount failed when trying to move mtab.tmp back to mtab, it seemed reasonable, that CAP_CHOWN could help. And it did :).
All in all I’m very happy today and will write a separate post on capable_probe. I added the patched version to my git-repo [2].
I would be even happier :D if someone would try my patched ebuilds and tell me if all is okay or if there is something missing.
[0] http://www.friedhoff.org/posixfilecaps.html
[1] http://wiki.archlinux.org/index.php/Using_File_Capabilities_Instead_Of_Setuid
[2] http://github.com/constanze/GSoC2010_Gentoo_Capabilities/tree/master/capable_probe/