From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=DMARC_NONE,MAILING_LIST_MULTI, RDNS_DYNAMIC autolearn=no autolearn_force=no version=4.0.0 Received: from lark.theleaf.office (cable-213-132-142-63.upc.chello.be [213.132.142.63]) by chiba.3jane.net (Postfix) with SMTP id C785811A8C for ; Wed, 21 Nov 2001 03:18:13 -0600 (CST) Received: (qmail 965 invoked from network); 21 Nov 2001 09:16:03 -0000 Received: from unknown (HELO willow.theleaf.office) (10.1.1.3) by 10.1.1.1 with SMTP; 21 Nov 2001 09:16:03 -0000 Subject: Re: [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over From: Geert Bevin To: gentoo-dev@gentoo.org In-Reply-To: <20011120174806.A77914@enteract.com> References: <20011120174806.A77914@enteract.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.0 (Preview Release) Date: 21 Nov 2001 10:16:33 +0100 Message-Id: <1006334193.4764.8.camel@willow> Mime-Version: 1.0 Sender: gentoo-dev-admin@gentoo.org Errors-To: gentoo-dev-admin@gentoo.org X-BeenThere: gentoo-dev@gentoo.org X-Mailman-Version: 2.0.6 Precedence: bulk Reply-To: gentoo-dev@gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Developer discussion list List-Unsubscribe: , List-Archive: X-Archives-Salt: 9cd746a7-7f1f-479e-8dfc-bb2a35ef7756 X-Archives-Hash: 70625c85972b5c4f349cf1be32ffdc28 Great ! I've been waiting for this for a while. Would be good if this or something similar is integrated by default in portage. On Wed, 2001-11-21 at 00:48, Terry Chan wrote: > Hi, > > Hopefully other Gentoo users will find this bash script useful. It creates > Gentoo binary packages AFTER the package has already been emerge'd. > > This is useful if you don't always want to emerge with --buildpkg, but you > do want to create the Gentoo package (tbz2) at a later date. This also > gives the sys-admin a chance to modify the config files that are a part > of any given package and then those config file changes will be bundled > up into the resulting binary package. > > Script must be run as ROOT. Invocation is fairly simple. Using prozilla as > an example: > > quickpkg /var/db/pkg/net-www/prozilla-1.3.6/ > > Will create /usr/portage/packages/All/prozilla-1.3.6.tbz2 > > This binary Gentoo package can then be installed on another Gentoo system > by simplying copy the tbz2 package to the new gentoo box and then using > this command: > > emerge --usepkg /usr/portage/packages/All/prozilla-1.3.6.tbz2 > > Terry Chan > ---------- > ---- > > #!/bin/bash > # This script tries to quickly create a gentoo binary package using the > # /var/db/pkg/class-app/app/* files > # > # Example invocation should be something similar to: > # quickpkg /var/db/pkg/net-www/prozilla-1.3.6/ > # > # Resulting tbz2 file will be created in /usr/portage/packages/ALL/ > # > # Run this script as ROOT > # > # Comments or questions to tchan@enteract.com > # Terry Chan, 2001, GPL > # > PF=`cat $1/PF` > MYDIR="/tmp/portage/${PF}" > rm -r ${MYDIR}/temp > mkdir -p ${MYDIR}/temp > cp $1/* ${MYDIR}/temp > cut -f 2 -d " " $1/CONTENTS >${MYDIR}/filelist > tar cjvf ${MYDIR}/bin.tar.bz2 --files-from=${MYDIR}/filelist --no-recursion > rm ${MYDIR}/temp/CONTENTS > xpak ${MYDIR}/temp ${MYDIR}/inf.xpak > tbz2tool join ${MYDIR}/bin.tar.bz2 ${MYDIR}/inf.xpak ${MYDIR}/${PF}.tbz2 > [ -d /usr/portage/packages/All ] || mkdir -p /usr/portage/packages/All > mv ${MYDIR}/${PF}.tbz2 /usr/portage/packages/All > rm ${MYDIR}/temp/* > rm ${MYDIR}/bin.tar.bz2 ${MYDIR}/inf.xpak ${MYDIR}/filelist > -- Geert Bevin the Leaf sprl/bvba "Use what you need" Pierre Theunisstraat 1/47 http://www.theleaf.be 1030 Brussels gbevin@theleaf.be Tel & Fax +32 2 241 19 98