Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612122 - bump /space/prefix-whitelists/ on dev.g.o
Summary: bump /space/prefix-whitelists/ on dev.g.o
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Dev box issues (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-09 14:53 UTC by Michael Haubenwallner (RETIRED)
Modified: 2021-01-06 15:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Haubenwallner (RETIRED) gentoo-dev 2017-03-09 14:53:27 UTC
On dev.g.o, redlizard initiated to install /space/prefix-whitelists/ back in 2014,
using scripts from https://github.com/redlizard/prefix-whitelists

But things have changed since, now fixed in https://github.com/gentoo/prefix-whitelists

These scripts still are run by some cron job, although I fail to find the crontab for, nor do I have write access to /space/prefix-whitelists/.

So these steps are necessary as root at dev.g.o:

*) Bump prefix portage for EAPI 6 support:
Along /space/prefix-whitelists/portage/README, but with prefix-portage-2.2.28 version:
$ rm -rf /space/prefix-whitelists/portage/{usr,var}
$ sed -i -e 's/2.2.10/2.2.28/g' /space/prefix-whitelists/portage/README
$ wget http://dev.gentoo.org/~grobian/distfiles/prefix-portage-2.2.28.tar.bz2
$ tar xf prefix-portage-2.2.28.tar.bz2
$ cd prefix-portage-2.2.28
$ ./configure --prefix=/space/prefix-whitelists/portage/usr --with-offset-prefix=/space/prefix-whitelists/portage --with-portage-user=root --with-portage-group=root && make && make install

*) Switch upstream of scripts repo:
$ cd /space/prefix-whitelists/scripts/
$ sed -i -e 's/redlizard/gentoo/' .git/config
$ git pull

*) Remove mercurial based prefix tree:
$ rm -rf /space/prefix-whitelists/home/prefix-tree

Thanks!
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-04-06 07:09:08 UTC
Done that. Note that there's some local changes to the scripts I've preserved (+ making them all +x):

diff --git a/update-prefix-whitelists.sh b/update-prefix-whitelists.sh
old mode 100644
new mode 100755
index 8a5bf51..ce5ab2e
--- a/update-prefix-whitelists.sh
+++ b/update-prefix-whitelists.sh
@@ -9,13 +9,13 @@ export PYTHONPATH=/space/prefix-whitelists/portage/usr/lib/portage/pym:$PYTHONPA
 
 cd "${HOMEDIR}"
 
-bash "${SCRIPTSDIR}"/update-prefix-tree.sh
-bash "${SCRIPTSDIR}"/update-prefix-snapshots.sh
+bash "${SCRIPTSDIR}"/update-prefix-tree.sh || exit 1
+bash "${SCRIPTSDIR}"/update-prefix-snapshots.sh || exit 2
 
 [[ -e $WHITELISTDIR/prefix-tree ]] && mv $WHITELISTDIR/prefix-tree $WHITELISTDIR/prefix-tree.old
-cp prefix-tree-whitelist $WHITELISTDIR/prefix-tree
+cp -f prefix-tree-whitelist $WHITELISTDIR/prefix-tree
 rm -f $WHITELISTDIR/prefix-tree.old
 
 [[ -e $WHITELISTDIR/prefix-bootstrap-snapshot ]] && mv $WHITELISTDIR/prefix-bootstrap-snapshot $WHITELISTDIR/prefix-bootstrap-snapshot.old
-cp prefix-bootstrap-snapshot-whitelist $WHITELISTDIR/prefix-bootstrap-snapshot
+cp -f prefix-bootstrap-snapshot-whitelist $WHITELISTDIR/prefix-bootstrap-snapshot
 rm -f $WHITELISTDIR/prefix-bootstrap-snapshot.old
Comment 2 Michael Haubenwallner (RETIRED) gentoo-dev 2017-04-06 07:22:20 UTC
(In reply to Michał Górny from comment #1)
> Done that.

Thanks! Let's see what happens at next cron call.

> Note that there's some local changes to the scripts I've
> preserved (+ making them all +x):

pushed.
Comment 3 Michael Haubenwallner (RETIRED) gentoo-dev 2017-06-19 13:42:37 UTC
(In reply to Michael Haubenwallner from comment #2)
> Thanks! Let's see what happens at next cron call.

So... nothing useful yet:

As that cronjob seems to run as the nobody:exp_prefix user, the scripts fail to run portage from /space/prefix-whitelists/portage/usr, as this has 0700 permission for root:root.

Probably that portage should be owned by nobody:exp_prefix - after reinstalling with:
./configure ... --with-portage-user=nobody --with-portage-group=exp_prefix
Comment 4 Fabian Groffen gentoo-dev 2021-01-06 13:47:29 UTC
if I recall correctly the whole /space/distfiles-local thing disappeared
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2021-01-06 14:34:48 UTC
(In reply to Fabian Groffen from comment #4)
> if I recall correctly the whole /space/distfiles-local thing disappeared

/space/prefix-whitelists still exists; but it looks like we have not run the automation to update it in some time.

Is it something you still need (how is prefix-portage distributed today?)

-A
Comment 6 Fabian Groffen gentoo-dev 2021-01-06 15:07:42 UTC
I just use dev.gentoo.org and private servers for this now.