[Swan-dev] proposed patch to re-create version.c every time

Paul Wouters paul at nohats.ca
Wed Jul 31 13:40:27 UTC 2019


Looks good to me

Sent from mobile device

> On Jul 31, 2019, at 08:55, Antony Antony <antony at phenome.org> wrote:
> 
> Hi
> tangential to "make showversion" discussion, there is an issue that annoys 
> me. Now I have a fix for it! If there is no violent opposition against this 
> proposed patch I would like to apply the attached patch.
> 
> version.c dependency is broken while developing and testing continuously from 
> one directory. Current dependency works great if you always build from a 
> clean git tree or run 'make clean' first or build from a tar ball. However, 
> less ideal for continuous development and testing.
> 
> Here is the case where it breaks.
> You run "make base install-base" starting with a clean git tree.
> Now make changes to the code and commit those changes.
> then "make base install-base". Now the  version.c would be stale.
> ie. pluto --version would not change even though the code changed, and 
> commit id, or "make showversion" changed.
> 
> ./OBJ.linux.x86_64/programs/pluto/pluto --version
> Libreswan v3.28-526-g5c9063def5-master-s2 XFRM(netkey) esp-hw-offload FORK 
> PTHREAD_SETSCHEDPRIO NSS (IPsec profile) DNSSEC FIPS_CHECK LABELED_IPSEC 
> SECCOMP LIBCAP_NG LINUX_AUDIT XAUTH_PAM NETWORKMANAGER CURL(non-NSS)
> 
> With this proposed patch version.c will be always (re)created.
> "make base' or make programs will have the correct version string.
> It would help me a lot. Are there any side effects if version.c is 
> (re)created every time?
> 
> Currently I use a work around, "make clean". it has two disadvantages.
> It would add another 30 - 180 sec delay for when you make a change 
> re-compile.  Often I forget that and have back track double check.
> 
> Let me know what you think. If there are no major objections to this patch I 
> will apply it, if no comment in week I will apply it:) 
> See the attached patch.
> 
> -antony
> <version-c.patch>
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev



More information about the Swan-dev mailing list