El 4/4/24 a las 14:07, Johannes Schauer Marin Rodrigues escribió:
well this is an old bug. How have you worked around it being open for the past six years?
This is important for me, so I'm still patching my own sbuild version. Yes, every single time.
Quoting Santiago Vila (2024-04-04 12:57:13) I'm not happy with using an environment variable for this. Sbuild only has a single environment variable that is specific to it: SBUILD_CONFIG. The usual way to customize an sbuild run is via the config or command line arguments, not via environment variables. Also, your patch is missing documentation.
Ok. At the time, I was completely unaware of such design decisions, so an environment variable is just the way I found to be simpler, but a command line argument would be completely fine of course. Can you give me a small hint about how I should proceed? (For example, which files in the source would require to be modified?) (Preferred name for the command line?)
I also think that there is a more elegant solution to this. If this is just about the timestamp, why not add a new configuration option which allows customizing the default strftime format %FT%TZ to be anything else? You could use such a mechanism to store your own timestamp. This is what you suggested doing earlier in this bug report.
Unfortunately, it's not just about the date format (that's only how it started), it's mainly about sbuild allowing me to specify the build log filename beforehand, without it second-guessing the string I really want to use. I have a recent case where the usefulness of this may be seen easily: Last time I tried to rebuild bookworm from source, I found several packages which FTBFS because of expired SSL certificates being used in the tests. So I decided to build bookworm "in the future" to know which packages will fail for similar reasons in the next years. I first tried using libfaketime but did not managed for it to work easily. At the end, the most reliable way I found was to actually change the system clock, like this: timedatectl set-time '2031-01-14 12:00:00' Now, here is the thing: When I do that, sbuild would think (rightfully) that I'm on such date, and would use it for both the contents of the build log and also the build log filename. However, in this case I still want the build log filename to be the present day, because it's the real date where I tried such build in the future. Thanks.