-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2011-04-08 11:10, Dmitry Katsubo wrote:
> Hi Niels,
> 
> On 07.04.2011 18:52, Niels Thykier wrote:
>> Hi
>>
>> I have the feeling you have not read #615132, which is basically asking
>> for a check against this particular usage of substvars.
> 
> To my opinion, emitting a warning is fine.
> 
> Jakub says that "use substitution variables in the source is always a
> packaging bug", however the documentation concerning "debian/control"
> file keeps silence concerning the fields which are not allowed to be
> substituted:
> 
> http://www.debian.org/doc/debian-policy/ch-source.html#s-substvars
> 

True, however Lintian does emit quite a few tags based on "best
practice" or things that may lead to issues.

>> This most likely happens because dpkg command (exact name eludes me at
>> the moment, possibly dpkg-source or dpkg-genchanges) building the dsc
>> does not include the Maintainer field.
> 
> You are right here: the generated .dsc file does not contain
> "Maintainer" field at all, and "dpkg-genchanges" generated the .changes
> file with "Maintainer" not substituted:
> [...]
> 
> As from the logs I also override dh_gencontrol, which by default is
> passing package-specific substvars file:
> dh_gencontrol -Tdebian/osra.substvars
> while I want to use one substvars for all packages.
> 

Generally that is a bad idea to only use one for all packages.  Some of
the substitutions are package specific, which is why there are package
specific files for it.  Plus these substitutions are auto-generated, so
you would need to "clean up" the auto-generated subst variables from the
file.

> As I mentioned, all "DEBIAN/control" files in the .deb packages look OK.
> 
> Does it look like a bug for dpkg-source / dpkg-genchanges? I have found
> this bug report:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589609
> saying that it's only dpkg-gencontrol (and not dpkg-source /
> dpkg-genchanges) that performs the substitution. But still "-T" option
> is there... I've got a bad feeling :)
> 

It might be a bug in dpkg-source/dpkg-genchanges - not to sure, but I
suggest you ask/contact the dpkg maintainers about it.

>> I assume it does this if the Maintainer field is empty, which is very
>> likely as the debian/substvars file is usually removed by the clean
>> target (e.g. by dh_clean) and is therefore not present when the source
>> package is created.
> 
> No, "debian/substvars" is not removed (at least explicitly by me) at
> dh_clean step and it stays in "debian/" after the build.
> 

Looks like dh_clean only checks for debian/<pkg>.substvars - oh well.

>> Note we also have a tag for keeping the debian/substvars file in the
>> source package because doing so may lead to complications/weird results.
> 
> Could you provide more information on that (which lintian option / tag?)
> 

The tag is called "diff-contains-substvars" and only applies to the
Debian packaging (so if you are making a native package, it would not
notice it... fun).
  The actual check is based on whether the filename matches these
anchored regexes.

  ^(?:.+\.)?substvars$
  ^debian/(?:.+\.)?substvars$

The difference is caused by whether or not it is a 3.0 (quilt) or an 1.0
source (respectively) and differ only with a prefix.  The relevant code
is in checks/cruft if you are interested in seeing it.

>> Obviously we cannot satisfy this and #615132 at the same time.
>> Personally I am more inclined to satisfy #615132, since these
>> substitutions can be rather non-trivial and (as you experienced) lead to
>> some "interesting" issues when done in source fields.
> 
> I can agree with you. Does it mean, that it is only "Maintainer" field
> which is problematic? What if I want to substitute "Homepage" or
> "Vcs-Browser" or "Version" field?
> 
> Thanks.
> 

The issue applies to all fields there are in debian/control.  We do not
substitute these variables because so far all substitutions are created
during build so we do not have their value.
  Admittedly, in some cases we conclude that a substitution variable is
missing based on which helper tools are in use (e.g. debhelper +
${misc:Depends}).  However that is an entirely different (and much
simpler) problem to solve.

~Niels

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJNnut5AAoJEAVLu599gGRCF/oP/RlUnc7A60XR4SkuDEtdIigs
qzujCpEiezP4bW4RUFWNIQDvKAJScxO4mwdJa3O56Jo2h4ggEcooBWkJPfsuY4UV
GwE40fMjAzTCWqHn0f0TIKh+d6Q9GQPZUGburLkG/bwLs5SOAIthxzbVmwIg7TDk
Swwq0nLh/+cxlEWqh5JcrXcB+XcfketXsUnIrHGsQuQ3jT7WSmv6HGBb74yDI4bI
Uj9zWIXOkdAqpYZwvInrhB3qS5JAfjUX2xAn/SivZo9W+7eZhPJ5dJvp8k9UMttt
N7ohxfR8qgJZDMKQ5G/tA2jQRz1c12NINLuFUB6axfD4lSIWT68pGzSPEgUxVrRy
0wCtjjRHF9G77ZJsC85+EvEoZUE5blYqCUl8VZgXDl84qrwZApfdWehQwSS8yjpb
5x1uSn6CANLOdNTBvGXeJqZGacXHjir/10p0PhCsItLW0EP6lDnhvM2fzwkSLB6P
1cfqk+Rk8tgQqIRVnUuJtNCpslgYgkFsgqK0+Lx+6LFA/2uf2vPAfHFd1fRG/MaZ
Ae4+Fdm0hOjugJiSR2RcG4kNS+cd1pT9X1wGP8gHejJhgqe6Hm20DvIf8QUnArDV
m6Mth/JmGlqqxqiga6sp6zutwVhf5R2X8HaSubm44shNdzt6ch922TRB7/zv1Wys
BiNnMGAchfbn+FLz0UNE
=iF97
-----END PGP SIGNATURE-----



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to