[pacman-dev] Split installs for makepkg
I'd like any opinion about doing split installs using the method outlined below. Is this a reasonable approach or am I missing something obvious? It seems to work okay and does not involve any hacking or patching of /usr/bin/makepkg. This example is for building qt-copy and qt-copy-doc from KDE4 svn trunk using qt-copy/PKGBUILD as the "parent" PKGBUILD and removing the build() function from the "child" PKGBUILD.qt-copy-doc and putting that logic into the parent build_doc() function... pkgname=qt-copy pkgver=4.3.3 pkgrel=7 _pkgfqn=qt-x11-opensource-src-$pkgver ... other typical pre build variables build() { ... pre make instructions make || return 1 build_doc ## ie; requires build_examples() + PKGBUILD.qt-copy-examples #build_examples make INSTALL_ROOT=$startdir/pkg install || return 1 ... post make instructions } build_doc() { mkdir -p $pkgdir/usr/share/doc/qt cp -r $srcdir/$_pkgfqn/doc/html/* $pkgdir/usr/share/doc/qt cd $startdir makepkg --asroot -R -p PKGBUILD.qt-copy-doc rm -rf $pkgdir/* cd $srcdir/$_pkgfqn } # ll /home/packages total 38268 -rw-r--r-- 1 archlinux users 16812720 2008-02-10 16:07 qt-copy-4.3.3-7-x86_64.pkg.tar.bz2 -rw-r--r-- 1 archlinux users 22322007 2008-02-10 16:06 qt-copy-doc-4.3.3-7-any.pkg.tar.bz2 # pacman -Qi qt-copy Name : qt-copy Version : 4.3.3-7 URL : http://www.trolltech.com/products/qt Licenses : GPL Groups : kdesvn kdesvn-all Provides : qt=4.3.3 Depends On : libpng libjpeg libxi libxcursor libxinerama mesa fontconfig libxrandr dbus glib2 Optional Deps : None Required By : poppler-qt qca qimageblitz qt-copy-doc soprano strigi tapioca-qt telepathy-qt Conflicts With : qt Replaces : None Installed Size : 45785.92 K Packager : Mark Constable <markc@renta.net> Architecture : x86_64 Build Date : Sun 10 Feb 2008 16:07:08 EST Install Date : Sun 10 Feb 2008 16:07:13 EST Install Reason : Explicitly installed Install Script : No Description : The QT gui toolkit # pacman -Qi qt-copy-doc Name : qt-copy-doc Version : 4.3.3-7 URL : http://www.trolltech.com/products/qt Licenses : GPL Groups : None Provides : qt-doc Depends On : qt>=4.3.3 Optional Deps : None Required By : None Conflicts With : qt-doc Replaces : None Installed Size : 56325.43 K Packager : Mark Constable <markc@renta.net> Architecture : any Build Date : Sun 10 Feb 2008 16:06:56 EST Install Date : Sun 10 Feb 2008 16:15:09 EST Install Reason : Explicitly installed Install Script : No Description : The QT gui toolkit documentation --markc
2008/2/10, Mark Constable <markc@renta.net>:
I'd like any opinion about doing split installs using the method outlined below. Is this a reasonable approach or am I missing something obvious?
It seems to work okay and does not involve any hacking or patching of /usr/bin/makepkg. This example is for building qt-copy and qt-copy-doc from KDE4 svn trunk using qt-copy/PKGBUILD as the "parent" PKGBUILD and removing the build() function from the "child" PKGBUILD.qt-copy-doc and putting that logic into the parent build_doc() function...
IIRC something like this was proposed by Alessio AKA mOLOk. You can find it in ML archives or bugtracker. -- Roman Kyrylych (Роман Кирилич)
On Tue, Feb 12, 2008 at 10:10 PM, Roman Kyrylych <roman.kyrylych@gmail.com> wrote:
2008/2/10, Mark Constable <markc@renta.net>:
I'd like any opinion about doing split installs using the method outlined below. Is this a reasonable approach or am I missing something obvious?
It seems to work okay and does not involve any hacking or patching of /usr/bin/makepkg. This example is for building qt-copy and qt-copy-doc from KDE4 svn trunk using qt-copy/PKGBUILD as the "parent" PKGBUILD and removing the build() function from the "child" PKGBUILD.qt-copy-doc and putting that logic into the parent build_doc() function...
IIRC something like this was proposed by Alessio AKA mOLOk. You can find it in ML archives or bugtracker.
Right, you referenced everything there : http://bugs.archlinux.org/task/8187 About Mark's proposal, that doesn't seem like the cleanest way. I mean, calling makepkg from a PKGBUILD sounds a bit ugly. Probably cleaner implementations involve hacking or patching of makepkg :)
On 25 Feb 2008 22:04, Xavier wrote:
IIRC something like this was proposed by Alessio AKA mOLOk. You can find it in ML archives or bugtracker.
Right, you referenced everything there : http://bugs.archlinux.org/task/8187
About Mark's proposal, that doesn't seem like the cleanest way. I mean, calling makepkg from a PKGBUILD sounds a bit ugly. Probably cleaner implementations involve hacking or patching of makepkg :)
I posted to ping the issue of split packages and the main point of my current suggestion is that it indeed does *not* require any patching of makepkg meaning I can, and am, using the method right now to produce split packages via an unpatched makepkg, albeit in a crude and perhaps ugly manner. The only real world example in actual use, that I am aware of, is the KDEmod method and that requires a fairly invasive 9k patch that seems difficult to forward port to later versions of makepkg. This bothers me and is why I looked into another method to achieve at least simple split packages (*-doc and *-dev) out from the main package. To my surprise I found the absolute simplest recursive approach actually seems to work, for my immediate needs. For the record here again is a snippet from my current kde-svn build system... build() { ... do regular stuff to build qt-copy build_doc } build_doc(){ mv $pkgdir $pkgdir.orig && mkdir $pkgdir || return 1 mkdir -p $pkgdir/{usr/bin,usr/share/doc} mv $pkgdir.orig/usr/share/doc/* $pkgdir/usr/share/doc mv $pkgdir.orig/usr/bin/qtdemo $pkgdir/usr/bin cd $startdir makepkg --asroot -R -p PKGBUILD.doc rm -rf $pkgdir mv $pkgdir.orig $pkgdir cd $srcdir/$_pkgfqn } # cat qt-copy/PKGBUILD.doc pkgname=qt-copy-doc pkgver=4.3.3 pkgrel=20080225 pkgdesc="The Qt Gui Toolkit Documentation" arch=(any) url=http://www.trolltech.com/products/qt _pkgfqn=qt-x11-opensource-src-$pkgver depends=("qt>=$pkgver") source=(ftp://ftp.trolltech.com/qt/source/$_pkgfqn.tar.gz) license=(GPL) replaces=(qt-doc) provides=(qt-doc) conflicts=(qt-doc) --markc
On Mon, Feb 25, 2008 at 10:50:30PM +1000, Mark Constable wrote:
On 25 Feb 2008 22:04, Xavier wrote:
IIRC something like this was proposed by Alessio AKA mOLOk. You can find it in ML archives or bugtracker.
Right, you referenced everything there : http://bugs.archlinux.org/task/8187
About Mark's proposal, that doesn't seem like the cleanest way. I mean, calling makepkg from a PKGBUILD sounds a bit ugly. Probably cleaner implementations involve hacking or patching of makepkg :)
I posted to ping the issue of split packages and the main point of my current suggestion is that it indeed does *not* require any patching of makepkg meaning I can, and am, using the method right now to produce split packages via an unpatched makepkg, albeit in a crude and perhaps ugly manner.
The only real world example in actual use, that I am aware of, is the KDEmod method and that requires a fairly invasive 9k patch that seems difficult to forward port to later versions of makepkg. This bothers me and is why I looked into another method to achieve at least simple split packages (*-doc and *-dev) out from the main package. To my surprise I found the absolute simplest recursive approach actually seems to work, for my immediate needs. For the record here again is a snippet from my current kde-svn build system...
Right, I am not denying the fact that your approach is practical and useful. I personally don't even have the need of splitting packages in the first place. I was just pointing out that the ideas suggested in FS#8187 look like a cleaner approach, and that it should probably be implemented by people who need and want that feature ;)
participants (3)
-
Mark Constable
-
Roman Kyrylych
-
Xavier