[done] slkbuild + symlink

You think you have found a bug? Let us know about it.
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

[done] slkbuild + symlink

Post 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? :o
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 ... :roll:
Last edited by damNageHack on 19. Jan 2010, 21:34, edited 1 time in total.
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
gapan
Salix Wizard
Posts: 6372
Joined: 6. Jun 2009, 17:40

Re: slkbuild + symlink

Post by gapan »

Because it copies the tarball into $startdir/src. Can't copy a symlink. Not a bug.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: slkbuild + symlink

Post by JRD »

Why do you use fakeroot with slkbuild ?
Image
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: slkbuild + symlink

Post 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. :geek:
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
gapan
Salix Wizard
Posts: 6372
Joined: 6. Jun 2009, 17:40

Re: slkbuild + symlink

Post 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.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: slkbuild + symlink

Post by JRD »

OK, good idea, I will use it then :)
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: slkbuild + symlink

Post 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 ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: slkbuild + symlink

Post 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?
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: slkbuild + symlink

Post by thenktor »

I don't really care about it and don't want to investigate a huuuuge log ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
User avatar
damNageHack
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: slkbuild + symlink

Post 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. :roll:

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. 8-)
Image
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Post Reply