Re: [aur-general] How to handle installers in PKGBUILDs
On 9.2.2011 14.08, "Michael Schubert" <mschu.dev@gmail.com> wrote:
Hi,
I am already maintaining a couple of PKGBUILDs and wanted to add one for CellDesigner, which is used to model biochemical pathways. The
download
is only available as binary package with its own installer.
Now, I thought that I could use the installer inside a PKGBUILD with $pkgdir as root. However, the installer cross-references some files in others with absolute paths, i.e. when the package is installed it still links to the build dir instead of the system dir. Because of the way the cross-refs are inserted, simple sed'ing these does not work.
The obvious solution would be to use fakeroot/chroot in the $pkgdir and use to to emulate a root directory structure. My question now is: (1) am I on the right track and (2) is there any standard way to do this in PKGBUILDs?
I couldn't find any sample PKGBUILDs concerning this issue and the ArchWiki contains no information either. Any help would be appreciated.
Cheers, Michael
Usually the installers are shell acripts with a binary tar.gz blob in the end of the file. This can be cat:ed from the file and piped to tar. This is what the installer does Open it and you see how to cat the contents and what else might ne needed
I tried the following: $ cat CellDesigner-4.1-linux-installer.bin | tar -xzvf - $ cat CellDesigner-4.1-linux-installer.bin | tar -xjvf - $ cat CellDesigner-4.1-linux-installer.bin | tar -xJvf - each of which failed with "unknown archive type". 2011/2/9 jesse jaara <jesse.jaara@gmail.com>
On 9.2.2011 14.08, "Michael Schubert" <mschu.dev@gmail.com> wrote:
Hi,
I am already maintaining a couple of PKGBUILDs and wanted to add one for CellDesigner, which is used to model biochemical pathways. The
download
is only available as binary package with its own installer.
Now, I thought that I could use the installer inside a PKGBUILD with $pkgdir as root. However, the installer cross-references some files in others with absolute paths, i.e. when the package is installed it still links to the build dir instead of the system dir. Because of the way the cross-refs are inserted, simple sed'ing these does not work.
The obvious solution would be to use fakeroot/chroot in the $pkgdir and use to to emulate a root directory structure. My question now is: (1) am I on the right track and (2) is there any standard way to do this in PKGBUILDs?
I couldn't find any sample PKGBUILDs concerning this issue and the ArchWiki contains no information either. Any help would be appreciated.
Cheers, Michael
Usually the installers are shell acripts with a binary tar.gz blob in the end of the file. This can be cat:ed from the file and piped to tar. This is what the installer does Open it and you see how to cat the contents and what else might ne needed
On Wed, Feb 09, 2011 at 12:37:16PM +0000, Michael Schubert wrote:
I tried the following:
$ cat CellDesigner-4.1-linux-installer.bin | tar -xzvf - $ cat CellDesigner-4.1-linux-installer.bin | tar -xjvf - $ cat CellDesigner-4.1-linux-installer.bin | tar -xJvf -
each of which failed with "unknown archive type".
$ file CellDesigner-4.1-linux-installer.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped $ strings CellDesigner-4.1-linux-installer.bin | grep '$Info' $Info: This file is packed with the UPX executable packer http://upx.sf.net $ $ upx -d CellDesigner-4.1-linux-installer.bin > /dev/null upx: CellDesigner-4.1-linux-installer.bin: CantUnpackException: header corrupted 2 Looks like an UPX-packed executable with an additional wrapper (might be another layer of encryption/compression) or a modified version of UPX. This is probably not so easy to unpack and needs more investigation.
Thank you for the suggestions. I will email the authors and ask if they can provide an archive instead of the installer. 2011/2/9 Lukas Fleischer <archlinux@cryptocrack.de>
On Wed, Feb 09, 2011 at 12:37:16PM +0000, Michael Schubert wrote:
I tried the following:
$ cat CellDesigner-4.1-linux-installer.bin | tar -xzvf - $ cat CellDesigner-4.1-linux-installer.bin | tar -xjvf - $ cat CellDesigner-4.1-linux-installer.bin | tar -xJvf -
each of which failed with "unknown archive type".
$ file CellDesigner-4.1-linux-installer.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped $ strings CellDesigner-4.1-linux-installer.bin | grep '$Info' $Info: This file is packed with the UPX executable packer http://upx.sf.net $ $ upx -d CellDesigner-4.1-linux-installer.bin > /dev/null upx: CellDesigner-4.1-linux-installer.bin: CantUnpackException: header corrupted 2
Looks like an UPX-packed executable with an additional wrapper (might be another layer of encryption/compression) or a modified version of UPX. This is probably not so easy to unpack and needs more investigation.
participants (3)
-
jesse jaara
-
Lukas Fleischer
-
Michael Schubert