Skip to content

Commit cdf2337

Browse files
committed
configure: build sulogin, watchdogd, and libsystemd by default
v5.0 ships keventd and the D-Bus support enabled out of the box, but the remaining bundled pieces stayed opt-in, and the help text for two of them already claimed otherwise. Default all three to yes; --without-sulogin, --without-watchdog, and --without-libsystemd opt out. The distcheck and CI configure lines drop the flags they no longer need, so CI exercises the defaults. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 847f4db commit cdf2337

8 files changed

Lines changed: 37 additions & 25 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ jobs:
116116
- name: Regular Finit
117117
run: |
118118
./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var \
119-
--enable-x11-common-plugin --enable-testserv-plugin --with-watchdog \
120-
--with-keventd \
119+
--enable-x11-common-plugin --enable-testserv-plugin \
121120
CFLAGS="-fsanitize=address -ggdb"
122121
make -j9 clean
123122
make -j9 V=1
@@ -173,7 +172,7 @@ jobs:
173172
run: |
174173
./autogen.sh
175174
./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var \
176-
--disable-dbus --enable-testserv-plugin --with-keventd
175+
--disable-dbus --enable-testserv-plugin
177176
make -j9 V=1
178177
- name: Verify no bus artifacts
179178
run: |

‎.github/workflows/coverity.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ jobs:
6666
- name: Configure
6767
run: |
6868
./autogen.sh
69-
./configure --prefix= --enable-x11-common-plugin --with-watchdog \
70-
--with-keventd --with-libsystemd
69+
./configure --prefix= --enable-x11-common-plugin
7170
- name: Build
7271
run: |
7372
export PATH=`pwd`/coverity/bin:$PATH

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ jobs:
4646
./autogen.sh
4747
./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc \
4848
--localstatedir=/var --enable-x11-common-plugin \
49-
--enable-testserv-plugin --with-watchdog \
50-
--with-keventd --with-libsystemd
49+
--enable-testserv-plugin
5150
- name: Enable unprivileged userns (unshare)
5251
run: |
5352
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0

‎Makefile.am‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ release: distcheck
6363
printf "$$file.sha256\t"; cat ../$$file.sha256 | cut -f1 -d' '; \
6464
done
6565

66-
DISTCHECK_CONFIGURE_FLAGS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
67-
--enable-testserv-plugin --enable-x11-common-plugin \
68-
--with-watchdog --with-keventd --with-fstab=/etc/fstab \
69-
--with-libsystemd --with-bash-completion-dir=no
66+
DISTCHECK_CONFIGURE_FLAGS = --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
67+
--enable-testserv-plugin --enable-x11-common-plugin \
68+
--with-fstab=/etc/fstab --with-bash-completion-dir=no

‎configure.ac‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ AC_ARG_WITH(udev-rules,
184184
AS_HELP_STRING([--without-udev-rules], [Skip install of curated udev rules under /lib/udev/rules.d, default: yes when keventd enabled]),, [with_udev_rules=yes])
185185

186186
AC_ARG_WITH(sulogin,
187-
AS_HELP_STRING([--with-sulogin@<:@=USER@:>@], [Enable built-in sulogin, optional USER to request password for (default root), default: no.]),[sulogin=$withval],[with_sulogin=no])
187+
AS_HELP_STRING([--with-sulogin@<:@=USER@:>@], [Built-in sulogin, optional USER to request password for, default: yes (root)]),[sulogin=$withval],[with_sulogin=yes sulogin=yes])
188188

189189
AC_ARG_WITH(watchdog,
190-
AS_HELP_STRING([--with-watchdog@<:@=DEV@:>@], [Enable built-in watchdog, default: /dev/watchdog]),
191-
[watchdog=$withval], [with_watchdog=no watchdog=])
190+
AS_HELP_STRING([--with-watchdog@<:@=DEV@:>@], [Built-in watchdog, default: yes (/dev/watchdog)]),
191+
[watchdog=$withval], [with_watchdog=yes watchdog=yes])
192192

193193
AC_ARG_WITH(libsystemd,
194-
AS_HELP_STRING([--with-libsystemd], [Build replacement libsystemd library, default: yes]),
195-
[with_libsystemd=$withval], [with_libsystemd=no])
194+
AS_HELP_STRING([--without-libsystemd], [Skip replacement libsystemd library, default: yes]),
195+
[with_libsystemd=$withval], [with_libsystemd=yes])
196196

197197
AC_ARG_WITH(hook-scripts-path,
198198
AS_HELP_STRING([--with-hook-scripts-path=DIR], [Base directory for hook scripts, default $libexecdir/finit/hook]),

‎doc/ChangeLog.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ All relevant changes are documented in this file.
6969
`tmpfiles.d/dbus.conf`, so both can be overridden from `/etc` like any other
7070
system file. Those directories are no longer chowned to `messagebus`,
7171
matching how Finit ships directories for other daemons
72+
- The bundled `sulogin` and `watchdogd`, and the replacement `libsystemd`,
73+
are now built and installed by default, like keventd and the D-Bus
74+
support. `--without-sulogin`, `--without-watchdog`, and
75+
`--without-libsystemd` opt out. Note, Finit starts `watchdogd` by
76+
itself when the WDT device node exists, and `libsystemd.so` is
77+
installed to `$libdir`, where a system with systemd already has one
7278
- The `tty` block takes `passenv`, which the line-based format has had since
7379
v4.4 (issue #286) and the block format was missing
7480
- New `provides` setting for run/task/service/sysv blocks, naming conditions

‎doc/build.md‎

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,20 @@ Below are a few of the main switches to configure:
7979
run mdev, mdevd, or udevd instead. Enabled by default, and the only
8080
thing that pulls in libblkid. See [Bundled Device Manager](keventd.md).
8181

82-
* `--with-sulogin`: Enable bundled `sulogin` program. Default is to use the
83-
system `sulogin(8)`. The sulogin shipped with Finit *allows password-less*
84-
login if the `root` user is disabled or has no password at all.
82+
* `--without-sulogin`: Drop the bundled `sulogin`, enabled by default,
83+
and use the system `sulogin(8)` instead. The one shipped with Finit
84+
*allows password-less* login if the `root` user is disabled or has no
85+
password at all. `--with-sulogin=USER` prompts for another user's
86+
password than `root`'s.
87+
88+
* `--without-watchdog`: Drop the bundled `watchdogd`, enabled by default
89+
on `/dev/watchdog`, `--with-watchdog=DEV` selects another device.
90+
Finit starts it when the device node exists, see [Watchdog](watchdog.md).
91+
92+
* `--without-libsystemd`: Drop the replacement `libsystemd`, built and
93+
installed by default, which lets programs that use `sd_notify()` talk
94+
to Finit without systemd. Note, it installs `libsystemd.so` in
95+
`$libdir`, where a system with systemd already has one.
8596

8697
For more configure flags, see <kbd>./configure --help</kbd>
8798

@@ -108,8 +119,7 @@ Then configure, build and install:
108119

109120
```shell
110121
$ ./configure --prefix=/usr --exec-prefix= \
111-
--sysconfdir=/etc --localstatedir=/var \
112-
--with-keventd --with-watchdog
122+
--sysconfdir=/etc --localstatedir=/var
113123
$ make
114124
.
115125
.

‎doc/watchdog.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Bundled Watchdog Daemon
22
=======================
33

4-
When built `--with-watchdog` a separate service is built and installed
5-
in `/libexec/finit/watchdogd`. If this exists at runtime, and the WDT
6-
device node exists, Finit will start it and treat it as the elected
7-
watchdog service to delegate its reboot to. This delegation is to
4+
A separate service is built and installed in `/libexec/finit/watchdogd`,
5+
unless disabled with `--without-watchdog`. If this exists at runtime,
6+
and the WDT device node exists, Finit will start it and treat it as the
7+
elected watchdog service to delegate its reboot to. This delegation is to
88
ensure that the system is rebooted by a hardware watchdog timer -- on
99
many embedded systems this is crucial to ensure all circuits on the
1010
board are properly reset for the next boot, in effect ensuring the

0 commit comments

Comments
 (0)