[Piuparts-commits] rev 291 - piatti/org/piuparts.debian.org/etc piatti/org/piuparts.debian.org/htdocs trunk trunk/debian
Holger Levsen
holger at alioth.debian.org
Fri Mar 20 00:19:43 UTC 2009
Author: holger
Date: 2009-03-20 00:19:42 +0000 (Fri, 20 Mar 2009)
New Revision: 291
Removed:
piatti/org/piuparts.debian.org/etc/piuparts-master.conf
piatti/org/piuparts.debian.org/etc/piuparts-report.conf
Modified:
piatti/org/piuparts.debian.org/etc/piuparts-slave.conf
piatti/org/piuparts.debian.org/htdocs/style.css
trunk/Makefile
trunk/TODO
trunk/debian/changelog
trunk/piuparts-master.py
trunk/piuparts-report.py
trunk/piuparts-slave.py
trunk/piuparts.conf.sample
Log:
* Break backwards compatibility of the configuration files for master-slave-
mode. Merge those three into one: /etc/piuparts/piuparts/piuparts.conf
Deleted: piatti/org/piuparts.debian.org/etc/piuparts-master.conf
Deleted: piatti/org/piuparts.debian.org/etc/piuparts-report.conf
Modified: piatti/org/piuparts.debian.org/etc/piuparts-slave.conf
===================================================================
--- piatti/org/piuparts.debian.org/etc/piuparts-slave.conf 2009-03-19 18:26:06 UTC (rev 290)
+++ piatti/org/piuparts.debian.org/etc/piuparts-slave.conf 2009-03-20 00:19:42 UTC (rev 291)
@@ -1,21 +1,24 @@
#
-# This is the configuration file for piuparts-slave, the slave portion
-# of the distributed piuparts system.
+# This is the configuration file for piuparts running in master-slave mode.
#
#
-[slave]
+[global]
sections = sid squeeze
master-host = localhost
master-user = piupartsm
master-command = echo hello
+index-page = /org/piuparts.debian.org/htdocs/index.html
[sid]
idle-sleep = 300
master-host = localhost
master-user = piupartsm
master-directory = /org/piuparts.debian.org/master/
+output-directory = /org/piuparts.debian.org/htdocs/
master-command = PYTHONPATH=/org/piuparts.debian.org/lib/python2.4/site-packages:/org/piuparts.debian.org/lib/python2.5/site-packages python /org/piuparts.debian.org/share/piuparts/piuparts-master.py sid
+log-file = master.log
+packages-url = http://ftp.fi.debian.org/debian/dists/sid/main/binary-amd64/Packages.bz2
mirror = http://ftp.fi.debian.org/debian/
piuparts-cmd = sudo /org/piuparts.debian.org/sbin/piuparts --no-symlinks --scriptsdir /etc/piuparts/scripts/ --tmpdir /org/piuparts.debian.org/tmp
distro = sid
@@ -28,8 +31,11 @@
idle-sleep = 300
master-host = localhost
master-user = piupartsm
+output-directory = /org/piuparts.debian.org/htdocs/
master-directory = /org/piuparts.debian.org/master/
master-command = PYTHONPATH=/org/piuparts.debian.org/lib/python2.4/site-packages:/org/piuparts.debian.org/lib/python2.5/site-packages python /org/piuparts.debian.org/share/piuparts/piuparts-master.py squeeze
+log-file = master.log
+packages-url = http://ftp.fi.debian.org/debian/dists/squeeze/main/binary-amd64/Packages.bz2
mirror = http://ftp.fi.debian.org/debian/
piuparts-cmd = sudo /org/piuparts.debian.org/sbin/piuparts --no-symlinks --scriptsdir /etc/piuparts/scripts/ --tmpdir /org/piuparts.debian.org/tmp
distro = squeeze
Modified: piatti/org/piuparts.debian.org/htdocs/style.css
===================================================================
--- piatti/org/piuparts.debian.org/htdocs/style.css 2009-03-19 18:26:06 UTC (rev 290)
+++ piatti/org/piuparts.debian.org/htdocs/style.css 2009-03-20 00:19:42 UTC (rev 291)
@@ -202,8 +202,10 @@
font-size: 32px;
text-align: left;
margin-bottom: 0px;
+ margin-top: 0px;
+ padding-top: 0px;
padding-bottom: 0px;
- padding-left: 30px;
+ padding-left: 15px;
}
#footer {
@@ -240,7 +242,7 @@
}
td.titlecell {
color: white;
- background-color: #9F0431;
+ background-color: #d70751;
border: 2px solid black;
font-weight: bold;
text-align: center;
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/Makefile 2009-03-20 00:19:42 UTC (rev 291)
@@ -41,11 +41,8 @@
gzip -9f $(man1dir)/piuparts.1
install -d $(sharedir)/piuparts
- for file in piuparts-slave piuparts-master piuparts-report; do \
- sed "/^CONFIG_FILE = /s:\".*\":\"/etc/piuparts/$$file.conf\":" \
- $$file.py > $(sharedir)/piuparts/$$file.py; done
- install piuparts-analyze.py $(sharedir)/piuparts/piuparts-analyze
- chmod +x $(sharedir)/piuparts/*.py
+ for file in piuparts-slave piuparts-master piuparts-reporti piuparts-analyze; do \
+ install -m 0755 $$file.py $(sharedir)/piuparts/$$file ; done
install -d $(site24)/piupartslib
install -d $(site25)/piupartslib
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/TODO 2009-03-20 00:19:42 UTC (rev 291)
@@ -3,22 +3,20 @@
must for 0.36
+- convert to NEWS Debian system and introduce breakge of conf file backwards compatibility...
+- globalize more config variables.
+- document this in README
- document sections for piuparts-slave in README.
-- the templates used by update-reports.py should be taken from /etc/piuparts/templates/
- and not be included in the python source
- the sections in the index page generated by piuparts-report.py are hardcoded atm..
(fix by merging configfiles, also sections should have
desctription="Debian sid, consisting of main contrib non-free, testing installation and removal in sid"
+- the templates used by update-reports.py should be taken from /etc/piuparts/templates/
+ and not be included in the python source
- rename packages.txt into $section_done_today.txt and include sections
- create $section_packages.txt with into about all packages
- better header (link to FAQ, point out to read the bottom first..) for piuparts-logs
- debug is on, even though its off in the config
-nice for 0.36
-
-- improve the config parser so we dont need redundant config entries...
-- merge conf-files into piuparts-sm.conf
-
for 0.37 and on
- upgrade-reports should have a list of available arch and list packages
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/debian/changelog 2009-03-20 00:19:42 UTC (rev 291)
@@ -21,6 +21,8 @@
- assume packages in state "circular-dependency" are testable. True, they
are not testable without the circular dependent package, so in case of
failure analysing will be harder.
+ * Break backwards compatibility of the configuration files for master-slave-
+ mode. Merge those three into one: /etc/piuparts/piuparts/piuparts.conf
* piuparts-slave.py:
- support looping trough multiple sections in slave.conf via new config
value "sections". Thanks to Frank Ploss for writing this patch with me
Modified: trunk/piuparts-master.py
===================================================================
--- trunk/piuparts-master.py 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/piuparts-master.py 2009-03-20 00:19:42 UTC (rev 291)
@@ -34,7 +34,7 @@
import piupartslib
-CONFIG_FILE = "piuparts-master.conf"
+CONFIG_FILE = "/etc/piuparts/piuparts.conf"
def setup_logging(log_level, log_file_name):
@@ -237,27 +237,21 @@
def main():
- # For supporting multiple architectures and suites, we take a command-line
- # argument referring to a section in the master configuration file. For
- # backwards compatibility, if no argument is given, the "master" section is
- # assumed.
+ # piuparts-master is always called by the slave with a section as argument
if len(sys.argv) == 2:
section = sys.argv[1]
config = Config(section=section)
- else:
- section = None
- config = Config()
- config.read(CONFIG_FILE)
+ config.read(CONFIG_FILE)
- setup_logging(logging.DEBUG, config["log-file"])
+ setup_logging(logging.DEBUG, config["log-file"])
- logging.info("Fetching %s" % config["packages-url"])
- packages_file = piupartslib.open_packages_url(config["packages-url"])
- m = Master(sys.stdin, sys.stdout, packages_file, section=section)
- packages_file.close()
- while m.do_transaction():
- pass
- m.write_summaries()
+ logging.info("Fetching %s" % config["packages-url"])
+ packages_file = piupartslib.open_packages_url(config["packages-url"])
+ m = Master(sys.stdin, sys.stdout, packages_file, section=section)
+ packages_file.close()
+ while m.do_transaction():
+ pass
+ m.write_summaries()
if __name__ == "__main__":
Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/piuparts-report.py 2009-03-20 00:19:42 UTC (rev 291)
@@ -35,7 +35,7 @@
import piupartslib
-CONFIG_FILE = "piuparts-report.conf"
+CONFIG_FILE = "/etc/piuparts/piuparts.conf"
HTML_HEADER = """
@@ -267,6 +267,16 @@
These pages are updated daily.
</td>
</tr>
+ <td class="titlecell">
+ News
+ <!-- This shall properly be included in future -->
+ </td>
+ </tr>
+ <tr class="normalrow">
+ <td class="contentcell2">
+ 2009-03-19: lenny2squeeze is not needed, so all logs for squeeze (as well as lenny2squeeze) were deleted. (As squezze now includes two kinds of tests: installation and removal in squeeze, and installation in lenny, upgrade to squeeze, removal in squeeze.
+ </td>
+ </tr>
</table>
"""
@@ -529,16 +539,15 @@
setup_logging(logging.DEBUG, None)
# For supporting multiple architectures and suites, we take a command-line
- # argument referring to a section in the reports configuration file. For
- # backwards compatibility, if no argument is given, the "report" section is
- # assumed.
+ # argument referring to a section in configuration file.
+ # If no argument is given, the "global" section is assumed.
section_names = []
if len(sys.argv) > 1:
section = sys.argv[1]
else:
- report_config = Config(section="report")
- report_config.read(CONFIG_FILE)
- section_names = report_config["sections"].split()
+ global_config = Config(section="general")
+ global_config.read(CONFIG_FILE)
+ section_names = global_config["sections"].split()
sections = []
for section_name in section_names:
@@ -548,7 +557,7 @@
logging.debug("Writing index page")
htmlpage = string.Template(HTML_HEADER + INDEX_BODY_TEMPLATE + HTML_FOOTER)
- write_file(report_config["index-page"], htmlpage.safe_substitute( {
+ write_file(global_config["index-page"], htmlpage.safe_substitute( {
"time": time.strftime("%Y-%m-%d %H:%M %Z"),
}))
Modified: trunk/piuparts-slave.py
===================================================================
--- trunk/piuparts-slave.py 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/piuparts-slave.py 2009-03-20 00:19:42 UTC (rev 291)
@@ -35,7 +35,7 @@
import piupartslib.packagesdb
-CONFIG_FILE = "piuparts-slave.conf"
+CONFIG_FILE = "/etc/piuparts/piuparts.conf"
def setup_logging(log_level, log_file_name):
@@ -414,18 +414,16 @@
def main():
setup_logging(logging.INFO, None)
- # For supporting multiple piuparts-slave configurations on a particular
- # machine (e.g. for testing multiple suites), we take one or more command-line
- # arguments referring to sections in the slave configuration file. For
- # backwards compatibility, if no arguments are given, the "slave" section is
- # assumed.
+ # For supporting multiple architectures and suites, we take a command-line
+ # argument referring to a section in configuration file.
+ # If no argument is given, the "global" section is assumed.
section_names = []
if len(sys.argv) > 1:
section_names = sys.argv[1:]
else:
- slave_config = Config(section="slave")
- slave_config.read(CONFIG_FILE)
- section_names = slave_config["sections"].split()
+ global_config = Config(section="global")
+ global_config.read(CONFIG_FILE)
+ section_names = global_config["sections"].split()
sections = []
for section_name in section_names:
Modified: trunk/piuparts.conf.sample
===================================================================
--- trunk/piuparts.conf.sample 2009-03-19 18:26:06 UTC (rev 290)
+++ trunk/piuparts.conf.sample 2009-03-20 00:19:42 UTC (rev 291)
@@ -1,5 +1,5 @@
#
-# This is the configuration file for piuparts running in master-slave mode
+# This is the configuration file for piuparts running in master-slave mode.
#
# The sample file does not set all required values, to prevent the
# master from being run accidentally.
@@ -10,7 +10,7 @@
#
#
-[slave]
+[global]
sections = sid
[sid]
@@ -20,8 +20,10 @@
# master-host = localhost
# master-user = piuparts
# master-directory = .
+output-directory = html
master-command = python /usr/share/piuparts/piuparts-master.py
# mirror = http://your.mirror.here/debian
+# packages-url = http://your.mirror.here/debian/dists/sid/main/binary-i386/Packages.bz2
piuparts-cmd = sudo piuparts
distro = sid
chroot-tgz = sid.tar.gz
@@ -29,47 +31,10 @@
upgrade-test-chroot-tgz =
max-reserved = 50
debug = no
+og-file = /dev/null
-[master]
-log-file = /dev/null
-# packages-url = http://your.mirror.here/debian/dists/sid/main/binary-i386/Packages.bz2
-# report
-[sid]
-output-directory = html
-
-[report]
-sections = sid
-index-page = ./index.html
-
-
-# You can have multiple sections, so that you can run piuparts for multiple dists
-
-# For stable-proposed-updates, you'll have to roll your own chroot, or modify
-# the sources.list in a generated chroot for stable, in order to include the
-# appropriate deb line for stable-proposed-updates
## [s-p-u-i386]
-## idle-sleep = 300
-## # master-host = localhost
-## # master-user = piuparts
-## # master-directory = .
## master-command = python /usr/share/piuparts/piuparts-master.py s-p-u-i386
-## # mirror = http://your.mirror.here/debian
-## piuparts-cmd = sudo piuparts
-## distro = stable-proposed-updates
-## chroot-tgz = s-p-u.tar.gz
-## keep-sources-list = yes
-## upgrade-test-distros =
-## upgrade-test-chroot-tgz =
-## max-reserved = 50
-## debug = no
-
-## [sid-ia64]
-## log-file = /dev/null
-## packages-url = http://ftp.debian.org/debian/dists/sid/binary-ia64/Packages.bz2
-
-## [s-p-u-i386]
-## log-file = /dev/null
## packages-url = http://ftp.debian.org/debian/dists/stable-proposed-updates/binary-i386/Packages.bz2
-
More information about the Piuparts-commits
mailing list