Skip to content
Commits on Source (77)
......@@ -5,8 +5,8 @@ mandir = $(sharedir)/man
man1dir = $(mandir)/man1
man8dir = $(mandir)/man8
libdir = $(prefix)/lib
docdir = $(prefix)/share/doc/piuparts/
site27 = $(libdir)/python2.7/dist-packages
docdir = $(prefix)/share/doc/piuparts
site3 = $(libdir)/python3/dist-packages
htdocsdir = $(sharedir)/piuparts/htdocs
etcdir = $(prefix)/etc
......@@ -23,7 +23,7 @@ endif
SCRIPTS_TEMPLATES = $(wildcard *.in master-bin/*.in slave-bin/*.in conf/*.in)
SCRIPTS_PYTHON_BINARY = $(wildcard *.py master-bin/*.py slave-bin/*.py)
SCRIPTS_GENERATED = $(SCRIPTS_TEMPLATES:.in=) $(SCRIPTS_PYTHON_BINARY:.py=)
DOCS_GENERATED = piuparts.1 piuparts.1.html piuparts_slave_run.8 piuparts_slave_join.8 piuparts_slave_stop.8 README.html README_server.html
DOCS_GENERATED = piuparts.1 piuparts_slave_run.8 piuparts_slave_join.8 piuparts_slave_stop.8 docs/build
define placeholder_substitution
sed -r \
......@@ -45,7 +45,7 @@ all: build
python_scripts = $(wildcard *.py piupartslib/*.py master-bin/*.py slave-bin/*.py)
python-syntax-check:
@set -e -x; $(foreach py,$(python_scripts),python -m py_compile $(py);)
@set -e -x; $(foreach py,$(python_scripts),python3 -m py_compile $(py);)
$(RM) $(python_scripts:=c)
build: build-stamp build-master-stamp
......@@ -63,31 +63,63 @@ build-master-stamp:
build-doc: $(DOCS_GENERATED)
README.html: README.txt
a2x --copy -a toc -a toclevels=3 -f xhtml -r /etc/asciidoc/ README.txt
docs/build: docs/build
python3 -m sphinx docs/ docs/build/
README_server.html: README_server.txt
a2x --copy -a toc -a toclevels=3 -f xhtml -r /etc/asciidoc/ README_server.txt
piuparts.1: docs/piuparts/piuparts.1.txt
python3 -m sphinx -b man -c docs/piuparts/ docs/piuparts/ ./
piuparts.1: piuparts.1.txt
a2x -f manpage piuparts.1.txt
piuparts_slave_run.8: docs/piuparts_slave_run/piuparts_slave_run.8.txt
python3 -m sphinx -b man -c docs/piuparts_slave_run/ docs/piuparts_slave_run/ ./
piuparts_slave_run.8: piuparts_slave_run.8.txt
a2x -f manpage piuparts_slave_run.8.txt
piuparts_slave_join.8: piuparts_slave_join.8.txt
a2x -f manpage piuparts_slave_join.8.txt
piuparts_slave_stop.8: piuparts_slave_stop.8.txt
a2x -f manpage piuparts_slave_stop.8.txt
piuparts.1.html: piuparts.1.txt
a2x --copy -f xhtml piuparts.1.txt
piuparts_slave_join.8: docs/piuparts_slave_join/piuparts_slave_join.8.txt
python3 -m sphinx -b man -c docs/piuparts_slave_join/ docs/piuparts_slave_join/ ./
piuparts_slave_stop.8: docs/piuparts_slave_stop/piuparts_slave_stop.8.txt
python3 -m sphinx -b man -c docs/piuparts_slave_stop/ docs/piuparts_slave_stop/ ./
install-doc: build-stamp
# txt
install -d $(DESTDIR)$(docdir)/
install -m 0644 README.txt README.html README_server.txt README_server.html docbook-xsl.css $(DESTDIR)$(docdir)/
install -m 0644 docs/README.txt docs/README_server.txt $(DESTDIR)$(docdir)/
# html
install -d $(DESTDIR)$(docdir)/html/
install -m 0644 docs/build/*.html $(DESTDIR)$(docdir)/html/
install -m 0644 docs/build/searchindex.js $(DESTDIR)$(docdir)/html/
install -m 0644 docs/build/objects.inv $(DESTDIR)$(docdir)/html/
install -d $(DESTDIR)$(docdir)/html/_static/
install -m 0644 docs/build/_static/* $(DESTDIR)$(docdir)/html/_static
install -d $(DESTDIR)$(docdir)/html/piuparts/
install -m 0644 docs/build/piuparts/index.html $(DESTDIR)$(docdir)/html/piuparts/
install -m 0644 docs/build/piuparts/piuparts.1.html $(DESTDIR)$(docdir)/html/piuparts/
install -d $(DESTDIR)$(docdir)/html/piuparts_slave_run/
install -m 0644 docs/build/piuparts_slave_run/index.html $(DESTDIR)$(docdir)/html/piuparts_slave_run/
install -m 0644 docs/build/piuparts_slave_run/piuparts_slave_run.8.html $(DESTDIR)$(docdir)/html/piuparts_slave_run/
install -d $(DESTDIR)$(docdir)/html/piuparts_slave_join/
install -m 0644 docs/build/piuparts_slave_join/index.html $(DESTDIR)$(docdir)/html/piuparts_slave_join/
install -m 0644 docs/build/piuparts_slave_join/piuparts_slave_join.8.html $(DESTDIR)$(docdir)/html/piuparts_slave_join/
install -d $(DESTDIR)$(docdir)/html/piuparts_slave_stop/
install -m 0644 docs/build/piuparts_slave_stop/index.html $(DESTDIR)$(docdir)/html/piuparts_slave_stop/
install -m 0644 docs/build/piuparts_slave_stop/piuparts_slave_stop.8.html $(DESTDIR)$(docdir)/html/piuparts_slave_stop/
install -d $(DESTDIR)$(docdir)/html/
install -m 0644 docs/build/*.html $(DESTDIR)$(docdir)/html/
install -m 0644 docs/build/searchindex.js $(DESTDIR)$(docdir)/html/
install -m 0644 docs/build/objects.inv $(DESTDIR)$(docdir)/html/
install -d $(DESTDIR)$(docdir)/html/_static/
install -m 0644 docs/build/_static/* $(DESTDIR)$(docdir)/html/_static
install -d $(DESTDIR)$(docdir)/html/piuparts/
install -m 0644 docs/build/piuparts/index.html $(DESTDIR)$(docdir)/html/piuparts/
install -m 0644 docs/build/piuparts/piuparts.1.html $(DESTDIR)$(docdir)/html/piuparts/
install -d $(DESTDIR)$(docdir)/html/piuparts_slave_run/
install -m 0644 docs/build/piuparts_slave_run/index.html $(DESTDIR)$(docdir)/html/piuparts_slave_run/
install -m 0644 docs/build/piuparts_slave_run/piuparts_slave_run.8.html $(DESTDIR)$(docdir)/html/piuparts_slave_run/
install -d $(DESTDIR)$(docdir)/html/piuparts_slave_join/
install -m 0644 docs/build/piuparts_slave_join/index.html $(DESTDIR)$(docdir)/html/piuparts_slave_join/
install -m 0644 docs/build/piuparts_slave_join/piuparts_slave_join.8.html $(DESTDIR)$(docdir)/html/piuparts_slave_join/
install -d $(DESTDIR)$(docdir)/html/piuparts_slave_stop/
install -m 0644 docs/build/piuparts_slave_stop/index.html $(DESTDIR)$(docdir)/html/piuparts_slave_stop/
install -m 0644 docs/build/piuparts_slave_stop/piuparts_slave_stop.8.html $(DESTDIR)$(docdir)/html/piuparts_slave_stop/
# manpages
install -d $(DESTDIR)$(man1dir)
install -m 0644 piuparts.1 $(DESTDIR)$(man1dir)/
gzip -9fn $(DESTDIR)$(man1dir)/piuparts.1
......@@ -96,7 +128,6 @@ install-doc: build-stamp
gzip -9fn $(DESTDIR)$(man8dir)/piuparts_slave_run.8
gzip -9fn $(DESTDIR)$(man8dir)/piuparts_slave_join.8
gzip -9fn $(DESTDIR)$(man8dir)/piuparts_slave_stop.8
install -m 0644 piuparts.1.html $(DESTDIR)$(docdir)/
install-conf: build-stamp
install -d $(DESTDIR)$(etcdir)/piuparts
......@@ -117,8 +148,8 @@ install-conf-4-running-from-git: build-stamp
install -m 0755 update-piuparts-master-setup $(DESTDIR)$(sharedir)/piuparts/master/
install-common: build-stamp
install -d $(DESTDIR)$(site27)/piupartslib
install -m 0644 piupartslib/*.py $(DESTDIR)$(site27)/piupartslib/
install -d $(DESTDIR)$(site3)/piupartslib
install -m 0644 piupartslib/*.py $(DESTDIR)$(site3)/piupartslib/
install -d $(DESTDIR)$(sharedir)/piuparts/lib
install -m 0644 lib/*.sh $(DESTDIR)$(sharedir)/piuparts/lib/
......@@ -130,9 +161,9 @@ install-master: build-master-stamp install-common
install -d $(DESTDIR)$(sharedir)/piuparts
install -m 0755 piuparts-master piuparts-master-backend piuparts-report piuparts-analyze $(DESTDIR)$(sharedir)/piuparts/
# do not install the templates (*.in, *.py)
# do not install the templates (*.in, *.py, *.) nor __pycache__
install -d $(DESTDIR)$(sharedir)/piuparts/master
install -m 0755 $(filter-out %.in %.py,$(wildcard master-bin/*)) $(DESTDIR)$(sharedir)/piuparts/master/
install -m 0755 $(filter-out %.in %.py %__pycache__,$(wildcard master-bin/*)) $(DESTDIR)$(sharedir)/piuparts/master/
install -d $(DESTDIR)$(sharedir)/piuparts/known_problems
install -m 0644 known_problems/*.conf $(DESTDIR)$(sharedir)/piuparts/known_problems/
......@@ -156,9 +187,9 @@ install-slave: install-common
install -d $(DESTDIR)$(sharedir)/piuparts
install -m 0755 piuparts-slave $(DESTDIR)$(sharedir)/piuparts/
# do not install the templates (*.in, *.py)
# do not install the templates (*.in, *.py) nor __pycache__
install -d $(DESTDIR)$(sharedir)/piuparts/slave
install -m 0755 $(filter-out %.in %.py,$(wildcard slave-bin/*)) $(DESTDIR)$(sharedir)/piuparts/slave/
install -m 0755 $(filter-out %.in %.py %__pycache__,$(wildcard slave-bin/*)) $(DESTDIR)$(sharedir)/piuparts/slave/
install -d $(DESTDIR)$(etcdir)/piuparts
@set -e -x ; \
......@@ -170,13 +201,13 @@ install: install-master install-slave
check:
nosetests --verbose
python3 -m nose --verbose
clean:
rm -f build-stamp
rm -f build-master-stamp
rm -f $(DOCS_GENERATED)
rm -f piuparts.1.xml README.xml README_server.xml docbook-xsl.css piuparts.html
rm -fr $(DOCS_GENERATED)
rm -fr .doctrees/
rm -f *.pyc piupartslib/*.pyc master-bin/*.pyc slave-bin/*.pyc tests/*.pyc
rm -f $(SCRIPTS_GENERATED)
$(RM) helpers/debiman-piuparts-distill/debiman-piuparts-distill
......
To: submit@bugs.debian.org
Subject: obsolete conffiles (policy 10.7.3):
Package:
Version:
Severity: important
User: debian-qa@lists.debian.org
Usertags: piuparts
Hi,
during a test with piuparts I noticed your package has obsolete
conffiles.
To see the policy statement,
https://www.debian.org/doc/debian-policy/ch-files.html#behavior
10.7.3: "[...] Obsolete configuration files without local changes
should be removed by the package during upgrade.[11]"
[11] The dpkg-maintscript-helper tool, available from the dpkg
package, can help for this task.
Quotes from manpage:
"
[...]
If the conffile has not been shipped for several versions, and you
are now modifying the maintainer scripts to clean up the obsolete
file, prior-version should be based on the version of the package
that you are now preparing, not the first version of the package
that lacked the conffile. This applies to all other actions in the
same way.
For example, for a conffile removed in version 2.0-1 of a package,
prior-version should be set to 2.0-1~. This will cause the conffile
to be removed even if the user rebuilt the previous version 1.0-1
as 1.0-1local1. Or a package switching a path from a symlink (shipped
in version 1.0-1) to a directory (shipped in version 2.0-1), but only
performing the actual switch in the maintainer scripts in version
3.0-1, should set prior-version to 3.0-1~.
[...]
"
The debian/deb_package.maintscript file should look like this:
rm_conffile /path/to/the/obsolete_conffile X.X-X~
Please read the manpage for details.
Attached you will find a compressed log file. To find the line
in the log file look for "OBSOLETE CONFFILE". Here are the line(s)
in package_version_log_file:
OBSOLETE CONFFILE /path/to/file REGISTERED BY srptools
See also https://wiki.debian.org/DpkgConffileHandling
There may be false positives, e.g. if a conffile was converted
to a maintainer script managed configuration file.
cheers,
......@@ -2,7 +2,7 @@
# set PATH, variable substitution is not supported (PATH=$PATH:/my/bin)
PATH=@sharedir@/piuparts/master:@sharedir@/piuparts:/usr/bin:/bin
PYTHONPATH=@libdir@/python2.7/dist-packages
PYTHONPATH=@libdir@/python3/dist-packages
#
# cleanup $HTDOCS/daily.lock
......
......@@ -6,8 +6,8 @@ PATH=@sharedir@/piuparts/slave:/usr/bin:/bin
#
# start slave_run automatically after reboots
#
@reboot slave_cleanup ; slave_run
42 * * * * slave_cleanup ; ! slave_run >/dev/null 2>&1 || echo "piuparts-slave started by cron"
#@reboot slave_cleanup ; slave_run
#42 * * * * slave_cleanup ; ! slave_run >/dev/null 2>&1 || echo "piuparts-slave started by cron"
#
# monitor slave session every hour
......
piuparts (1.0.2) UNRELEASED; urgency=medium
piuparts (1.1.0) unstable; urgency=medium
* Team upload.
[ Herbert Parentes Fortes Neto ]
* piuparts.py: use Popen with universal_newlines=True. Py2, Py3 compatible.
* New mail template: add bug-templates/obsolete_conffiles.mail.
[ Thomas Goirand ]
* Switch to package to Python 3:
- Replaced python- with python3- in debian/control.
- Removed all python2 (>= 2.7) by a ${python3:Depends}.
- Replaced python2 by python3 in debian/rules.
- Replaced dh_python2 stuff by dh_python3 in debian/rules.
- Patched piupartslib/conf.py, piupartslib/dependencyparser.py,
piupartslib/packagesdb.py, piupartslib/pkgsummary.py, tests/unittests.py
so that they are Python 3 compatible.
- Removed python-lzma (build-)depends as it's in standard in Py 3.
- Add python3-six as (build-)depends.
- Fix Makefile to use python3 and not python2.
- d/piuparts-common.install: switch to python 3.
- d/rules: remove all __pycache__ folder before proceeding to install.
- Add --shebang=/usr/bin/python3 when calling dh_python3.
- Do not use -N piuparts-master -N piuparts-slave when calling dh_python3
for the 2nd time, so that it correctly adds the interpreter as depends.
- Lintian overrides "python-script-but-no-python-dep": that's ok, because
piuparts-common already has the dependency.
[ Bastian Venthur ]
* piuparts-analyze.py: updates for python-debianbts 2.10.0 deprecating
some methodcalls, update depends in d/control accordingly.
Closes: #919170.
[ Nis Martensen ]
* piuparts, piuparts-master-backend, piuparts-report,
detect_well_known_errors, piupartslib/(dependencyparser|packagesdb):
several fixes and improvements related to porting to python3.
[ James Clarke ]
* piuparts: Fix diff_meta_data reporting every file as new and removed.
[ Mattia Rizzolo ]
* piuparts-slave.py: port to python3.
[ David Prévot ]
* Use the same favicon as the one from www.d.o.
* piuparts.conf-template.pejacevic: add bullseye to sections.
Closes: #933061.
-- Holger Levsen <holger@debian.org> Tue, 30 Jul 2019 00:58:17 -0300
[ Holger Levsen ]
* Bump version number to 1.1.x due to the switch to python3.
* piuparts.conf-template.pejacevic:
- also test bullseye and bullseye-rcmd. Closes: #933061.
- increase precedence values for oldstable and older.
* docs/README_server.txt, docs/piuparts/piuparts.1.txt and piuparts.py:
update examples for buster being stable and bullseye being the new
testing.
* Use /usr/bin/python3 everywhere. Closes: #937293.
* d/control:
- bump standards version to 4.4.1, no changes needed.
- bump debhelper-compat to 12.
* d/tests: Add simple smoke-test.
* htdocs/news.tpl:
- mention new suites bullseye and bullseye-rcmd being tested.
- mention piuparts.debian.org is running the python3 branch.
- add farewell note.
* instances/Makefile: set default mirror to deb.debian.org.
* d/rules: set GOCACHE to a safely writable directory during build as
the cache is mandatory with Go 1.12.
* d/control:
- bump standards version to 4.4.1, no changes needed.
- bump debhelper-compat to 12.
- remove myself from uploaders. It was fun! Policy is your friend. Trust
the Policy. Love the Policy. Obey the Policy.
* instances/*, docs/README_pejacevic.txt and htdocs/index: stop mentioning
piu-slave-bm-a.debian.org.
-- Holger Levsen <holger@debian.org> Wed, 08 Jan 2020 20:50:42 +0100
piuparts (1.0.1) unstable; urgency=medium
......
Source: piuparts
Maintainer: piuparts developers team <piuparts-devel@alioth-lists.debian.net>
Uploaders:
Holger Levsen <holger@debian.org>
Section: devel
Priority: optional
Standards-Version: 4.3.0
Standards-Version: 4.4.1
Rules-Requires-Root: no
Build-Depends:
asciidoc,
debhelper-compat (= 11),
debhelper-compat (= 12),
dh-python,
python (>= 2.7),
python-debian,
python-apt,
python-distro-info,
python-nose,
python-debianbts,
python-yaml,
python-mox3,
python-lzma,
python3-all,
python3-apt,
python3-debian,
python3-debianbts (>= 2.10.0),
python3-distro-info,
python3-mox3,
python3-nose,
python3-six,
python3-sphinx,
python3-yaml,
golang-any,
xmlto,
Build-Depends-Indep:
git,
Homepage: https://piuparts.debian.org
......@@ -35,11 +32,12 @@ Depends:
# keep this list in sync with piuparts-slave-from-git-deps
debootstrap (>= 1.0.89~),
debsums (>= 2.2.2~),
libjs-sphinxdoc,
lsb-release,
lsof,
mount,
python-debian,
${python:Depends},
python3-debian,
${python3:Depends},
${misc:Depends},
Recommends:
adequate
......@@ -66,19 +64,18 @@ Depends:
# keep this list in sync with piuparts-master-from-git-deps
adduser,
openssh-server,
python-debianbts,
python-setproctitle,
python3-debianbts (>= 2.10.0),
python3-setproctitle,
tango-icon-theme,
xz-utils,
python-yaml,
python (>= 2.7),
${python:Depends},
python3-yaml,
${python3:Depends},
${shlibs:Depends},
${misc:Depends},
Recommends:
apache2 | httpd,
ghostscript,
python-rpy2,
python3-rpy2,
r-base-dev,
r-recommended,
devscripts,
......@@ -100,20 +97,19 @@ Depends:
# this list is synced from piuparts-master
adduser,
openssh-server,
python-debianbts,
python-setproctitle,
python3-debianbts (>= 2.10.0),
python3-setproctitle,
tango-icon-theme,
xz-utils,
python-yaml,
python (>= 2.7),
python3-yaml,
# selected packages from piuparts-master Recommends
apache2 | httpd,
python-rpy2,
python3-rpy2,
# this list is synced from piuparts-common
python-apt,
python-distro-info,
python-lzma,
python3-apt,
python3-distro-info,
${misc:Depends},
${python3:Depends},
Description: dependencies for running piuparts master from git
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.
......@@ -133,9 +129,8 @@ Depends:
openssh-client,
screen,
sudo,
python (>= 2.7),
${python:Depends},
${misc:Depends},
${python3:Depends},
Suggests:
schroot
Description: piuparts slave components
......@@ -156,19 +151,19 @@ Depends:
openssh-client,
screen,
sudo,
python (>= 2.7),
# this list is synced from piuparts
debootstrap (>= 1.0.89~),
debsums (>= 2.2.2~),
libjs-sphinxdoc,
lsb-release,
lsof,
mount,
python-debian,
python3-debian,
# this list is synced from piuparts-common
python-apt,
python-distro-info,
python-lzma,
python3-apt,
python3-distro-info,
${misc:Depends},
${python3:Depends},
Description: dependencies for running piuparts slave from git
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.
......@@ -182,11 +177,12 @@ Package: piuparts-common
Architecture: all
Depends:
# keep this list in sync with piuparts-{master,slave}-from-git-deps
python-apt,
python-distro-info,
python-lzma,
${python:Depends},
python3-apt,
python3-distro-info,
python3-six,
python3-urllib3,
${misc:Depends},
${python3:Depends},
Description: common piuparts components
piupartslib, common library used by piuparts-master, -report, -analyze and
-slave.
......
etc/piuparts/distros.conf
usr/lib/python2.7/*
usr/lib/python*/*
usr/share/piuparts/lib/*
README_server.txt
README_pejacevic.txt
docs/README_server.txt
docs/README_pejacevic.txt
# It's ok, because it depends on piuparts-common that has the dependency.
piuparts-master: python-script-but-no-python-dep usr/share/piuparts/master/detect_well_known_errors #!/usr/bin/python3
piuparts-master: python-script-but-no-python-dep usr/share/piuparts/piuparts-analyze #!/usr/bin/python3
piuparts-master: python-script-but-no-python-dep usr/share/piuparts/piuparts-master-backend #!/usr/bin/python3
piuparts-master: python-script-but-no-python-dep usr/share/piuparts/piuparts-report #!/usr/bin/python3
# It's ok, because it depends on piuparts-common that has the dependency.
piuparts-slave: python-script-but-no-python-dep usr/share/piuparts/piuparts-slave #!/usr/bin/python3
Document: piuparts
Title: Piuparts Manual
Author: Holger
Abstract: This manual describes what Piuparts is, and how it can be used.
Section: System/Package Management
Format: HTML
Index: /usr/share/doc/piuparts/html/index.html
Files: /usr/share/doc/piuparts/html/*.html
README.txt
README.html
piuparts.1.html
docbook-xsl.css
docs/README.txt
debian/tmp/usr/share/doc/piuparts/html/
/usr/share/javascript/sphinxdoc/1.0/jquery.js usr/share/doc/piuparts/html/_static/jquery.js
/usr/share/javascript/sphinxdoc/1.0/underscore.js usr/share/doc/piuparts/html/_static/underscore.js
/usr/share/javascript/sphinxdoc/1.0/doctools.js usr/share/doc/piuparts/html/_static/doctools.js
/usr/share/javascript/sphinxdoc/1.0/searchtools.js usr/share/doc/piuparts/html/_static/searchtools.js
......@@ -3,16 +3,18 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@ --with python2
export GOCACHE := $(CURDIR)/.gocache
%:
dh $@ --with python3
override_dh_auto_build:
$(MAKE) prefix=/usr build build-doc
override_dh_auto_install:
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp prefix=/usr etcdir=/etc install install-doc install-conf
override_dh_python2:
dh_python2 -p piuparts-master -p piuparts-slave /usr/share/piuparts
dh_python2 -N piuparts-master -N piuparts-slave
override_dh_python3:
dh_python3 -p piuparts-master -p piuparts-slave /usr/share/piuparts --shebang=/usr/bin/python3
dh_python3 -N piuparts-master -N piuparts-slave
Tests: smoke-test
Depends: @
Restrictions: needs-root
#!/bin/sh
echo running $0
test_this() {
echo
echo "running $@"
$@
}
test_this piuparts --info
test_this piuparts --list
piuparts README
---------------
.. raw:: html
<style> .blue {color:navy} </style>
.. role:: blue
.. _top1:
README
======
Author: Lars Wirzenius
Email: <liw@iki.fi>
......@@ -8,7 +17,8 @@ After reading this README you probably also want to have a look
at the piuparts manpage, to learn about the available options.
But read this document first!
== Introduction
:blue:`Introduction`
^^^^^^^^^^^^^^^^^^^^
piuparts is a tool for testing that .deb packages can be
installed, upgraded, and removed without problems. The
......@@ -24,16 +34,17 @@ since the Lenny release in 2009, though responsible maintainers
run piuparts locally before uploading packages to the archive.
== How to use piuparts in 5 minutes
:blue:`How to use piuparts in 5 minutes`
=== Basic Usage
:blue:`Basic Usage`
^^^^^^^^^^^^^^^^^^^
Testing your packages with piuparts is as easy as typing at the
console prompt:
console prompt:::
piuparts sm_0.6-1_i386.deb
----
# piuparts sm_0.6-1_i386.deb
----
Note that in order to work, piuparts has to be executed as user
root, so you need to be logged as root or use 'sudo'.
......@@ -42,30 +53,29 @@ This will create a sid chroot with debootstrap, where it'll test
your package.
If you want to test your package in another release, for example,
testing, you can do so with:
testing, you can do so with:::
# piuparts ./sm_0.6-1_i386.deb -d testing
----
# piuparts ./sm_0.6-1_i386.deb -d testing
----
By default, this will read the first mirror from your
'/etc/apt/sources.list' file. If you want to specify a different
mirror you can do it with the option '-m':
mirror you can do it with the option '-m':::
# piuparts ./sm_0.6-1_i386.deb -m http://ftp.de.debian.org/debian
----
# piuparts ./sm_0.6-1_i386.deb -m http://ftp.de.debian.org/debian
----
It's possible to use -d more than once. For example, to do a first
installation in stable, then upgrade to testing, then upgrade to
unstable and then upgrade to the local package use this:
unstable and then upgrade to the local package use this:::
# piuparts -d stable -d testing -d unstable ./sm_0.6-1_i386.deb
----
# piuparts -d stable -d testing -d unstable ./sm_0.6-1_i386.deb
----
:ref:`top <top1>`
=== Some tips
:blue:`Some tips`
^^^^^^^^^^^^^^^^^
piuparts also has a manpage, where all available options are explained.
......@@ -77,47 +87,48 @@ Piuparts has the option of using a tarball as the contents of the
initial chroot, instead of building a new one with debootstrap. A
easy way to use this option is use a tarball created with
pbuilder. If you are not a pbuilder user, you can create this
tarball with the command (again, as root):
tarball with the command (again, as root):::
----
# pbuilder --create
----
# pbuilder --create
then you only have to remember to update this tarball with:
----
# pbuilder --update
----
then you only have to remember to update this tarball with:::
To run piuparts using this tarball:
# pbuilder --update
----
# piuparts -p ./sm_0.6-1_i386.deb
----
If you want to use your own pre-made tarball:
To run piuparts using this tarball:::
# piuparts -p ./sm_0.6-1_i386.deb
If you want to use your own pre-made tarball:::
# piuparts --basetgz=/path/to/my/tarball.tgz ./sm_0.6-1_i386.deb
----
# piuparts --basetgz=/path/to/my/tarball.tgz ./sm_0.6-1_i386.deb
----
Piuparts also has the option of using a tarball as the contents
of the initial chroot, instead of building a new one with
pbuilder. You can save a tarball for later use with the '-s'
('--save') piuparts option. Some people like this, others prefer
('*-*-save') piuparts option. Some people like this, others prefer
to only have to maintain one tarball. Read the piuparts manpage
about the '-p', '-b' and '-s' options
While pbuilder itself supports using cdebootstrap, this is not
fully supported by piuparts: You will need to use debootstrap
or use the '--warn-on-debsums-errors' option for piuparts and then
or use the '*-*-warn-on-debsums-errors' option for piuparts and then
you will still see spurious warnings in the log.
=== Piuparts tests
:ref:`top <top1>`
:blue:`Piuparts tests`
^^^^^^^^^^^^^^^^^^^^^^
By default, piuparts does two tests:
. Installation and purging test.
. Installation, upgrade and purging tests.
The first test installs the package in a minimal chroot, removes
......@@ -127,11 +138,15 @@ version (deb files given to piuparts in the input), removes and
purges.
If you only want to perfom the first test, you can use the
option: '--no-upgrade-test'
option: '*-*-no-upgrade-test'
:ref:`top <top1>`
=== Testing packages in the config-files-remaining state
:blue:`Testing packages in the config-files-remaining state`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The --install-remove-install option modifies the three piuparts
The *-*-install-remove-install option modifies the three piuparts
tests in order to test package installation while config files
from a previous installation are remaining, but the package itself
was removed inbetween.
......@@ -139,21 +154,26 @@ This exercises different code paths in the maintainer scripts.
. Installation and purging test: install, remove, install again
and purge.
. Installation, upgrade and purging test: install the old version,
remove, install the new version and purge.
. Distupgrade test: install the version from the first
distribution, remove, distupgrade to the last distribution,
install the new version.
=== Analyzing piuparts results
:ref:`top <top1>`
:blue:`Analyzing piuparts results`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
When piuparts finishes all the tests satisfactorily, you will get
these lines as final output:
these lines as final output:::
0m39.5s INFO: PASS: All tests.
0m39.5s INFO: piuparts run ends.
----
0m39.5s INFO: PASS: All tests.
0m39.5s INFO: piuparts run ends.
----
Anyway, it is a good idea to read the whole log in order to
discover possible problems that did not stop the piuparts
......@@ -163,11 +183,15 @@ If you do not get those lines, piuparts has failed during a test.
The latest lines should give you a pointer to the problem with
your package.
== Custom scripts with piuparts
:ref:`top <top1>`
:blue:`Custom scripts with piuparts`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can specify several custom scripts to be run inside piuparts.
You have to store them in a directory and give it as argument to
piuparts: '--scriptsdir=/dir/with/the/scripts'
piuparts: '*-*-scriptsdir=/dir/with/the/scripts'
This option can be given multiple times. The scripts from all
directories will be merged together (and later ones may overwrite
earlier scripts with the same filename).
......@@ -194,17 +218,24 @@ Depending on the current test, the variable PIUPARTS_TEST is set
to
. 'install' (installation and purging test),
. 'upgrade' (installation, upgrade and purging tests) or
. 'distupgrade'.
During the 'upgrade' and 'distupgrade' tests, the variable
PIUPARTS_PHASE is set to one of the following values:
. 'install' while initially installing the packages from the
repository,
. 'upgrade' when upgrading to the .debs,
. 'distupgrade' while reinstalling the packages after
'apt-get dist-upgrade' to ensure they were not removed accidently
During the 'install' test, the PIUPARTS_PHASE variable is set to
'install'.
......@@ -216,13 +247,13 @@ The following prefixes for scripts are recognized:
'post_chroot_unpack' - after the chroot has been unpacked/debootrapped.
Before the chroot gets updated/dist-upgraded initially.
'post_setup_' - after the *setup* of the chroot is finished.
'post_setup\_' - after the *setup* of the chroot is finished.
Before metadata of the chroot is recorded for later comparison.
'pre_test_' - at the beginning of each test. After metadata of
'pre_test\_' - at the beginning of each test. After metadata of
the chroot was recorded for later comparison.
'is_testable_' - before *installing* your package. If this script
'is_testable\_' - before *installing* your package. If this script
returns a non-zero return value, the installation of the package
will be skipped. With a return value of 1 the test will be reported
as successful, but with a return value if 2 it will be reported as
......@@ -233,59 +264,62 @@ ressources (e.g. some downloader packages) or are broken beyond
repair (e.g. buggy packages in archived releases). Use the return
value of 2 for seriously broken packages that can break piuparts.
'pre_install_' - before *installing* your package. Depending on
'pre_install\_' - before *installing* your package. Depending on
the test, this may be run multiple times. The PIUPARTS_TEST and
PIUPARTS_PHASE variables can be used to distinguish the cases.
'post_install_' - after *installing* your package and its
'post_install\_' - after *installing* your package and its
dependencies. Depending on the test, this may be run multiple
times. The PIUPARTS_TEST and PIUPARTS_PHASE variables can be used
to distinguish the cases.
'pre_remove_' - before *removing* your package.
'pre_remove\_' - before *removing* your package.
Depending on the test, this may be run multiple times.
'post_remove_' - after *removing* your package.
'post_remove\_' - after *removing* your package.
Depending on the test, this may be run multiple times.
'post_purge_' - after *purging* your package.
'post_purge\_' - after *purging* your package.
Depending on the test, this may be run multiple times.
'post_test_' - at the end of each test. Right before performing
'post_test\_' - at the end of each test. Right before performing
final checks and comparing the chroot with the reference chroot
metadata.
'pre_distupgrade_' - before *upgrading* the chroot to the *next
'pre_distupgrade\_' - before *upgrading* the chroot to the *next
distribution*. The next distribution is available in the variable
PIUPARTS_DISTRIBUTION_NEXT.
'post_distupgrade_' - after *upgrading* the chroot to the *next
'post_distupgrade\_' - after *upgrading* the chroot to the *next
distribution*. The previous distribution is available in the
variable PIUPARTS_DISTRIBUTION_PREV.
=== Example custom scripts:
:ref:`top <top1>`
'$ cat post_install_numbers'
----
#!/bin/bash
:blue:`Example custom scripts`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
number=`dpkg -l | wc -l`
echo "There are $number packages installed."
exit 0
----
.. code-block:: text
'$ cat post_setup_package'
----
#!/bin/sh
'$ cat post_install_numbers'
#!/bin/bash
echo "$PIUPARTS_OBJECTS will now get tested."
exit 0
----
number=`dpkg -l | wc -l`
echo "There are $number packages installed."
exit 0
== Distributed testing
'$ cat post_setup_package'
#!/bin/sh
This is described in README_server.txt.
echo "$PIUPARTS_OBJECTS will now get tested."
exit 0
// vim: set filetype=asciidoc:
:ref:`top <top1>`
:blue:`Distributed testing`
^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is described in README_server.txt.
Notes about the piuparts installation on pejacevic.debian.org and it's slave(s)
===============================================================================
.. raw:: html
<style> .blue {color:navy} </style>
.. role:: blue
.. _top3:
README_perjacevic
=================
:blue:`Notes about the piuparts installation on pejacevic.debian.org and it's slave(s)`
This document describes the setup for https://piuparts.debian.org - it's used
for reference for the Debian System Administrators (DSA) as well as a guide
......@@ -8,17 +22,19 @@ installed from git. For regular installations we recommend to use the
piuparts-master and piuparts-slaves packages as described in
/usr/share/doc/piuparts-master/README_server.txt
== Installation
:blue:`Installation`
^^^^^^^^^^^^^^^^^^^^
piuparts.debian.org is a setup running on three systems:
piuparts.debian.org is a setup running on two systems:
* pejacevic.debian.org, running the piuparts-master instance and an apache
webserver to display the results.
* piu-slave-bm-a.debian.org, running four piuparts-slave nodes to run the
* piu-slave-ubc-01.debian.org, running four piuparts-slave nodes to run the
actual tests.
* piu-slave-ubc-01.debian.org, running four piuparts-slave nodes as well.
=== piuparts installation from source
:blue:`piuparts installation from source`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* basically, apt-get build-dep piuparts - in reality both systems get their
package configuration from git.debian.org/git/mirror/debian.org.git
......@@ -35,108 +51,129 @@ piuparts.debian.org is a setup running on three systems:
* `sudo ln -s /srv/piuparts.debian.org/etc/piuparts /etc/piuparts`
* See below for further user setup instructions.
=== User setup
:ref:`top <top3>`
:blue:`User setup`
^^^^^^^^^^^^^^^^^^
On pejacevic the piuparts-master user piupartsm needs to be created, on
piu-slave-bm-a and piu-slave-ubc-01 a piupartss user is needed for the slave.
piu-slave-ubc-01 a piupartss user is needed for the slave.
Both are members of the group piuparts and '/srv/piuparts.debian.org' needs to
be chmod 2775 and chown piuparts(sm):piuparts.
==== '~/bashrc' for piupartsm and piupartss
Do this for the piupartsm user on pejacevic and piupartss on the slave(s):
:ref:`top <top3>`
:blue:`'~/bashrc' for piupartsm and piuparts`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Do this for the piupartsm user on pejacevic and piupartss on the slave(s):::
piupartsm@pejacevic$ cat >> ~/.bashrc <<-EOF
----
piupartsm@pejacevic$ cat >> ~/.bashrc <<-EOF
# added manually for piuparts
umask 0002
export PATH="~/bin:\$PATH"
EOF
# added manually for piuparts
umask 0002
export PATH="~/bin:\$PATH"
EOF
----
==== set up ssh pubkey authentification
:ref:`top <top3>`
:blue:`set up ssh pubkey authentification`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Then create an SSH keypair for piupartss and put it into
'/etc/ssh/userkeys/piupartsm' on pejacevic, so the piupartss user can login
with ssh and run only piuparts-master. Restrict it like this:
with ssh and run only piuparts-master. Restrict it like this:::
$ cat /etc/ssh/userkeys/piupartsm
command="/srv/piuparts.debian.org/share/piuparts/piuparts-master",from="2001:41c8:1000:21::21:7,5.153.231.7",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-rsa ...
----
$ cat /etc/ssh/userkeys/piupartsm
command="/srv/piuparts.debian.org/share/piuparts/piuparts-master",from="2001:41c8:1000:21::21:7,5.153.231.7",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-rsa ...
----
=== Setup sudo for the slave(s)
:ref:`top <top3>`
:blue:`Setup sudo for the slave(s)`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is actually done by DSA:
==== '/etc/sudoers' for piu-slave-bm-a and piu-slave-ubc-01
'/etc/sudoers' for piu-slave-ubc-01:
.. code-block:: text
----
# The piuparts slave needs to handle chroots.
piupartss ALL = NOPASSWD: /usr/sbin/piuparts *, \
/bin/umount /srv/piuparts.debian.org/tmp/tmp*, \
/usr/bin/test -f /srv/piuparts.debian.org/tmp/tmp*, \
/usr/bin/rm -rf --one-file-system /srv/piuparts.debian.org/tmp/tmp*
----
# The piuparts slave needs to handle chroots.
piupartss ALL = NOPASSWD: /usr/sbin/piuparts *, \
/bin/umount /srv/piuparts.debian.org/tmp/tmp*, \
/usr/bin/test -f /srv/piuparts.debian.org/tmp/tmp*, \
/usr/bin/rm -rf --one-file-system /srv/piuparts.debian.org/tmp/tmp*
=== Apache configuration
Any other webserver will do but apache is used on pejacevic (and maintained by DSA):
:ref:`top <top3>`
----
<VirtualHost *:80>
ServerName piuparts.debian.org
:blue:`Apache configuration`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ServerAdmin debian-admin@debian.org
Any other webserver will do but apache is used on pejacevic (and maintained by DSA):::
ErrorLog /var/log/apache2/piuparts.debian.org-error.log
CustomLog /var/log/apache2/piuparts.debian.org-access.log combined
<VirtualHost *:80>
ServerName piuparts.debian.org
DocumentRoot /srv/piuparts.debian.org/htdocs
AddType text/plain .log
AddDefaultCharset utf-8
ServerAdmin debian-admin@debian.org
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
</VirtualHost>
# vim:set syn=apache:
----
ErrorLog /var/log/apache2/piuparts.debian.org-error.log
CustomLog /var/log/apache2/piuparts.debian.org-access.log combined
== Running piuparts
DocumentRoot /srv/piuparts.debian.org/htdocs
AddType text/plain .log
AddDefaultCharset utf-8
=== Updating the piuparts installation
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
</VirtualHost>
Updating the master, pejacevic.debian.org:
----
holger@pejacevic~$ sudo su - piupartsm update-piuparts-master-setup develop origin
----
:ref:`top <top3>`
Updating the slave(s), for example on piu-slave-bm-a.debian.org:
:blue:`Running piuparts`
^^^^^^^^^^^^^^^^^^^^^^^^
----
holger@piu-slave-bm-a~$ sudo su - piupartss update-piuparts-slave-setup develop origin
----
Updating the piuparts installation
=== Running piuparts
Updating the master, pejacevic.debian.org:::
holger@pejacevic~$ sudo su - piupartsm update-piuparts-master-setup develop origin
Updating the slave(s), for example on piu-slave-ubc-01.debian.org:::
holger@piu-slave-ubc-01~$ sudo su - piupartss update-piuparts-slave-setup develop origin
:ref:`top <top3>`
:blue:`Running piuparts`
^^^^^^^^^^^^^^^^^^^^^^^^
When running piuparts in master/slave mode, the master is never run by itself,
instead it is always started by the slave(s).
==== Starting and stopping the slaves
:ref:`top <top3>`
:blue:`Starting and stopping the slaves`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Run the following script under *your* user account to start four instances of
piuparts-slave on pejacevic, piuparts-master will be started automatically by
the slaves.
the slaves.::
holger@piu-slave-ubc-01:~$ sudo -u piupartss -i slave_run
----
holger@piu-slave-bm-a:~$ sudo -u piupartss -i slave_run
----
There are several cronjobs installed via '~piupartsm/crontab' and
'~piupartss/crontab') to monitor both master and slave as well as the hosts
......@@ -150,22 +187,33 @@ but that may leave temporary directories and processes around.
See the 'piuparts_slave_run (8)' manpage for more information on 'slave_run'.
==== Joining an existing slave session
Run the following script under *your* user account:
:ref:`top <top3>`
:blue:`Joining an existing slave session`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Run the following script under *your* user account:::
holger@pejacevic:~$ sudo -u piupartss -i slave_join
----
holger@pejacevic:~$ sudo -u piupartss -i slave_join
----
See the 'piuparts_slave_join (8)' manpage for more information on 'slave_join'.
=== Generating reports for the website
:ref:`top <top3>`
:blue:`Generating reports for the website`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'piuparts-report' is run daily at midnight and at noon from
'~piupartsm/crontab' on pejacevic.
=== Cronjobs to aid problem spotting
:ref:`top <top3>`
:blue:`Cronjobs to aid problem spotting`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some cronjobs to aid problem spotting reside in '~piupartsm/bin/' and are run
daily by '~piupartsm/crontab'.
......@@ -178,10 +226,11 @@ daily by '~piupartsm/crontab'.
More checks should be added as we become aware of them.
== Authors
:ref:`top <top3>`
:blue:`Authors`
^^^^^^^^^^^^^^^
Last updated: February 2017
Holger Levsen <holger@layer-acht.org>
// vim: set filetype=asciidoc: