[Swan-dev] comment on version.mk - make rpm

Paul Wouters paul at nohats.ca
Mon Oct 7 13:56:39 UTC 2019


On Fri, 4 Oct 2019, Antony Antony wrote:

> a minor comment. I noticed a commit to fix version number in "make rpm"
>
> https://github.com/libreswan/libreswan/commit/b68c5a33261ea07defa119edee97e4a495588d6c
>
> It is good improvement to "make rpm".
>
> However, there is another way to set pluto --version,
> IPSECVERSION=%{IPSECVERSION}
> https://github.com/libreswan/libreswan/blob/master/packaging/fedora/libreswan-testing.spec#L18
>
> setting IPSECVERSION is also used in Debian and OpenWRT packaging. May be it
> is better to use this method instead of b68c5a.

People often re-use spec files by grabbing their existing one and only
changing the Version: and Release: fields. When you install a SRPM and the
spec file goes into ~/rpmbuild/SPECS, you do not remember the origin of
that spec file. So you might not be aware that you would need to change
Version:, Release: _and_ IPSECVERSION.

Having two independent version-like options in the spec file that can
contradict each other seems dangerous, and I wanted to avoid people
creating a "3.31" tarball that still has IPSECVERSION=3.30 hardcoded in
the spec file, which will misidentify as 3.30 instead of 3.31. And if
ipsec version and rpm -q libreswan contradict each other, which one do
you believe?

Paul


More information about the Swan-dev mailing list