pbiering/ipv6calc

Pregenerated contrib/ipv6calc.spec is shipped in the source tree & tarball

Opened this issue · 5 comments

While contrib/ipv6calc.spec is generated from contrib/ipv6calc.spec.in, the pregenerated file is shipped in the source tree and resulting tarball. This is unlike e.g. Makefiles, that are also generated from Makefile.in, but in this case no pregenerated Makefiles being shipped.

This results into a dirty source tree when running "make; make clean" and requires workarounds in the Debian package.

@paravoid : a pregenerated ipv6calc.spec file is required to create RPM package using

rpmbuild -ta ipv6calc-<VERSION>.tar.gz

But what happens if ipv6calc.spec is out of date and needs to be regenerated? Isn't that a chicken-and-egg loop?

To be more specific about the issue I'm trying to address:

root@4f83acec3998:/tmp/ipv6calc# git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
root@4f83acec3998:/tmp/ipv6calc# ./configure
checking for gawk... no
[...]
*** ENABLE_MOD_IPV6CALC        =0
root@4f83acec3998:/tmp/ipv6calc# git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   contrib/ipv6calc.spec

no changes added to commit (use "git add" and/or "git commit -a")

Same thing even if I run "make distclean" afterwards, for what it's worth.

Hah, case in point: I think with cf02e4d you accidentally committed ipv6calc.spec with a dirty diff (no apxs installed).

thank you for reporting, fixed by 3adc887

Imho the chicken-egg problem can't be solved except by taking care in the process not releasing code without having spec file proper updated (generated):

   BUILD OPTIONS
       The general form of an rpm build command is

       rpmbuild {-bSTAGE|-rSTAGE|-tSTAGE} [rpmbuild-options] FILE ...

       The argument used is -b if a spec file is being used to build the package, -r if a source package is to be  rebuilt  and  -t  if
       rpmbuild should look inside of a (possibly compressed) tar file for the spec file to use.