Bug#948824: opensmtpd: Installation fails with "post-installation script subprocess returned error exit status 1"

2020-01-22 Thread Jernej Jakob
On Sun, 19 Jan 2020 10:54:06 -0500
Ryan Kavanagh  wrote:

> Thanks, this helps a lot! I can reproduce the issue now. I've tested the
> attached configuration script and it fixes the issue on my end. Could
> you please let me know if it fixes the issue on your end? You can test
> it by copying it to /var/lib/dpkg/info/opensmtpd.config (with the same
> permissions as the existing file) and then trying to configure the
> package again.
> 
> Thanks,
> Ryan
> 

Thanks, the attached script fixed the issue.



Bug#948824: opensmtpd: Installation fails with "post-installation script subprocess returned error exit status 1"

2020-01-18 Thread Jernej Jakob
Output with set -e:

:~# DEBCONF_DEBUG=developer dpkg --configure --pending
Setting up opensmtpd (6.0.3p1-5) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is opensmtpd
debconf (developer): starting /var/lib/dpkg/info/opensmtpd.config configure 
+ set -e
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z  ]
+ exec
+ [  ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ db_fget opensmtpd/mailname seen
+ _db_cmd FGET opensmtpd/mailname seen
+ _db_internal_IFS= 

+ IFS= 
+ printf %s\n FGET opensmtpd/mailname seen
+ IFS=

+ read -r _db_internal_line
debconf (developer): <-- FGET opensmtpd/mailname seen
debconf (developer): --> 0 false
+ IFS= 

+ RET=false
+ return 0
+ [ false = true ]
+ [ -f /etc/mailname ]
+ hostname --fqdn
+ MAILNAME=
dpkg: error processing package opensmtpd (--configure):
 installed opensmtpd package post-installation script subprocess returned error 
exit status 1
Errors were encountered while processing:
 opensmtpd


I think it's because I have no entry in /etc/hosts for the hostname
in /etc/hostname, just localhost. hostname --fqdn returns
"Name or service not known".

On Sat, 18 Jan 2020 11:40:54 -0500
Ryan Kavanagh  wrote:

> Control: tags -1 + moreinfo
> 
> Hi Jernej,
> 
> On Mon, Jan 13, 2020 at 08:38:47PM +0100, Jernej Jakob wrote:
> > I installed opensmtpd but its installation failed. I found an archived
> > bug report that matches my error exactly:
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770939  
> 
> I'm unable to reproduce this in a clean buster chroot (using piuparts).
> Could you please add "set -x" to the top of
> /var/lib/dpkg/info/opensmtpd.config (right before the "set -e" line),
> rerun
> 
> DEBCONF_DEBUG=developer dpkg --configure --pending
> 
> and attach the output?
> 
> Thanks,
> Ryan
> 



Bug#948824: opensmtpd: Installation fails with "post-installation script subprocess returned error exit status 1"

2020-01-13 Thread Jernej Jakob
Package: opensmtpd
Version: 6.0.3p1-5
Severity: grave
Justification: renders package unusable

Dear Maintainer,

I installed opensmtpd but its installation failed. I found an archived
bug report that matches my error exactly:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770939

DEBCONF_DEBUG=developer dpkg --configure --pending
Setting up opensmtpd (6.0.3p1-5) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is opensmtpd
debconf (developer): starting /var/lib/dpkg/info/opensmtpd.config
configure 
debconf (developer): <-- FGET opensmtpd/mailname seen
debconf (developer): --> 0 false
dpkg: error processing package opensmtpd (--configure):
 installed opensmtpd package post-installation script subprocess
 returned error exit status 1
 Errors were encountered while processing:
  opensmtpd

Regards,
Jernej

-- System Information:
Debian Release: 10.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: mipsel (mips)

Kernel: Linux 5.4.6+ (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages opensmtpd depends on:
ii  adduser3.118
ii  debconf [debconf-2.0]  1.5.71
ii  ed 1.15-1
ii  libasr01.0.2-2
ii  libc6  2.28-10
ii  libdb5.3   5.3.28+dfsg1-0.5
ii  libevent-2.1-6 2.1.8-stable-4
ii  libpam0g   1.3.1-5
ii  libssl1.1  1.1.1d-0+deb10u2
ii  lsb-base   10.2019051400
ii  zlib1g 1:1.2.11.dfsg-1

Versions of packages opensmtpd recommends:
pn  opensmtpd-extras  

Versions of packages opensmtpd suggests:
ii  ca-certificates  20190110

-- debconf information:
  opensmtpd/root_address:
  opensmtpd/mailname:



Bug#930696: [pkg-cryptsetup-devel] Bug#930696: Keyfiles specified by KEYFILE_PATTERN are not added to the initramfs

2019-06-19 Thread Jernej Jakob
On Wed, 19 Jun 2019 01:36:22 +0200
Guilhem Moulin  wrote:

> Control: severity -1 minor
> 
> Hi,
> 
> On Tue, 18 Jun 2019 at 20:35:47 +0200, Jernej Jakob wrote:
> > Any keyfiles configured in /etc/cryptsetup-initramfs/conf-hook
> > KEYFILE_PATTERN are not added to the initramfs if the target in
> > /etc/crypttab also has keyscript set.  
> 
> As crypttab(5) reads,
> 
>“In case of a keyscript, the value of [the third] field is given as
>argument to the keyscript.”
> 
> This could probably be made clearer, but the behavior is intentional: it is
> *not* treated as a key file, hence not compared against the KEYFILE_PATTERN
> glob(7) expansion.

Makes sense. Seems good to add this explanation to the documentation,
maybe adding "and is *not* added to the initramfs". Otherwise it may be
assumed it would still be added, since it's a file, and is passed as an
argument to the keyscript (the argument of which could be a file), and
the field is normally used as the path to a keyfile, which is added.
It all seems very complex to understand to a novice, in particular due
to the dual function of the third field.

> 
> > This may prevent the system from booting if the target has a
> > keyscript=/bin/cat set (as is in PureOS which is based on buster).  
> 
> Setting ‘keyscript=/bin/cat’ is useless for unlocking by key file, and
> is discouraged as it's incompatible with setups not supporting
> keyscripts, like systemd's systemd-cryptsetup@.service.  The same entry
> without the key script should work just fine.
> 
> > Perhaps cryptroot should print out a warning that the keyfile set in
> > crypttab wasn't added due to a set keyscript. That way the users would
> > know something may be misconfigured.  
> 
> I'm reluctant to do that due to false positives.  Consider a setup with
> two devices unlocked at initramfs stage, one opened by key file (copied
> to the initramfs image), one by key script, and KEYFILE_PATTERN set to
> "*".  Nothing wrong with that setup, KEYFILE_PATTERN="*" indicates that
> all key files should be copied to the initramfs image; crypttab(5)
> entries with a ‘keyscript=’ option are intentionally excluded from
> glob(7)'ing printing any warning would be a false positive.
> 
> Cheers,

I agree.

Thanks



Bug#930696: Keyfiles specified by KEYFILE_PATTERN are not added to the initramfs

2019-06-18 Thread Jernej Jakob
Package: cryptsetup
Version: 2:2.1.0-5

Any keyfiles configured in /etc/cryptsetup-initramfs/conf-hook
KEYFILE_PATTERN are not added to the initramfs if the target in
/etc/crypttab also has keyscript set.

This may prevent the system from booting if the target has a
keyscript=/bin/cat set (as is in PureOS which is based on buster).

The check is done in debian/initramfs/hooks/cryptroot:169.

Perhaps cryptroot should print out a warning that the keyfile set in
crypttab wasn't added due to a set keyscript. That way the users would
know something may be misconfigured.

The documentation should also be updated to reflect this behavior, in
particular /etc/cryptsetup-initramfs/conf-hook, debian/README.initramfs
and wherever else it's applicable.



Bug#922720: ca-certificates-java: update-ca-certificates fails with bashism in jks-keystore

2019-03-01 Thread Jernej Jakob
Can confirm this bug, happened when installing ca-certificates-java on
debian 9.8.