Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:openrc-0.12.x commit in: src/librc/, mk/, etc/, src/rc/
Date: Wed, 30 Oct 2013 20:35:56
Message-Id: 1383163240.0853c110e5e2ce285c9edb701b6029c0999e35b3.williamh@OpenRC
1 commit: 0853c110e5e2ce285c9edb701b6029c0999e35b3
2 Author: Steven Chamberlain <steven <AT> pyro <DOT> eu <DOT> org>
3 AuthorDate: Tue Oct 29 18:35:33 2013 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 30 20:00:40 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=0853c110
7
8 Begin port to GNU/kFreeBSD
9
10 This is just a minimal port to get Debian up and running; the rest will
11 be done later.
12
13 ---
14 etc/rc.conf.GNU-kFreeBSD | 11 +++++++++++
15 mk/os-GNU-kFreeBSD.mk | 9 +++++++++
16 mk/os.mk | 2 +-
17 src/librc/librc-daemon.c | 2 +-
18 src/rc/mountinfo.c | 4 ++--
19 src/rc/rc-logger.c | 2 +-
20 src/rc/runscript.c | 2 +-
21 7 files changed, 26 insertions(+), 6 deletions(-)
22
23 diff --git a/etc/rc.conf.GNU-kFreeBSD b/etc/rc.conf.GNU-kFreeBSD
24 new file mode 100644
25 index 0000000..67fe2ae
26 --- /dev/null
27 +++ b/etc/rc.conf.GNU-kFreeBSD
28 @@ -0,0 +1,11 @@
29 +##############################################################################
30 +# GNU/kFreeBSD SPECIFIC OPTIONS
31 +
32 +# This is the subsystem type. Valid options on GNU/kFreeBSD:
33 +# "" - nothing special
34 +# "jail" - FreeBSD jails (not yet implemented)
35 +# If this is commented out, automatic detection will be used.
36 +#
37 +# This should be set to the value representing the environment this file is
38 +# PRESENTLY in, not the virtualization the environment is capable of.
39 +#rc_sys=""
40
41 diff --git a/mk/os-GNU-kFreeBSD.mk b/mk/os-GNU-kFreeBSD.mk
42 new file mode 100644
43 index 0000000..72fea3e
44 --- /dev/null
45 +++ b/mk/os-GNU-kFreeBSD.mk
46 @@ -0,0 +1,9 @@
47 +# Copyright (c) 2008 Roy Marples <roy@×××××××.name>
48 +# Released under the 2-clause BSD license.
49 +
50 +# Generic definitions
51 +
52 +CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=700
53 +LIBDL= -Wl,-Bdynamic -ldl
54 +LIBKVM?=
55 +include ${MK}/os-BSD.mk
56
57 diff --git a/mk/os.mk b/mk/os.mk
58 index 3e18962..6b2d428 100644
59 --- a/mk/os.mk
60 +++ b/mk/os.mk
61 @@ -3,7 +3,7 @@
62
63 # Generic definitions
64
65 -_OS_SH= uname -s
66 +_OS_SH= uname -s | tr '/' '-'
67 _OS:= $(shell ${_OS_SH})
68 OS?= ${_OS}
69 include ${MK}/os-${OS}.mk
70
71 diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
72 index 6e7d57f..e98b02c 100644
73 --- a/src/librc/librc-daemon.c
74 +++ b/src/librc/librc-daemon.c
75 @@ -30,7 +30,7 @@
76
77 #include "librc.h"
78
79 -#if defined(__linux__)
80 +#if defined(__linux__) || defined (__GLIBC__)
81 static bool
82 pid_is_exec(pid_t pid, const char *exec)
83 {
84
85 diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
86 index 43d9c83..ce3f27d 100644
87 --- a/src/rc/mountinfo.c
88 +++ b/src/rc/mountinfo.c
89 @@ -39,7 +39,7 @@
90 # include <sys/statvfs.h>
91 # define statfs statvfs
92 # define F_FLAGS f_flag
93 -#elif defined (__linux__)
94 +#elif defined (__linux__) || defined (__GLIBC__)
95 # include <mntent.h>
96 #endif
97
98 @@ -265,7 +265,7 @@ find_mounts(struct args *args)
99 return list;
100 }
101
102 -#elif defined (__linux__)
103 +#elif defined (__linux__) || defined (__GLIBC__)
104 static struct mntent *
105 getmntfile(const char *file)
106 {
107
108 diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
109 index 468225f..e8fb0ff 100644
110 --- a/src/rc/rc-logger.c
111 +++ b/src/rc/rc-logger.c
112 @@ -44,7 +44,7 @@
113 #include <time.h>
114 #include <unistd.h>
115
116 -#ifdef __linux__
117 +#if defined(__linux__) || defined(__GLIBC__)
118 # include <pty.h>
119 #elif defined(__NetBSD__) || defined(__OpenBSD__)
120 # include <util.h>
121
122 diff --git a/src/rc/runscript.c b/src/rc/runscript.c
123 index 0eea335..86fa151 100644
124 --- a/src/rc/runscript.c
125 +++ b/src/rc/runscript.c
126 @@ -52,7 +52,7 @@
127 #include <time.h>
128 #include <unistd.h>
129
130 -#ifdef __linux__
131 +#if defined(__linux__) || defined(__GLIBC__)
132 # include <pty.h>
133 #elif defined(__NetBSD__) || defined(__OpenBSD__)
134 # include <util.h>