Bug 273242 - sysutils/appjail: Update to 2.7.1
Summary: sysutils/appjail: Update to 2.7.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Fernando Apesteguía
URL: https://github.com/DtxdF/AppJail/rele...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-20 11:07 UTC by Jesús Daniel Colmenares Oviedo
Modified: 2023-08-21 17:49 UTC (History)
1 user (show)

See Also:


Attachments
appjail-2.7.0.patch (3.38 KB, patch)
2023-08-20 11:07 UTC, Jesús Daniel Colmenares Oviedo
DtxdF: maintainer-approval+
Details | Diff
appjail-2.7.1.patch (1.51 KB, patch)
2023-08-21 11:05 UTC, Jesús Daniel Colmenares Oviedo
DtxdF: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesús Daniel Colmenares Oviedo 2023-08-20 11:07:47 UTC
Created attachment 244223 [details]
appjail-2.7.0.patch

Description:

ChangeLog: https://github.com/DtxdF/AppJail/releases/tag/v2.7.0

* Fixed: <defunct> process in appjail-dns (When sending a SIGTERM
  signal to appjail-dns, there will be one process left, that
  process is the sleep(1) command, which results in a minute
  or a little more waiting for this process to finish. To
  fix this, when sending a SIGTERM signal to appjail-dns,
  a SIGTERM signal is sent to the sleep(1) command.).
* Fixed: exit status of the start stage (The start stage may return
  a non-zero exit status indicating an error or whatever it means
  and the start command will return 0 which in almost all
  situations is not the intent.).
* Fixed: pkg all (Add a missing shift command to fix pkg all as its
  arguments were passed to pkg(8).).
* Added: special keyword <random> to virtualnet:interface.
* Added: special keyword <name> to virtualnet:interface.
* Create the mount point when using the -p parameter in fstab set.
* Fixed: incorrect data type in fstab:dump and fstab:pass.
* Incremented: priority after running OPTION.
* Make empty some global variables when running makejail.
* Added: -V parameter in makejail.
* Improved: DNS support.
* Added: input file when showing the importing message.
* Moved: message when importing after creating the empty jail.
* Fixed: typos in Build Arguments.
* Removed: obsolete documentation for Build Arguments (The example
  shown in Build Arguments is no longer correct as the official
  Makejail for Python has been changed.).
* Added: IMAGE_ENTRYPOINT option
* Fixed: share/appjail/lib/replace:lib_replace: escape [&#]
* Adapted: EXEC to use global makejails
* Added: GLOBAL instruction

QA:

* portlint: OK (looks fine.)
* testport: OK (poudriere: 13.2-RELEASE, amd64, DEBOOTSTRAP DOAS DOCS GIT tested)
Comment 1 Jesús Daniel Colmenares Oviedo 2023-08-21 11:05:18 UTC
Created attachment 244248 [details]
appjail-2.7.1.patch

Description:

ChangeLog: https://github.com/DtxdF/AppJail/releases/tag/v2.7.1

* Hotfix: Load rc config before checking values (When the user defines
  a custom rc value in their rc.conf file, it is not honored for some
  operations, instead the default values are used, which is not the
  intention in this case.).

QA:

* portlint: OK (looks fine.)
* testport: OK (poudriere: 13.2-RELEASE, amd64, DEBOOTSTRAP DOAS DOCS GIT tested)
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-21 11:12:38 UTC
(In reply to Jesús Daniel Colmenares Oviedo from comment #1)
Thanks for that!

Being a hotfix, is this something we want in 2023Q3?
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-21 11:15:27 UTC
(In reply to Fernando Apesteguía from comment #2)
Answering to myself, this is a bug in 2.7.0, not before.
Comment 4 Jesús Daniel Colmenares Oviedo 2023-08-21 11:27:03 UTC
(In reply to Fernando Apesteguía from comment #3)

Hi Fernando,

Yeah, this bug was introduced in 2.7.0.

Thanks!
Comment 5 Jesús Daniel Colmenares Oviedo 2023-08-21 11:37:23 UTC
(In reply to Jesús Daniel Colmenares Oviedo from comment #4)

I discovered this bug with the appjail-dns rc script as I set `appjail_dns_hook` to another script and it does not honor the user defined value, but I set `appjail_dns_logfile` and it is honored. I think this is strange behavior with the rc framework, but I think load_rc_config is supposed to be before setting the defaults. See the dnsmasq rc script for another example.

Of course, after making changes to the rc scripts I test appjail-dns and the user-defined options are honored, so load_rc_config should be before the defaults.
Comment 6 Fernando Apesteguía freebsd_committer freebsd_triage 2023-08-21 17:48:53 UTC
Committed,

Thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-08-21 17:49:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=80222f50fea7be0ad7ac6460f519acaf4d2f56ef

commit 80222f50fea7be0ad7ac6460f519acaf4d2f56ef
Author:     Jesús Daniel Colmenares Oviedo <DtxdF@disroot.org>
AuthorDate: 2023-08-21 11:21:11 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-08-21 17:48:32 +0000

    sysutils/appjail: Update to 2.7.1

    ChangeLog: https://github.com/DtxdF/AppJail/releases/tag/v2.7.0

    * Fixed: <defunct> process in appjail-dns (When sending a SIGTERM
      signal to appjail-dns, there will be one process left, that
      process is the sleep(1) command, which results in a minute
      or a little more waiting for this process to finish. To
      fix this, when sending a SIGTERM signal to appjail-dns,
      a SIGTERM signal is sent to the sleep(1) command.).
    * Fixed: exit status of the start stage (The start stage may return
      a non-zero exit status indicating an error or whatever it means
      and the start command will return 0 which in almost all
      situations is not the intent.).
    * Fixed: pkg all (Add a missing shift command to fix pkg all as its
      arguments were passed to pkg(8).).
    * Added: special keyword <random> to virtualnet:interface.
    * Added: special keyword <name> to virtualnet:interface.
    * Create the mount point when using the -p parameter in fstab set.
    * Fixed: incorrect data type in fstab:dump and fstab:pass.
    * Incremented: priority after running OPTION.
    * Make empty some global variables when running makejail.
    * Added: -V parameter in makejail.
    * Improved: DNS support.
    * Added: input file when showing the importing message.
    * Moved: message when importing after creating the empty jail.
    * Fixed: typos in Build Arguments.
    * Removed: obsolete documentation for Build Arguments (The example
      shown in Build Arguments is no longer correct as the official
      Makejail for Python has been changed.).
    * Added: IMAGE_ENTRYPOINT option
    * Fixed: share/appjail/lib/replace:lib_replace: escape [&#]
    * Adapted: EXEC to use global makejails
    * Added: GLOBAL instruction

    PR:             273242
    Reported by:    DtxdF@disroot.org (maintainer)

 sysutils/appjail/Makefile  | 2 +-
 sysutils/appjail/distinfo  | 6 +++---
 sysutils/appjail/pkg-plist | 6 ++++++
 3 files changed, 10 insertions(+), 4 deletions(-)