Commit Graph

3346 Commits

Author SHA1 Message Date
William Hubbs
2b55ac719a separate github actions based on OS
This fixes #466.
2021-10-09 14:14:41 -05:00
Sam James
c45e3361ee add github action to build on several linux platforms
This github action runs a build on each of the following platforms on a
push or pull request.

- Ubuntu LTS with gcc and glibc
- Ubuntu LTS with clang and glibc
- Alpine with gcc and musl

This fixes #463.
2021-10-08 23:15:14 -05:00
William Hubbs
785726d67d selinux build fix 2021-10-08 19:51:05 -05:00
William Hubbs
1033909f0e fix bug in pam build tests 2021-10-08 16:39:21 -05:00
Sam James
2085f31d9c .cirrus.yml: update FreeBSD images 2021-10-08 11:13:34 -05:00
William Hubbs
5a5ede3156 support older pam versions
Some distros are still using versions of pam which do not create
*.pc files, so we need fallback logic for that situation.
2021-10-08 10:46:42 -05:00
Sam James
bb8334104b checkpath: fix allocation size of path buffer
strlen's return value isn't enough to be used
directly for (x)malloc; it doesn't include
the null byte at the end of the string.

X-Gentoo-Bug: 816900
X-Gentoo-Bug-URL: https://bugs.gentoo.org/816900
Fixes: #459
Fixes: #462
2021-10-07 23:00:49 -05:00
William Hubbs
6b9a5b8271 fix build for selinux 2021-10-04 13:13:35 -05:00
William Hubbs
bfa634493d build: fix pam and pam_misc dependencies
Pam generates pkgconfig files now, so meson can use them to find the pam
dependencies.
2021-10-02 16:10:45 -05:00
William Hubbs
a4d4d390be move rc_bindir and rc_sbindir definitions to the top level 2021-09-21 12:34:22 -05:00
William Hubbs
d07572e1b7 build: fix rootprefix
This fixes #438.
2021-09-21 10:26:57 -05:00
William Hubbs
2ee9d92599 link runscript with audit 2021-09-18 17:02:32 -05:00
William Hubbs
b877ef24c4 link openrc-run with audit and libpam_misc 2021-09-18 16:25:15 -05:00
hosxy
c6a037e9dd fix agetty can be start directly
This fixes #320.
2021-09-15 17:01:19 -05:00
Natanael Copa
7faa48ae04 hide error when migrating /var/run to /run
The script tries to copy non-existing files. We simply hide the error

http://bugs.alpinelinux.org/issues/3160
This fixes #451.
2021-09-15 10:21:12 -05:00
Natanael Copa
93d600c0a4 force root to be rw before localmount
The original service that pulled in root remount was mtab which
is not part of OpenRC.

This fixes #449.
2021-09-14 11:28:41 -05:00
Aaditya Bagga
6e24d33517 [runit integration] give a bit of time to start the service
Currently, we run sv start immediately after linking the service.
The runsv process may not be up at the moment, as a result of which
openrc will mark the service as stopped, even though it may be brought up
by runit at the next scan.

This is documented in the gentoo wiki:
https://wiki.gentoo.org/wiki/Runit#OpenRC.27s_runit_integration_feature

This PR adds a timeout so that correct process state can be reported.

Before:
 * Starting netdata-runit ...
fail: /run/openrc/sv/netdata: runsv not running
 * Failed to start netdata-runit

After:
 * Starting netdata-runit ...
fail: /run/openrc/sv/netdata: runsv not running
ok: run: /run/openrc/sv/netdata: (pid 9042) 0s

This fixes #253.
2021-09-11 17:20:50 -05:00
Jakub Jirutka
d65e603acd Fix undeclared UT_LINESIZE
Fix the following error:

	broadcast.c:41:21: error: '__UT_LINESIZE' undeclared (first use in this function); did you mean 'UT_LINESIZE'?
	 #define UT_LINESIZE __UT_LINESIZE
                          ^~~~~~~~~~

Constant UT_LINESIZE is defined in <utmp.h> provided by musl.
2021-09-09 22:30:59 -05:00
Sören Tempel
d87f5b2f24 rc-mount: make timeout invocation compatible with busybox timeout
Busybox timeout does not support the `-k` flag. As such, invoking fuser
from do_unmount never worked without this patch. This went unnoticed as
standard error is redirected to /dev/null. This patch fixes this by
simply removing the incompatible `-k` flag.

[Ariadne: the `-k` is redundant anyway, since we are sending the KILL
 signal to begin with.]
2021-09-09 22:57:44 -04:00
Ariadne Conill
25d5de8fd9 fix build under musl 1.2 on 32 bit systems
Since musl 1.2 time_t is a 64 bit value, even on 32 bit systems. A
hotfix for printing the value is simply using PRIu64 from inttypes.h
in the format string.

This fixes #446.
2021-09-09 12:36:25 -05:00
Ariadne Conill
b5cf79f747 fix trailing whitespace in tools/meson_runlevels.sh 2021-09-09 02:14:59 -06:00
artoo
3f098817ef meson: fix symlinks with sysvinit 2021-09-09 00:03:04 +02:00
William Hubbs
a25ccbd8f2 build: install pam files 2021-09-08 15:05:46 -05:00
William Hubbs
8807e954c4 meson: typo fix 2021-09-08 14:47:20 -05:00
William Hubbs
4aa5a89ee0 build: fix sysvinit script installation 2021-09-08 13:28:29 -05:00
William Hubbs
46a0bfedd1 build: fix symlinks 2021-09-08 11:59:38 -05:00
William Hubbs
803aa1c637 version 0.44 2021-09-07 16:16:51 -05:00
William Hubbs
fb186a3867 update ChangeLog 2021-09-07 16:14:08 -05:00
William Hubbs
c9b64b64fa update README 2021-09-07 16:13:35 -05:00
William Hubbs
9cce9f8ce8 news typo fix 2021-09-07 15:59:19 -05:00
William Hubbs
5a41f1ef20 add discussion about removing old build system to NEWS 2021-09-07 14:17:44 -05:00
William Hubbs
6e3afc29f3 update NEWS 2021-09-07 13:31:16 -05:00
William Hubbs
7c29fbd36f build: install bash and zsh completions 2021-09-07 12:45:53 -05:00
William Hubbs
593be166d1 build: fix libexecdir 2021-09-06 18:52:54 -05:00
William Hubbs
ca0270967c tools/meson_final.sh: typo fix 2021-09-06 18:37:11 -05:00
William Hubbs
3a187f88f4 build: typo fix 2021-09-06 16:04:46 -05:00
William Hubbs
f2362cc277 build: add split-usr option 2021-09-06 15:22:28 -05:00
William Hubbs
444e44eb9d build: change root_prefix to rootprefix 2021-09-06 14:30:30 -05:00
William Hubbs
c0f8313164 sync meson build version with makefiles 2021-09-05 20:04:55 -05:00
William Hubbs
d6622a1156 add meson build files
Closes #116.
Closes #171.
Closes #172.
Closes #175.
2021-09-04 16:01:29 -05:00
William Hubbs
92004a2ed6 README: add note about github discussions 2021-09-04 14:23:18 -05:00
Matt Whitlock
5f6d7ac028 supervise-daemon: implement SSD_IONICELEVEL
supervise-daemon was apparently overlooked when support for the
SSD_IONICELEVEL environment variable was added. This commit brings
supervise-daemon up to parity with start-stop-daemon with respect to
this environment variable.
2021-08-17 00:57:47 -04:00
William Hubbs
7cedc4942b update travis ci irc notifications
- move to libera network
- always notify on successful build
2021-08-14 15:05:07 -05:00
William Hubbs
091cd8015f man/supervise-daemon.8: document --pidfile option 2021-08-13 23:08:07 -05:00
Sven Wegener
63955056ec on_ac_power: support multiple power_supply devices in sysfs
Newer devices have multiple power_supply devices in sysfs:

$ grep ^ /sys/class/power_supply/*/type
/sys/class/power_supply/AC/type:Mains
/sys/class/power_supply/BAT0/type:Battery
/sys/class/power_supply/ucsi-source-psy-USBC000:001/type:USB
/sys/class/power_supply/ucsi-source-psy-USBC000:002/type:USB

There are two "USB" Type-C ports than can supply power and both are
aggregated into the "Mains" power supply by the firmware. The "Battery"
also counts as a power supply, but is missing the online attribute.

The -f check with a wildcard pattern results in an error, when multiple
devices are present:

/lib/rc/bin/on_ac_power: line 21: [: too many arguments

When the power_supply class is registered, check for a "Mains" device.

Fixes #427.
2021-08-13 13:38:07 -05:00
Alex Xu
1e975be896 conf.d/hostname: clarify hostname variable usage
https://gitlab.alpinelinux.org/alpine/aports/-/issues/9744

This fixes #433.
2021-08-13 13:13:14 -05:00
kyoreln
18e53f7fed move supervise-daemon out of experimental status
supervise-daemon is no longer experimental so remove the statements to
that affect.

This fixes #434.
2021-08-13 12:46:52 -05:00
William Hubbs
b5e4c2c2db Revert "openrc-init: ignore an empty string in argv[1]"
This reverts commit dec9ef200b.
This check is no longer needed since rc_runlevel_exists() is fixed.

    X-Gentoo-Bug: 803536
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
    Closes: https://github.com/OpenRC/openrc/pull/431
2021-08-13 10:46:57 -05:00
William Hubbs
0a97bad6c9 librc: fix rc_runlevel_exists return for empty string
This function should return false if the runlevel is an empty string.

    X-Gentoo-Bug: 803536
    X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
    Closes: https://github.com/OpenRC/openrc/pull/431
2021-08-13 10:28:44 -05:00
Mike Gilbert
dec9ef200b openrc-init: ignore an empty string in argv[1]
X-Gentoo-Bug: 803536
X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
Closes: https://github.com/OpenRC/openrc/pull/431
2021-08-12 15:04:38 -05:00