Skip to content

Commit 75cc929

Browse files
authored
Merge pull request #125 from jkloetzke/systemd
Systemd
2 parents 16b3032 + 4ec1977 commit 75cc929

File tree

6 files changed

+253
-6
lines changed

6 files changed

+253
-6
lines changed

aliases/virtual/core/udev.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
multiPackage:
2-
"": ${CONFIG_SELECT_UDEV:-core::eudev}
3-
dev: ${CONFIG_SELECT_UDEV:-core::eudev}-dev
4-
tgt: ${CONFIG_SELECT_UDEV:-core::eudev}-tgt
2+
"": ${CONFIG_SELECT_UDEV:-$(if-then-else,$(eq,${CONFIG_INIT:-},systemd),core::systemd,core::eudev)}
3+
dev: ${CONFIG_SELECT_UDEV:-$(if-then-else,$(eq,${CONFIG_INIT:-},systemd),core::systemd-libudev,core::eudev)}-dev
4+
tgt: ${CONFIG_SELECT_UDEV:-$(if-then-else,$(eq,${CONFIG_INIT:-},systemd),core::systemd-libudev,core::eudev)}-tgt

classes/rootfs.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ depends:
3030
target-toolchain: host-compat-toolchain
3131
use: [tools]
3232
depends:
33-
- kernel::kmod
34-
- utils::brtools
33+
- name: kernel::kmod
34+
alias: kernel::kmod+host
35+
- name: utils::brtools
36+
alias: utils::brtools+host
3537

3638
buildToolsWeak: [kmod, brtools]
3739
buildVars: [CONFIG_HOSTNAME, CONFIG_TZ, CONFIG_ROOT_PW, CONFIG_ROOT_PW_SALT]

recipes/core/busybox/inittab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
::sysinit:/bin/mount -o remount,rw /
55
# The linux kernel does not mount /dev in case of an ramdisk. So check if it is
66
# already mounted and if not mount it before creating any subdirs in it.
7-
::sysinit:/bin/sh -c '/bin/grep -q /dev /proc/mounts || mount /dev'
7+
::sysinit:/bin/sh -c '/bin/cut -d " " -f 2 /proc/mounts | /bin/grep -q "^/dev$" || mount /dev'
88
::sysinit:/bin/mkdir -p /dev/pts /dev/shm
99
::sysinit:/bin/mount -a
1010
::sysinit:/bin/mkdir -p /run/lock/subsys

recipes/core/shadow.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
inherit: [autotools]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "4.15.1"
5+
PKG_LICENSE: BSD-3-Clause
6+
7+
depends:
8+
- libs::libxcrypt-dev
9+
10+
- use: []
11+
depends:
12+
- libs::libxcrypt-tgt
13+
14+
checkoutSCM:
15+
scm: url
16+
url: https://github.com/shadow-maint/shadow/releases/download/${PKG_VERSION}/shadow-${PKG_VERSION}.tar.xz
17+
digestSHA256: bb5f70639a0581f9d626f227ce45b31ac137daa7c451c0f672ce14f2731a96ee
18+
stripComponents: 1
19+
20+
buildScript: |
21+
autotoolsBuild "$1" \
22+
--disable-man \
23+
--without-btrfs \
24+
--without-nscd \
25+
--without-skey \
26+
--without-sssd \
27+
--without-su \
28+
--without-tcb \
29+
--with-sha-crypt --without-libbsd
30+
31+
packageScript: |
32+
autotoolsPackageTgt "$1"
33+
mv bin/* usr/bin/
34+
mv bin/.debug/* usr/bin/.debug/
35+
mv sbin/* usr/sbin/
36+
mv sbin/.debug/* usr/sbin/.debug/
37+
rm -rf bin sbin
38+
39+
provideDeps: ["*-tgt"]

recipes/core/systemd.yaml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
inherit: [meson]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "v257.7"
5+
PKG_LICENSE: "LGPL-2.1+"
6+
7+
Config:
8+
SYSTEMD_ANALYZE:
9+
type: bool
10+
default: false
11+
SYSTEMD_COREDUMP:
12+
type: bool
13+
default: false
14+
SYSTEMD_HWDB:
15+
type: bool
16+
default: false
17+
SYSTEMD_LOGIND:
18+
type: bool
19+
default: false
20+
SYSTEMD_NETWORKD:
21+
type: bool
22+
default: false
23+
SYSTEMD_RESOLVD:
24+
type: bool
25+
default: false
26+
SYSTEMD_UTMP:
27+
type: bool
28+
default: false
29+
SYSTEMD_VCONSOLE:
30+
type: bool
31+
default: true
32+
33+
depends:
34+
- name: devel::gperf
35+
use: [tools]
36+
tools:
37+
target-toolchain: host-compat-toolchain
38+
39+
- libs::libcap-dev
40+
- core::util-linux-dev
41+
- kernel::kmod-lib-dev
42+
- libs::libxcrypt-dev
43+
- python::jinja2
44+
- use: []
45+
depends:
46+
- libs::libcap-tgt
47+
- core::util-linux-tgt
48+
- kernel::kmod-lib-tgt
49+
- libs::libxcrypt-tgt
50+
51+
checkoutSCM:
52+
scm: url
53+
url: https://github.com/systemd/systemd/archive/refs/tags/${PKG_VERSION}.tar.gz
54+
digestSHA1: 508c4cae4a78fb84d2daf0fe31412cc5c6177460
55+
stripComponents: 1
56+
57+
buildTools: [gperf]
58+
buildVars:
59+
- SYSTEMD_ANALYZE
60+
- SYSTEMD_COREDUMP
61+
- SYSTEMD_HWDB
62+
- SYSTEMD_LOGIND
63+
- SYSTEMD_NETWORKD
64+
- SYSTEMD_RESOLVD
65+
- SYSTEMD_UTMP
66+
- SYSTEMD_VCONSOLE
67+
buildScript: |
68+
BOOL=( false true )
69+
FEATURE=( disabled enabled )
70+
71+
OPTS=(
72+
# Make sure that no (new) features are enabled automatically...
73+
-Dauto_features=disabled
74+
-Dmode=release
75+
76+
# Fix paths. Otherwise $PATH is searched! m(
77+
-Dquotaon-path=/usr/sbin/quotaon
78+
-Dquotacheck-path=/usr/sbin/quotacheck
79+
-Dkmod-path=/usr/bin/kmod
80+
-Dkexec-path=/usr/sbin/kexec
81+
-Dsulogin-path=/usr/sbin/sulogin
82+
-Dmount-path=/usr/bin/mount
83+
-Dumount-path=/usr/bin/umount
84+
-Dloadkeys-path=/usr/bin/loadkeys
85+
-Dsetfont-path=/usr/bin/setfont
86+
-Dnologin-path=/usr/sbin/nologin
87+
88+
# Feature switches
89+
-Danalyze=${BOOL[$SYSTEMD_ANALYZE]}
90+
-Dcoredump=${BOOL[$SYSTEMD_COREDUMP]}
91+
-Dhwdb=${BOOL[$SYSTEMD_HWDB]}
92+
-Dlogind=${BOOL[$SYSTEMD_LOGIND]}
93+
-Dnetworkd=${BOOL[$SYSTEMD_NETWORKD]}
94+
-Dresolve=${BOOL[$SYSTEMD_RESOLVD]}
95+
-Dutmp=${BOOL[$SYSTEMD_UTMP]}
96+
-Dvconsole=${BOOL[$SYSTEMD_VCONSOLE]}
97+
98+
# Static feature switches.
99+
-Dkmod=enabled
100+
101+
# Static boolean switches.
102+
-Dnss-systemd=true
103+
-Dtmpfiles=true
104+
105+
-Dadm-group=false
106+
-Dbacklight=false
107+
-Dbinfmt=false
108+
-Defi=false
109+
-Denvironment-d=false
110+
-Dfirstboot=false
111+
-Dgshadow=false
112+
-Dhibernate=false
113+
-Dhostnamed=false
114+
-Didn=false
115+
-Dima=false
116+
-Dinitrd=false
117+
-Dipe=false
118+
-Dkernel-install=false
119+
-Dldconfig=false
120+
-Dlocaled=false
121+
-Dmachined=false
122+
-Dmountfsd=false
123+
-Dnsresourced=false
124+
-Dnss-myhostname=false
125+
-Doomd=false
126+
-Dportabled=false
127+
-Dpstore=false
128+
-Dquotacheck=false
129+
-Drandomseed=false
130+
-Drfkill=false
131+
-Dsmack=false
132+
-Dstoragetm=false
133+
-Dsysext=false
134+
-Dsysusers=false
135+
-Dtests=false
136+
-Dtimedated=false
137+
-Dtimesyncd=false
138+
-Dtpm=false
139+
-Duserdb=false
140+
-Dwheel-group=false
141+
-Dxdg-autostart=false
142+
143+
-Dsystem-gid-max=999
144+
-Dsystem-uid-max=999
145+
)
146+
147+
mkdir -p systemd
148+
pushd systemd
149+
mesonBuild "$1" "${OPTS[@]}"
150+
popd
151+
152+
rm -rf libudev libsystemd
153+
154+
# libudev
155+
mkdir -p libudev/install/usr/{include,lib/pkgconfig}
156+
mv systemd/install/usr/include/libudev.h libudev/install/usr/include/
157+
mv systemd/install/usr/lib/pkgconfig/libudev.pc libudev/install/usr/lib/pkgconfig/
158+
mv systemd/install/usr/lib/libudev.* libudev/install/usr/lib/
159+
160+
# libsystemd
161+
mkdir -p libsystemd/install/usr/{include,lib/pkgconfig}
162+
mv systemd/install/usr/include/systemd/ libsystemd/install/usr/include/
163+
mv systemd/install/usr/lib/pkgconfig/libsystemd.pc libsystemd/install/usr/lib/pkgconfig/
164+
mv systemd/install/usr/lib/libsystemd.* libsystemd/install/usr/lib/
165+
166+
multiPackage:
167+
"":
168+
packageScript: |
169+
mesonPackageTgt "$1/systemd"
170+
provideDeps: [ "*-tgt" ]
171+
172+
libudev:
173+
multiPackage:
174+
dev:
175+
packageScript: mesonPackageDev "$1/libudev"
176+
tgt:
177+
packageScript: mesonPackageLib "$1/libudev"
178+
179+
libsystemd:
180+
multiPackage:
181+
dev:
182+
packageScript: mesonPackageDev "$1/libsystemd"
183+
tgt:
184+
packageScript: mesonPackageLib "$1/libsystemd"

recipes/python/jinja2.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
inherit: ["python3::flit"]
2+
3+
metaEnvironment:
4+
PKG_VERSION: "3.1.6"
5+
6+
checkoutSCM:
7+
scm: url
8+
url: https://files.pythonhosted.org/packages/source/j/jinja2/jinja2-${PKG_VERSION}.tar.gz
9+
digestSHA256: 0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d
10+
stripComponents: 1
11+
12+
depends: &deps
13+
- python::markupsafe
14+
15+
buildScript: |
16+
python3BuildFlit $1
17+
18+
packageScript: |
19+
python3PackageTgt
20+
21+
# Beware: the python3::flit class adds build time dependencies!
22+
provideDeps: *deps

0 commit comments

Comments
 (0)