Compare commits

...

32 Commits

Author SHA1 Message Date
William Hubbs
45d1494b5d version 0.44.8 2021-11-12 22:20:34 -06:00
William Hubbs
20856a14e9 update ChangeLog 2021-11-12 22:19:34 -06:00
William Hubbs
a850651f5c openrc-init: fix build for selinux
X-Gentoo-Bug: 821520
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821520
2021-11-12 22:16:04 -06:00
William Hubbs
b0a80a042d build: pam fix
Set the HAVE_PAM option if the dependency is found *and* pam is
requested.

X-Gentoo-Bug: 821211
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821211
2021-11-12 20:57:46 -06:00
William Hubbs
49620e95ec fix permission of installed version file 2021-11-12 20:56:00 -06:00
William Hubbs
b4789b9910 version 0.44.7 2021-10-15 13:57:57 -05:00
William Hubbs
d5ae8a2ad1 update ChangeLog 2021-10-15 13:54:16 -05:00
Kerin Millar
3a276728e0 init.d/s6-svscan.in: make sure $command exists
While the s6-svscan runscript belongs to OpenRC, the user is required to
install s6 before it can actually be used, potentially leading to
confusion. Check for the existence of $command in start_pre and, if it does not
exist, bail out with an error that makes this observation.

X-Gentoo-Bug: 816978
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=816978
2021-10-14 23:06:19 -05:00
William Hubbs
29d3e0bde2 selinux build fix 2021-10-14 19:32:16 -05:00
William Hubbs
969a036225 fix bug in pam build tests 2021-10-14 19:29:45 -05:00
William Hubbs
9767d24510 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-14 19:26:22 -05:00
William Hubbs
c73284ef96 build: fix pam and pam_misc dependencies
Pam generates pkgconfig files now, so meson can use them to find the pam
dependencies.
2021-10-14 18:31:24 -05:00
William Hubbs
0657bf0d25 separate github actions based on OS
This fixes #466.
2021-10-14 16:04:39 -05:00
Sam James
80aad11b02 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-14 16:03:44 -05:00
Sam James
2d9dc654b5 .cirrus.yml: update FreeBSD images 2021-10-14 16:02:44 -05:00
William Hubbs
f46cc83ef7 move rc_bindir and rc_sbindir definitions to the top level 2021-10-09 15:26:09 -05:00
Sam James
cc45b55f89 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:13:24 -05:00
William Hubbs
930e69017f version 0.44.6 2021-10-04 10:36:14 -05:00
William Hubbs
44912434cf update ChangeLog 2021-10-04 10:31:46 -05:00
William Hubbs
c7fde9a3da fix build for selinux
I would like to thank jpds@protonmail.com for the patch.

X-Gentoo-Bug: 815847
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=815847
2021-10-04 10:26:53 -05:00
William Hubbs
ffededbf95 version 0.44.5 2021-09-21 11:21:17 -05:00
William Hubbs
b0efb663f9 update ChangeLog 2021-09-21 11:12:35 -05:00
William Hubbs
aa69e48125 build: fix rootprefix
This fixes #438.
2021-09-21 11:10:36 -05:00
William Hubbs
4ba10f1d50 link runscript with audit 2021-09-18 17:06:19 -05:00
William Hubbs
38a9e2ff63 link openrc-run with audit and libpam_misc 2021-09-18 17:06:19 -05:00
William Hubbs
783af5abac version 0.44.4 2021-09-15 10:27:48 -05:00
William Hubbs
75c3b53e31 update ChangeLog 2021-09-15 10:25:47 -05:00
Natanael Copa
c300c180a2 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:23:59 -05:00
Natanael Copa
be8d2ee6e3 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:51:40 -05:00
Aaditya Bagga
d9ef1bb635 [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-12 13:28:20 -05:00
Jakub Jirutka
cfc6991219 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:42:51 -05:00
Sören Tempel
97ae5af201 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:18:22 -05:00
15 changed files with 423 additions and 56 deletions

View File

@@ -4,7 +4,8 @@
test_task:
freebsd_instance:
matrix:
image: freebsd-12-1-release-amd64
image: freebsd-13-0-release-amd64
image: freebsd-12-2-release-amd64
image: freebsd-11-4-release-amd64
env:
OS: FreeBSD

26
.github/workflows/ci-alpine-linux.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: ci_alpine_linux
on: [push, pull_request]
jobs:
gcc-musl:
runs-on: ubuntu-latest
container: alpine:latest
steps:
- name: install deps
run: >-
apk --no-cache add \
build-base \
meson \
pkgconf \
linux-pam \
linux-pam-dev
- name: checkout
uses: actions/checkout@v2
- run: meson setup builddir/
env:
CC: gcc
- run: ninja -C builddir
env:
CC: gcc

32
.github/workflows/ci-ubuntu.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: ci_ubuntu
on: [push, pull_request]
jobs:
gcc-glibc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update -q
- run: sudo apt-get install -q -y build-essential libpam-dev meson
- run: meson setup builddir/
env:
CC: gcc
- run: ninja -C builddir
env:
CC: gcc
clang-glibc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update -q
- run: sudo apt-get install -q -y build-essential clang libpam-dev meson
- run: meson setup builddir/
env:
CC: clang
- run: ninja -C builddir
env:
CC: clang

304
ChangeLog
View File

@@ -1,3 +1,293 @@
commit a850651f5ce29a37574f7d76ae40ef9e1d2d4a62
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
openrc-init: fix build for selinux
X-Gentoo-Bug: 821520
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821520
commit b0a80a042d20d3d0ee4d204c5c96e1538a65575f
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
build: pam fix
Set the HAVE_PAM option if the dependency is found *and* pam is
requested.
X-Gentoo-Bug: 821211
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821211
commit 49620e95ec8ecd5d91c554d8e50cdf65df1920b5
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix permission of installed version file
commit b4789b99104f08136ad160920388b8d4df000508
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.44.7
commit d5ae8a2ad1b66f4f20609b3eadf9968b36133f7a
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit 3a276728e079aa9f44ab19cf5858e1eac2670462
Author: Kerin Millar <kfm@plushkava.net>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/s6-svscan.in: make sure $command exists
While the s6-svscan runscript belongs to OpenRC, the user is required to
install s6 before it can actually be used, potentially leading to
confusion. Check for the existence of $command in start_pre and, if it does not
exist, bail out with an error that makes this observation.
X-Gentoo-Bug: 816978
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=816978
commit 29d3e0bde237e13f8c5083d2f0db50652061bf2c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
selinux build fix
commit 969a0362252a7f9459337ac564ebf5f0c2c74476
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix bug in pam build tests
commit 9767d24510e1d52b86a2051c25af2fa5928e7319
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit c73284ef963cd6b3c47dd007a45f5c13c5dafcb0
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
build: fix pam and pam_misc dependencies
Pam generates pkgconfig files now, so meson can use them to find the pam
dependencies.
commit 0657bf0d25a460b4b56579984eb326302f3bf121
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
separate github actions based on OS
This fixes #466.
commit 80aad11b02d575d5a949914bb6942b92fc15e834
Author: Sam James <sam@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit 2d9dc654b58c4a523b01097369ce94708c8cf43a
Author: Sam James <sam@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
.cirrus.yml: update FreeBSD images
commit f46cc83ef7100ce713c4e616524e63371825e153
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
move rc_bindir and rc_sbindir definitions to the top level
commit cc45b55f895d0c21b5ac3e5a65b0bf00f76adeb7
Author: Sam James <sam@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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
commit 930e69017f95766c662763c2445e2827eb037fd7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.44.6
commit 44912434cfe139a1953bbd3b2cde7e0b2bce0ae7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit c7fde9a3dab01d30d16f9907f7cce00799f92821
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix build for selinux
I would like to thank jpds@protonmail.com for the patch.
X-Gentoo-Bug: 815847
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=815847
commit ffededbf955e39add0fbbacc22f2c0d7a8901b35
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.44.5
commit b0efb663f9ed84627c302a2d051fc5a74fb0c2b6
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit aa69e48125df7684ab3b77eaf9013f8c126b1fca
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
build: fix rootprefix
This fixes #438.
commit 4ba10f1d5074a45b4ddd96d2d404842fa3b38e63
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
link runscript with audit
commit 38a9e2ff630b0e0bd261afb2e66072f904b5d608
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
link openrc-run with audit and libpam_misc
commit 783af5abac209c7745fd5c06dc89b2f5dfa3b313
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.44.4
commit 75c3b53e3195f2d3541a7d83920667d1c4b14337
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit c300c180a2a7dbefb46272c2acac6462372b8eb0
Author: Natanael Copa <ncopa@alpinelinux.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit be8d2ee6e35a6ea504e6a3cf725b8804dd2da617
Author: Natanael Copa <ncopa@alpinelinux.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit d9ef1bb6355c62e335a972f203806210de68912f
Author: Aaditya Bagga <aaditya_gnulinux@zoho.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
[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.
commit cfc699121960a8298c8e9519239c149f31a35ef0
Author: Jakub Jirutka <jakub@jirutka.cz>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit 97ae5af2017df2667e0c79d7dac3706b3a93c6cc
Author: Sören Tempel <soeren+git@soeren-tempel.net>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.]
commit 4c820a0e48301f997911a196d6159670dad68296
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.44.3
commit 9c39b381a5185325dc1359b6001f00e60732ec71
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit 321bb2cd90cf673d03175c56bf1cecfcef02bd49
Author: Ariadne Conill <ariadne@dereferenced.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
@@ -773,17 +1063,3 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
command line, but keep in mind that this is not secure.
This fixes #201.
commit aac1734a70b60da97d4d24930f1902ca46894b44
Author: Julien Surloppe <julien@surloppe.fr>
Commit: Mike Frysinger <vapier@gmail.com>
Update user-guide.md
Add missing underscore.
commit 2355f1a3f2a4fd62cac6d9af0e94c8731acd4c0f
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
supervise-daemon: only log debug logs when verbose mode is active

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.44.3
VERSION= 0.44.8
PKG= ${NAME}-${VERSION}

View File

@@ -113,8 +113,10 @@ migrate_to_run()
rm $src
elif [ ! -L $src -a -d $src ]; then
ebegin "Migrating $src to $dst"
cp -a $src/* $dst/
rm -rf $src
if ! rmdir $src 2>/dev/null; then
cp -a $src/* $dst/
rm -rf $src
fi
eend $?
fi
# If $src doesn't exist at all, just run this

View File

@@ -13,9 +13,9 @@ description="Mounts disks and swap according to /etc/fstab."
depend()
{
need fsck
use lvm modules root
after clock lvm modules root
need fsck root
use lvm modules
after clock lvm modules
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
}

View File

@@ -21,9 +21,13 @@ depend()
start_pre()
{
einfo "Creating s6 scan directory"
checkpath -d -m 0755 "$RC_SVCDIR"/s6-scan
return $?
if [ ! -e "$command" ]; then
eerror "$command is missing (please install s6)"
else
einfo "Creating s6 scan directory"
checkpath -d -m 0755 "$RC_SVCDIR"/s6-scan
fi
return
}
stop_post()

View File

@@ -1,5 +1,5 @@
project('OpenRC', 'c',
version : '0.44.3',
version : '0.44.8',
license: 'BSD-2',
default_options : [
'c_std=c99',
@@ -42,17 +42,20 @@ else
os = option_os
endif
pam = get_option('pam')
if pam
libpam = cc.find_library('pam')
libpam_misc = cc.find_library('pam_misc')
pam_dep = dependency('pam', required: false)
if not pam_dep.found()
pam_dep = cc.find_library('pam', required: false)
endif
if pam_dep.found() and get_option('pam')
cc_pam_flags = '-DHAVE_PAM'
else
libpam = []
libpam_misc = []
cc_pam_flags = []
endif
if not pam_dep.found() and get_option('pam')
error('Pam was requested but could not be located')
endif
option_pkg_prefix = get_option('pkg_prefix')
if option_pkg_prefix == ''
if os == 'Dragonfly' or os == 'FreeBSD'
@@ -72,27 +75,39 @@ else
split_usr = get_option('split-usr') == 'true'
endif
rootprefix_default = split_usr ? '/' : '/usr'
rootprefix_path = get_option('rootprefix')
rootprefix = rootprefix_path != '' ? rootprefix_path : rootprefix_default
rootprefix = get_option('rootprefix')
rootprefix_default = '/'
if rootprefix == ''
rootprefix = rootprefix_default
endif
bindir = rootprefix / get_option('bindir')
libdir = rootprefix / get_option('libdir')
if os == 'Linux' and split_usr
libexecpath = 'lib'
else
libexecpath = get_option('libexecdir')
libexecdir = get_option('libexecdir')
if os == 'Linux' and libexecdir == 'libexec'
libexecdir = 'lib'
endif
libexecdir = split_usr ? rootprefix / libexecpath :
get_option('prefix') / libexecpath
libexecdir = rootprefix / libexecdir
rc_libexecdir = libexecdir / 'rc'
rc_bindir = rc_libexecdir / 'bin'
rc_sbindir = rc_libexecdir / 'sbin'
sbindir = rootprefix / get_option('sbindir')
selinux_dep = dependency('libselinux', required : get_option('selinux'))
if selinux_dep.found()
cc_selinux_flags = '-DHAVE_SELINUX'
else
if pam_dep.found() and get_option('pam')
pam_misc_dep = dependency('pam_misc', required: false)
if not pam_misc_dep.found()
pam_misc_dep = cc.find_library('pam_misc', required: false)
endif
if not pam_misc_dep.found() and get_option('pam')
error('Pam was requested but could not be located')
endif
endif
else
cc_selinux_flags = []
pam_misc_dep = []
endif
termcap = get_option('termcap')

View File

@@ -48,7 +48,7 @@ do_unmount()
retry=4 # Effectively TERM, sleep 1, TERM, sleep 1, KILL, sleep 1
while ! LC_ALL=C $cmd "$mnt" 2>/dev/null; do
if command -v fuser >/dev/null 2>&1; then
pids="$(timeout -k 10 -s KILL "${rc_fuser_timeout:-60}" \
pids="$(timeout -s KILL "${rc_fuser_timeout:-60}" \
fuser $f_opts "$mnt" 2>/dev/null)"
fi
case " $pids " in

View File

@@ -20,8 +20,20 @@ runit_start()
service_link="${RC_SVCDIR}/sv/${service_path##*/}"
ebegin "Starting ${name:-$RC_SVCNAME}"
ln -snf "${service_path}" "${service_link}"
sv start "${service_link}" > /dev/null 2>&1
eend $? "Failed to start ${name:-$RC_SVCNAME}"
local i=0 retval=1
# it can take upto 5 seconds for runsv to start
while [ $i -lt 6 ] ; do
if sv start "${service_link}" > /dev/null 2>&1; then
retval=0
break
fi
sleep 1 && i=$(expr $i + 1)
done
if [ $retval -eq 1 ]; then
# clean up the link else sv will keep on trying
rm "${service_link}"
fi
eend $retval "Failed to start ${name:-$RC_SVCNAME}"
}
runit_stop()

View File

@@ -22,6 +22,7 @@
#include <time.h>
#include <unistd.h>
#include <stdio.h>
#include <utmp.h>
#include <utmpx.h>
#include <pwd.h>
#include <fcntl.h>

View File

@@ -151,7 +151,7 @@ static char *clean_path(char *path)
char *ch;
char *ch2;
char *str;
str = xmalloc(strlen(path));
str = xmalloc(strlen(path) + 1);
ch = path;
ch2 = str;
while (true) {

View File

@@ -14,7 +14,7 @@ usage_c = files([
'_usage.c',
])
if get_option('selinux').enabled()
if selinux_dep.found()
rc_selinux_c = files([
'rc-selinux.c',
])
@@ -26,9 +26,6 @@ rc_wtmp_c = files([
'rc-wtmp.c',
])
rc_bindir = rc_libexecdir / 'bin'
rc_sbindir = rc_libexecdir / 'sbin'
executable('rc-status',
['rc-status.c', rc_misc_c, usage_c, version_h],
c_args : cc_branding_flags,
@@ -53,7 +50,7 @@ executable('openrc-run',
rc_selinux_c, version_h],
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [dl_dep, libpam, selinux_dep, util_dep],
dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, selinux_dep, util_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@@ -88,7 +85,7 @@ executable('runscript',
rc_selinux_c, version_h],
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, util_dep, selinux_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@@ -98,7 +95,7 @@ executable('start-stop-daemon',
rc_selinux_c, usage_c, version_h],
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
dependencies: [audit_dep, dl_dep, pam_dep, pam_misc_dep, util_dep, selinux_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@@ -108,7 +105,7 @@ executable('supervise-daemon',
usage_c, version_h],
c_args : [cc_branding_flags, cc_pam_flags, cc_selinux_flags],
link_with: [libeinfo, librc],
dependencies: [dl_dep, libpam, util_dep, selinux_dep],
dependencies: [dl_dep, pam_dep, util_dep, selinux_dep],
include_directories: [incdir, einfo_incdir, rc_incdir],
install: true,
install_dir: sbindir)
@@ -116,9 +113,10 @@ executable('supervise-daemon',
if os == 'Linux'
executable('openrc-init',
['openrc-init.c', rc_plugin_c, rc_wtmp_c, version_h],
c_args : cc_selinux_flags,
include_directories: [incdir, einfo_incdir, rc_incdir],
link_with: [libeinfo, librc],
dependencies: [dl_dep],
dependencies: [dl_dep, selinux_dep],
install: true,
install_dir: sbindir)
@@ -171,7 +169,7 @@ executable('checkpath',
c_args : [cc_audit_flags, cc_branding_flags, cc_pam_flags, cc_selinux_flags],
include_directories: [incdir, einfo_incdir, rc_incdir],
link_with: [libeinfo, librc],
dependencies: [libpam, selinux_dep],
dependencies: [audit_dep, pam_dep, pam_misc_dep, selinux_dep],
install: true,
install_dir: rc_bindir)

View File

@@ -10,4 +10,4 @@ if [ ${os} != Linux ]; then
install -d "${DESTDIR}/${rc_libexecdir}"/init.d
fi
install -d "${DESTDIR}/${rc_libexecdir}"/tmp
install "${MESON_BUILD_ROOT}/src/common/version" "${DESTDIR}/${rc_libexecdir}"
install -m 644 "${MESON_BUILD_ROOT}/src/common/version" "${DESTDIR}/${rc_libexecdir}"