Subject: Bug#1079184: wine: Removes and generates debian/control at build time

From: Guillem Jover <[email-masked]>
Date: Wed, 21 Aug 2024 04:33:41 +0200

Source: wine
Source-Version: 9.0~repack-4
Severity: important

Hi!

This package regenerates the debian/control file on each build, from my
reading of the archive https://ftp-master.debian.org/REJECT-FAQ.html,
this is not allowed.

I realize the regeneration is supposed to not change the content of
the file unless the packaging is for stable or development source
packages. But the above would still seem to apply.

In, practical terms this is causing the following error:

  ,---
  /usr/bin/make -f debian/rules debian/control
  make[2]: Entering directory '/tmp/bd/wine-9.0~repack'
  dpkg-buildapi: error: cannot read debian/control: No such file or directory
  /bin/sh: 1: test: Illegal number: 
  sed "s/VERSION//g;s/DEBSUFFIX/-stable/g" < debian/control.in > debian/control
  `---

Because the debian/control file gets removed before it gets
regenerated. Besides the regeneration issue, I think the control file
should not be removed.

I think, that the current handling might have multiple intents. One
perhaps to generate the debian/control file from debian/control.in if
the former is missing, this can be accomplished as of now with a make
target. Then there is the generation of the file depending on the
source, but that should not change often, or when it changes would be
due to changes in control.in, which would trigger the usual target as
well, but a new target could be created as well to forcibly touch the
source and then depend on the usual target. And finally, perhaps as a
check to make sure that the file always contains the expected result.
For this latter case I guess adding a new target that generates the
file as a temporary, and compares against the canonical
debian/control, and then fails if there's any difference, would
accomplish the check, while not generating it.

Thanks,
Guillem

---

From: Paul Gevers <[email-masked]>
Date: Sat, 10 May 2025 12:37:41 +0200

Control: severity -1 serious

> reading of the archive https://ftp-master.debian.org/REJECT-FAQ.html,

I agree with this reading, hence bumping the severity. You can compare a 
generated file with the on-disk file and fail the build if you want to 
guarantee that the d/control file is up-to-date, You're not allowed to 
regenerated it during the build.

Paul