* [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over
@ 2001-11-20 23:48 Terry Chan
2001-11-21 9:16 ` Geert Bevin
0 siblings, 1 reply; 2+ messages in thread
From: Terry Chan @ 2001-11-20 23:48 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
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
----------
[-- Attachment #2: quickpkg --]
[-- Type: text/plain, Size: 965 bytes --]
#!/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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over
2001-11-20 23:48 [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over Terry Chan
@ 2001-11-21 9:16 ` Geert Bevin
0 siblings, 0 replies; 2+ messages in thread
From: Geert Bevin @ 2001-11-21 9:16 UTC (permalink / raw
To: gentoo-dev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-11-21 9:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-20 23:48 [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over Terry Chan
2001-11-21 9:16 ` Geert Bevin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox