From: Terry Chan <tchan@enteract.com>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over
Date: Tue, 20 Nov 2001 17:48:06 -0600 [thread overview]
Message-ID: <20011120174806.A77914@enteract.com> (raw)
[-- 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
next reply other threads:[~2001-11-20 23:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-20 23:48 Terry Chan [this message]
2001-11-21 9:16 ` [gentoo-dev] Useful bash script to create Gentoo binary packages after emerge is over Geert Bevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011120174806.A77914@enteract.com \
--to=tchan@enteract.com \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox