[aur-general] makepkg and unzip
Hello, I am not sure if it's widely known that makepkg 3.1 now uses bsdtar for extracting .zip sources. I see many PKGBUILDs still have makedepends=(unzip) while unzip is in fact never used. It was often discussed before whether that makedepends line was required or not. eg : http://aur.archlinux.org/packages.php?ID=5280 Now the situation is clearer, since unzip is no longer used by makepkg. So the makedepends line can be safely removed. There might be some special zip files that are not handled (correctly) by bsdtar. In that case, it's probably a good idea to contact both bsdtar maintainer and the creators of the zip archive about the problem. To work around it, you can use noextract and call unzip manually like in that example : http://bugs.archlinux.org/task/9792?getfile=2016 (in that pkgbuild, unzip is put in makedepends, and I think it's correct) If the above makes sense, and is not yet mentioned in the wiki, and someone finds a relevant place to add it, then go for it :)
How about if we were to unzip something under build()? Are we supposed to switch entirely to bsdtar then (use bsdtar in place of unzip commands)?
On Tue, May 6, 2008 at 11:16 AM, Ray Rashif <schivmeister@gmail.com> wrote:
How about if we were to unzip something under build()? Are we supposed to switch entirely to bsdtar then (use bsdtar in place of unzip commands)?
If bsdtar works, yes. makepkg already depends on bsdtar, so you can guarantee it is installed.
Ray Rashif wrote:
How about if we were to unzip something under build()? Are we supposed to switch entirely to bsdtar then (use bsdtar in place of unzip commands)?
Do you have an example, I am not sure how this could happen :) Something like a zip archive inside the main source archive? Sounds weird. But well, I guess it makes sense to try using bsdtar first, since it is in core/base. bsdtar is included in libarchive package which is a dep of pacman, so it will be installed on every system. Not unzip though.
Weird indeed, but can't say they don't exist. No real example from repos, but from outside of FLOSS paradigm: http://aur.archlinux.org/packages/steinberg-vst/steinberg-vst/PKGBUILD (I have no idea why I didn't just replace unzip with bsdtar since the main one was already unpacked; should have been obvious) Anyway it appears to work on every zip archive I've got. That's great, one down from now (possibly no need for unzip utility either for most people) =] Thanks for the heads up.
http://aur.archlinux.org/packages/aacplus/aacplus/PKGBUILD Source package contains zip inside it. 2008/5/6 Ray Rashif <schivmeister@gmail.com>:
Weird indeed, but can't say they don't exist. No real example from repos, but from outside of FLOSS paradigm: http://aur.archlinux.org/packages/steinberg-vst/steinberg-vst/PKGBUILD (I have no idea why I didn't just replace unzip with bsdtar since the main one was already unpacked; should have been obvious)
Anyway it appears to work on every zip archive I've got. That's great, one down from now (possibly no need for unzip utility either for most people) =] Thanks for the heads up.
2008/5/6 Lukáš Jirkovský <l.jirkovsky@gmail.com>:
http://aur.archlinux.org/packages/aacplus/aacplus/PKGBUILD Source package contains zip inside it.
You can use bsdtar to extract it. Regards, Mateusz.
I'm going to do this after new version will be released. It's IMHO only small cosmetic change. But it's example where it's necessary to unzip file manually. 2008/5/6 Mateusz Herych <heniekk@gmail.com>:
2008/5/6 Lukáš Jirkovský <l.jirkovsky@gmail.com>:
http://aur.archlinux.org/packages/aacplus/aacplus/PKGBUILD Source package contains zip inside it.
You can use bsdtar to extract it.
Regards, Mateusz.
Hello, some Java programs follow the windows install method "put everything into a directory", and the "Everything" is shipped via zipfile. So sometimes it is easier to unzip (or unbsdtar) the whole bunch to $startdir/pkg/somewhere rather than to $startdir/src/somewhere. example (not yet in AUR) # Contributor: Stefan Husmann <stefan-husmann@t-online.de> pkgname=jose-chess pkgver=1.44 pkgrel=1 pkgdesc="Graphical chess tool and game" url="http://jose-chess.sourceforge.net/" arch=('i686') license=('GPL') install=jose.install depends=('jre' 'mysql' 'libgl') source=(http://downloads.sourceforge.net/sourceforge/$pkgname/jose-144-linux.zip) md5sums=('c36ec11a2703a2fdc92106b33ac737e5') noextract=('jose-144-linux.zip') build() { install -d $pkgdir/usr/share/ || return 1 cd $pkgdir/usr/share unzip -qou $srcdir/jose-144-linux.zip || return 1 find $pkgdir/usr/share/jose -type f -exec chmod 664 {} \; || return 1 chmod 755 $pkgdir/usr/share/jose/jose.sh || return 1 find $pkgdir/usr/share/jose -type d -exec chmod 775 {} \; || return 1 } -----Original Message----- Date: Tue, 06 May 2008 18:28:17 +0200 Subject: Re: [aur-general] makepkg and unzip From: Xavier To: "Discussion about the Arch User Repository (AUR)" Ray Rashif wrote:
How about if we were to unzip something under build()? Are we supposed to switch entirely to bsdtar then (use bsdtar in place of unzip commands)?
Do you have an example, I am not sure how this could happen :) Something like a zip archive inside the main source archive? Sounds weird. But well, I guess it makes sense to try using bsdtar first, since it is in core/base. bsdtar is included in libarchive package which is a dep of pacman, so it will be installed on every system. Not unzip though.
stefan-husmann@t-online.de wrote:
Hello,
some Java programs follow the windows install method "put everything into a directory", and the "Everything" is shipped via zipfile. So sometimes it is easier to unzip (or unbsdtar) the whole bunch to $startdir/pkg/somewhere rather than to $startdir/src/somewhere.
example (not yet in AUR)
Ok, thanks to you and Lukáš Jirkovský for providing real examples :) In any cases, it's a good idea to check if it works with bsdtar because this is installed on any arch system, unlike unzip.
Hello, I checked, it works. So I can only imagine the situation that the upstream build system may require unzip and the package maintainer rejects tweaking of th makefile or whatever there is. sincerly Stefan -----Original Message----- Date: Tue, 06 May 2008 22:12:43 +0200 Subject: Re: [aur-general] makepkg and unzip From: Xavier To: "Discussion about the Arch User Repository (AUR)" stefan-husmann@t-online.de wrote:
Hello,
some Java programs follow the windows install method "put everything into a directory", and the "Everything" is shipped via zipfile. So sometimes it is easier to unzip (or unbsdtar) the whole bunch to $startdir/pkg/somewhere rather than to $startdir/src/somewhere.
example (not yet in AUR)
Ok, thanks to you and Luká Jirkovský for providing real examples :) In any cases, it's a good idea to check if it works with bsdtar because this is installed on any arch system, unlike unzip.
On 5/6/08, stefan-husmann@t-online.de <stefan-husmann@t-online.de> wrote:
So I can only imagine the situation that the upstream build system may require unzip and the package maintainer rejects tweaking of th makefile or whatever there is. sed -i 's/unzip/bsdtar/g' Makefile to be adapted...
a small sed (or even a patch) is better than a "stupid" build dependency IMHO. -- Geoffroy Carrier
On Wed 2008-05-07 00:42 , Geoffroy Carrier wrote:
On 5/6/08, stefan-husmann@t-online.de <stefan-husmann@t-online.de> wrote:
So I can only imagine the situation that the upstream build system may require unzip and the package maintainer rejects tweaking of th makefile or whatever there is. sed -i 's/unzip/bsdtar/g' Makefile to be adapted...
a small sed (or even a patch) is better than a "stupid" build dependency IMHO.
Are you crazy? Patches are not allowed anymore in Arch Linux! Now you are under trial for being enemy of the Revolution KISS. :) -- Alessio (molok) Bolognino Please send personal email to themolok@gmail.com Public Key http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xFE0270FB GPG Key ID = 1024D / FE0270FB 2007-04-11 Key Fingerprint = 9AF8 9011 F271 450D 59CF 2D7D 96C9 8F2A FE02 70FB
On 5/7/08, Alessio Bolognino <themolok.ml@gmail.com> wrote:
Are you crazy? Patches are not allowed anymore in Arch Linux! Now you are under trial for being enemy of the Revolution KISS.
:) That's why I use sed... It's PKGBUILD-related, so nothing to do with patching :) And yes, I love big sed hacking... Here's my baby: http://aur.archlinux.org/packages/gplanarity/gplanarity/PKGBUILD Don't try this at home!
-- Geoffroy Carrier
Geoffroy Carrier wrote:
That's why I use sed... It's PKGBUILD-related, so nothing to do with patching :) And yes, I love big sed hacking... Here's my baby: http://aur.archlinux.org/packages/gplanarity/gplanarity/PKGBUILD Don't try this at home!
Don't worry, I won't try! Seriously, I hope all these gettext problems are reported upstream and will be fixed because it looks ugly :)
participants (8)
-
Aaron Griffin
-
Alessio Bolognino
-
Geoffroy Carrier
-
Lukáš Jirkovský
-
Mateusz Herych
-
Ray Rashif
-
stefan-husmann@t-online.de
-
Xavier