[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-755-ga3ab31d
Holger Levsen
holger at layer-acht.org
Mon Jun 18 11:37:59 UTC 2012
The following commit has been merged in the piatti branch:
commit bc69493aa8d39810c0a6dd06ac78fa8170996340
Author: David Steele <dsteele at gmail.com>
Date: Thu May 17 20:30:58 2012 -0400
Create a piuparts-server package out of the merged piatti.git files
diff --git a/Makefile b/Makefile
index a0c20d3..43d2c4c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ mandir = $(sharedir)/man
man1dir = $(mandir)/man1
libdir = $(prefix)/lib
docdir = $(prefix)/share/doc/piuparts/
+svrdocdir = $(prefix)/share/doc/piuparts-server
site26 = $(libdir)/python2.6/dist-packages
site27 = $(libdir)/python2.7/dist-packages
etcdir = $(prefix)/etc
@@ -32,11 +33,31 @@ install-doc:
gzip -9f $(man1dir)/piuparts.1
a2x --copy -f xhtml piuparts.1.txt
install -m 0644 piuparts.1.html $(docdir)
+ install -d $(svrdocdir)/
+ install -m 0755 README-server.txt $(svrdocdir)/
install-conf:
install -d $(etcdir)/piuparts
install -m 0644 conf/piuparts.conf.sample $(etcdir)/piuparts/piuparts.conf
+ install -d $(etcdir)/cron.d
+ install -m 0644 home/piupartsm/crontab $(etcdir)/cron.d/piuparts-server
+ install -m 0644 home/piupartss/crontab $(etcdir)/cron.d/piuparts-slave
+
+ install -d $(etcdir)/piuparts/known_problems
+ for fl in home/piupartsm/bin/known_problems/* ; do\
+ install -m 0644 $$fl $(etcdir)/piuparts/known_problems; \
+ done
+
+ install -d $(etcdir)/sudoers.d
+ install -m 440 conf/piuparts.sudoers $(etcdir)/sudoers.d/piuparts
+
+ install -d $(etcdir)/apache2/conf.d
+ install -m 0644 conf/piuparts.apache $(etcdir)/apache2/conf.d
+
+ install -d $(etcdir)/piuparts/scripts
+ install org/piuparts.debian.org/etc/scripts/* $(etcdir)/piuparts/scripts
+
install:
install -d $(sbindir)
sed -e 's/__PIUPARTS_VERSION__/$(version)/g' piuparts.py > piuparts
@@ -54,6 +75,33 @@ install:
install -m 0644 piupartslib/*.py $(site26)/piupartslib
install -m 0644 piupartslib/*.py $(site27)/piupartslib
+ install -d $(sharedir)/piuparts/master
+
+ for fl in home/piupartsm/bin/* ; do\
+ if [ -f $$fl ] ; then install $$fl $(sharedir)/piuparts/master ; fi ; done
+
+ install -d $(sharedir)/piuparts/slave
+
+ cp -r home/piupartss/bin/* $(sharedir)/piuparts/slave
+
+ install -d $(sharedir)/piuparts/htdocs
+ for file in org/piuparts.debian.org/htdocs/* ; do\
+ if [ -f $$file ] ; then \
+ install -m 0644 $$file $(sharedir)/piuparts/htdocs ;\
+ fi \
+ done
+
+ install -d $(sharedir)/piuparts/htdocs/images
+ install -m 0644 org/piuparts.debian.org/htdocs/images/* $(sharedir)/piuparts/htdocs/images
+
+ install -d $(sharedir)/piuparts/htdocs/templates/mail
+ for file in org/piuparts.debian.org/htdocs/templates/mail/* ; do\
+ if [ -f $$file ] ; then \
+ install -m 0644 $$file $(sharedir)/piuparts/htdocs/templates/mail ;\
+ fi \
+ done
+
+
check:
python piuparts.py unittest
python unittests.py
diff --git a/README-server.txt b/README-server.txt
new file mode 100644
index 0000000..e6cb7e9
--- /dev/null
+++ b/README-server.txt
@@ -0,0 +1,21 @@
+The piuparts-server package installs a piuparts server along the lines of
+http://piuparts.debian.org/.
+
+Before running the server, edit /etc/piuparts.conf appropriately, to define
+'sections' to be tested (e.g. 'sid') and define references to the Debian mirror
+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.
+
+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.
+
diff --git a/debian/changelog b/debian/changelog
index f84de1c..9040ba4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,11 @@ piuparts (0.45) UNRELEASED; urgency=low
configuration files.
* Added server configuration files for apache, sudo, and cron.
* Use dh_install, in preparation for multiple package build.
+ * Added packaging to create the piuparts-server package out of the old
+ piatti directory tree (Closes: #652934).
+ - Create and configure piupartss and piupartsm users.
+ - Coordinate ssh keys between master and slave users.
+ - Create working directory tree for each under /var/lib/piuparts
* packagesdb.py:
- Calculate recursive reverse dependency count, and store in PackagesDB.
- Calculate the count of packages being blocked by a failed package.
diff --git a/debian/control b/debian/control
index f7d2514..83b36bc 100644
--- a/debian/control
+++ b/debian/control
@@ -4,8 +4,8 @@ Uploaders: Holger Levsen <holger at debian.org>
Section: devel
Priority: extra
Standards-Version: 3.9.3
-Build-Depends: debhelper (>=7)
-Build-Depends-Indep: python (>=2.6.6-3~), asciidoc, xmlto, git
+Build-Depends: debhelper (>=7), python (>=2.6.6-3~)
+Build-Depends-Indep: asciidoc, xmlto, git
Homepage: http://piuparts.debian.org
Vcs-Git: git://anonscm.debian.org/piuparts/piuparts.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=piuparts/piuparts.git
@@ -26,3 +26,14 @@ Description: .deb package installation, upgrading, and removal testing tool
.
piuparts is meant as a quality assurance tool for people who create .deb
packages to test them before they upload them to the Debian package archive.
+
+Package: piuparts-server
+Architecture: all
+Depends: apt, ${python:Depends}, piuparts (>= 0.45), apache2, ${misc:Depends}, openssh-client, screen, adduser
+Breaks: piuparts (<= 0.44)
+Replaces: piuparts (<= 0.44)
+Description: piuparts master and slave server components
+ A master/slave piuparts server, along the lines of
+ http://piuparts.debian.org/.
+
+
diff --git a/debian/copyright b/debian/copyright
index bfa4b9f..05450e2 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -33,3 +33,77 @@ License: GPL-2+
License version 2 can be found in the file
'/usr/share/common-licenses/GPL-2'.
+Files: */sunny.png */weather-severe-alert.png
+Comment: These files were downloaded from http://tango.freedesktop.org/releases/
+ and released in the tango-icon-theme package. The license text is from that package.
+Copyright: 2005-2009 Ulisse Perusin <uli.peru at gmail.com>
+ 2005-2009 Steven Garrity <sgarrity at silverorange.com>
+ 2005-2009 Lapo Calamandrei <calamandrei at gmail.com>
+ 2005-2009 Ryan Collier <rcollier at novell.com>
+ 2005-2009 Rodney Dawes <dobey at novell.com>
+ 2005-2009 Andreas Nilsson <nisses.mail at home.se>
+ 2005-2009 Tuomas Kuosmanen <tigert at tigert.com>
+ 2005-2009 Garrett LeSage <garrett at novell.com>
+ 2005-2009 Jakub Steiner <jimmac at novell.com>
+License: Public Domain
+ In the preparation of the 0.8.90 release Novell took care of tracking
+ down all the contributors to get them to relicense their artwork
+ into Public Domain.
+ .
+ The COPYING file of the tarball states the following:
+ | The icons in this repository are herefore released into the Public Domain.
+ .
+ Additionally the copyright status of the files was tracked in the CVS and the
+ rdf properties of the SVGs adjusted for all files that were put into Public
+ Domain (see rdf:about and rdf:resource). Both fields contain a link to the
+ Creative Commons Public Domain Dediciation[0] as reproduced below:
+ | Public Domain Dedication
+ |
+ | Copyright-Only Dedication (based on United States law) or Public Domain
+ | Certification
+ |
+ | The person or persons who have associated work with this document (the
+ | "Dedicator" or "Certifier") hereby either (a) certifies that, to the best
+ | of his knowledge, the work of authorship identified is in the public
+ | domain of the country from which the work is published, or (b)
+ | hereby dedicates whatever copyright the dedicators holds in the work
+ | of authorship identified below (the "Work") to the public domain. A
+ | certifier, moreover, dedicates any copyright interest he may have in
+ | the associated work, and for these purposes, is described as a
+ | "dedicator" below.
+ |
+ | A certifier has taken reasonable steps to verify the copyright
+ | status of this work. Certifier recognizes that his good faith efforts
+ | may not shield him from liability if in fact the work certified is not
+ | in the public domain.
+ |
+ | Dedicator makes this dedication for the benefit of the public at
+ | large and to the detriment of the Dedicator's heirs and successors.
+ | Dedicator intends this dedication to be an overt act of relinquishment
+ | in perpetuity of all present and future rights under copyright law,
+ | whether vested or contingent, in the Work. Dedicator understands that
+ | such relinquishment of all rights includes the relinquishment of all
+ | rights to enforce (by lawsuit or otherwise) those copyrights in the
+ | Work.
+ |
+ | Dedicator recognizes that, once placed in the public domain, the Work
+ | may be freely reproduced, distributed, transmitted, used, modified,
+ | built upon, or otherwise exploited by anyone for any purpose, commercial
+ | or non-commercial, and in any way, including by methods that have not
+ | yet been invented or conceived.
+ [0] http://creativecommons.org/licenses/publicdomain/
+
+Files: */debian.png */openlogo-ng-50.png
+Copyright: 1999 Software in the Public Interest
+License: Free
+ This logo or a modified version may be used by anyone to refer to the Debian project, but does not indicate endorsement by the project.
+ .
+ Note: we would appreciate that you make the image a link to http://www.debian.org/ if you use it on a web page.
+
+Files: */valid-html401.png */w3c-valid-css.png
+Copyright: 2009 W3C<insert copyright>
+License: Free Use
+ In most cases, W3C logos and icons may be used without requesting permission
+ from W3C. When the logo usage policy requires that you obtain express written
+ permission, please send your request to the W3C Communications Team
+ (w3t-pr at w3.org)
diff --git a/debian/piuparts-server.dirs b/debian/piuparts-server.dirs
new file mode 100644
index 0000000..3916802
--- /dev/null
+++ b/debian/piuparts-server.dirs
@@ -0,0 +1 @@
+var/lib/piuparts
diff --git a/debian/piuparts-server.docs b/debian/piuparts-server.docs
new file mode 100644
index 0000000..8957e1c
--- /dev/null
+++ b/debian/piuparts-server.docs
@@ -0,0 +1 @@
+README-server.txt
diff --git a/debian/piuparts-server.install b/debian/piuparts-server.install
new file mode 100644
index 0000000..e0bc5e9
--- /dev/null
+++ b/debian/piuparts-server.install
@@ -0,0 +1,6 @@
+etc/piuparts*
+etc/cron.d/piuparts-server
+etc/cron.d/piuparts-slave
+usr/share/piuparts/*
+etc/sudoers.d/piuparts
+etc/apache2/conf.d/piuparts.apache
diff --git a/debian/piuparts-server.links b/debian/piuparts-server.links
new file mode 100644
index 0000000..1c25eca
--- /dev/null
+++ b/debian/piuparts-server.links
@@ -0,0 +1,2 @@
+/usr/share/piuparts/slave/slave_run /usr/sbin/piuparts_slave_run
+/usr/share/piuparts/slave/slave_join /usr/sbin/piuparts_slave_join
diff --git a/debian/piuparts-server.postinst b/debian/piuparts-server.postinst
new file mode 100755
index 0000000..37b43c3
--- /dev/null
+++ b/debian/piuparts-server.postinst
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+set -e
+
+pgroup=piuparts
+muser=piupartsm
+suser=piupartss
+scriptroot=/usr/share/piuparts
+userhome=$scriptroot
+
+case "$1" in
+ configure)
+
+ addgroup --system --quiet $pgroup
+
+ for user in $muser $suser
+ do
+ adduser --system --quiet --home $userhome/$user --ingroup $pgroup \
+ --shell /bin/sh $user
+
+ touch $userhome/$user/.profile
+ chown $user.$pgroup $userhome/$user/.profile
+
+ if [ $user = "piupartsm" ] ;
+ then
+ role="master"
+ else
+ role="slave"
+ fi
+
+ if ! grep $scriptroot/$role $userhome/$user/.profile > /dev/null;
+ then
+ echo PATH=\$PATH:$scriptroot:$scriptroot/$role \
+ >>$userhome/$user/.profile
+ fi
+
+ if [ ! -d $userhome/$user/.ssh ] ; then
+ install -d -o $user -g $pgroup -m 0755 $userhome/$user/.ssh
+ 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)
+ ;;
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+
+#DEBHELPER#
diff --git a/debian/piuparts-server.postrm b/debian/piuparts-server.postrm
new file mode 100644
index 0000000..6a193c5
--- /dev/null
+++ b/debian/piuparts-server.postrm
@@ -0,0 +1,53 @@
+#!/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-server.pyinstall b/debian/piuparts-server.pyinstall
new file mode 100644
index 0000000..e326928
--- /dev/null
+++ b/debian/piuparts-server.pyinstall
@@ -0,0 +1,4 @@
+piupartslib/__init__.py piupartslib
+piupartslib/conf.py piupartslib
+piupartslib/dependencyparser.py piupartslib
+piupartslib/packagesdb.py piupartslib
diff --git a/debian/piuparts.install b/debian/piuparts.install
new file mode 100644
index 0000000..f73505c
--- /dev/null
+++ b/debian/piuparts.install
@@ -0,0 +1,2 @@
+/usr/sbin/piuparts
+
diff --git a/debian/piuparts.manpages b/debian/piuparts.manpages
new file mode 100644
index 0000000..9b4a815
--- /dev/null
+++ b/debian/piuparts.manpages
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/man/man1/piuparts.1.gz
+
diff --git a/debian/piuparts.postrm b/debian/piuparts.postrm
new file mode 100644
index 0000000..619b7bb
--- /dev/null
+++ b/debian/piuparts.postrm
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+muser=piupartsm
+suser=piupartss
+
+case "$1" in
+ purge)
+
+ # may be left over from a previous version
+ if [ -d /etc/piuparts ] ; then
+ rmdir /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/rules b/debian/rules
index 3275f66..aeb3de2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,6 +21,7 @@ install: build
$(MAKE) prefix=$(CURDIR)/debian/tmp/usr etcdir=$(CURDIR)/debian/tmp/etc all
dh_install
dh_installman --sourcedir=debian/piuparts
+ dh_link
binary-arch:
binary-indep: build install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..d3827e7
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+1.0
diff --git a/home/piupartss/bin/update-piuparts-setup b/home/piupartss/bin/update-piuparts-setup
index d7f7ff5..0412766 100755
--- a/home/piupartss/bin/update-piuparts-setup
+++ b/home/piupartss/bin/update-piuparts-setup
@@ -82,8 +82,8 @@ sudo mkdir -p $PIUPARTS_TEMPDIR
# update slave home, mostly scripts
#
cd
-cp -r $SRCDIR/home/piupartss/* .
-cp -r $SRCDIR/home/piupartss/.forward .
+cp -r $SRCDIR/usr/share/piuparts/piupartss/* .
+cp -r $SRCDIR/usr/share/piuparts/piupartss/.forward .
pwd
crontab crontab
@@ -95,7 +95,7 @@ crontab crontab
#
cd ~piupartsm
-sudo su - piupartsm -c "cp -r $SRCDIR/home/piupartsm/* . ; cp -ax $SRCDIR/home/piupartsm/.forward ."
+sudo su - piupartsm -c "cp -r $SRCDIR/usr/share/piuparts/piupartsm/* . ; cp -ax $SRCDIR/usr/share/piuparts/piupartsm/.forward ."
sudo su - piupartsm -c "crontab crontab"
--
piuparts git repository
More information about the Piuparts-commits
mailing list