-
Notifications
You must be signed in to change notification settings - Fork 588
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
Makefile.in: stop running distclean on dist #5142
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
distclean erases user-made modifications to the files generated by the configure script; it is not obvious that a non-"clean" target would ever run it. That is, instead of: ./configure --enable-foo && make distclean && make dist It would probably be safer (and more maintainable) to do: make distclean && ./configure --enable-foo && make dist So drop the distclean call and the file-moving hacks around it. Added on commit 1379851 ("Baseline firejail 0.9.28", 2015-08-08). Relates to commit 6849191 ("bug: preserve config.status during make dist", 2016-09-19) and commit 31dc121 ("fixups", 2020-07-19).
reinerh
approved these changes
May 14, 2022
Misc: Used a normal merge for this because I refer to this PR on other commits. |
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 20, 2022
Add the following missing generated files to DISTFILES: * Makefile * mkdeb.sh To make the dist archive contain all of the files that are generated by the configure script, which removes the need to run ./configure after unpacking the archive (as is currently done on `make deb`). Relates to netblue30#5142.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 20, 2022
On firejail 0.9.68, one would run `./configure` (to generate Makefile from Makefile.in) and then running `make deb` would end up running something akin to: make distclean && make dist && ./configure --prefix=/usr && mkdeb.sh As of netblue30#5142, `make dist` does not run `make distclean` anymore, but `make deb` still overrides any configure options that the user might have set. Stop doing that and do just `make dist && mkdeb.sh` on `make deb`. To build everything from scratch as `make deb` would do on 0.9.68 (but without it overriding the configure options), one can run: make distclean && ./configure --prefix=/usr && make deb Note that this is basically what the "build_debian_package" job on .gitlab-ci.yml does (see also the "build_apparmor" job). Should fully fix netblue30#3523. Relates to netblue30#772 netblue30#1205.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 20, 2022
On firejail 0.9.68, one would run `./configure` (to generate Makefile from Makefile.in) and then running `make deb` would end up running something akin to: make distclean && make dist && ./configure --prefix=/usr && ./mkdeb.sh As of netblue30#5142, `make dist` does not run `make distclean` anymore, but `make deb` still overrides any configure options that the user might have set. Stop doing that and do just `make dist && ./mkdeb.sh` on `make deb`. To build everything from scratch as `make deb` would do on 0.9.68 (but without it overriding the configure options), one can run: make distclean && ./configure --prefix=/usr && make deb Note that this is basically what the "build_debian_package" job on .gitlab-ci.yml does (see also the "build_apparmor" job). Should fully fix netblue30#3523. Relates to netblue30#772 netblue30#1205.
This was referenced May 20, 2022
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 27, 2022
This (mostly) restores the behavior from before commit 1fb814e ("Makefile.in: stop running distclean on dist", 2022-05-13) / PR netblue30#5142. ./configure still has to be called before calling ./contrib/fj-mkdeb.py (to generate Makefile from Makefile.in before calling `make distclean`).
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
May 27, 2022
This (mostly) restores the behavior from before commit 1fb814e ("Makefile.in: stop running distclean on dist", 2022-05-13) / PR netblue30#5142. ./configure still has to be called before calling ./contrib/fj-mkdeb.py (to generate Makefile from Makefile.in before calling `make distclean`).
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
Jun 8, 2022
This reverts commit 1fb814e. If distclean is not executed before copying the files on dist, then the generated files inside src/ are included in the dist archive: $ ./configure >/dev/null && make distclean >/dev/null && ./configure >/dev/null && make dist | grep 'Makefile$' | wc -l 26 This happens because src/ is copied wholesale on dist (see DISTFILES). Revert the commit to ensure that only the input files (such as the "Makefile.in" files) are archived. Related discussion: netblue30#5154 (review) Relates to netblue30#5142.
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
Jul 27, 2023
The clean target is currently enough to remove all generated files other than the ones directly in the root directory, so to simplify the dist target, make it depend on clean instead of distclean. See commit 5f27852 ("build: remove unnecessary distclean targets", 2023-07-15) / PR netblue30#5911. Relates to netblue30#5142 netblue30#5182.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
distclean erases user-made modifications to the files generated by the
configure script; it is not obvious that a non-"clean" target would ever
run it.
That is, instead of:
It would probably be safer (and more maintainable) to do:
So drop the distclean call and the file-moving hacks around it.
Added on commit 1379851 ("Baseline firejail 0.9.28", 2015-08-08).
Relates to commit 6849191 ("bug: preserve config.status during make
dist", 2016-09-19) and commit 31dc121 ("fixups", 2020-07-19).