Improvement continues

Okay, no big deals today to report actually. I’ve fixed the baselayout ebuild that I forgot to recommit, so if you had lots of trouble after updating baselayout to the snapshot version, it should be fixed in tomorrow’s snapshot (or already if you’re a developer and you can use the SVN). I’ll also prepare a newer snapshot version later today probably.

But a few progresses were made anyway. Yesterday I fixed eselect’s env update to work with FreeBSD’s and DragonFly’s ldconfig; the patch is in the overlay (will be in tomorrow’s snapshot probably) and I submitted it to our lovely eselect developers so they can put it in the next versions. Then I discovered that there is a port for libbfd recently updated to 2.16.1, that way it should be simpler to forwardport the patches and then submit them upstream.

For the ones following pidof’s odyssey, I’ve decided to go with GPL, as that allows me to reuse code from sysvinit and also might be helpful if, instead of releasing a single pidof package, I decide to create a better suite to add some of the things that we end up missing on FreeBSD because are GNUisms and things like that.

I hope to provide something interestingly new in the next days, maybe an updated stage, but I”m not yet sure, I still need to fix the route adding problem, but if there is an unix-like command I _never_ understood, that command would be route(8)…

Oh well…

Posted in Gentoo/*BSD | Leave a comment

Helping without coding…

I want to suggest reading last Philip Rodriguez‘s entry on his blog. It’s an interesting insight of the common tasks that can be done without being developers.

I agree with him, and I actually already wrote an article about it, in Italian tho, so not for all the audiences… this is a bit more accessible ;)

Really, give a look to that.

Posted in Personal | Leave a comment

I have the stage

So, ok, I have the stage. Which stage? Gentoo/FreeBSD 6.0 x86 stage. It’s an experimental stage for now as it’s still using portage 2.1_pre4 and the old baselayout, and I’m probably going to refresh it next week. I’m at least ten days late on my original time table, but the result is quite interesting.
I can’t release it right now as I need to wait for the overlay to get updated with a new patch I added to freebsd-sources to be able to build kernel with new versions of flex. Seems like 2.5.31 release got quite a few of cleanups changing behaviour.. and it’s interesting to see how many people to such changes started yelling “broken, broken!”… well I was a bit annoyed by those changes, but that’s not because flex is broken, mostly because I hoped in a “-permissive” switch at command line…

But anyway, since I restarted working full time on Gentoo/*BSD, there were lots of steps forward. I think this was the most productive month I ever seen in respect to Gentoo/*BSD; maybe because I’m not sleeping that well (or at all sometimes) since last month.. personal life does suck indeed.

Oh by the way, I think I found the reason why FreeBSD is told not to support –as-needed. Some of the system’s libraries doesn’t get linked against the libraries they need, to avoid putting a circular dependency, for example, between the lib package and openssl. This is indeed a problem, but I think I can get around it, maybe splitting out the libc itself to a package and the rest of it with the dependency they need. That way I should be able to make –as-needed working on FreeBSD, an interesting achievement, I think.

On a completely unrelated note, last week I seen the last series of Friends (again, I already watched it in Italian when they aired it here), when I completed the DVD series that came with an Italian magazine… I’m missing it quite a bit… not only for the series (that I like), but also because I’m out of stuff in English to watch :P Although there are some great dubbers in Italy, the original voices are something you cannot replace (well a part some exceptions like Gimli in The Lord of the Rings…). The same magazine is now publishing Angel’s DVD (always with prices good enough for me) but unfortunately it’s not being shipped where I usually buy magazines here :(
I think I need a new job… possibly not as an underpaid codemonkey using a stupid RAD environment on Windows as I had to do last time… underpaid because I spent three weeks working on that, one week just to get the test environment working (because they didn’t send me a decent spec in the form of “you need thesee versions of PHP, MySQL, Apache, configured in this this and this way”, but just told me “it works with PHP Apache and MySQL”… what the?!), ending up having to re-create the environment three times (okay first time was partly my error, forgot PHP4 and MySQL 4.1 in Windows doesn’t get along that well)… they started ranting when I noted 8 hours trying to get one of the features they required working and failing (not my fault here, if the library isn’t able to cope with a simple thing like a start/end date for a calendar event), and when I left them without adding the three extra hours I needed to complete the requested feature, they ever said that I took too much time to do the job… without even being able to evaluate if what I did was good for them because they didn’t actually know what they asked me to do!

I must say that Gentoo is for me almost like a job… with the main difference that I don’t usually eat while working, but I eat while working on Gentoo :P

Anyway, I’ll try to relax tonight and see if I’m able to sleep finally…

Posted in Gentoo/*BSD | Leave a comment

The shadow and pam-login conflict

Okay this is not news, but seems like it’s still a problem for someone, so I’m following fox2mike’s suggestion (from yesterday.. I initially forgot about doing so), and I’m blogging about it…

So many people using ~arch or some packages out of ~arch might have seen that a new update to shadow (>=4.0.12-r2) blocks pam-login, and pam-login blocks newer versions of shadow.
Why this? Well it’s simple to say for me, as I know the background, but might be less easy to understand without knowing that.

So let’s start with the reason why /bin/login was not provided by shadow when using pam (thing that happens on most desktop systems)… to be honest, I don’t know that for sure, probably it’s just that shadow weren’t providing a PAM-enabled /bin/login or it had problems in the past.. so we just gone using pam-login package from SuSE (in the good days when people _provided_ the tarballs for other distributions to use), the 3.x series.
This was all good until shadow 4.0.something started providing a valid /bin/login, so we just had pam-login ebuild to build /bin/login from shadow source code.. but that meant we had to build the same code two times, and maintain patches for two packages instead of one.

So as this was planned for a while but Azarah hasn’t had time to handle that, I decided to do the merge between the two: since shadow 4.0.14-r2 the single sys-apps/shadow package replaces both shadow AND the old pam-login package. This means that they block each other now, so you have to do something like:

emerge -C pam-login && emerge -u shadow

if you want to have your system working fine. If you just unmerge pam-login but NOT update shadow, you won’t be able to login in the system if you restart (although already running sessions, already waiting login prompts, xdm and variants and ssh won’t be affected).

Please also note that you need a recent version of util-linux, that dropped the pam useflag, if you want to be sure that it won’t request you to merge pam-login again; ~arch version is fine. For older versions you might want to just set util-linux to use -pam with package.use as it doesn’t change anything anyway.

Now, don’t start asking for better way to handle this, as portage does not provide anything to improve this. This works without strange surprises, so just drop pam-login and you’ll be fine :)

Update: Comments have been closed because this post had too much spam coming. If you want to say yours, use the repost. Thanks, Diego.

Posted in Gentoo | 21 Comments

Fixing strict aliasing warnings

So, up to now I usually responded to strict aliasing breakage from programs with adding -fno-strict-aliasing to be safe.
In the last days I tried, on Donnie’s suggestion, to investigate of possible solutions to those strict aliasing rules breakage and see if I can fix at least some of them.

I found interestingly that most of the cases that can be found patched on google, and that causes the warnings are not actually involving structs and unions as the gcc documentation shows, but rather double pointers. What’s a double pointer? A pointer to a pointer, of course!

Taking a look to XdTV, I found a quite interesting thing: this is a double-linked list implementation that comes out of AleVT code, that is used by XdTV too. The cause of the warnings come out of lines 20 and 22. I’ll look only at line 20:

h->first = (struct dl_node *)&h->null;

well seems fine no? But wait… &h->null is a struct dl_node ** …
And later on, h->first is going to be used as a struct dl_node * …
So for some kind of miracle this seems to work, but I’m not that sure that this is something that’s going to work forever.

And there are other casts that works probably only for sheer luck in AleVT’s code. Upstream seems to be dead sicne 2 years (last update on the site is January 2004), and we don’t have really good alternatives to it…
If someone wants to write something useful to people.. probably a replacement for alevt using zvbi would be useful ;)

Posted in Gentoo | 1 Comment

Happened while testing…

Seems strange, but while I’m on AMD64 team, I don’t really mark many things.. I used to have a stable chroot to mark stable things, but I haven’t updated it in eons and then I just trashed it.
I sometimes marked things ~amd64 if they were missing, but it’s rare.. well if everything goes like I think, in the next days I’m going to mark a couple of packages :P

The first is app-mobilephone/moto4lin, that builds and runs fine on AMD64… I have to see if it works with my new phone, tho (the Motorola V180 I talked about)… to do that I have to buy the USB cable, luckily it seems to be a standard USB mini-A connection.

Then, I was looking for a SIP client for KDE/QT, as kphone does not seem to work with the VoIP provider I just registered with… Twinkle seems to be what I was looking for, but it requires to be patched for AMD64 compliancy, and also its dependency net-libs/ccrtp needs to. Unfortunately to submit the patch to ccrtp I had to registered with Savannah.. and yet another registration, sob.

Talking about the VoIP provider I registered with… well it does seem to provide a decent service, so I can’t blame them about that, but in the “Who we are” page, they really seems to be lamers:

“When the project shaped, a storm rose above the Eutelia’s premises and the thunderbolts struck the iron tower that dominate them; from here the Skypho name as short for Sky Phone.”

a part the “poetry” of all the story, that I don’t trust neither with a nail of my fingers, for a project born in 2005, with “skypho” as name, the only reason for the naming is the similarity with the way more known Skype service.
Geeeee, why they need to be so lame while faking the reasons of their name? Better avoiding telling that, than having this lame impressions to people who know other services (because I’m sure many Italian users that does not know Skype will fall for such a beautiful story..).

Oh well… and for the KDE category I added to this post, Halcy0n confirmed that an ICE I was getting building 2.6.14 kernel with GCC 4.0.2-r1 is due to the famous visibility patch backported from Fedora. Now remember me, why we are still fighting with that? Because KDE upstream still thinks that there’s no point in disabling visibility, also if 90% of KDE becomes unstable after that? Because Dirk is still convinced that changing the default visibility, possibly breaking KDE in subtle way is good?
Sob, I just hope that people don’t start blaming “KDE is unstable” just because of that visibility stuff that does not and won’t ever work.

Posted in Gentoo, KDE, Personal | Leave a comment

Tip of the day: useful core dump names

It’s not the first time I blog of something just not to forget about that :P This time it’st he turn of how to set the name of core dump files to something meaningful so that I can know which hell of an app left them around.
I have to thank ehmsen and brix for pointing me to the right directions as I had no clue how to do that before :)

Why do I need such a name scheme? Well I’m experiencing some strange crashes lately with akregator and a few other programs so I’m tempted to just get a backtrace and then check where the problem is hidden, unfortunately by enabling corefiles for everything you get a lot of files named “core” or “core.<pid>”, nothing useful to recognise what you’re looking for.

So what’s the solution? /proc/sys/kernel/core_pattern is where the kernel take the template for the core files naming… so I just changed that to ‘%e.%p.core’ and now i have the files just called “<executable>.<pid>.core” (so that they don’t overwrite each other). Good eh? :)

To make this a stable change, just put at the end of /etc/sysctl.conf the line
kernel.core_pattern = %e.%p.core
Now, I just need to remember how to enable core files for my user to be always generated … :P
IIRC it should be something like
flame C204800
in /etc/limits (limiting to 20MB of dump). But I still have to try :)

Posted in Gentoo | 1 Comment

When your upstream need patching

Ok today here in Italy is holiday and I stopped working on the translation I’m paid for (it’s also sunday so it’s “double holiday” :) ).
The day is good and the sun is shining so I’m out on my garden with my iBook working on gentoo via ssh to the main box and screen. X-Chat Aqua let me maintain the link with #gentoo-dev and other chans.

The cell phone is off an I feel more free than usual. So I’m in a good mood for a blog entry :)

One of the most annoying task when maintaining packages on gentoo is maintain clean the patches which, by version to version, doesn’t apply and needs to be re-created mainly manually. This task is needed because sometime we have to change the way packages works to make them follow gentoo’s structure in installing files or other things.
Other usual patches you need to prepare are when upstream didn’t cared about 64-bit architectures (which were pretty rare until a few monhts ago we can say, as amd64 (Athlon64 and Opterons), ppc64 (G5) and ia64 (Itanium) are recent processors. In those case you can have a lot of warnings about int casted to pointers and the other way ’round. The problem here is that the size of a pointer in a 64-bit arch is 64-bit instead the size of int is just 32-bit. long type is usually the same size of the pointers, and ptrdiff_t should be used to do arithmetic computation with pointers.
Also with the newest gcc (4.0.0) most of those warnings are became erros and need a complete fix. This is good as code ingoring those warnings usually produce wrong binaries.

Another kind of problem is when borked configures doesn’t like passing –enable to commandline (for example when they consider every –enable|disable-something as a –disable) or when they just use automagical test for libraries presence, which makes useflag not honourable.
In video category there are many apps which has a lot of dependencies in external libraries to mangle file formats, and many of them doesn’t provide enough configure params to satisfy our useflags needs, so I have hacked most of those configure scripts to add params and sent them upstream. Most of them was applied upstream, a few weren’t and I’m still hoping for them being applied as they are a big pain.

One of the package for which I’m having most patches is xine-lib. Mainly because it’s a popular package which is installed in a lot of different machines with different setups, but also because its configure.ac was really messy, and for a long time the package wasn’t able to exclude some plugins and the ebuild used to depend on something line aalib which was useless for most users. Then there was my rewrite which used autoconf cache tricks, but it was probably not working with confcache so I preferred to patch xine-lib to add the needed params. Still the patch is not applied and it needs a lot more work to have it clean anyway.

But it’s onot only the configures which are a pain to fix because they aren’t complete or just suits the setups of the developers, there is also the PIC __PIC__ stuff: libtool used to define -DPIC to select between PIC and non-PIC stuff, but gcc already defines __PIC__ if -fPIC is passed, and sometimes the -DPIC is simply missing for some reasons and the things need to be changed accordlinh.

Most of those errors are things which gots warning or which needs to pay attention to to be sure that they works, but they can be real pain when the complier start to be stricter (which occours every gcc release).

Now, I hope the new patches I’m working on for xine-lib can be applied upstream so next release would simply drop the patches.. it’s being a few versions in which the patches aren’t being dropped but added (well, a part from the security fixes and the wma stuff added in -r2, -r4 and removed in 1.0.1.

Oh I forgot to say what I’m working on at the moment… it’s just a little little patch to enable vidix support on amd64 (I had a report for a gcc4 problem in vidix driver, I fixed it and tried to compile it but vidix support wasn’t being built at all, then I started looking at it and I found out that it wasn’t supported on amd64, and I’ve make it be accepted and compile. Now the vidix output plugin is on my system, but it seems not to work at runtime. I’m investigating this.

Oh you’ll find that post in an hour not suited to be outside in my timezone (20:30), but that’s because I had a friend here and stopped blogging.

Posted in Gentoo | Leave a comment

What Fantasy/SciFi Character Are You?

From harshy’s blog, I took this test and…

Which Fantasy/SciFi Character Are You?

The funny thing is that Elrond was the name of my character on Ultima OnLine for a long time :)

Posted in Personal | Leave a comment

KDE 3.5 beta1 is coming your way

If you haven’t noticed that my commits in the last days were less than usual, well you’re going to have quite a bit of a surprise in the next days :P

I’m currently waiting for KDE 3.5 beta1 to compile, after that is finished, I’ll start committing the new ebuilds. Seems like the QT mess it’s still not cleared up in 3.5, not only in 3.4, so there will be patches applied to 3.5_beta1 ebuilds, too. Luckily, those patches can usually be applied to 3.4, too, so the number of packages failing because of qt 3.3.5 is going to decrease in the next days. K3B and amaroK are already fixed.

Talking about amaroK, I wish to thank Ian Monroe for notifying me of the prerelease tarball, so that I was able to create the new ebuild and test it before the complete release :)

I don’t feel right now like writing too much, as I’m waiting for KDE to complete its build, and today was a long long day. I won’t be paid for my translation until late November (if nothing goes wrong, eh), so in the mean time I probably have to look for something else as I’m afraid I have to change my audio amplifier soon.

Anyway, tomorrow evening is scheduled a new meeting at my LUG, hoping not to get fighting because of the already said reasons.

And to close, a little personal request for who’s reading this :) If somebody knows an European e-shop for multimedia equipment that sells in Italy (and is written in English, French, Spanish or as last option German -these are the languages I can sort of understand… actually I have to have German translated, but that is), with not-so-high shipping costs, can drop me an email (flameeyes _at_ gentoo _dot_ org) with the link? Maybe I can find the amplifier a bit cheaper than here. :)

Posted in Gentoo, KDE | 2 Comments