Gentoo Archives: gentoo-dev

From: Michael Boman <michael.boman@××××××××××.com>
To: Brett Simpson <Simpsonb@××××××××××××××××××.org>
Cc: Gentoo-dev <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] Suggestion for improved PORTDIR_OVERLAY
Date: Tue, 10 Jun 2003 16:05:57
Message-Id: 1055261062.18394.12.camel@r2d2.dmz1.securecirt.com
In Reply to: [gentoo-dev] Suggestion for improved PORTDIR_OVERLAY by Brett Simpson
1 On Tue, 2003-06-10 at 23:43, Brett Simpson wrote:
2 > I'm running into a problem were I have to manually rsync several servers PORTDIR_OVERLAY contents so that my custom ebuilds get used properly. While this is manageable for a couple systems it's a pain for me since I have over 6 servers and 4 workstations running Gentoo Linux.
3 >
4 > Using NFS is not an option since some of the servers are locked down as a firewall. All of these systems of course have internet access so I was thinking (which is dangerous) that maybe an additional option called PORTHTTP_OVERLAY be added. This would in effect look to a web server for custom ebuilds.
5 >
6 > My other option would be to write an rsync script to pull the files from my own rsync server to a local PORTDIR_OVERLAY on each system. This is also not a problem but it would be cooler to have the PORTHTTP_OVERLAY feature.
7 >
8 > Brett
9
10 I had the same issue, and I solved it by creating my own (tainted) rsync
11 server.
12
13 First off, I put all my local ebuilds in a own category, "local" for an
14 example, and merge that into the portage tree.
15
16 Emerge app-admin/gentoo-rsync-mirror
17
18 and at the end of /opt/gentoo-rsync/rsync-gentoo-portage.sh add
19
20 /opt/gentoo-rsync/rsync-local-portage.sh
21
22 Which contain something like this:
23
24 ---8<------8<------8<------8<------8<------8<---
25 #!/bin/bash
26
27 RSYNC="/usr/bin/rsync"
28 LOPTS="--quiet --recursive --links --perms --times --devices --compress
29 --timeout=600 --delete --exclude=CVS"
30 RSYNC_PORTDIR="/opt/gentoo-rsync/portage"
31 LSRC="/opt/gentoo-rsync/gentoo-x86/local/"
32 DST="/opt/gentoo-rsync/portage/local/"
33
34 echo "Started update at" `date` >> $0.log 2>&1
35 logger -t rsync "re-syncing local portage tree"
36 old_pwd=`pwd`
37
38 # Get the files from local CVS
39 cd /opt/gentoo-rsync/gentoo-x86 &&
40 cvs -q up -d &&
41 cd $old_pwd
42
43 ${RSYNC} ${LOPTS} ${LSRC} ${DST}
44
45 grep -q local ${RSYNC_PORTDIR}/profiles/categories 2>/dev/null
46 RETURN_VALUE=$?
47 if [ $RETURN_VALUE -eq 1 ]; then
48 echo "Adding 'local' category" >> $0.log 2>&1
49 echo local >> ${RSYNC_PORTDIR}/profiles/categories
50 else
51 echo "'local' category already exists" >> $0.log 2>&1
52 fi
53
54 echo "End: "`date` >> $0.log 2>&1
55 ---8<------8<------8<------8<------8<------8<---
56
57 /opt/gentoo-rsync/gentoo-x86 is a CVS repository (always good to keep
58 track of changes) that has already been checked out. Of course you don't
59 need to use CVS in which case you can just copy your PORTAGE_OVERLAY
60 tree over there and skip the cvs commands.
61
62 After that is done it's just point on that server as your SYNC="" mirror
63 in make.conf and you should be on your way ;)
64
65 I am currently working on policies and procedures how to create and
66 maintain servers running Gentoo GNU/Linux so that things doesn't break
67 ;)
68
69 Once it's finished you can be sure GWN gets a copy of it, but there is a
70 few issues still like having libstdc++ as a own package so no compiler
71 is needed on the server, and producing binary kernel images as packages.
72 If you have any solution how to do that I would be very grateful.
73
74
75 Best regards
76 Michael Boman
77
78 --
79 Michael Boman
80 Security Architect, SecureCiRT Pte Ltd
81 http://www.securecirt.com

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Suggestion for improved PORTDIR_OVERLAY Brett Simpson <simpsonb@××××××××××××××××××.org>