Quoting Paul Gevers (2022-10-13 10:00:42)
Please also consider supporting the nodoc build profile. We are aware
that nodoc is regularly used in a non-reproducible way (as intended,
but with this consequence), so checking for correctness of this
profile may be a bit harder. Ideally, using the profile would just
make documentation binaries virtually empty.
No. Ideally, using the nodoc profile would make documentation binaries not be emitted at all. This then also makes checking for correctness a lot easier because then all binary packages built with the nodoc profile will be bit-by-bit identical if your source package builds reproducibly.
This can be achieved by adding this to the binary package stanza in d/control:
Package: foo-doc
Architecture: all
Build-Profiles: <!nodoc>
Then, in d/rules you can surround code that creates the foo-doc package with a conditional like this one:
ifneq (,$(filter foo-doc,$(shell dh_listpackages)))
# do stuff needed to build foo-doc
endif
Using dh_listpackages you also automatically catch other cases in which foo-doc might not get built other than the nodoc build profile being active, for example for an arch:any-only build.
Also, do not forget to add the build dependencies necessary to build foo-doc to Build-Depends-Indep instead of keeping them in Build-Depends if your foo-doc package is Architecture:all.
Thanks!
cheers, josch
--==============x61359629841089423=MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Description: signature
Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmNIApsACgkQ8sulx4+9 g+EI0Q/+OdgmdYIRI1GXQz71xR1tJKcdzj+ju1bjp2lkwGBdeBqAhqNymgl0KToW VVJKszioPya3cW+TQ/90aBDgD4jgMsBxDelPnrUbeY6BtAxW2m4FpEZAyjoSBN58 vK8Slg6fL/ArTDoLvaCKkiRaGXSncaEUQ6oC8BhwnLSMx7zFVfsd8JY7HHo3vFZc ZmWE9cXGq+bHeEvYxqKhf7VxVyjSL7TdgRgvs/CGcEUCjKGMW87yZLig9c6piyfU HqJF2UvayEye2sja6XJAD3qMILmnVxNZJtXsnIxocNgbDW+O2zMV5z8Ja1goMroF igjtRE+E+seJWCqI6vocKHaxqTszZF6I0bULssqw1S13QgIxnhU8ijJxvXcVfIDM NBXiXR9rbtK3PuKdJpIde3oXaLJWQ14C/BafxhKKiU3qb6Hg7SNoynVrecAYbhPI zstn7E2RYjZl2zW4HQcm2BRyuVPqPx/ijfZLfRkIYdYOKJRvniKbUMAPbHd75M3M FuUI+oUIkxWZnShxf9P3bZR0TGr2CNyvhWTFATVvDRFNbVscU+A9bTIqje+q5JIt /zf/7+MOXJmv69d/O6azSxm4prmTAp8j3Zv4Q11ojfQJY0s9DBJD/2KRKGy7Jrtq 8dBe0UYcYYAZqBrPEcBa3KeAVqNV6im9cbcviak6z54GdAvlRaE=
=qj2M
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)