Page 1 of 2
[done] slkbuild + symlink
Posted: 7. Jan 2010, 19:06
by damNageHack
raphael[i486]$ ls -l psi-0.14.tar.bz2
lrwxrwxrwx 1 raphael users 19 2010-01-07 19:47 psi-0.14.tar.bz2 -> ../psi-0.14.tar.bz2
raphael[i486]$ file psi-0.14.tar.bz2
psi-0.14.tar.bz2: symbolic link to `../psi-0.14.tar.bz2'
raphael[i486]$ ls -l ../psi-0.14.tar.bz2
-rwxr-xr-x 1 raphael users 2168801 2009-12-03 01:24 ../psi-0.14.tar.bz2
raphael[i486]$ fakeroot slkbuild -x
psi-0.14.tar.bz2 found in current directory
build-psi.sh has been created
./build-psi.sh: line 170: cd: /opt/slkbuild/psi/i486/src/psi-0.14: Datei oder Verzeichnis nicht gefunden
./build-psi.sh: line 171: ./configure: Datei oder Verzeichnis nicht gefunden
build() failed.
Bug or feature of slkbuild? Why it is not possible to automatically extract symlinked archives?
As far as i can see into the build script, it calls the command file to determine the archive type, and then symlink is not known what to do with ...

Re: slkbuild + symlink
Posted: 7. Jan 2010, 19:09
by gapan
Because it copies the tarball into $startdir/src. Can't copy a symlink. Not a bug.
Re: slkbuild + symlink
Posted: 7. Jan 2010, 21:38
by JRD
Why do you use fakeroot with slkbuild ?
Re: slkbuild + symlink
Posted: 7. Jan 2010, 21:45
by damNageHack
JRD wrote:Why do you use fakeroot with slkbuild ?
$ fakeroot slkbuild -x
-x and -X both need root rights because of the generated build script checks for them. I work on a script to automate some things.

Re: slkbuild + symlink
Posted: 7. Jan 2010, 21:59
by gapan
JRD wrote:Why do you use fakeroot with slkbuild ?
It's a very good practice. I suggest you do it too. If you're building a package as root and you have a bad makefile that installs files directly under / and doesn't respect DESTDIR, it's easy to get fooled that your package works, while important parts where installed in your system instead of in the package. With fakeroot, you'll get an error that you have no permission to write under / instead and package building will fail, which is a
lot better.
Re: slkbuild + symlink
Posted: 7. Jan 2010, 22:20
by JRD
OK, good idea, I will use it then

Re: slkbuild + symlink
Posted: 7. Jan 2010, 23:12
by thenktor
But note that fakeroot may fail in very (!!) rare cases, e.g. I can't build amarok package with fakeroot. Instead I have to build as root. I have no idea why and this is my only package where this happens. Just a hint

Re: slkbuild + symlink
Posted: 8. Jan 2010, 07:23
by damNageHack
thenktor wrote:Instead I have to build as root. I have no idea why and this is my only package where this happens. Just a hint

Log?
Re: slkbuild + symlink
Posted: 8. Jan 2010, 12:46
by thenktor
I don't really care about it and don't want to investigate a huuuuge log

Re: slkbuild + symlink
Posted: 19. Jan 2010, 18:01
by damNageHack
gapan wrote:Because it copies the tarball into $startdir/src. Can't copy a symlink. Not a bug.
Sorry, but you are wrong or do not understand.
Could you please add the -L option to the file call in line 435 of slkbuild file?
file_type=\$(file -biLz "\$FILES")
man file wrote:
-L, --dereference
option causes symlinks to be followed, as the like-named option
in ls(1) (on systems that support symbolic links). This is the
default if the environment variable POSIXLY_CORRECT is defined.
raphael[i486]$ file -biz libdaemon-0.13.tar.gz
application/x-symlink; charset=binary
raphael[i486]$ file -biLz libdaemon-0.13.tar.gz
application/x-tar; charset=binary compressed-encoding=application/x-gzip; charset=binary; charset=binary
I think the addition will be a good thing for cross compiling for both salix distributions. Thx.
