Bug 274993 - sysutils/bastille: do not override upstream rc script
Summary: sysutils/bastille: do not override upstream rc script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-09 16:20 UTC by Denis Shaposhnikov
Modified: 2023-12-07 19:26 UTC (History)
4 users (show)

See Also:
fernape: maintainer-feedback+


Attachments
update to 0.10.20231125 (4.04 KB, patch)
2023-12-02 16:04 UTC, Denis Shaposhnikov
fernape: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Shaposhnikov 2023-11-09 16:20:18 UTC
Hi,

does it possible to configure rc.d/bastille.sh to stop jails in reverse order? If not, it would an usable feature. In may use case a jail with icinga and grafana should be started after jail with postgersql, and I can get it with

  bastille_list="db icinga"

but icinga should be stopped before postgesql, because it is trying to connect to postgresql and waiting too long. It would be nice to have a new rc.conf var like

  bastille_reverse_stop="YES"
Comment 1 Mina Galić freebsd_triage 2023-11-09 16:44:44 UTC
you're Trink that should be the default, instead of some variable that needs to be set
Comment 2 Michael Osipov freebsd_committer freebsd_triage 2023-11-09 17:45:28 UTC
This is the wrong forum. Go here: https://github.com/BastilleBSD/bastille/issues
Comment 3 Denis Shaposhnikov 2023-11-09 19:17:52 UTC
rc.d/bastille is part of freebsd port:

https://cgit.freebsd.org/ports/tree/sysutils/bastille/files/bastille.in

so this is correct forum.
Comment 4 Mina Galić freebsd_triage 2023-11-09 19:22:19 UTC
the upstream script was fixed to support this a year ago
maybe we should drop our override?
Comment 5 Denis Shaposhnikov 2023-11-09 22:04:56 UTC
I agree. Looking into

https://github.com/BastilleBSD/bastille/blob/master/usr/local/etc/rc.d/bastille

I don't see why does sysutils/bastille override upstream's rc.d script.
Comment 6 Christer Edwards 2023-11-09 22:08:20 UTC
We can standardize the upstream if you can show me an example / patch. I'm not tied to the current method for any reason.
Comment 7 Mina Galić freebsd_triage 2023-11-09 22:20:08 UTC
see discussion https://github.com/BastilleBSD/bastille/issues/389
discussion fix: https://github.com/BastilleBSD/bastille/pull/556

this still leaves the recent problem mentioned in https://github.com/BastilleBSD/bastille/issues/389#issuecomment-1782623047
Comment 8 Denis Shaposhnikov 2023-11-11 18:50:15 UTC
I just created PR https://github.com/BastilleBSD/bastille/pull/629 which allows configuring dependencies between jails. May be this way is better.
Comment 9 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-13 08:08:38 UTC
(In reply to Denis Shaposhnikov from comment #3)
It is not :-)

Our issue tracker is used for issues identified to be bugs and enhancements.

For general support, questions and issues, the following channels are available to the community:

  https://www.freebsd.org/support.html

If your issue is isolated to be a bug and is reproducible on an up-to-date and supported FreeBSD version, please re-open this issue with additional information and steps to reproduce.
Comment 10 Denis Shaposhnikov 2023-11-13 10:03:39 UTC
This is a bug. Jails should be stopped in reverse order. And this bug is specific for the port, because the startup script is part of this port. And this bug is fixed upstream, so this is a bug of this port.
Comment 11 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-13 10:37:24 UTC
(In reply to Denis Shaposhnikov from comment #10)
Then, let's do things properly.
Comment 12 Denis Shaposhnikov 2023-11-13 13:43:39 UTC
Oh, thanks. You are right, this title is better.
Comment 13 Denis Shaposhnikov 2023-12-02 16:04:10 UTC
Created attachment 246723 [details]
update to 0.10.20231125

This patch updates bastille to latest release 0.10.20231125

Also it uses upstream rc script, instead of one from port's files dir.
Comment 14 Christer Edwards 2023-12-02 16:09:52 UTC
Comment on attachment 246723 [details]
update to 0.10.20231125

Thank you. This was on my todo list.
Comment 15 Fernando Apesteguía freebsd_committer freebsd_triage 2023-12-06 18:55:39 UTC
(In reply to Christer Edwards from comment #14)
Hi Chris, can I assume you approve this patch? (it is still queued for testing on my side sorry).
Comment 16 Christer Edwards 2023-12-06 19:02:36 UTC
approved
Comment 17 Fernando Apesteguía freebsd_committer freebsd_triage 2023-12-07 19:26:09 UTC
Committed,

Thanks!
Comment 18 commit-hook freebsd_committer freebsd_triage 2023-12-07 19:26:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=08ed7d01655c4150a96e1c49bdab87711a952df4

commit 08ed7d01655c4150a96e1c49bdab87711a952df4
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2023-12-06 18:54:08 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-12-07 19:25:47 +0000

    sysutils/bastille: update to 0.10.20231125

    While here do not override upstream rc script

    PR:             274993
    Reported by:    dsh@bamus.cz
    Approved by:    christer.edwards@gmail.com (maintainer)

 sysutils/bastille/Makefile                 | 22 +++++++----
 sysutils/bastille/distinfo                 |  6 +--
 sysutils/bastille/files/bastille.in (gone) | 61 ------------------------------
 sysutils/bastille/pkg-plist                |  2 +
 4 files changed, 20 insertions(+), 71 deletions(-)