Gentoo Archives: gentoo-dev

From: Sven Vermeulen <sven.vermeulen@××××××.be>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] emerge once -- distribute resulting binaries across lan?
Date: Thu, 03 Oct 2002 11:13:04
Message-Id: 20021003161307.GA29075@Daikan.pandora.be
In Reply to: [gentoo-dev] emerge once -- distribute resulting binaries across lan? by Michael Dawson
1 On Thu, Oct 03, 2002 at 09:16:44AM -0600, Michael Dawson wrote:
2 > Is there any automated way to generate an install package (rpm,
3 > whatever) from an emerge? I want to emerge (retrieve, configure,
4 > compile, install) on one workstation and then repeat just the
5 > install phase on other workstations that I use.
6
7 I have something that has a start of your features. Its very plain and
8 simple: it checks the files in the CONTENTS-file of the package and places it
9 in a tarball, together with the /var/db/pkg/[type]/[name]-[version] directory
10 contents so that portage thinks it has installed it by itself.
11
12 It also contains the magical word "system" which will make a tarball of the
13 packages that are listed in the file "packages", which has use for me, but
14 probably not for you.
15
16 #v+
17
18 #!/bin/bash
19
20 # $1 is kind/package-version or "system"
21 # $2 is tarfilename.tar
22
23 # Create the tarball, add something
24 tar cpf $2 /usr/portage/licenses/GPL-2
25
26 if [ $1 == "system" ]
27 then
28 for n in `cat packages`
29 do
30 echo "Adding $n"
31 for p in `cat /var/db/pkg/$n/CONTENTS | cut -f 2 -d ' '`
32 do
33 if [ ! -d "$p" ]
34 then
35 tar rpf stage3.tar "$p" 2>/dev/null
36 fi
37 done
38 done
39 else
40 for p in `cat /var/db/pkg/$1/CONTENTS | cut -f 2 -d ' '`
41 do
42 if [ ! -d "$p" ]
43 then
44 tar rpf $2 "$p" 2>/dev/null;
45 fi
46 done
47 tar rpf $2 /var/db/pkg/$1;
48 fi
49
50 gzip $2;
51
52 #v-
53
54 F.i.
55 ~# makebinary app-office/openoffice-1.0.1 OOo-1.0.1.tar
56 makes a tarball called "OOo-1.0.1.tar.gz" with all the files provided by an
57 "emerge openoffice".
58
59 HTH,
60 Sven Vermeulen

Replies

Subject Author
Re: [gentoo-dev] emerge once -- distribute resulting binaries across lan? Paul de Vrieze <gentoo-user@××××××××.net>