Freebsd unremoveable directories

When I was trying to get my FreeBSD working as a XenU, I used the make option DESTDIR= for installworld and installkernel.
After the files had been installed in my DESTDIR directory however, I wasn’t able to remove certain directories when I tried to remove my DESTDIR for a clean new install:

rm: /usr/local/xen/current-root/bin/rcp: Operation not permitted
rm: /usr/local/xen/current-root/bin: Directory not empty
rm: /usr/local/xen/current-root/lib/libc.so.7: Operation not permitted
rm: /usr/local/xen/current-root/lib/libcrypt.so.5: Operation not permitted
rm: /usr/local/xen/current-root/lib/libthr.so.3: Operation not permitted
rm: /usr/local/xen/current-root/lib: Directory not empty
rm: /usr/local/xen/current-root/libexec/ld-elf.so.1: Operation not permitted
rm: /usr/local/xen/current-root/libexec: Directory not empty
rm: /usr/local/xen/current-root/sbin/init: Operation not permitted
rm: /usr/local/xen/current-root/sbin: Directory not empty
rm: /usr/local/xen/current-root/usr/bin/chpass: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/chfn: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/chsh: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/ypchpass: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/ypchfn: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/ypchsh: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/login: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/opieinfo: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/opiepasswd: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/passwd: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/yppasswd: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/rlogin: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/rsh: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/su: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin/crontab: Operation not permitted
rm: /usr/local/xen/current-root/usr/bin: Directory not empty
rm: /usr/local/xen/current-root/usr/lib/librt.so.1: Operation not permitted
rm: /usr/local/xen/current-root/usr/lib: Directory not empty
rm: /usr/local/xen/current-root/usr: Directory not empty
rm: /usr/local/xen/current-root/var/empty: Operation not permitted
rm: /usr/local/xen/current-root/var: Directory not empty
rm: /usr/local/xen/current-root: Directory not empty

After getting really annoyed with all the directories piling up in my /usr/local/xen directory, Benv offered to try and find out why the hell these directories didn’t want to get deleted.
It seemed that the directories had a flag ’schg’ which you can see by doing an ‘ls -lo’ on the directory. The ’schg’ flag means that the directory is system immutable and only the owner and superuser are allowed to remove this flag.
This is done by calling chflags 0 on the directory. This clears all it’s flags.

I fixed my problem by doing:

cd /usr/local/xen/current-root
find . -exec chflags 0 "{}" \;
rm -rf /usr/local/xen/current-root

AnimeVersus

Another little browser game from anime cubed. I started playing it as well since Benv told my it would give me stamina bonuses for Billy vs Snakeman.
Here’s my avatar:


lotjuh
Level: 17
Strength: 1
Intelligence: 11
Magic: 12
Hotness: 11 (*1*)
Fangirls: 10
Fight your friends! Play AnimeVersus today!

How to build lua on Slackware 64

Today I figured it was time to update my e17 installation and it seemed that they introduced a new dependency for edje: liblua. So I go to my /usr/src directory and run:

slackbuild.pl http://www.lua.org/ftp/lua-5.1.4.tar.gz

But when it tried to run configure, there was nothing to configure so I figured it was smart to quit the slackbuild script and check it out myself.
It seems that there was indeed no configure file, but the INSTALL file told me I had to run “make linux install” to build and install the library for my platform. Well that’s nice, but where will it install everything? Benv hinted me that I should probably edit the Makefile and change INSTALL_TOP to INSTALL_TOP= /usr/src/lua-5.1.4/pkg/usr so I could run makepkg after to create my own package. But after creating and installing the lua package, edje still complained that there was no liblua installed on my machine.
Checking my config.log I found out it was searching for liblua in the pkgconfig files. Oddly enough, the lua src did have a etc/lua.pc file, but it does not install it. So I placed it in /usr/src/lua-5.1.4/pkg/usr/share/pkgconfig/ directory and I changed the paths so it would match my installation and I recreated and reinstalled the package.
This time edje did find the library, but crashed with the following error:

/usr/lib/liblua.a: could not read symbols: Bad value

After googling a little and checking the error again, I found out that the Makefile needed to be patched so it would also use the -fPIC option. So I edited the /usr/src/lua-5.1.4/src/Makefile and changed

CFLAGS= -O2 -Wall $(MYCFLAGS)

to

CFLAGS= -O2 -Wall -fPIC $(MYCFLAGS)

, ran the make linux install, created a new package, installed the package and it finally worked \o/

Billy Vs. SNAKEMAN

So yeah, Benv got me into playing Billy Vs. SNAKEMAN too and now I’m all addicted to it -.-
Here’s my avatar if anyone cares:

Be the Ultimate Ninja! Play Billy Vs. SNAKEMAN today!

How to build Picard on Slackware

Since I’ve gone through this hell a couple of months ago already, and I’m about to go through it again, I figured I should write it down this time so I might be easier to do it the next time.

If you wonder what picard is, you can check it out here: PicardTagger

To install Picard, you’ll need the following software

(more…)

Slackware 64

Slackware

So BenV had told me I had to install Slackware 64 on my computer since there’s nothing that should hold me back from it now they got a decent release and I don’t play any games on my Linux anyway.

Of course I should have known from experience that doing something ‘trivial’ as installing an new OS on my computer on BenV’s request, would probably turn out to be a disaster. (more…)