[Bug 284677] sysutils/s6: rc fails on boot

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 09 Feb 2025 09:19:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284677

            Bug ID: 284677
           Summary: sysutils/s6: rc fails on boot
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: sg@redu.cx
                CC: crest@rlwinm.de
             Flags: maintainer-feedback?(crest@rlwinm.de)
                CC: crest@rlwinm.de

s6-2.13.1.0 does not come up automatically on boot.  I think this is the result
of two separate problems.

#283100 relocated the static libraries for all ska ports.
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=255605&action=diff

before:
lib/skalibs/libskarnet.a

after:
lib/libskarnet.a

Linkage in the FreeBSD ports changed as a side-effect.  I expect this was
unintentional.

execline-2.9.5.1:

-- 8< --
$ ldd usr/local/bin/execlineb
usr/local/bin/execlineb:
        libc.so.7 => /lib/libc.so.7 (0xbbdf6d45000)
        [vdso] (0xbbdf6164000)
-- >8 --

execline-2.9.6.1:

-- 8< --
$ ldd usr/local/bin/execlineb
usr/local/bin/execlineb:
        libskarnet.so.2.14 => /usr/local/lib/libskarnet.so.2.14
(0x20a9b0510000)
        libc.so.7 => /lib/libc.so.7 (0x20a9af470000)
        librt.so.1 => /lib/librt.so.1 (0x20a9b07bd000)
        libthr.so.3 => /lib/libthr.so.3 (0x20a9b0a38000)
        [vdso] (0x20a9aef71000)
-- >8 --

Combined with what I suspect is a vestigial bug in the s6 rc script...

-- 8< --
# PROVIDE: /service
# BEFORE:  SERVERS
# KEYWORD: shutdown
-- >8 --

s6-2.13.1.0 is now liable to fail on boot because rc attempts to execute before
the dynamic linker is configured.

-- 8< --
/etc/rc: DEBUG: checkyesno: s6_enable is set to YES.
/etc/rc: DEBUG: run_rc_command: doit:  s6_start 
ld-elf.so.1: Shared object "libskarnet.so.2.14" not found, required by
"execlineb"
/etc/rc: DEBUG: checkyesno: ugidfw_enable is set to NO.
/etc/rc: DEBUG: checkyesno: rctl_enable is set to YES.
/etc/rc: DEBUG: run_rc_command: doit:  rctl_start 
/etc/rc: DEBUG: run_rc_command: doit:  ldconfig_start 
/etc/rc: DEBUG: checkyesno: ldconfig_insecure is set to NO.
/etc/rc: DEBUG: checkyesno: rc_startmsgs is set to YES.
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
/usr/local/lib/compat/pkg /usr/local/lib/compat/pkg
/usr/local/lib/perl5/5.36/mach/CORE /usr/local/lib/samba4
/etc/rc: DEBUG: checkyesno: rc_startmsgs is set to YES.
32-bit compatibility ldconfig path: /usr/lib32 /usr/lib32
-- >8 --

Suggested changes:

1. Add 'REQUIRE: LOGIN' to the s6 rc script.  (Remove 'BEFORE: SERVERS'.)
2. Revert the linkage changes from #283100.

crest, please refer to mail from ~2024-Dec-15.  I looped upstream in, who
suggested a smattering of --libdir and --with-lib if you would like to revert
the change to linkage in the FreeBSD port.

-- 
You are receiving this mail because:
You are the assignee for the bug.