#1009639 localepurge: unable to create reproducible system image due to 'mktemp' in postinst script

#1009639#5
Date:
2022-04-13 12:11:47 UTC
From:
To:
Version: 0.7.3.10

Severity: normal



Dear Maintainer,



Hi,



I am working to fix a reproducible issue happened during system image creation,

There, when locale purge configuration is copied before package (localepurge) installation,

it produces a debconf cache entry with non-reproducible entries, that is due to 'mktemp' used in postinst script [0],



I wanted to know whether we can use other temporary file at [0], which can be reproducible?



[0] https://salsa.debian.org/elmig-guest/localepurge/-/blob/master/debian/postinst#L206



steps to verify this issue:

1. create a minimal base image with debootstrap $ sudo debootstrap bullseye rootfs/ http://deb.debian.org/debian/ 2. create a configuration for locale.nopurge $ sudo chroot rootfs /bin/bash -c "echo en > /etc/locale.nopurge"

3. install localepurge

$ sudo chroot rootfs /bin/bash -c "apt update && apt install localepurge"

4. Check the debconf cache entry (shown below) that has non-reproducible ```

Name: ucf/changeprompt

Template: ucf/changeprompt

Value: keep_current

Owners: ucf

Flags: seen

Variables:

BASENAME = locale.nopurge

FILE = /etc/locale.nopurge

NEW = /tmp/tmp.WJBJ9kEpAu

```



Thanks,

Venkata.