odd thing happening when I install packages in a chroot
On one of my GoFlexNet I've a folder, on the sata software raid mirror, where I keep a slackware arm 14.1 developement environment for compiling things.
In order to use it I just usually descent into the tree and type "chroot ." I've noticed that when I use slackpkg from there to install packages the links are not created but the rest is in place. I work around that by extracting the doinst script and run it manually. As to my understanding slackpkg uses installpkg internally to do the package installation, I've not yet checked out if installpkg does the same but none the less this thing seems odd. Anyone else had the same thing ? |
Quote:
The only thing that's different about pkgtools on ARM is that they have been patched to improve the performance on ARM: http://ftp.arm.slackware.com/slackwa...g.speedup.diff The other scripts are similarly patched - check the piece of sed at the bottom as this might be the culprit. I don't know if some how slackpkg is interfering with this (I can't think of a reason why it should, but I don't know how slackpkg works). The patches themselves have been around since 2006 and haven't caused any issues, but I can't think of anything else that'd be causing slackpkg to fail on occasions. |
I don't think it's related (as you're talking about a chroot, so the new / of the filesystem should be the one you chrooted to and the pkgtools utilities/slackpkg should work fine), but in some spots slackpkg doesn't honor the $ROOT environment variable (unlike the pkgtools utilities), so I prepared a patch some time ago that I sent to Pat but it never got included (maybe because he was waiting for Piter to review it).
I'll attach it here, if you want to try it (I'm using it to create LXC containers with slackpkg's templates) Code:
diff -Naur slackpkg-2.82.0.orig/usr/libexec/slackpkg/core-functions.sh slackpkg-2.82.0/usr/libexec/slackpkg/core-functions.sh |
Quote:
|
I've an idea: I'll run slackpkg after having put a -x flag in the interpreter line ... this might give me a suggestion as to why something odd is going on at the time doinst scrip is executed.
|
I did that but could not spot anything that would explain the broken links.
I did notice though that installpkg looks at /proc/self : Code:
root@nas:/tmp# installpkg slackkit-1.02-arm-1.txz I think this has a bad influence in this part of the installpkg script (which in turn is used by slackpkg): Code:
if [ -f $ROOT/install/doinst.sh ]; then |
to see if it's that, you can mount proc in the chroot too
Code:
mount -t proc proc /your/chroot/proc Code:
mount -o bind /dev /your/chroot/dev |
I'm pretty much certain it's that without trying ... but just to make sure I'll try binding all 3
Code:
root@nas:/mnt/exports/developement/slackware_arm_14.1_dev# mount -o bind /dev ./dev I reinstald libmpc via slackpkg and the links seem to be right this time. Not sure if I should have them in fstab or make a script to do it each time I want to use the chroot environment. |
All times are GMT -5. The time now is 07:02 AM. |