[Piuparts-commits] [piuparts] 01/03: Provide crontab and sudoers files for master and slave as seperate examples.

Holger Levsen holger at moszumanska.debian.org
Mon May 19 23:13:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch develop
in repository piuparts.

commit 92c67117467979b98aa979ffead602484647976c
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon May 19 23:12:19 2014 +0000

    Provide crontab and sudoers files for master and slave as seperate examples.
    
    Makefile: don't install crontabs and sudoers file anymore, except when installing from git.
    Packaging: split sudoers.d into master and slave and provide them in /examples/ too.
---
 Makefile                                          | 12 ------------
 README_server.txt                                 | 20 +++++++++-----------
 conf/piuparts-master.sudoers                      |  7 +++++++
 conf/{piuparts.sudoers => piuparts-slave.sudoers} |  5 ++++-
 debian/changelog                                  |  4 ++++
 debian/piuparts-master.examples                   |  1 +
 debian/piuparts-slave.examples                    |  1 +
 debian/piuparts-slave.install                     |  1 -
 8 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/Makefile b/Makefile
index 3530ebb..79b845b 100644
--- a/Makefile
+++ b/Makefile
@@ -88,18 +88,6 @@ install-conf: build-stamp
 	install -d $(DESTDIR)$(etcdir)/piuparts
 	install -m 0644 conf/piuparts.conf.sample $(DESTDIR)$(etcdir)/piuparts/piuparts.conf
 	install -m 0644 conf/distros.conf $(DESTDIR)$(etcdir)/piuparts/
-
-	install -d $(DESTDIR)$(etcdir)/cron.d
-	install -m 0644 conf/crontab-master $(DESTDIR)$(etcdir)/cron.d/piuparts-master
-	install -m 0644 conf/crontab-slave $(DESTDIR)$(etcdir)/cron.d/piuparts-slave
-	# disable shipped crontabs
-	sed -i -r '/^[^#]+/s/^/#/' $(DESTDIR)$(etcdir)/cron.d/piuparts-*
-
-	install -d $(DESTDIR)$(etcdir)/sudoers.d
-	install -m 440 conf/piuparts.sudoers $(DESTDIR)$(etcdir)/sudoers.d/piuparts
-	# disable shipped sudoers
-	sed -i -r '/^[^#]+/s/^/#/' $(DESTDIR)$(etcdir)/sudoers.d/piuparts
-
 	install -d $(DESTDIR)$(etcdir)/apache2/conf-available
 	install -m 0644 conf/piuparts-master.conf $(DESTDIR)$(etcdir)/apache2/conf-available/
 
diff --git a/README_server.txt b/README_server.txt
index 338830f..f693fb9 100644
--- a/README_server.txt
+++ b/README_server.txt
@@ -37,13 +37,11 @@ To set this up for yourself, the following steps should suffice:
  The key should be restricted to only allow running
  'piuparts-master' by prefixing it with
  'command="/usr/share/piuparts/piuparts-master",no-pty,no-port-forwarding'
-. Configure sudo (via '/etc/sudoers.d/piuparts') on the slave machine(s)
- to allow the slave account to run '/usr/sbin/piuparts' as root without
- password (otherwise  you'll be typing in a password all the time).
-. Run '/usr/share/piuparts/piuparts-slave' on the slave accounts.
- Packages that are installed want to use '/dev/tty', so you can't
- do this from cron. Also, you'll want to keep an eye on what is
- happening, to catch runaway processes and stuff.
+. Configure sudo to allow the slave account to run '/usr/sbin/piuparts'
+ as root without  password. There are examples provided in
+ /usr/share/doc/piuparts-(master|slave)/examples/.
+. Run '/usr/bin/piuparts-slave-run' and 'piuparts-slave-join' to actually
+ let the slave(s) run and to join their sessions.
 . The logs go into the master account, into subdirectories.
 
 === Setup from piuparts-master and piuparts-slaves packages
@@ -69,10 +67,10 @@ join the screen session.
 Logs are stored under /var/lib/piuparts. They are stored there because they
 are basically the result of piuparts running.
 
-There are maintenance cron jobs defined in /etc/cron.d/piuparts-*.cron. In
-particular, piuparts-report will create a web summary, defaulting to
-http://localhost/piuparts, served by Apache. Uncomment the lines in the cron
-file to enable the jobs.
+There are maintenance cron jobs defined in
+/usr/share/doc/piuparts-(master|slave)/examples/. In particular,
+piuparts-report will create a web summary, defaulting to
+http://localhost/piuparts, served by Apache.
 
 === Setup from GIT
 
diff --git a/conf/piuparts-master.sudoers b/conf/piuparts-master.sudoers
new file mode 100644
index 0000000..9cce474
--- /dev/null
+++ b/conf/piuparts-master.sudoers
@@ -0,0 +1,7 @@
+#
+# copy this file to /etc/sudoers.d/piuparts-master
+#
+
+#piuparts admins
+%piuparts       ALL=(piupartsm) ALL
+
diff --git a/conf/piuparts.sudoers b/conf/piuparts-slave.sudoers
similarity index 70%
rename from conf/piuparts.sudoers
rename to conf/piuparts-slave.sudoers
index d4205fe..169b1db 100644
--- a/conf/piuparts.sudoers
+++ b/conf/piuparts-slave.sudoers
@@ -1,7 +1,10 @@
+#
+# copy this file to /etc/sudoers.d/piuparts-slave
+#
+
 # The piuparts slave needs to handle chroots.
 piupartss	ALL = NOPASSWD: ALL
 
 #piuparts admins
 %piuparts       ALL=(piupartss) ALL
-%piuparts       ALL=(piupartsm) ALL
 
diff --git a/debian/changelog b/debian/changelog
index 3f556fe..ab22068 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,9 +11,13 @@ piuparts (0.59) UNRELEASED; urgency=low
     - fix log directory creation. (Closes: #746722)
     - fix spelling of "ditto". (Closes: #746724)
     - create graph of bugs filed and display it piuparts.d.o welcome page.
+  * Makefile: don't install crontabs and sudoers file anymore, except when
+    installing from git.
   * Packaging:
     - install cron files for piupartsm and piupartss users in
       /usr/share/doc/piuparts-(master|slave)/examples/ (Closes: #746721)
+    - split sudoers.d into master and slave and provide them in /examples/
+      too.
     - install piuparts.conf.sample in /usr/share/doc/piuparts-master/examples/
     - install slave_run and slave_join in /usr/bin/ (Closes: #746718)
 
diff --git a/debian/piuparts-master.examples b/debian/piuparts-master.examples
index a2e97c1..3403ebd 100644
--- a/debian/piuparts-master.examples
+++ b/debian/piuparts-master.examples
@@ -2,3 +2,4 @@ instances/piuparts.conf.anbe
 instances/piuparts.conf.pejacevic
 conf/piuparts.conf.sample
 conf/crontab-master
+conf/piuparts-master.sudoers
diff --git a/debian/piuparts-slave.examples b/debian/piuparts-slave.examples
index 6e5c706..8c3d8bc 100644
--- a/debian/piuparts-slave.examples
+++ b/debian/piuparts-slave.examples
@@ -1 +1,2 @@
 conf/crontab-slave
+conf/piuparts-slave.sudoers
diff --git a/debian/piuparts-slave.install b/debian/piuparts-slave.install
index 116de11..dcd0f82 100644
--- a/debian/piuparts-slave.install
+++ b/debian/piuparts-slave.install
@@ -1,4 +1,3 @@
 etc/piuparts/piuparts.conf
-etc/sudoers.d/piuparts
 usr/share/piuparts/piuparts-slave
 usr/share/piuparts/slave/*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git



More information about the Piuparts-commits mailing list