[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-755-ga3ab31d
Holger Levsen
holger at layer-acht.org
Mon Jun 18 11:38:16 UTC 2012
The following commit has been merged in the piatti branch:
commit f4e3599aea9cfa7bd557649193f49d764fc6f0ed
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Jun 18 00:50:33 2012 +0200
further fixup ae7cc89c223a565cc33f9a535c4154b7410ac23a and bc69493aa8d39810c0a6dd06ac78fa8170996340 after review from Andreas
diff --git a/README_server.txt b/README_server.txt
index e6cb7e9..10c0db2 100644
--- a/README_server.txt
+++ b/README_server.txt
@@ -7,9 +7,10 @@ and Packages files. Note that the server can place a significant load on the
repository. Consider setting up a local mirror, or a caching proxy for http
and apt-get, to reduce the load.
-Start the server using /sbin/slave_run, which will launch a 'screen' session.
-The slave will launch a master process via ssh, as needed, to retrieve work
-and return results. Use /sbin/slave_join to join the screen session.
+Start the server using /usr/sbin/piuparts_slave_run, which will launch a
+'screen' session. The slave will launch a master process via ssh, as needed,
+to retrieve work and return results. Use /usr/sbin/piuparts_slave_join to
+join the screen session.
Logs are stored under /var/lib/piuparts. They are stored there because they
are basically the result of piuparts running.
diff --git a/TODO b/TODO
index 764c692..5e034ef 100644
--- a/TODO
+++ b/TODO
@@ -23,9 +23,22 @@ for 0.45:
- NEWS should mention new master+slave packages.
+- split /etc/piuparts/piuparts.conf in /etc/piuparts/master.conf and
+ /etc/piuparts/slave.conf?!
+
+- the doc_root needs cleanup and the parameter needs sanitized: a trailing
+ slash is required and the $doc_root substitution should be replaced by
+ ${doc_root} and there should be no slash following the }
+ (just to have nice html without extra ////)
+
+- slave package writes into the masters homedir... comments?
+
for 0.46:
+- use cdn.debian.net as mirror default (instead of "your.mirror.here") and provide
+ a debconf template to overwrite this.
+
- in maintainer view: sort buggy states up again
- more stats and graphs:
diff --git a/debian/piuparts-master.postinst b/debian/piuparts-master.postinst
index 37b43c3..b4efda1 100755
--- a/debian/piuparts-master.postinst
+++ b/debian/piuparts-master.postinst
@@ -4,16 +4,15 @@ set -e
pgroup=piuparts
muser=piupartsm
-suser=piupartss
scriptroot=/usr/share/piuparts
-userhome=$scriptroot
+userhome=var/lib/piuparts
case "$1" in
configure)
addgroup --system --quiet $pgroup
- for user in $muser $suser
+ for user in $muser
do
adduser --system --quiet --home $userhome/$user --ingroup $pgroup \
--shell /bin/sh $user
@@ -28,7 +27,7 @@ case "$1" in
role="slave"
fi
- if ! grep $scriptroot/$role $userhome/$user/.profile > /dev/null;
+ if ! grep -q $scriptroot/$role $userhome/$user/.profile ;
then
echo PATH=\$PATH:$scriptroot:$scriptroot/$role \
>>$userhome/$user/.profile
@@ -39,30 +38,13 @@ case "$1" in
fi
done
-
- if [ ! -e $userhome/$suser/.ssh/id_rsa ] ; then
- ssh-keygen -q -f $userhome/$suser/.ssh/id_rsa -N ""
- chown $suser.$pgroup $userhome/$suser/.ssh/id_rsa \
- $userhome/$suser/.ssh/id_rsa.pub
- fi
-
- cat $userhome/$suser/.ssh/id_rsa.pub >>$userhome/$muser/.ssh/authorized_keys
- chown $muser.$pgroup $userhome/$muser/.ssh/authorized_keys
- chmod 0600 $userhome/$muser/.ssh/authorized_keys
-
install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/master
install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/master/monitor-slave
install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/backup
- if [ -d /var/lib/piuparts/htdocs ] ; then
- rm -rf /var/lib/piuparts/htdocs
- fi
install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/htdocs
cp -rf $scriptroot/htdocs/* /var/lib/piuparts/htdocs/
- install -d -o $suser -g $pgroup -m 0755 /var/lib/piuparts/slave
- install -d -o $suser -g $pgroup -m 0755 /var/lib/piuparts/slave/0
-
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/piuparts-master.postrm b/debian/piuparts-master.postrm
deleted file mode 100755
index 6a193c5..0000000
--- a/debian/piuparts-master.postrm
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-set -e
-
-muser=piupartsm
-suser=piupartss
-
-case "$1" in
- purge)
- for user in $muser $suser
- do
- rm -rf /usr/share/piuparts/$user
- done
-
- if [ -d /user/share/piuparts ] ; then
- rmdir /usr/share/piuparts
- fi
-
- if [ -d /var/lib/piuparts/master ] ; then
- rm -rf /var/lib/piuparts/master
- fi
-
- if [ -d /var/lib/piuparts/slave ] ; then
- rm -rf /var/lib/piuparts/slave
- fi
-
- if [ -d /var/lib/piuparts/htdocs ] ; then
- rm -rf /var/lib/piuparts/htdocs
- fi
-
- if [ -d /var/lib/piuparts/backup ] ; then
- rm -rf /var/lib/piuparts/backup
- fi
-
- if [ -d /var/lib/piuparts ] ; then
- rmdir /var/lib/piuparts
- fi
-
- if [ -d /etc/piuparts ] ; then
- rm -rf /etc/piuparts
- fi
-
- ;;
- upgrade|remove|failed-upgrade|abort-install|abort-upgrade)
- ;;
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-#DEBHELPER#
-
diff --git a/debian/piuparts-master.postinst b/debian/piuparts-slave.postinst
similarity index 72%
copy from debian/piuparts-master.postinst
copy to debian/piuparts-slave.postinst
index 37b43c3..7c97688 100755
--- a/debian/piuparts-master.postinst
+++ b/debian/piuparts-slave.postinst
@@ -6,14 +6,14 @@ pgroup=piuparts
muser=piupartsm
suser=piupartss
scriptroot=/usr/share/piuparts
-userhome=$scriptroot
+userhome=var/lib/piuparts
case "$1" in
configure)
addgroup --system --quiet $pgroup
- for user in $muser $suser
+ for user in $suser
do
adduser --system --quiet --home $userhome/$user --ingroup $pgroup \
--shell /bin/sh $user
@@ -28,7 +28,7 @@ case "$1" in
role="slave"
fi
- if ! grep $scriptroot/$role $userhome/$user/.profile > /dev/null;
+ if ! grep -q $scriptroot/$role $userhome/$user/.profile ;
then
echo PATH=\$PATH:$scriptroot:$scriptroot/$role \
>>$userhome/$user/.profile
@@ -50,16 +50,6 @@ case "$1" in
chown $muser.$pgroup $userhome/$muser/.ssh/authorized_keys
chmod 0600 $userhome/$muser/.ssh/authorized_keys
- install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/master
- install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/master/monitor-slave
- install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/backup
-
- if [ -d /var/lib/piuparts/htdocs ] ; then
- rm -rf /var/lib/piuparts/htdocs
- fi
- install -d -o $muser -g $pgroup -m 0755 /var/lib/piuparts/htdocs
- cp -rf $scriptroot/htdocs/* /var/lib/piuparts/htdocs/
-
install -d -o $suser -g $pgroup -m 0755 /var/lib/piuparts/slave
install -d -o $suser -g $pgroup -m 0755 /var/lib/piuparts/slave/0
--
piuparts git repository
More information about the Piuparts-commits
mailing list