On Wed, Apr 10, 2019 at 06:25:42AM -0700, tony mancill wrote: > On Wed, Apr 10, 2019 at 09:49:02AM +0200, Andreas Beckmann wrote: > > Hi Tony, > > > > do we have another error in the script? > > > > Setting up ca-certificates-java (20170929~deb9u2) ... > > /var/lib/dpkg/info/ca-certificates-java.postinst: line 55: printf: -d: > > invalid option > > printf: usage: printf [-v var] format [arguments] > > Adding debian:TrustCor_RootCert_CA-2.pem > > Adding debian:TrustCor_RootCert_CA-1.pem > > ... > > > > (noticed while looking for something different ..) > > Hello Andreas, > > Yes, and the error is due to this hunk in my patch: > > > --- ca-certificates-java-20170929~deb9u1/debian/postinst.in 2019-02-11 > > 04:14:23.000000000 -0800 > > +++ ca-certificates-java-20170929~deb9u2/debian/postinst.in 2019-02-24 > > 09:55:04.000000000 -0800 > > @@ -52,7 +52,7 @@ > > > > # Forcibly remove diginotar cert (LP: #920758) > > if [ -n "$FIXOLD" ]; then > > - echo -e "-diginotar_root_ca\n-diginotar_root_ca_pem" | \ > > + printf "-diginotar_root_ca\n-diginotar_root_ca_pem\n" | \ > > java -Xmx64m -jar $JAR -storepass "$storepass" > > fi > > I didn't realize that the behavior of printf varied between the shells. > > - printf "-dfoo" fails in dash and ash, but not in bash or zsh, etc. > - printf '-dfoo' fails in dash and ash as well. > - printf -- "-dfoo" works as expected.
Bah! - please ignore my comments above. The `printf "-dfoo" fails in other shells too. And even more frustrating is that there wasn't any point in trying to address the "echo -e" bashism in the postinst in the first place, since it uses /bin/bash shebang anyway (unlike jks-keystore, which runs under /bin/sh). > Sorry for the hassle and thank you for noticing this. > > I will prepare another upload. Since Andreas fixed another bashism in the postinst with his proposed debdiff [1], I propose that we move forward with the fixed printf syntax (debdiff attached), since it matches other uses of printf in the postinst. I have tested locally in a chroot, including forcing the execution path to flow through the $FIXOLD path and believe it's fixed now. Andreas, please let me know if this looks okay to you and I'll file the stretch-pu bug. Thank you, tony [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=922996;filename=ca-certificates-java_20170929~deb9u2.dsc.diff.gz;msg=5
diff -Nru ca-certificates-java-20170929~deb9u2/debian/changelog ca-certificates-java-20170929~deb9u3/debian/changelog --- ca-certificates-java-20170929~deb9u2/debian/changelog 2019-02-24 09:55:04.000000000 -0800 +++ ca-certificates-java-20170929~deb9u3/debian/changelog 2019-04-10 19:59:01.000000000 -0700 @@ -1,3 +1,10 @@ +ca-certificates-java (20170929~deb9u3) stretch; urgency=medium + + * Team upload. + * Fix printf syntax problem introduced in 20170929~deb9u2 + + -- tony mancill <tmanc...@debian.org> Wed, 10 Apr 2019 19:59:01 -0700 + ca-certificates-java (20170929~deb9u2) stretch; urgency=medium * Team upload. diff -Nru ca-certificates-java-20170929~deb9u2/debian/postinst.in ca-certificates-java-20170929~deb9u3/debian/postinst.in --- ca-certificates-java-20170929~deb9u2/debian/postinst.in 2019-02-24 09:55:04.000000000 -0800 +++ ca-certificates-java-20170929~deb9u3/debian/postinst.in 2019-04-10 19:59:01.000000000 -0700 @@ -52,7 +52,7 @@ # Forcibly remove diginotar cert (LP: #920758) if [ -n "$FIXOLD" ]; then - printf "-diginotar_root_ca\n-diginotar_root_ca_pem\n" | \ + printf -- "-diginotar_root_ca\n-diginotar_root_ca_pem\n" | \ java -Xmx64m -jar $JAR -storepass "$storepass" fi
signature.asc
Description: PGP signature