Tuesday, May 20, 2008

portage on mac

The gentoo prefix portage throws up errors about man.ecompress.dir conflicts. When observed closely, it also threw up errors about xargs not recognisng -r flag. Thats because the default xargs doesn't support gnu extensions. So we need to emerge findutils. THere is a catch though. it fails too. you need to comment out the line that stops locate being built. and then do an ebuild findutils-.ebuild digest. Then the install will happily continue.

Thursday, December 01, 2005

LFS Profile for package user

Here is a page from LFS profile I created. It might help you modify the other pages. I'll put up everything shortly after I find a file host that doesn't mind hot linking.

coreutils.xml

Up and running, A happy system.

Categories:

After My last attemp succeeded, I moved onto BLFS(didn't use profiles because this is my first BLFS attempt and I wanted to do it by hand.) My PC is happy and so am I. Initially I started with console only PC(mplayer and all). Then I needed firefox badly and installed X. No sweat here. I've put firefox and gaim in xinitrc and everything just worked. After a bit of probing from a friend, I finally gave in and installed XFCE. Now even my friends can use it.

Here is my package list(/etc/passwd)

There are a few more packages and things I wanna talk about, but later.

Monday, November 21, 2005

Second attempt at nALFS + package users

Categories:

Last night I have run another build and found a few problems.

Sunday, November 20, 2005

First attempt at nALFS + package users

Categories:

I tried to modify the LFS-6.1-1 ALFS profile for implimenting the changes. I used 6.1 live cd and there are a few digest mismatches. Apparently there was a server hickup and things changed. I guess it's okay to ignore them. The rest of the errors and temporary work arounds are here.

patched nALFS to use /etc/passwd from $LFS

Categories:

The earlier patch for uid:gid failed because You can't use it to set additional groups which is required because package users use sticky bit of install dirs owned by install group.

So once more I found myself looking at nALFS code. This time I was looking at change group function in stage.c and discovered that it had been modified earlier for use in chroot environment. I knew it when I saw because I was hoping to use the fget.... functions too. Hmm, looks like the team has forgot to change the change_to_user function. I did it and here is the patch. It's working just fine.

nALFS-1.2.5-change_to_user.patch

Thursday, November 17, 2005

patched nALFS to use uid:gid style user info

Categories:

As I got no replies for my mail to alfs mailing list, I have finally decided to get my hands dirtier (They are already dirty). I have made a patch for nALFS that seems to do the job of using <user>uid:gid</user>. the usual at your own risk blah blah... disclaimer.

The format <user>uid:gid</user> has to be strictly followed and it won't check for the format, neither does it have any defaults in case you omit anything. I don't know if I have broken the original functionality. I had to bypass the user not found check and I didn't care to adopt it, instead I removed it. So I suggest either you look into it and modify it further or wait till my exams are over and I'll be more free to work them out.

There is one more catch, there are two files with same function which are exact replicas. But I changed only one that was being used when I traced it in gdb. Be warned, its only a couple of days since I started using gdb. Thanks to Kousik and Sunny.

nALFS-1.2.5-user-UID.patch

Wednesday, November 09, 2005

package users and nALFS: define package id in users tag

Categories:

The other option Iwas left with is to use use numeric uid in <users></users>. But can it take the syntax <users>uid:gid</users> because without gid, it is going to be a mess unless taken care of. or is it going to default to the uid value for gid too? I have to experiment and find out. unless some one can help me here.

Another thing I can do is (in case it won't take the gid) set the gid while cleaning up with something like find / -uid $UID -exec chgrp $GID {} and take extra care to set gid before making any suids.

Tuesday, November 08, 2005

Bug 1058 - changing user breaks when chrooted in script

Bug 1058 - changing user breaks when chrooted in script

I tried to make matching entries in /etc/passwd and /etc/groups on the host and still getting the user not found error.

Here are the contents I appended to the host contents.


/etc/passwd
/etc/group

Saturday, October 29, 2005

Use fake package users

Categories:

So I need to use user IDs, huh? Wonder how I can catch the output of the script and place it in xml. If that can't be done, I can always use a package-userid xml entity in package.ent.

The first seems to beimpossible as of now and the second is a head ache. I think I will modify the add_user script so that it can be run from host root and make changes to $LFS/etc/passwd and /etc/passwd. Well, The following schema should work.

  • The users on host should all belong to a temp group so that they can be removed easily after the build is done. But still I don't like messing my host system.
  • The id finding algo should check both the files to find the usable ID. This can be ensured by making the range availiable in host passwd filed, but some how I don't like to depend on that !