On 10/9/21 6:40 PM, Christoph Anton Mitterer wrote:
It seems that when not selecting any of the new certs on upgrade, the package
install fails:
Setting up ca-certificates (20211004) ...
Updating certificates in /etc/ssl/certs...
chmod: cannot access '/etc/ssl/certs/ca-certificates.crt.new': No such file or 
directory
dpkg: error processing package ca-certificates (--configure):
  installed ca-certificates package post-installation script subprocess 
returned error exit status 1

Good find - patch attached to check if file exists before chmod & mv.

--
Kind regards,
Michael
diff --git a/debian/changelog b/debian/changelog
index 2a146c2..7b1e0bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ca-certificates (20211010) UNRELEASED; urgency=medium
+
+  [ Michael Shuler ]
+  * Fix error on install when TEMPBUNDLE missing. Closes: #996005
+
+ -- Michael Shuler <mich...@pbandjelly.org>  Sun, 10 Oct 2021 09:10:28 -0500
+
 ca-certificates (20211004) unstable; urgency=low
 
   [ Debian Janitor ]
diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
index 789867f..0265205 100755
--- a/sbin/update-ca-certificates
+++ b/sbin/update-ca-certificates
@@ -187,8 +187,12 @@ then
   fi
 fi
 
-chmod 0644 "$TEMPBUNDLE"
-mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
+# chmod and mv only if TEMPBUNDLE exists or install may fail, #996005
+if [ -f "$TEMPBUNDLE" ]
+then
+  chmod 0644 "$TEMPBUNDLE"
+  mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
+fi
 # Restore proper SELinux label after moving the file
 [ -x /sbin/restorecon ] && /sbin/restorecon "$CERTBUNDLE" >/dev/null 2>&1
 

Reply via email to