Subject: debootstrap: aid reproducible boostrapping by providing a --cleanup-logs option

From: Holger Levsen <[email-masked]>
Date: Tue, 13 Sep 2022 17:36:34 +0200

Package: debootstrap
Version: 1.0.127
Severity: wishlist
X-Debbugs-Cc: [email-masked]

Dear Maintainer,

using debootstrap 1.0.127 it's possible to reproducible bootstrap Debian,
provided one does three extra steps:

1. rm /var/log/dpkg.log /var/log/alternatives.log /var/log/bootstrap.log
2. rm /etc/machine-id /var/cache/ldconfig/aux-cache
3. SOURCE_DATE_EPOCH=$some_sane_value ; sudo tar --mtime="@$SOURCE_DATE_EPOCH" --clamp-mtime $SUITE -cf $SUITE.tar

This bug is about the first step. It would be really nice if debootstrap
had an option called --cleanup-logs which would delete those logs.

Step 2 (or rather it's first part) is tracked via #1018740: "debootstrap:
better initialisation of /etc/machine-id".
Step 3 would be another new feature for debootstrap, namely to create tar archives.

Thanks for maintaining debootstrap!

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

"I know what you're thinking" used to be an idiom but now it's a business model.

---

From: "Chris Lamb" <[email-masked]>
Date: Wed, 14 Sep 2022 10:00:32 +0100

> had an option called --cleanup-logs which would delete those logs.

Would it be sensible to suggest that, instead of an explicit
command-line flag, that debootstrap would do this cleanup if
SOURCE_DATE_EPOCH is present?

If it helps, the idea of using the presence (or non-presence) of
SOURCE_DATE_EPOCH to slightly adjust the behaviour of a program is
already being used as a flag in other places.

(If it helps, the parallel bug for cdebootstrap is #1019698.)

Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email-masked] 🍥 chris-lamb.co.uk
       `-

---

From: Holger Levsen <[email-masked]>
Date: Wed, 14 Sep 2022 09:59:44 +0000

Hi Chris,

> SOURCE_DATE_EPOCH is present?

I think that's an excellent idea! :)
 
> (If it helps, the parallel bug for cdebootstrap is #1019698.)

Leaving the rest of your reply as I've cc:ed #1019698.

-- 
cheers,
	Holger

 ⢀⣴⠾⠻⢶⣦⠀

"Climate change" is an euphenism. "Global warming" as well.

---

From: Cyril Brulebois <[email-masked]>
Date: Wed, 14 Sep 2022 16:26:18 +0200

> SOURCE_DATE_EPOCH is present?

LGTM, and much better than the command line flag I was definitely not a
huge fan of (as mentioned initially).

It would probably make sense to have a tiny note in the manpage so that
people can check the difference in behaviour if they notice and wonder.

> already being used as a flag in other places.

Good to know, thanks.

Cheers,
-- 
Cyril Brulebois ([email-masked])            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant