https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-misc/frr-8.2.2 installs shell script that uses non-POSIX features. Discovered on: amd64 (internal ref: ci)
Created attachment 775110 [details] build.log build log and emerge --info
ci has reproduced this issue with version 8.4.1 - Updating summary.
ci has reproduced this issue with version 8.4.2 - Updating summary.
ci has reproduced this issue with version 8.5 - Updating summary.
ci has reproduced this issue with version 8.5.2 - Updating summary.
`ulimit -n` is POSIX compatible: alarig@pikachu ~ % dash %B%F{green}%n@%m%k %B%F{blue}%1~ %# %b%f%kunset PS1 export PS1='$ ' $ $ ulimit -n 42 $ echo $? 0
I sorted similar for asterisk. Simplest ended up being using prlimit: 155 prlimit --core=${dumpcore} --pid=$$ 156 prlimit --nofile=${maxfd} --pid=$$ This change is simple enough. Line 109 of current RC script just needs to be updated to prlimit --nofile=${MAX_FDS} --pid=$$ >/dev/null 2>/dev/null, and RDEPEND="sys-apps/util-linux". This is all that's required to fix the bashisms issue. ... looking at this init script it seems fairly complex. Do we know that restart actually restarts the daemons or does it truly as implied merely reload? 243 # Handle restarts. 244 if [ "$RC_CMD" = 'restart' ]; then 245 ebegin 'Reloading FRR configuration' 246 else 247 ebegin 'Starting FRR' 248 fi And, does it perform graceful restarts where possible? One of the reasons we don't like upgrading FRR is because as a rule this is a problem for us. Not so much on the reflectors (of which there's always two), but on the router-firewalls where routing has to remain up as much as possible. I also note that if _frr_start fails then it's possible that start() will still respond success which is probably a bad thing to do. If you don't mind giving me a few days before applying the above to take a problem look at this script please.
Thanks a lot for the tip! I commited the fix, the bot should add the MR to this bug very quick.
(In reply to Alarig Le Lay from comment #8) > Thanks a lot for the tip! I commited the fix, the bot should add the MR to > this bug very quick. Cool, let's get this one in then. Glad I could help. My week got filled with a bunch of work that came in yesterday morning so not going to get a lot of time this week for Gentoo related work and pjproject[webrtc] is top of my list.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dab354ffbad5069f6a4de1330fe2b33e7619525e commit dab354ffbad5069f6a4de1330fe2b33e7619525e Author: Alarig Le Lay <alarig@swordarmor.fr> AuthorDate: 2023-07-17 19:49:29 +0000 Commit: Jakov Smolić <jsmolic@gentoo.org> CommitDate: 2023-07-24 07:48:44 +0000 net-misc/frr: Switch the init from ulimit to prlimit Suggested-by: Jaco Kroon <jaco@uls.co.za> Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr> Closes: https://bugs.gentoo.org/841431 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org> net-misc/frr/files/frr-openrc-v2 | 301 +++++++++++++++++++++ .../frr/{frr-8.5.2.ebuild => frr-8.5.2-r1.ebuild} | 3 +- 2 files changed, 303 insertions(+), 1 deletion(-)