On Wed, 31 Jul 2019 at 08:56, Antony Antony <[email protected]> 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. > > Right, for the case where the version file really matters, it is correct. See the bottom end of: https://lists.libreswan.org/pipermail/swan-dev/2016-August/001609.html This is also the least worst option. For instance, invoking 'make' on an up-to-date build should do 'nothing'. With this patch applied, repeated makes will instead repeatedly rebuild all the programs. In addition to being confusing, and misleading (what did I change, is a dependency broken) it is also wrong - it cascades as now the re-built programs are going to needlessly trigger other dependencies (for instance make check in cavp). On KVMs, things get worse. A sequence like (i.e., make certain things are up-to-date and then run a test): $ make kvm-install kvm-test KVM_TESTS=testing/pluto/basic-pluto-01 now has the additional overhead of both running git with the dirty check and against 9p (which I think we can all agree is expensive, but something we can't see since it is being hidden under a rock) and then build new executable. The problem with git and KVM is also also why I've never bothered to fix this - any 'technically correct' solution will need to invoke 'git dirty' within the KVM - is that overhead really worth it - not for me? Andrew 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 > _______________________________________________ > Swan-dev mailing list > [email protected] > https://lists.libreswan.org/mailman/listinfo/swan-dev >
_______________________________________________ Swan-dev mailing list [email protected] https://lists.libreswan.org/mailman/listinfo/swan-dev
