[BusyBox] rm -rf confused by directories without "x" bit set.

Rob Landley rob at landley.net
Sat Nov 15 05:54:20 UTC 2003


On Friday 14 November 2003 15:45, Glenn McGrath wrote:
> On Sun, 9 Nov 2003 13:22:30 -0600
>
> Rob Landley <rob at landley.net> wrote:
> > I ran buildroot as me (not as root), and it created a file that rm -rf
> > won't delete.
> >
> > [landley at dhcppc4 busybox]$ ./busybox rm -rf
> > ../../../buildroot/build_i386 rm: unable to stat
> > `../../../buildroot/build_i386/staging_dir/lib/pkgconfig/openssl.pc':
> > Permission denied
> > rm: unable to remove
> >
> > Any suggestions?
>
> What are the pormisions of openssl.pc ?

I think the problem was the directory they're in had bad permission, but 
unfortunately I'd deleted it (a gig and change is a lot on my laptop), and 
when I extracted the tarball and ran the build again and it died BEFORE the 
last problem, with a completely new failure:

---------------------------
  /home/landley/pending/buildroot/build_i386/staging_dir/bin/i386-linux-gcc -o 
openssl -DMONOLITH -I.. -I../include  -fPIC -DDSO_DLFCN -DHAVE_DLFCN_H 
-DOPENSSL_NO_KRB5 
-I/home/landley/pending/buildroot/build_i386/staging_dir/include 
-DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DL_ENDIAN -DTERMIO -O3 
-fomit-frame-pointer -Wall openssl.o verify.o asn1pars.o req.o dgst.o dh.o 
dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o 
rsautl.o dsa.o dsaparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o 
speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o 
ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o engine.o ocsp.o  
-L.. -lssl  -L.. -lcrypto 
-L/home/landley/pending/buildroot/build_i386/staging_dir/lib -ldl -ldl ; \
fi
../libcrypto.so: undefined reference to `_dl_fixup'
collect2: ld returned 1 exit status
make[2]: *** [openssl] Error 1
make[2]: Leaving directory 
`/home/landley/pending/buildroot/build_i386/openssl-0.9.7c/apps'
make[1]: *** [sub_all] Error 1
make[1]: Leaving directory 
`/home/landley/pending/buildroot/build_i386/openssl-0.9.7c'
make: *** 
[/home/landley/pending/buildroot/build_i386/openssl-0.9.7c/apps/openssl] 
Error 2
[landley at dhcppc4 buildroot]$
-------------------------

This is why I hate hate hate hate hate hate hate hate (and then some) build 
procedures that download random source as they go along from servers that may 
or may not be accessable, may or may not have the same code on them as last 
time, etc.

I only tried it again because I found an "everything in one tarball" version, 
so I could get some reproducible builds that I could actually debug if there 
was a few days lag between sessions.  But it isn't, it's got tarballs missing 
and the default configuration overwrites what it DOES have with random crap 
out of CVS, and going out to the web and overwriting random portions of the 
build with whatever people have felt like checking in since seems to be a 
fundamental built-in part of "the buildroot way".  Our motto: 
"reproducibility is bad", apparently.

This was why I gave up on it back in august.  Debugging is about ISOLATING 
PROBLEMS.  Not having 50 things change without you asking them to and going 
"oh, the problem got masked by random unrelated changes, let's call that a 
solution!"

> Its possible to extract a file that you dont have permission to remove,
> you can use setgid on directories to ensure your group has permissions
> for all files created in that dir.

I know.  I can reproduce that problem, and hope to patch busybox rm this 
weekend.

Unfortunately, it looks like you can't use uclibc without buildroot anymore, 
and there's no "stable" release of a self-contained buildroot source barball 
that actually produces a root_fs image without dying halfway through the 
build.  This means I either grab a precompiled binary root_fs (which can't 
rebuild itself under itself), or I not use uclibc at all.

I don't know what changed since last build.  I don't care.  I can't reproduce 
the problem I had last time because NEW problems are interfering that I 
DIDN'T ASK IT TO DOWNLOAD.  I wash my hands of it, and will go back to 
thumping on busybox exclusively until somebody makes an actual self-contained 
buildroot source _release_.  Even if it's a testing release, that's fine.  
But not "today's CVS snapshot halfway through a multi-file checkin."  Grrr...

> Glenn

Rob



More information about the busybox mailing list