Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | require systemd.inc |
| 2 | |
| 3 | PROVIDES = "udev" |
| 4 | |
| 5 | PE = "1" |
| 6 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 7 | DEPENDS = "intltool-native gperf-native libcap util-linux python3-jinja2-native" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | |
| 9 | SECTION = "base/shell" |
| 10 | |
| 11 | inherit useradd pkgconfig meson perlnative update-rc.d update-alternatives qemu systemd gettext bash-completion manpages features_check |
| 12 | |
| 13 | # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so |
| 14 | # that we don't build both udev and systemd in world builds. |
| 15 | REQUIRED_DISTRO_FEATURES = "systemd" |
| 16 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | SRC_URI += "file://touchscreen.rules \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | file://00-create-volatile.conf \ |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 19 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://org.freedesktop.hostname1_no_polkit.conf', '', d)} \ |
| 20 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'file://00-hostnamed-network-user.conf', '', d)} \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 21 | file://init \ |
| 22 | file://99-default.preset \ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 23 | file://systemd-pager.sh \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 24 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
| 25 | file://0003-implment-systemd-sysv-install-for-OE.patch \ |
Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 26 | file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 27 | file://0001-test-parse-argument-Include-signal.h.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | " |
| 29 | |
| 30 | # patches needed by musl |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | SRC_URI_MUSL = "\ |
| 33 | file://0002-don-t-use-glibc-specific-qsort_r.patch \ |
| 34 | file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ |
| 35 | file://0004-add-fallback-parse_printf_format-implementation.patch \ |
| 36 | file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ |
| 37 | file://0006-Include-netinet-if_ether.h.patch \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 38 | file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 39 | file://0008-add-missing-FTW_-macros-for-musl.patch \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 40 | file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ |
| 41 | file://0010-Use-uintmax_t-for-handling-rlim_t.patch \ |
| 42 | file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ |
| 43 | file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ |
| 44 | file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ |
| 45 | file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ |
| 46 | file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ |
| 47 | file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ |
| 48 | file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \ |
| 49 | file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \ |
| 50 | file://0019-Handle-missing-LOCK_EX.patch \ |
| 51 | file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \ |
| 52 | file://0021-test-json.c-define-M_PIl.patch \ |
| 53 | file://0022-do-not-disable-buffer-in-writing-files.patch \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 54 | file://0025-Handle-__cpu_mask-usage.patch \ |
| 55 | file://0026-Handle-missing-gshadow.patch \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 56 | file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 57 | " |
| 58 | |
| 59 | PAM_PLUGINS = " \ |
| 60 | pam-plugin-unix \ |
| 61 | pam-plugin-loginuid \ |
| 62 | pam-plugin-keyinit \ |
| 63 | " |
| 64 | |
| 65 | PACKAGECONFIG ??= " \ |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 66 | ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 67 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \ |
| 68 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \ |
| 69 | backlight \ |
| 70 | binfmt \ |
| 71 | gshadow \ |
| 72 | hibernate \ |
| 73 | hostnamed \ |
| 74 | idn \ |
| 75 | ima \ |
| 76 | kmod \ |
| 77 | localed \ |
| 78 | logind \ |
| 79 | machined \ |
| 80 | myhostname \ |
| 81 | networkd \ |
| 82 | nss \ |
| 83 | nss-mymachines \ |
| 84 | nss-resolve \ |
| 85 | quotacheck \ |
| 86 | randomseed \ |
| 87 | resolved \ |
| 88 | set-time-epoch \ |
| 89 | sysusers \ |
| 90 | sysvinit \ |
| 91 | timedated \ |
| 92 | timesyncd \ |
| 93 | userdb \ |
| 94 | utmp \ |
| 95 | vconsole \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 96 | wheel-group \ |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 97 | zstd \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 98 | " |
| 99 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 100 | PACKAGECONFIG:remove:libc-musl = " \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 101 | gshadow \ |
| 102 | idn \ |
| 103 | localed \ |
| 104 | myhostname \ |
| 105 | nss \ |
| 106 | nss-mymachines \ |
| 107 | nss-resolve \ |
| 108 | sysusers \ |
| 109 | userdb \ |
| 110 | utmp \ |
| 111 | " |
| 112 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 113 | CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 114 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 115 | # Some of the dependencies are weak-style recommends - if not available at runtime, |
| 116 | # systemd won't fail but the library-related feature will be skipped with a warning. |
| 117 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 118 | # Use the upstream systemd serial-getty@.service and rely on |
| 119 | # systemd-getty-generator instead of using the OE-core specific |
| 120 | # systemd-serialgetty.bb - not enabled by default. |
| 121 | PACKAGECONFIG[serial-getty-generator] = "" |
| 122 | |
| 123 | PACKAGECONFIG[acl] = "-Dacl=true,-Dacl=false,acl" |
| 124 | PACKAGECONFIG[audit] = "-Daudit=true,-Daudit=false,audit" |
| 125 | PACKAGECONFIG[backlight] = "-Dbacklight=true,-Dbacklight=false" |
| 126 | PACKAGECONFIG[binfmt] = "-Dbinfmt=true,-Dbinfmt=false" |
| 127 | PACKAGECONFIG[bzip2] = "-Dbzip2=true,-Dbzip2=false,bzip2" |
| 128 | PACKAGECONFIG[cgroupv2] = "-Ddefault-hierarchy=unified,-Ddefault-hierarchy=hybrid" |
| 129 | PACKAGECONFIG[coredump] = "-Dcoredump=true,-Dcoredump=false" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 130 | PACKAGECONFIG[cryptsetup] = "-Dlibcryptsetup=true,-Dlibcryptsetup=false,cryptsetup,,cryptsetup" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 131 | PACKAGECONFIG[tpm2] = "-Dtpm2=true,-Dtpm2=false,tpm2-tss,tpm2-tss libtss2 libtss2-tcti-device" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 132 | PACKAGECONFIG[dbus] = "-Ddbus=true,-Ddbus=false,dbus" |
| 133 | PACKAGECONFIG[efi] = "-Defi=true,-Defi=false" |
| 134 | PACKAGECONFIG[gnu-efi] = "-Dgnu-efi=true -Defi-libdir=${STAGING_LIBDIR} -Defi-includedir=${STAGING_INCDIR}/efi,-Dgnu-efi=false,gnu-efi" |
| 135 | PACKAGECONFIG[elfutils] = "-Delfutils=true,-Delfutils=false,elfutils" |
| 136 | PACKAGECONFIG[firstboot] = "-Dfirstboot=true,-Dfirstboot=false" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 137 | PACKAGECONFIG[repart] = "-Drepart=true,-Drepart=false" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 138 | PACKAGECONFIG[homed] = "-Dhomed=true,-Dhomed=false" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 139 | # Sign the journal for anti-tampering |
| 140 | PACKAGECONFIG[gcrypt] = "-Dgcrypt=true,-Dgcrypt=false,libgcrypt" |
| 141 | PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" |
| 142 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" |
| 143 | PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false" |
| 144 | PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false" |
| 145 | PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" |
| 146 | PACKAGECONFIG[ima] = "-Dima=true,-Dima=false" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 147 | # importd requires journal-upload/xz/zlib/bzip2/gcrypt |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 148 | PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false" |
| 149 | # Update NAT firewall rules |
| 150 | PACKAGECONFIG[iptc] = "-Dlibiptc=true,-Dlibiptc=false,iptables" |
| 151 | PACKAGECONFIG[journal-upload] = "-Dlibcurl=true,-Dlibcurl=false,curl" |
| 152 | PACKAGECONFIG[kmod] = "-Dkmod=true,-Dkmod=false,kmod" |
| 153 | PACKAGECONFIG[ldconfig] = "-Dldconfig=true,-Dldconfig=false,,ldconfig" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 154 | PACKAGECONFIG[libidn] = "-Dlibidn=true,-Dlibidn=false,libidn,,libidn" |
| 155 | PACKAGECONFIG[libidn2] = "-Dlibidn2=true,-Dlibidn2=false,libidn2,,libidn2" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 156 | PACKAGECONFIG[localed] = "-Dlocaled=true,-Dlocaled=false" |
| 157 | PACKAGECONFIG[logind] = "-Dlogind=true,-Dlogind=false" |
| 158 | PACKAGECONFIG[lz4] = "-Dlz4=true,-Dlz4=false,lz4" |
| 159 | PACKAGECONFIG[machined] = "-Dmachined=true,-Dmachined=false" |
| 160 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" |
| 161 | PACKAGECONFIG[microhttpd] = "-Dmicrohttpd=true,-Dmicrohttpd=false,libmicrohttpd" |
| 162 | PACKAGECONFIG[myhostname] = "-Dnss-myhostname=true,-Dnss-myhostname=false,,libnss-myhostname" |
| 163 | PACKAGECONFIG[networkd] = "-Dnetworkd=true,-Dnetworkd=false" |
| 164 | PACKAGECONFIG[nss] = "-Dnss-systemd=true,-Dnss-systemd=false" |
| 165 | PACKAGECONFIG[nss-mymachines] = "-Dnss-mymachines=true,-Dnss-mymachines=false" |
| 166 | PACKAGECONFIG[nss-resolve] = "-Dnss-resolve=true,-Dnss-resolve=false" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 167 | PACKAGECONFIG[oomd] = "-Doomd=true,-Doomd=false" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 168 | PACKAGECONFIG[openssl] = "-Dopenssl=true,-Dopenssl=false,openssl" |
| 169 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam,${PAM_PLUGINS}" |
| 170 | PACKAGECONFIG[pcre2] = "-Dpcre2=true,-Dpcre2=false,libpcre2" |
| 171 | PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 172 | # If polkit is disabled and networkd+hostnamed are in use, enabling this option and |
| 173 | # using dbus-broker will allow networkd to be authorized to change the |
| 174 | # hostname without acquiring additional privileges |
| 175 | PACKAGECONFIG[polkit_hostnamed_fallback] = ",,,,dbus-broker,polkit" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 176 | PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 177 | PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 178 | PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" |
| 179 | PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false" |
| 180 | PACKAGECONFIG[resolved] = "-Dresolve=true,-Dresolve=false" |
| 181 | PACKAGECONFIG[rfkill] = "-Drfkill=true,-Drfkill=false" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 182 | PACKAGECONFIG[seccomp] = "-Dseccomp=true,-Dseccomp=false,libseccomp" |
| 183 | PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell" |
| 184 | PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false" |
| 185 | PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false" |
| 186 | PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d -Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,systemd-compat-units update-rc.d" |
| 187 | # When enabled use reproducble build timestamp if set as time epoch, |
| 188 | # or build time if not. When disabled, time epoch is unset. |
| 189 | def build_epoch(d): |
| 190 | epoch = d.getVar('SOURCE_DATE_EPOCH') or "-1" |
| 191 | return '-Dtime-epoch=%d' % int(epoch) |
| 192 | PACKAGECONFIG[set-time-epoch] = "${@build_epoch(d)},-Dtime-epoch=0" |
| 193 | PACKAGECONFIG[timedated] = "-Dtimedated=true,-Dtimedated=false" |
| 194 | PACKAGECONFIG[timesyncd] = "-Dtimesyncd=true,-Dtimesyncd=false" |
| 195 | PACKAGECONFIG[usrmerge] = "-Dsplit-usr=false,-Dsplit-usr=true" |
| 196 | PACKAGECONFIG[sbinmerge] = "-Dsplit-bin=false,-Dsplit-bin=true" |
| 197 | PACKAGECONFIG[userdb] = "-Duserdb=true,-Duserdb=false" |
| 198 | PACKAGECONFIG[utmp] = "-Dutmp=true,-Dutmp=false" |
| 199 | PACKAGECONFIG[valgrind] = "-DVALGRIND=1,,valgrind" |
| 200 | PACKAGECONFIG[vconsole] = "-Dvconsole=true,-Dvconsole=false,,${PN}-vconsole-setup" |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 201 | PACKAGECONFIG[wheel-group] = "-Dwheel-group=true, -Dwheel-group=false" |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 202 | PACKAGECONFIG[xdg-autostart] = "-Dxdg-autostart=true,-Dxdg-autostart=false" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 203 | # Verify keymaps on locale change |
| 204 | PACKAGECONFIG[xkbcommon] = "-Dxkbcommon=true,-Dxkbcommon=false,libxkbcommon" |
| 205 | PACKAGECONFIG[xz] = "-Dxz=true,-Dxz=false,xz" |
| 206 | PACKAGECONFIG[zlib] = "-Dzlib=true,-Dzlib=false,zlib" |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 207 | PACKAGECONFIG[zstd] = "-Dzstd=true,-Dzstd=false,zstd" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 208 | |
| 209 | # Helper variables to clarify locations. This mirrors the logic in systemd's |
| 210 | # build system. |
| 211 | rootprefix ?= "${root_prefix}" |
| 212 | rootlibdir ?= "${base_libdir}" |
| 213 | rootlibexecdir = "${rootprefix}/lib" |
| 214 | |
| 215 | # This links udev statically with systemd helper library. |
| 216 | # Otherwise udev package would depend on systemd package (which has the needed shared library), |
| 217 | # and always pull it into images. |
| 218 | EXTRA_OEMESON += "-Dlink-udev-shared=false" |
| 219 | |
| 220 | EXTRA_OEMESON += "-Dnobody-user=nobody \ |
| 221 | -Dnobody-group=nobody \ |
| 222 | -Drootlibdir=${rootlibdir} \ |
| 223 | -Drootprefix=${rootprefix} \ |
| 224 | -Ddefault-locale=C \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 225 | -Dmode=release \ |
| 226 | -Dsystem-alloc-uid-min=101 \ |
| 227 | -Dsystem-uid-max=999 \ |
| 228 | -Dsystem-alloc-gid-min=101 \ |
| 229 | -Dsystem-gid-max=999 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 230 | " |
| 231 | |
| 232 | # Hardcode target binary paths to avoid using paths from sysroot |
| 233 | EXTRA_OEMESON += "-Dkexec-path=${sbindir}/kexec \ |
| 234 | -Dkmod-path=${base_bindir}/kmod \ |
| 235 | -Dmount-path=${base_bindir}/mount \ |
| 236 | -Dquotacheck-path=${sbindir}/quotacheck \ |
| 237 | -Dquotaon-path=${sbindir}/quotaon \ |
| 238 | -Dsulogin-path=${base_sbindir}/sulogin \ |
| 239 | -Dnologin-path=${base_sbindir}/nologin \ |
| 240 | -Dumount-path=${base_bindir}/umount" |
| 241 | |
| 242 | do_install() { |
| 243 | meson_do_install |
| 244 | install -d ${D}/${base_sbindir} |
| 245 | if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then |
| 246 | # Provided by a separate recipe |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 247 | rm ${D}${systemd_system_unitdir}/serial-getty* -f |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 248 | fi |
| 249 | |
| 250 | # Provide support for initramfs |
| 251 | [ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init |
| 252 | [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd |
| 253 | |
| 254 | install -d ${D}${sysconfdir}/udev/rules.d/ |
| 255 | install -d ${D}${sysconfdir}/tmpfiles.d |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 256 | for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do |
| 257 | install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ |
| 258 | done |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 259 | |
| 260 | install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ |
| 261 | |
| 262 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
| 263 | install -d ${D}${sysconfdir}/init.d |
| 264 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd |
| 265 | sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 266 | install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_system_unitdir}d-sysv-install |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 267 | fi |
| 268 | |
| 269 | chown root:systemd-journal ${D}/${localstatedir}/log/journal |
| 270 | |
| 271 | # Delete journal README, as log can be symlinked inside volatile. |
| 272 | rm -f ${D}/${localstatedir}/log/README |
| 273 | |
| 274 | # journal-remote creates this at start |
| 275 | rm -rf ${D}/${localstatedir}/log/journal/remote |
| 276 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 277 | install -d ${D}${systemd_system_unitdir}/graphical.target.wants |
| 278 | install -d ${D}${systemd_system_unitdir}/multi-user.target.wants |
| 279 | install -d ${D}${systemd_system_unitdir}/poweroff.target.wants |
| 280 | install -d ${D}${systemd_system_unitdir}/reboot.target.wants |
| 281 | install -d ${D}${systemd_system_unitdir}/rescue.target.wants |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 282 | |
| 283 | # Create symlinks for systemd-update-utmp-runlevel.service |
| 284 | if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 285 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service |
| 286 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/multi-user.target.wants/systemd-update-utmp-runlevel.service |
| 287 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/poweroff.target.wants/systemd-update-utmp-runlevel.service |
| 288 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/reboot.target.wants/systemd-update-utmp-runlevel.service |
| 289 | ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_system_unitdir}/rescue.target.wants/systemd-update-utmp-runlevel.service |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 290 | fi |
| 291 | |
| 292 | # this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it |
| 293 | # for existence else it fails |
| 294 | if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then |
| 295 | ${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)} |
| 296 | fi |
| 297 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then |
| 298 | echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/systemd/resolve/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf |
| 299 | echo 'd /run/systemd/resolve 0755 root root -' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf |
| 300 | echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf |
| 301 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd |
| 302 | else |
| 303 | sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../run/systemd/resolve/resolv.conf%g" ${D}${exec_prefix}/lib/tmpfiles.d/etc.conf |
| 304 | ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd |
| 305 | fi |
| 306 | if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then |
| 307 | rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf |
| 308 | rm -r ${D}${sysconfdir}/X11 |
| 309 | fi |
| 310 | |
| 311 | # If polkit is setup fixup permissions and ownership |
| 312 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then |
| 313 | if [ -d ${D}${datadir}/polkit-1/rules.d ]; then |
| 314 | chmod 700 ${D}${datadir}/polkit-1/rules.d |
| 315 | chown polkitd:root ${D}${datadir}/polkit-1/rules.d |
| 316 | fi |
| 317 | fi |
| 318 | |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 319 | # If polkit is not available and a fallback was requested, install a drop-in that allows networkd to |
| 320 | # request hostname changes via DBUS without elevating its privileges |
| 321 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', 'true', 'false', d)}; then |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 322 | install -d ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ |
| 323 | install -m 0644 ${WORKDIR}/00-hostnamed-network-user.conf ${D}${systemd_system_unitdir}/systemd-hostnamed.service.d/ |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 324 | install -d ${D}${datadir}/dbus-1/system.d/ |
| 325 | install -m 0644 ${WORKDIR}/org.freedesktop.hostname1_no_polkit.conf ${D}${datadir}/dbus-1/system.d/ |
| 326 | fi |
| 327 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 328 | # create link for existing udev rules |
| 329 | ln -s ${base_bindir}/udevadm ${D}${base_sbindir}/udevadm |
| 330 | |
| 331 | # duplicate udevadm for postinst script |
| 332 | install -d ${D}${libexecdir} |
| 333 | ln ${D}${base_bindir}/udevadm ${D}${libexecdir}/${MLPREFIX}udevadm |
| 334 | |
| 335 | # install default policy for presets |
| 336 | # https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 337 | install -Dm 0644 ${WORKDIR}/99-default.preset ${D}${systemd_system_unitdir}-preset/99-default.preset |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 338 | |
| 339 | # add a profile fragment to disable systemd pager with busybox less |
| 340 | install -Dm 0644 ${WORKDIR}/systemd-pager.sh ${D}${sysconfdir}/profile.d/systemd-pager.sh |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 341 | } |
| 342 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 343 | python populate_packages:prepend (){ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 344 | systemdlibdir = d.getVar("rootlibdir") |
| 345 | do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True) |
| 346 | } |
| 347 | PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*" |
| 348 | |
| 349 | PACKAGE_BEFORE_PN = "\ |
| 350 | ${PN}-gui \ |
| 351 | ${PN}-vconsole-setup \ |
| 352 | ${PN}-initramfs \ |
| 353 | ${PN}-analyze \ |
| 354 | ${PN}-kernel-install \ |
| 355 | ${PN}-rpm-macros \ |
| 356 | ${PN}-binfmt \ |
| 357 | ${PN}-zsh-completion \ |
| 358 | ${PN}-container \ |
| 359 | ${PN}-journal-gatewayd \ |
| 360 | ${PN}-journal-upload \ |
| 361 | ${PN}-journal-remote \ |
| 362 | ${PN}-extra-utils \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 363 | ${PN}-udev-rules \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 364 | udev \ |
| 365 | udev-hwdb \ |
| 366 | " |
| 367 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 368 | SUMMARY:${PN}-container = "Tools for containers and VMs" |
| 369 | DESCRIPTION:${PN}-container = "Systemd tools to spawn and manage containers and virtual machines." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 370 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 371 | SUMMARY:${PN}-journal-gatewayd = "HTTP server for journal events" |
| 372 | DESCRIPTION:${PN}-journal-gatewayd = "systemd-journal-gatewayd serves journal events over the network. Clients must connect using HTTP. The server listens on port 19531 by default." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 373 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 374 | SUMMARY:${PN}-journal-upload = "Send journal messages over the network" |
| 375 | DESCRIPTION:${PN}-journal-upload = "systemd-journal-upload uploads journal entries to a specified URL." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 376 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 377 | SUMMARY:${PN}-journal-remote = "Receive journal messages over the network" |
| 378 | DESCRIPTION:${PN}-journal-remote = "systemd-journal-remote is a command to receive serialized journal events and store them to journal files." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 379 | |
| 380 | SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)} \ |
| 381 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gatewayd', '', d)} \ |
| 382 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ |
| 383 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ |
| 384 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 385 | SYSTEMD_SERVICE:${PN}-binfmt = "systemd-binfmt.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 386 | |
| 387 | USERADD_PACKAGES = "${PN} ${PN}-extra-utils \ |
| 388 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-gateway', '', d)} \ |
| 389 | ${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '${PN}-journal-remote', '', d)} \ |
| 390 | ${@bb.utils.contains('PACKAGECONFIG', 'journal-upload', '${PN}-journal-upload', '', d)} \ |
| 391 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 392 | GROUPADD_PARAM:${PN} = "-r systemd-journal;" |
| 393 | GROUPADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '-r systemd-hostname;', '', d)}" |
| 394 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'coredump', '--system -d / -M --shell /sbin/nologin systemd-coredump;', '', d)}" |
| 395 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'networkd', '--system -d / -M --shell /sbin/nologin systemd-network;', '', d)}" |
| 396 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'polkit', '--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 polkitd;', '', d)}" |
| 397 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'resolved', '--system -d / -M --shell /sbin/nologin systemd-resolve;', '', d)}" |
| 398 | USERADD_PARAM:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /sbin/nologin systemd-timesync;', '', d)}" |
| 399 | USERADD_PARAM:${PN}-extra-utils = "--system -d / -M --shell /sbin/nologin systemd-bus-proxy" |
| 400 | USERADD_PARAM:${PN}-journal-gateway = "--system -d / -M --shell /sbin/nologin systemd-journal-gateway" |
| 401 | USERADD_PARAM:${PN}-journal-remote = "--system -d / -M --shell /sbin/nologin systemd-journal-remote" |
| 402 | USERADD_PARAM:${PN}-journal-upload = "--system -d / -M --shell /sbin/nologin systemd-journal-upload" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 403 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 404 | FILES:${PN}-analyze = "${bindir}/systemd-analyze" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 405 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 406 | FILES:${PN}-initramfs = "/init" |
| 407 | RDEPENDS:${PN}-initramfs = "${PN}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 408 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 409 | FILES:${PN}-gui = "${bindir}/systemadm" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 410 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 411 | FILES:${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 412 | ${systemd_system_unitdir}/systemd-vconsole-setup.service \ |
| 413 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-vconsole-setup.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 414 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 415 | RDEPENDS:${PN}-kernel-install += "bash" |
| 416 | FILES:${PN}-kernel-install = "${bindir}/kernel-install \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 417 | ${sysconfdir}/kernel/ \ |
| 418 | ${exec_prefix}/lib/kernel \ |
| 419 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 420 | FILES:${PN}-rpm-macros = "${exec_prefix}/lib/rpm \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 421 | " |
| 422 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 423 | FILES:${PN}-zsh-completion = "${datadir}/zsh/site-functions" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 424 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 425 | FILES:${PN}-binfmt = "${sysconfdir}/binfmt.d/ \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 426 | ${exec_prefix}/lib/binfmt.d \ |
| 427 | ${rootlibexecdir}/systemd/systemd-binfmt \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 428 | ${systemd_system_unitdir}/proc-sys-fs-binfmt_misc.* \ |
| 429 | ${systemd_system_unitdir}/systemd-binfmt.service" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 430 | RRECOMMENDS:${PN}-binfmt = "kernel-module-binfmt-misc" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 431 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 432 | RRECOMMENDS:${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 433 | |
| 434 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 435 | FILES:${PN}-journal-gatewayd = "${rootlibexecdir}/systemd/systemd-journal-gatewayd \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 436 | ${systemd_system_unitdir}/systemd-journal-gatewayd.service \ |
| 437 | ${systemd_system_unitdir}/systemd-journal-gatewayd.socket \ |
| 438 | ${systemd_system_unitdir}/sockets.target.wants/systemd-journal-gatewayd.socket \ |
| 439 | ${datadir}/systemd/gatewayd/browse.html \ |
| 440 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 441 | SYSTEMD_SERVICE:${PN}-journal-gatewayd = "systemd-journal-gatewayd.socket" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 442 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 443 | FILES:${PN}-journal-upload = "${rootlibexecdir}/systemd/systemd-journal-upload \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 444 | ${systemd_system_unitdir}/systemd-journal-upload.service \ |
| 445 | ${sysconfdir}/systemd/journal-upload.conf \ |
| 446 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 447 | SYSTEMD_SERVICE:${PN}-journal-upload = "systemd-journal-upload.service" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 448 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 449 | FILES:${PN}-journal-remote = "${rootlibexecdir}/systemd/systemd-journal-remote \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 450 | ${sysconfdir}/systemd/journal-remote.conf \ |
| 451 | ${systemd_system_unitdir}/systemd-journal-remote.service \ |
| 452 | ${systemd_system_unitdir}/systemd-journal-remote.socket \ |
| 453 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 454 | SYSTEMD_SERVICE:${PN}-journal-remote = "systemd-journal-remote.socket" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 455 | |
| 456 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 457 | FILES:${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 458 | ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \ |
| 459 | ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \ |
| 460 | ${base_bindir}/machinectl \ |
| 461 | ${bindir}/systemd-nspawn \ |
| 462 | ${nonarch_libdir}/systemd/import-pubring.gpg \ |
| 463 | ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \ |
| 464 | ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.machine1.busname \ |
| 465 | ${systemd_system_unitdir}/local-fs.target.wants/var-lib-machines.mount \ |
| 466 | ${systemd_system_unitdir}/machines.target.wants/var-lib-machines.mount \ |
| 467 | ${systemd_system_unitdir}/remote-fs.target.wants/var-lib-machines.mount \ |
| 468 | ${systemd_system_unitdir}/machine.slice \ |
| 469 | ${systemd_system_unitdir}/machines.target \ |
| 470 | ${systemd_system_unitdir}/org.freedesktop.import1.busname \ |
| 471 | ${systemd_system_unitdir}/org.freedesktop.machine1.busname \ |
| 472 | ${systemd_system_unitdir}/systemd-importd.service \ |
| 473 | ${systemd_system_unitdir}/systemd-machined.service \ |
| 474 | ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \ |
| 475 | ${systemd_system_unitdir}/var-lib-machines.mount \ |
| 476 | ${rootlibexecdir}/systemd/systemd-import \ |
| 477 | ${rootlibexecdir}/systemd/systemd-importd \ |
| 478 | ${rootlibexecdir}/systemd/systemd-machined \ |
| 479 | ${rootlibexecdir}/systemd/systemd-pull \ |
| 480 | ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 481 | ${exec_prefix}/lib/tmpfiles.d/README \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 482 | ${systemd_system_unitdir}/systemd-nspawn@.service \ |
| 483 | ${libdir}/libnss_mymachines.so.2 \ |
| 484 | ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \ |
| 485 | ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \ |
| 486 | ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \ |
| 487 | ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \ |
| 488 | ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \ |
| 489 | ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \ |
| 490 | " |
| 491 | |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 492 | # "machinectl import-tar" uses "tar --numeric-owner", not supported by busybox. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 493 | RRECOMMENDS:${PN}-container += "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 494 | ${PN}-journal-gatewayd \ |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 495 | ${PN}-journal-remote \ |
| 496 | ${PN}-journal-upload \ |
| 497 | kernel-module-dm-mod \ |
| 498 | kernel-module-loop \ |
| 499 | kernel-module-tun \ |
| 500 | tar \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 501 | " |
| 502 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 503 | FILES:${PN}-extra-utils = "\ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 504 | ${base_bindir}/systemd-escape \ |
| 505 | ${base_bindir}/systemd-inhibit \ |
| 506 | ${bindir}/systemd-detect-virt \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 507 | ${bindir}/systemd-dissect \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 508 | ${bindir}/systemd-path \ |
| 509 | ${bindir}/systemd-run \ |
| 510 | ${bindir}/systemd-cat \ |
| 511 | ${bindir}/systemd-delta \ |
| 512 | ${bindir}/systemd-cgls \ |
| 513 | ${bindir}/systemd-cgtop \ |
| 514 | ${bindir}/systemd-stdio-bridge \ |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 515 | ${bindir}/systemd-sysext \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 516 | ${base_bindir}/systemd-ask-password \ |
| 517 | ${base_bindir}/systemd-tty-ask-password-agent \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 518 | ${systemd_system_unitdir}/systemd-ask-password-console.path \ |
| 519 | ${systemd_system_unitdir}/systemd-ask-password-console.service \ |
| 520 | ${systemd_system_unitdir}/systemd-ask-password-wall.path \ |
| 521 | ${systemd_system_unitdir}/systemd-ask-password-wall.service \ |
| 522 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-console.path \ |
| 523 | ${systemd_system_unitdir}/sysinit.target.wants/systemd-ask-password-wall.path \ |
| 524 | ${systemd_system_unitdir}/multi-user.target.wants/systemd-ask-password-wall.path \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 525 | ${rootlibexecdir}/systemd/systemd-resolve-host \ |
| 526 | ${rootlibexecdir}/systemd/systemd-ac-power \ |
| 527 | ${rootlibexecdir}/systemd/systemd-activate \ |
| 528 | ${rootlibexecdir}/systemd/systemd-bus-proxyd \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 529 | ${systemd_system_unitdir}/systemd-bus-proxyd.service \ |
| 530 | ${systemd_system_unitdir}/systemd-bus-proxyd.socket \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 531 | ${rootlibexecdir}/systemd/systemd-socket-proxyd \ |
| 532 | ${rootlibexecdir}/systemd/systemd-reply-password \ |
| 533 | ${rootlibexecdir}/systemd/systemd-sleep \ |
| 534 | ${rootlibexecdir}/systemd/system-sleep \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 535 | ${systemd_system_unitdir}/systemd-hibernate.service \ |
| 536 | ${systemd_system_unitdir}/systemd-hybrid-sleep.service \ |
| 537 | ${systemd_system_unitdir}/systemd-suspend.service \ |
| 538 | ${systemd_system_unitdir}/sleep.target \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 539 | ${rootlibexecdir}/systemd/systemd-initctl \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 540 | ${systemd_system_unitdir}/systemd-initctl.service \ |
| 541 | ${systemd_system_unitdir}/systemd-initctl.socket \ |
| 542 | ${systemd_system_unitdir}/sockets.target.wants/systemd-initctl.socket \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 543 | ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \ |
| 544 | ${rootlibexecdir}/systemd/systemd-cgroups-agent \ |
| 545 | " |
| 546 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 547 | FILES:${PN}-udev-rules = "\ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 548 | ${rootlibexecdir}/udev/rules.d/70-uaccess.rules \ |
| 549 | ${rootlibexecdir}/udev/rules.d/71-seat.rules \ |
| 550 | ${rootlibexecdir}/udev/rules.d/73-seat-late.rules \ |
| 551 | ${rootlibexecdir}/udev/rules.d/99-systemd.rules \ |
| 552 | " |
| 553 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 554 | CONFFILES:${PN} = "${sysconfdir}/systemd/coredump.conf \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 555 | ${sysconfdir}/systemd/journald.conf \ |
| 556 | ${sysconfdir}/systemd/logind.conf \ |
| 557 | ${sysconfdir}/systemd/networkd.conf \ |
| 558 | ${sysconfdir}/systemd/pstore.conf \ |
| 559 | ${sysconfdir}/systemd/resolved.conf \ |
| 560 | ${sysconfdir}/systemd/sleep.conf \ |
| 561 | ${sysconfdir}/systemd/system.conf \ |
| 562 | ${sysconfdir}/systemd/timesyncd.conf \ |
| 563 | ${sysconfdir}/systemd/user.conf \ |
| 564 | " |
| 565 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 566 | FILES:${PN} = " ${base_bindir}/* \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 567 | ${base_sbindir}/shutdown \ |
| 568 | ${base_sbindir}/halt \ |
| 569 | ${base_sbindir}/poweroff \ |
| 570 | ${base_sbindir}/runlevel \ |
| 571 | ${base_sbindir}/telinit \ |
| 572 | ${base_sbindir}/resolvconf \ |
| 573 | ${base_sbindir}/reboot \ |
| 574 | ${base_sbindir}/init \ |
| 575 | ${datadir}/dbus-1/services \ |
| 576 | ${datadir}/dbus-1/system-services \ |
| 577 | ${datadir}/polkit-1 \ |
| 578 | ${datadir}/${BPN} \ |
| 579 | ${datadir}/factory \ |
| 580 | ${sysconfdir}/dbus-1/ \ |
| 581 | ${sysconfdir}/modules-load.d/ \ |
| 582 | ${sysconfdir}/pam.d/ \ |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 583 | ${sysconfdir}/profile.d/ \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 584 | ${sysconfdir}/sysctl.d/ \ |
| 585 | ${sysconfdir}/systemd/ \ |
| 586 | ${sysconfdir}/tmpfiles.d/ \ |
| 587 | ${sysconfdir}/xdg/ \ |
| 588 | ${sysconfdir}/init.d/README \ |
| 589 | ${sysconfdir}/resolv-conf.systemd \ |
| 590 | ${sysconfdir}/X11/xinit/xinitrc.d/* \ |
| 591 | ${rootlibexecdir}/systemd/* \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 592 | ${libdir}/pam.d \ |
| 593 | ${nonarch_libdir}/pam.d \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 594 | ${systemd_unitdir}/* \ |
| 595 | ${base_libdir}/security/*.so \ |
| 596 | /cgroup \ |
| 597 | ${bindir}/systemd* \ |
| 598 | ${bindir}/busctl \ |
| 599 | ${bindir}/coredumpctl \ |
| 600 | ${bindir}/localectl \ |
| 601 | ${bindir}/hostnamectl \ |
| 602 | ${bindir}/resolvectl \ |
| 603 | ${bindir}/timedatectl \ |
| 604 | ${bindir}/bootctl \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 605 | ${bindir}/oomctl \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 606 | ${exec_prefix}/lib/tmpfiles.d/*.conf \ |
| 607 | ${exec_prefix}/lib/systemd \ |
| 608 | ${exec_prefix}/lib/modules-load.d \ |
| 609 | ${exec_prefix}/lib/sysctl.d \ |
| 610 | ${exec_prefix}/lib/sysusers.d \ |
| 611 | ${exec_prefix}/lib/environment.d \ |
| 612 | ${localstatedir} \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 613 | ${rootlibexecdir}/modprobe.d/systemd.conf \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 614 | ${rootlibexecdir}/modprobe.d/README \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 615 | ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \ |
| 616 | ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \ |
| 617 | ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \ |
| 618 | ${datadir}/dbus-1/system.d/org.freedesktop.resolve1.conf \ |
| 619 | ${datadir}/dbus-1/system.d/org.freedesktop.systemd1.conf \ |
Andrew Geissler | 9b4d8b0 | 2021-02-19 12:26:16 -0600 | [diff] [blame] | 620 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit_hostnamed_fallback', '${datadir}/dbus-1/system.d/org.freedesktop.hostname1_no_polkit.conf', '', d)} \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 621 | ${datadir}/dbus-1/system.d/org.freedesktop.hostname1.conf \ |
| 622 | ${datadir}/dbus-1/system.d/org.freedesktop.login1.conf \ |
| 623 | ${datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf \ |
| 624 | ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 625 | ${datadir}/dbus-1/system.d/org.freedesktop.oom1.conf \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 626 | ${datadir}/dbus-1/system.d/org.freedesktop.home1.conf \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 627 | " |
| 628 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 629 | FILES:${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 630 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 631 | RDEPENDS:${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= ${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck" |
| 632 | RDEPENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)}" |
| 633 | RDEPENDS:${PN} += "volatile-binds" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 634 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 635 | RRECOMMENDS:${PN} += "systemd-extra-utils \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 636 | udev-hwdb \ |
| 637 | e2fsprogs-e2fsck \ |
| 638 | kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 kernel-module-sch-fq-codel \ |
| 639 | os-release \ |
| 640 | systemd-conf \ |
| 641 | " |
| 642 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 643 | INSANE_SKIP:${PN} += "dev-so libdir" |
| 644 | INSANE_SKIP:${PN}-dbg += "libdir" |
| 645 | INSANE_SKIP:${PN}-doc += " libdir" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 646 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 647 | RPROVIDES:udev = "hotplug" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 648 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 649 | RDEPENDS:udev-hwdb += "udev" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 650 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 651 | FILES:udev += "${base_sbindir}/udevd \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 652 | ${rootlibexecdir}/systemd/network/99-default.link \ |
| 653 | ${rootlibexecdir}/systemd/systemd-udevd \ |
| 654 | ${rootlibexecdir}/udev/accelerometer \ |
| 655 | ${rootlibexecdir}/udev/ata_id \ |
| 656 | ${rootlibexecdir}/udev/cdrom_id \ |
| 657 | ${rootlibexecdir}/udev/collect \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 658 | ${rootlibexecdir}/udev/dmi_memory_id \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 659 | ${rootlibexecdir}/udev/fido_id \ |
| 660 | ${rootlibexecdir}/udev/findkeyboards \ |
| 661 | ${rootlibexecdir}/udev/keyboard-force-release.sh \ |
| 662 | ${rootlibexecdir}/udev/keymap \ |
| 663 | ${rootlibexecdir}/udev/mtd_probe \ |
| 664 | ${rootlibexecdir}/udev/scsi_id \ |
| 665 | ${rootlibexecdir}/udev/v4l_id \ |
| 666 | ${rootlibexecdir}/udev/keymaps \ |
| 667 | ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \ |
Andrew Geissler | 635e0e4 | 2020-08-21 15:58:33 -0500 | [diff] [blame] | 668 | ${rootlibexecdir}/udev/rules.d/60-autosuspend.rules \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 669 | ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \ |
| 670 | ${rootlibexecdir}/udev/rules.d/60-block.rules \ |
| 671 | ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \ |
| 672 | ${rootlibexecdir}/udev/rules.d/60-drm.rules \ |
| 673 | ${rootlibexecdir}/udev/rules.d/60-evdev.rules \ |
| 674 | ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \ |
| 675 | ${rootlibexecdir}/udev/rules.d/60-input-id.rules \ |
| 676 | ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \ |
| 677 | ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \ |
| 678 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \ |
| 679 | ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules \ |
| 680 | ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \ |
| 681 | ${rootlibexecdir}/udev/rules.d/60-sensor.rules \ |
| 682 | ${rootlibexecdir}/udev/rules.d/60-serial.rules \ |
| 683 | ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \ |
| 684 | ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \ |
| 685 | ${rootlibexecdir}/udev/rules.d/70-joystick.rules \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 686 | ${rootlibexecdir}/udev/rules.d/70-memory.rules \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 687 | ${rootlibexecdir}/udev/rules.d/70-mouse.rules \ |
| 688 | ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \ |
| 689 | ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \ |
| 690 | ${rootlibexecdir}/udev/rules.d/75-net-description.rules \ |
| 691 | ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \ |
| 692 | ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \ |
| 693 | ${rootlibexecdir}/udev/rules.d/80-drivers.rules \ |
| 694 | ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \ |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 695 | ${rootlibexecdir}/udev/rules.d/81-net-dhcp.rules \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 696 | ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \ |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 697 | ${rootlibexecdir}/udev/rules.d/README \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 698 | ${sysconfdir}/udev \ |
| 699 | ${sysconfdir}/init.d/systemd-udevd \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 700 | ${systemd_system_unitdir}/*udev* \ |
| 701 | ${systemd_system_unitdir}/*.wants/*udev* \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 702 | ${base_bindir}/systemd-hwdb \ |
| 703 | ${base_bindir}/udevadm \ |
| 704 | ${base_sbindir}/udevadm \ |
| 705 | ${libexecdir}/${MLPREFIX}udevadm \ |
| 706 | ${datadir}/bash-completion/completions/udevadm \ |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 707 | ${systemd_system_unitdir}/systemd-hwdb-update.service \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 708 | " |
| 709 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 710 | FILES:udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 711 | " |
| 712 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 713 | RCONFLICTS:${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolvconf', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 714 | |
| 715 | INITSCRIPT_PACKAGES = "udev" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 716 | INITSCRIPT_NAME:udev = "systemd-udevd" |
| 717 | INITSCRIPT_PARAMS:udev = "start 03 S ." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 718 | |
| 719 | python __anonymous() { |
| 720 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): |
| 721 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 722 | |
| 723 | if bb.utils.contains('PACKAGECONFIG', 'repart', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'openssl', True, False, d): |
| 724 | bb.error("PACKAGECONFIG[repart] requires PACKAGECONFIG[openssl]") |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 725 | |
| 726 | if bb.utils.contains('PACKAGECONFIG', 'homed', True, False, d) and not bb.utils.contains('PACKAGECONFIG', 'userdb openssl cryptsetup', True, False, d): |
| 727 | bb.error("PACKAGECONFIG[homed] requires PACKAGECONFIG[userdb], PACKAGECONFIG[openssl] and PACKAGECONFIG[cryptsetup]") |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 728 | } |
| 729 | |
| 730 | python do_warn_musl() { |
| 731 | if d.getVar('TCLIBC') == "musl": |
| 732 | bb.warn("Using systemd with musl is not recommended since it is not supported upstream and some patches are known to be problematic.") |
| 733 | } |
| 734 | addtask warn_musl before do_configure |
| 735 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 736 | ALTERNATIVE:${PN} = "halt reboot shutdown poweroff runlevel ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'resolv-conf', '', d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 737 | |
| 738 | ALTERNATIVE_TARGET[resolv-conf] = "${sysconfdir}/resolv-conf.systemd" |
| 739 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/resolv.conf" |
| 740 | ALTERNATIVE_PRIORITY[resolv-conf] ?= "50" |
| 741 | |
| 742 | ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl" |
| 743 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" |
| 744 | ALTERNATIVE_PRIORITY[halt] ?= "300" |
| 745 | |
| 746 | ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl" |
| 747 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" |
| 748 | ALTERNATIVE_PRIORITY[reboot] ?= "300" |
| 749 | |
| 750 | ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl" |
| 751 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" |
| 752 | ALTERNATIVE_PRIORITY[shutdown] ?= "300" |
| 753 | |
| 754 | ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl" |
| 755 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" |
| 756 | ALTERNATIVE_PRIORITY[poweroff] ?= "300" |
| 757 | |
| 758 | ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl" |
| 759 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" |
| 760 | ALTERNATIVE_PRIORITY[runlevel] ?= "300" |
| 761 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 762 | pkg_postinst:${PN}:libc-glibc () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 763 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ |
| 764 | -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \ |
| 765 | -i $D${sysconfdir}/nsswitch.conf |
| 766 | } |
| 767 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 768 | pkg_prerm:${PN}:libc-glibc () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 769 | sed -e '/^hosts:/s/\s*\<myhostname\>//' \ |
| 770 | -e '/^hosts:/s/\s*myhostname//' \ |
| 771 | -i $D${sysconfdir}/nsswitch.conf |
| 772 | } |
| 773 | |
| 774 | PACKAGE_WRITE_DEPS += "qemu-native" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 775 | pkg_postinst:udev-hwdb () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 776 | if test -n "$D"; then |
| 777 | $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}" |
| 778 | else |
| 779 | udevadm hwdb --update |
| 780 | fi |
| 781 | } |
| 782 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 783 | pkg_prerm:udev-hwdb () { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 784 | rm -f $D${sysconfdir}/udev/hwdb.bin |
| 785 | } |