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

--enable-apparmor option is lost with make deb #772

Closed
nick75e opened this issue Sep 10, 2016 · 5 comments · Fixed by #5154
Closed

--enable-apparmor option is lost with make deb #772

nick75e opened this issue Sep 10, 2016 · 5 comments · Fixed by #5154
Labels
enhancement New feature request

Comments

@nick75e
Copy link

nick75e commented Sep 10, 2016

Hi!

Using configure --prefix=/usr --enable-apparmor shows this:

[...]
checking sys/apparmor.h usability... yes
checking sys/apparmor.h presence... yes
checking for sys/apparmor.h... yes
[...]
Configuration options:
   apparmor: -DHAVE_APPARMOR

But when I type make deb I get:

[...]
Configuration options:
   apparmor: 

The apparmor option is discarded at some point. Everything is okay when using make
Please fix.

@netblue30 netblue30 added the enhancement New feature request label Sep 10, 2016
@netblue30
Copy link
Owner

I'll have to implement it. For now, change "./configure --prefix=/usr" into "./configure --prefix=/usr --enable-apparmor" in mkdeb.sh.

@netblue30
Copy link
Owner

Fixed in git.

@netblue30
Copy link
Owner

I had to roll it back. Use the change in mkdeb.sh.

@laniakea64
Copy link
Contributor

Was going to file a bug about this when I couldn't disable git-install in my .deb build of firejail. After reading this issue, I wrote a Python 3 script to automate setting custom configure options in mkdeb.sh and then building.

Would it be useful for either of you?

@netblue30
Copy link
Owner

Sure, send a pull request. Put the file in https://github.com/netblue30/firejail/tree/master/contrib, I'll modify the install script to have it installed automatically.

kmk3 added a commit to kmk3/firejail that referenced this issue 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 issue 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 issue May 27, 2022
Currently, mkdeb.sh (which is used to make a .deb package) runs
./configure with hardcoded options (some of which are automatically
detected based on configure-time variables).  To work around the
hardcoding, contrib/fj-mkdeb.py is used to add additional options by
rewriting the actual call to ./configure on mkdeb.sh.  For example, the
following invocation adds --disable-firetunnel to mkdeb.sh:

    $ ./configure && ./contrib/fj-mkdeb.py --disable-firetunnel

To avoid depending on another script and to avoid re-generating
mkdeb.sh, just let the latter pass the remaining arguments (the first
one is an optional package filename suffix) to ./configure directly.
Example:

    $ make distclean && ./configure && make dist &&
      ./mkdeb.sh "" --disable-firetunnel

Additionally, change contrib/fj-mkdeb.py to do roughly the same as the
above example, by simply forwarding the arguments that it receives to
./mkdeb.sh (which then forwards them to ./configure).  Also, remove the
--only-fix-mkdeb option, since the script does not change mkdeb.sh
anymore.  With these changes, the script's usage (other than when using
--only-fix-mkdeb) should remain the same.

Note: To clean the generated files and then make a .deb package using
the default configuration, the invocation is still the same:

    $ make distclean && ./configure && make deb

Note2: Running ./configure in the above examples is only needed for
generating Makefile/mkdeb.sh from Makefile.in/mkdeb.sh.in after running
distclean, so that running `make` / `./mkdeb.sh` afterwards works.

Should fully fix netblue30#772.

Relates to netblue30#1205 netblue30#5148.
kmk3 added a commit to kmk3/firejail that referenced this issue May 27, 2022
Currently, mkdeb.sh (which is used to make a .deb package) runs
./configure with hardcoded options (some of which are automatically
detected based on configure-time variables).  To work around the
hardcoding, contrib/fj-mkdeb.py is used to add additional options by
rewriting the actual call to ./configure on mkdeb.sh.  For example, the
following invocation adds --disable-firetunnel to mkdeb.sh:

    $ ./configure && ./contrib/fj-mkdeb.py --disable-firetunnel

To avoid depending on another script and to avoid re-generating
mkdeb.sh, just let the latter pass the remaining arguments (the first
one is an optional package filename suffix) to ./configure directly.
Example:

    $ make distclean && ./configure && make dist &&
      ./mkdeb.sh "" --disable-firetunnel

Additionally, change contrib/fj-mkdeb.py to do roughly the same as the
above example, by simply forwarding the arguments that it receives to
./mkdeb.sh (which then forwards them to ./configure).  Also, remove the
--only-fix-mkdeb option, since the script does not change mkdeb.sh
anymore.  With these changes, the script's usage (other than when using
--only-fix-mkdeb) should remain the same.

Note: To clean the generated files and then make a .deb package using
the default configuration, the invocation is still the same:

    $ make distclean && ./configure && make deb

Note2: Running ./configure in the above examples is only needed for
generating Makefile/mkdeb.sh from Makefile.in/mkdeb.sh.in after running
distclean, so that running `make` / `./mkdeb.sh` afterwards works.

Should fully fix netblue30#772.

Relates to netblue30#1205 netblue30#5148.
kmk3 added a commit to kmk3/firejail that referenced this issue May 27, 2022
Currently, mkdeb.sh (which is used to make a .deb package) runs
./configure with hardcoded options (some of which are automatically
detected based on configure-time variables).  To work around the
hardcoding, contrib/fj-mkdeb.py is used to add additional options by
rewriting the actual call to ./configure on mkdeb.sh.  For example, the
following invocation adds --disable-firetunnel to mkdeb.sh:

    $ ./configure && ./contrib/fj-mkdeb.py --disable-firetunnel

To avoid depending on another script and to avoid re-generating
mkdeb.sh, just let the latter pass the remaining arguments (the first
one is an optional package filename suffix) to ./configure directly.
Example:

    $ make distclean && ./configure && make dist &&
      ./mkdeb.sh "" --disable-firetunnel

Additionally, change contrib/fj-mkdeb.py to do roughly the same as the
above example, by simply forwarding the arguments that it receives to
./mkdeb.sh (which then forwards them to ./configure).  Also, remove the
--only-fix-mkdeb option, since the script does not change mkdeb.sh
anymore.  With these changes, the script's usage (other than when using
--only-fix-mkdeb) should remain the same.

Note: To clean the generated files and then make a .deb package using
the default configuration, the invocation is still the same:

    $ make distclean && ./configure && make deb

Note2: Running ./configure in the above examples is only needed for
generating Makefile/mkdeb.sh from Makefile.in/mkdeb.sh.in after running
distclean, so that running `make` / `./mkdeb.sh` afterwards works.

Should fully fix netblue30#772.

Relates to netblue30#1205 netblue30#5148.
kmk3 added a commit to kmk3/firejail that referenced this issue May 29, 2022
Currently, mkdeb.sh (which is used to make a .deb package) runs
./configure with hardcoded options (some of which are automatically
detected based on configure-time variables).  To work around the
hardcoding, contrib/fj-mkdeb.py is used to add additional options by
rewriting the actual call to ./configure on mkdeb.sh.  For example, the
following invocation adds --disable-firetunnel to mkdeb.sh:

    $ ./configure && ./contrib/fj-mkdeb.py --disable-firetunnel

To avoid depending on another script and to avoid re-generating
mkdeb.sh, just let the latter pass the remaining arguments (the first
one is an optional package filename suffix) to ./configure directly.
Example:

    $ make distclean && ./configure && make dist &&
      ./mkdeb.sh "" --disable-firetunnel

Additionally, change contrib/fj-mkdeb.py to do roughly the same as the
above example, by simply forwarding the arguments that it receives to
./mkdeb.sh (which then forwards them to ./configure).  Also, remove the
--only-fix-mkdeb option, since the script does not change mkdeb.sh
anymore.  With these changes, the script's usage (other than when using
--only-fix-mkdeb) should remain the same.

Note: To clean the generated files and then make a .deb package using
the default configuration, the invocation is still the same:

    $ make distclean && ./configure && make deb

Note2: Running ./configure in the above examples is only needed for
generating Makefile/mkdeb.sh from Makefile.in/mkdeb.sh.in after running
distclean, so that running `make` / `./mkdeb.sh` afterwards works.

Should fully fix netblue30#772.

Relates to netblue30#1205 netblue30#3414 netblue30#5148.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants