Skip to content
Commits on Source (5)
......@@ -9,7 +9,10 @@ Acquire::Check-Valid-Until "false";
EOF
fi
if [ "$PIUPARTS_DISTRIBUTION" = "squeeze" ]; then
if [ "$PIUPARTS_DISTRIBUTION" = "squeeze" ] || \
[ "$PIUPARTS_DISTRIBUTION" = "squeeze-lts" ] || \
[ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports" ] || \
[ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports-sloppy" ]; then
echo "Creating /etc/apt/apt.conf.d/unauthenticated-squeeze ..."
tee /etc/apt/apt.conf.d/unauthenticated-squeeze <<EOF
# The squeeze signing key has expired.
......
......@@ -84,6 +84,12 @@ fi
if [ "$PIUPARTS_DISTRIBUTION" = "buster" ]; then
# libc-bin only upgrades pristine /etc/nsswitch.conf
if grep -q '^passwd:.*compat' /etc/nsswitch.conf ; then
echo "Switching from compat to files in /etc/nsswitch.conf"
sed -r -i '/^(passwd|group|shadow):/ s/compat/files/' /etc/nsswitch.conf
fi
# dpkg does not properly clean up directories getting empty and no longer shipped
for dir in /etc/dbus-1/system.d /etc/dbus-1
do
......
......@@ -23,6 +23,8 @@ Acquire::Check-Valid-Until "false";
EOF
elif [ "$PIUPARTS_DISTRIBUTION_NEXT" = "squeeze-backports" ]; then
:
elif [ "$PIUPARTS_DISTRIBUTION_NEXT" = "squeeze-lts" ]; then
:
elif [ -e /etc/apt/apt.conf.d/unauthenticated-squeeze ]; then
echo "FAIL: /etc/apt/apt.conf.d/unauthenticated-squeeze exists"
exit 1
......
......@@ -13,7 +13,7 @@ case ${PIUPARTS_OBJECTS%%=*} in
log_debug
echo 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
;;
squeeze*|stretch*|sid)
squeeze*|stretch*)
# force installation and removal of essential package sysv-rc
log_debug
yes 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
......
piuparts (0.94) UNRELEASED; urgency=medium
[ Holger Levsen ]
* master-bin/detect_well_known_errors.py: suppress output if nothing new is
found in a section, or section is busy or has been recently processed.
* master-bin/generate_daily_report: include number of failures in daily mail.
* slave-bin/detect_slave_problems: increase amount of time (from 30 to 60m)
a slave has to be inactive before complaining.
[ Andreas Beckmann ]
* piuparts.py:
- Logrotate files can only be placed directly in /etc/logrotate.d/.
* scripts/post_distupgrade_exceptions:
- Handle /etc/nsswitch.conf stretch -> buster upgrade if modifications
from libnss-myhostname and friends are present.
-- Holger Levsen <holger@debian.org> Sun, 21 Oct 2018 14:03:22 +0200
piuparts (0.93) unstable; urgency=medium
......
......@@ -1565,17 +1565,15 @@ class Chroot:
self.run_scripts("post_remove")
if not settings.skip_cronfiles_test:
cronfiles, cronfiles_list = self.check_if_cronfiles(packages)
if not settings.skip_cronfiles_test and cronfiles:
self.check_output_cronfiles(cronfiles_list)
cronfiles = self.check_if_cronfiles(packages)
if cronfiles:
self.check_output_cronfiles(cronfiles)
if not settings.skip_logrotatefiles_test:
logrotatefiles, logrotatefiles_list = self.check_if_logrotatefiles(packages)
if not settings.skip_logrotatefiles_test and logrotatefiles:
logrotatefiles = self.check_if_logrotatefiles(packages)
if logrotatefiles:
installed = self.install_logrotate()
self.check_output_logrotatefiles(logrotatefiles_list)
self.check_output_logrotatefiles(logrotatefiles)
self.purge_packages(installed)
# Then purge all packages being depended on.
......@@ -1829,9 +1827,9 @@ class Chroot:
"""Check if the packages have cron files under /etc/cron.d and in case positive,
it returns the list of files. """
# FIXME! Does not work for M-A: same packages
vdir = self.relative("var/lib/dpkg/info")
vlist = []
has_cronfiles = False
for p in packages:
basename = p + ".list"
......@@ -1846,12 +1844,10 @@ class Chroot:
mode = st[stat.ST_MODE]
# XXX /etc/cron.d/ files are NOT executables
if (mode & stat.S_IEXEC):
if not has_cronfiles:
has_cronfiles = True
vlist.append(pathname)
logging.info("Package " + p + " contains cron file: " + pathname)
return has_cronfiles, vlist
return vlist
def check_output_cronfiles(self, list):
"""Check if a given list of cronfiles has any output. Executes
......@@ -1874,9 +1870,9 @@ class Chroot:
"""Check if the packages have logrotate files under /etc/logrotate.d and in case positive,
it returns the list of files. """
# FIXME! Does not work for M-A: same packages
vdir = self.relative("var/lib/dpkg/info")
vlist = []
has_logrotatefiles = False
for p in packages:
basename = p + ".list"
......@@ -1885,14 +1881,12 @@ class Chroot:
for line in readlines_file(os.path.join(vdir, basename)):
pathname = line.strip()
if pathname.startswith("/etc/logrotate.d/"):
if os.path.dirname(pathname) == "/etc/logrotate.d":
if os.path.isfile(self.relative(pathname.strip("/"))):
if not has_logrotatefiles:
has_logrotatefiles = True
vlist.append(pathname)
logging.info("Package " + p + " contains logrotate file: " + pathname)
return has_logrotatefiles, vlist
return vlist
def install_logrotate(self):
"""Install logrotate for check_output_logrotatefiles, and return the
......