ipv6calc icon indicating copy to clipboard operation
ipv6calc copied to clipboard

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

Open paravoid opened this issue 1 year ago • 5 comments
trafficstars

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 avatar Dec 02 '23 20:12 paravoid

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

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

pbiering avatar Dec 03 '23 05:12 pbiering

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.

paravoid avatar Dec 04 '23 14:12 paravoid

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

paravoid avatar Dec 05 '23 16:12 paravoid

thank you for reporting, fixed by https://github.com/pbiering/ipv6calc/commit/3adc887090a5a80830bd52a8aedba72c8b03c273

pbiering avatar Dec 05 '23 21:12 pbiering

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.

pbiering avatar Dec 07 '23 05:12 pbiering