[Piuparts-devel] [Git][debian/piuparts][develop] 5 commits: permit expired stretch-{lts, backports{, -sloppy}} signing keys

Holger Levsen gitlab at salsa.debian.org
Fri Oct 26 16:22:14 BST 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
93c4bbb1 by Andreas Beckmann at 2018-10-26T15:18:37Z
permit expired stretch-{lts,backports{,-sloppy}} signing keys

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
7fcac454 by Andreas Beckmann at 2018-10-26T15:19:05Z
file-rc is gone from sid

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
4db8eb02 by Andreas Beckmann at 2018-10-26T15:19:10Z
add exception for nsswitch.conf on stretch->buster upgrades

switch passwd/group/shadow from compat to files
libc-bin only upgrades pristine /etc/nsswitch.conf
(i.e. w/o modifications by libnss-myhostname and friends)

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
8b9d62ef by Andreas Beckmann at 2018-10-26T15:19:15Z
p: logrotate files can only be placed directly in /etc/logrotate.d/

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
22a001c9 by Andreas Beckmann at 2018-10-26T15:19:20Z
p: simplify cronfiles and logrotatefiles handling

Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


6 changed files:

- custom-scripts/scripts/post_chroot_unpack_allow_unauthenticated
- custom-scripts/scripts/post_distupgrade_exceptions
- custom-scripts/scripts/pre_distupgrade_allow_unauthenticated
- custom-scripts/scripts/pre_install_exceptions
- debian/changelog
- piuparts.py


Changes:

=====================================
custom-scripts/scripts/post_chroot_unpack_allow_unauthenticated
=====================================
@@ -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.


=====================================
custom-scripts/scripts/post_distupgrade_exceptions
=====================================
@@ -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


=====================================
custom-scripts/scripts/pre_distupgrade_allow_unauthenticated
=====================================
@@ -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


=====================================
custom-scripts/scripts/pre_install_exceptions
=====================================
@@ -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


=====================================
debian/changelog
=====================================
@@ -1,11 +1,19 @@
 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 at debian.org>  Sun, 21 Oct 2018 14:03:22 +0200
 
 piuparts (0.93) unstable; urgency=medium


=====================================
piuparts.py
=====================================
@@ -1565,18 +1565,16 @@ 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:
-            installed = self.install_logrotate()
-            self.check_output_logrotatefiles(logrotatefiles_list)
-            self.purge_packages(installed)
+            logrotatefiles = self.check_if_logrotatefiles(packages)
+            if logrotatefiles:
+                installed = self.install_logrotate()
+                self.check_output_logrotatefiles(logrotatefiles)
+                self.purge_packages(installed)
 
         # Then purge all packages being depended on.
         self.purge_packages(deps_to_purge)
@@ -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



View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/3897b5fafacdb34b4e622d176f76221f27ae764a...22a001c986f3024aa80014083343ddcb93059fa3

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/3897b5fafacdb34b4e622d176f76221f27ae764a...22a001c986f3024aa80014083343ddcb93059fa3
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/piuparts-devel/attachments/20181026/b3a84564/attachment-0001.html>


More information about the Piuparts-devel mailing list