Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
paravoid opened this issue Dec 2, 2023 · 5 comments
Assignees
Labels

Comments

@paravoid
Copy link

paravoid commented Dec 2, 2023

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.

@pbiering pbiering self-assigned this Dec 3, 2023
@pbiering
Copy link
Owner

pbiering commented Dec 3, 2023

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

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

@paravoid
Copy link
Author

paravoid commented Dec 4, 2023

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
Copy link
Author

paravoid commented Dec 5, 2023

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

@pbiering
Copy link
Owner

pbiering commented Dec 5, 2023

thank you for reporting, fixed by 3adc887

@pbiering
Copy link
Owner

pbiering commented Dec 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants