systemd.mk 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. ################################################################################
  2. #
  3. # systemd
  4. #
  5. ################################################################################
  6. # When updating systemd, take care of the following:
  7. # - Check if the requirements have changed (see README), in particular
  8. # arch and headers
  9. # - If yes, propagate the dependencies to BR2_INIT_SYSTEMD
  10. # - If the required kernel options have changed, update the Config.in
  11. # help text and the list of KCONFIG_ENABLE_OPT.
  12. # - Check if there are new meson_options. Make sure all options are set
  13. # explicitly (usually to default value).
  14. # - If there are new services:
  15. # - create new options for them (if they really are optional);
  16. # - create a new _USER if necessary;
  17. # - create new directory (with _PERMISSIONS) if necessary.
  18. # - Diff sysusers.d with the previous version
  19. # - Diff factory/etc/nsswitch.conf with the previous version
  20. # (details are often sprinkled around in README and manpages)
  21. SYSTEMD_VERSION = 254.13
  22. SYSTEMD_SITE = $(call github,systemd,systemd-stable,v$(SYSTEMD_VERSION))
  23. SYSTEMD_LICENSE = \
  24. LGPL-2.1+, \
  25. GPL-2.0+ (udev), \
  26. Public Domain (few source files, see LICENSES/README.md), \
  27. BSD-2-Clause (eBPF instruction mini library), \
  28. BSD-3-Clause (tools/chromiumos), \
  29. CC0-1.0 (few source files, see LICENSES/README.md), \
  30. GPL-2.0 with Linux-syscall-note (linux kernel headers), \
  31. MIT-0 (few source files, see LICENSES/README.md), \
  32. MIT (few source files, see LICENSES/README.md), \
  33. OFL-1.1 (Heebo fonts)
  34. SYSTEMD_LICENSE_FILES = \
  35. LICENSE.GPL2 \
  36. LICENSE.LGPL2.1 \
  37. LICENSES/BSD-2-Clause.txt \
  38. LICENSES/BSD-3-Clause.txt \
  39. LICENSES/CC0-1.0.txt \
  40. LICENSES/LGPL-2.0-or-later.txt \
  41. LICENSES/Linux-syscall-note.txt \
  42. LICENSES/lookup3-public-domain.txt \
  43. LICENSES/MIT-0.txt \
  44. LICENSES/MIT.txt \
  45. LICENSES/murmurhash2-public-domain.txt \
  46. LICENSES/OFL-1.1.txt \
  47. LICENSES/README.md
  48. SYSTEMD_CPE_ID_VALID = YES
  49. SYSTEMD_INSTALL_STAGING = YES
  50. SYSTEMD_DEPENDENCIES = \
  51. $(BR2_COREUTILS_HOST_DEPENDENCY) \
  52. $(if $(BR2_PACKAGE_BASH_COMPLETION),bash-completion) \
  53. host-gperf \
  54. host-python-jinja2 \
  55. kmod \
  56. libcap \
  57. util-linux-libs \
  58. $(TARGET_NLS_DEPENDENCIES)
  59. SYSTEMD_SELINUX_MODULES = systemd udev xdg
  60. SYSTEMD_PROVIDES = udev
  61. SYSTEMD_CONF_OPTS += \
  62. -Dcreate-log-dirs=false \
  63. -Ddbus=false \
  64. -Ddbus-interfaces-dir=no \
  65. -Ddefault-compression='auto' \
  66. -Ddefault-hierarchy=unified \
  67. -Ddefault-locale='C.UTF-8' \
  68. -Ddefault-user-shell=/bin/sh \
  69. -Dfirst-boot-full-preset=false \
  70. -Didn=true \
  71. -Dima=false \
  72. -Dkexec-path=/usr/sbin/kexec \
  73. -Dkmod-path=/usr/bin/kmod \
  74. -Dldconfig=false \
  75. -Dlink-boot-shared=true \
  76. -Dloadkeys-path=/usr/bin/loadkeys \
  77. -Dman=false \
  78. -Dmount-path=/usr/bin/mount \
  79. -Dmode=release \
  80. -Dnspawn-locale='C.UTF-8' \
  81. -Dnss-systemd=true \
  82. -Dpasswdqc=false \
  83. -Dquotacheck-path=/usr/sbin/quotacheck \
  84. -Dquotaon-path=/usr/sbin/quotaon \
  85. -Drootlibdir='/usr/lib' \
  86. -Dsetfont-path=/usr/bin/setfont \
  87. -Dsplit-bin=true \
  88. -Dsplit-usr=false \
  89. -Dsulogin-path=/usr/sbin/sulogin \
  90. -Dsystem-gid-max=999 \
  91. -Dsystem-uid-max=999 \
  92. -Dsysvinit-path= \
  93. -Dsysvrcnd-path= \
  94. -Dtelinit-path= \
  95. -Dtests=false \
  96. -Dtmpfiles=true \
  97. -Dukify=false \
  98. -Dumount-path=/usr/bin/umount \
  99. -Dxenctrl=false
  100. SYSTEMD_CFLAGS = $(TARGET_CFLAGS)
  101. ifeq ($(BR2_OPTIMIZE_FAST),y)
  102. SYSTEMD_CFLAGS += -O3 -fno-finite-math-only
  103. endif
  104. ifeq ($(BR2_nios2),y)
  105. # Nios2 ld emits warnings, make warnings not to be treated as errors
  106. SYSTEMD_LDFLAGS = $(TARGET_LDFLAGS) -Wl,--no-fatal-warnings
  107. endif
  108. ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
  109. SYSTEMD_JOURNALD_PERMISSIONS = /var/log/journal d 2755 root systemd-journal - - - - -
  110. endif
  111. ifeq ($(BR2_PACKAGE_ACL),y)
  112. SYSTEMD_DEPENDENCIES += acl
  113. SYSTEMD_CONF_OPTS += -Dacl=true
  114. else
  115. SYSTEMD_CONF_OPTS += -Dacl=false
  116. endif
  117. ifeq ($(BR2_PACKAGE_LESS),y)
  118. SYSTEMD_CONF_OPTS += -Durlify=true
  119. else
  120. SYSTEMD_CONF_OPTS += -Durlify=false
  121. endif
  122. ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
  123. SYSTEMD_DEPENDENCIES += libapparmor
  124. SYSTEMD_CONF_OPTS += -Dapparmor=true
  125. else
  126. SYSTEMD_CONF_OPTS += -Dapparmor=false
  127. endif
  128. ifeq ($(BR2_PACKAGE_AUDIT),y)
  129. SYSTEMD_DEPENDENCIES += audit
  130. SYSTEMD_CONF_OPTS += -Daudit=true
  131. else
  132. SYSTEMD_CONF_OPTS += -Daudit=false
  133. endif
  134. ifeq ($(BR2_PACKAGE_CRYPTSETUP),y)
  135. SYSTEMD_DEPENDENCIES += cryptsetup
  136. SYSTEMD_CONF_OPTS += -Dlibcryptsetup=true -Dlibcryptsetup-plugins=true
  137. else
  138. SYSTEMD_CONF_OPTS += -Dlibcryptsetup=false -Dlibcryptsetup-plugins=false
  139. endif
  140. ifeq ($(BR2_PACKAGE_ELFUTILS),y)
  141. SYSTEMD_DEPENDENCIES += elfutils
  142. SYSTEMD_CONF_OPTS += -Delfutils=true
  143. else
  144. SYSTEMD_CONF_OPTS += -Delfutils=false
  145. endif
  146. ifeq ($(BR2_PACKAGE_IPTABLES),y)
  147. SYSTEMD_DEPENDENCIES += iptables
  148. SYSTEMD_CONF_OPTS += -Dlibiptc=true
  149. else
  150. SYSTEMD_CONF_OPTS += -Dlibiptc=false
  151. endif
  152. # Both options can't be selected at the same time so prefer libidn2
  153. ifeq ($(BR2_PACKAGE_LIBIDN2),y)
  154. SYSTEMD_DEPENDENCIES += libidn2
  155. SYSTEMD_CONF_OPTS += -Dlibidn2=true -Dlibidn=false
  156. else ifeq ($(BR2_PACKAGE_LIBIDN),y)
  157. SYSTEMD_DEPENDENCIES += libidn
  158. SYSTEMD_CONF_OPTS += -Dlibidn=true -Dlibidn2=false
  159. else
  160. SYSTEMD_CONF_OPTS += -Dlibidn=false -Dlibidn2=false
  161. endif
  162. ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
  163. SYSTEMD_DEPENDENCIES += libseccomp
  164. SYSTEMD_CONF_OPTS += -Dseccomp=true
  165. else
  166. SYSTEMD_CONF_OPTS += -Dseccomp=false
  167. endif
  168. ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
  169. SYSTEMD_DEPENDENCIES += libxkbcommon
  170. SYSTEMD_CONF_OPTS += -Dxkbcommon=true
  171. else
  172. SYSTEMD_CONF_OPTS += -Dxkbcommon=false
  173. endif
  174. ifeq ($(BR2_PACKAGE_BZIP2),y)
  175. SYSTEMD_DEPENDENCIES += bzip2
  176. SYSTEMD_CONF_OPTS += -Dbzip2=true
  177. else
  178. SYSTEMD_CONF_OPTS += -Dbzip2=false
  179. endif
  180. ifeq ($(BR2_PACKAGE_ZSTD),y)
  181. SYSTEMD_DEPENDENCIES += zstd
  182. SYSTEMD_CONF_OPTS += -Dzstd=true
  183. else
  184. SYSTEMD_CONF_OPTS += -Dzstd=false
  185. endif
  186. ifeq ($(BR2_PACKAGE_LZ4),y)
  187. SYSTEMD_DEPENDENCIES += lz4
  188. SYSTEMD_CONF_OPTS += -Dlz4=true
  189. else
  190. SYSTEMD_CONF_OPTS += -Dlz4=false
  191. endif
  192. ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
  193. SYSTEMD_DEPENDENCIES += linux-pam
  194. SYSTEMD_CONF_OPTS += -Dpam=true
  195. else
  196. SYSTEMD_CONF_OPTS += -Dpam=false
  197. endif
  198. ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y)
  199. SYSTEMD_CONF_OPTS += -Dfdisk=true
  200. else
  201. SYSTEMD_CONF_OPTS += -Dfdisk=false
  202. endif
  203. ifeq ($(BR2_PACKAGE_XZ),y)
  204. SYSTEMD_DEPENDENCIES += xz
  205. SYSTEMD_CONF_OPTS += -Dxz=true
  206. else
  207. SYSTEMD_CONF_OPTS += -Dxz=false
  208. endif
  209. ifeq ($(BR2_PACKAGE_ZLIB),y)
  210. SYSTEMD_DEPENDENCIES += zlib
  211. SYSTEMD_CONF_OPTS += -Dzlib=true
  212. else
  213. SYSTEMD_CONF_OPTS += -Dzlib=false
  214. endif
  215. ifeq ($(BR2_PACKAGE_LIBCURL),y)
  216. SYSTEMD_DEPENDENCIES += libcurl
  217. SYSTEMD_CONF_OPTS += -Dlibcurl=true
  218. else
  219. SYSTEMD_CONF_OPTS += -Dlibcurl=false
  220. endif
  221. ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
  222. SYSTEMD_DEPENDENCIES += libgcrypt
  223. SYSTEMD_CONF_OPTS += -Dgcrypt=true
  224. else
  225. SYSTEMD_CONF_OPTS += -Dgcrypt=false
  226. endif
  227. ifeq ($(BR2_PACKAGE_P11_KIT),y)
  228. SYSTEMD_DEPENDENCIES += p11-kit
  229. SYSTEMD_CONF_OPTS += -Dp11kit=true
  230. else
  231. SYSTEMD_CONF_OPTS += -Dp11kit=false
  232. endif
  233. ifeq ($(BR2_PACKAGE_PCRE2),y)
  234. SYSTEMD_DEPENDENCIES += pcre2
  235. SYSTEMD_CONF_OPTS += -Dpcre2=true
  236. else
  237. SYSTEMD_CONF_OPTS += -Dpcre2=false
  238. endif
  239. ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
  240. SYSTEMD_CONF_OPTS += -Dblkid=true
  241. else
  242. SYSTEMD_CONF_OPTS += -Dblkid=false
  243. endif
  244. ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y)
  245. SYSTEMD_CONF_OPTS += -Dnologin-path=/sbin/nologin
  246. else
  247. SYSTEMD_CONF_OPTS += -Dnologin-path=/bin/false
  248. endif
  249. ifeq ($(BR2_PACKAGE_SYSTEMD_INITRD),y)
  250. SYSTEMD_CONF_OPTS += -Dinitrd=true
  251. else
  252. SYSTEMD_CONF_OPTS += -Dinitrd=false
  253. endif
  254. ifeq ($(BR2_PACKAGE_SYSTEMD_KERNELINSTALL),y)
  255. SYSTEMD_CONF_OPTS += -Dkernel-install=true
  256. else
  257. SYSTEMD_CONF_OPTS += -Dkernel-install=false
  258. endif
  259. ifeq ($(BR2_PACKAGE_SYSTEMD_ANALYZE),y)
  260. SYSTEMD_CONF_OPTS += -Danalyze=true
  261. else
  262. SYSTEMD_CONF_OPTS += -Danalyze=false
  263. endif
  264. ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y)
  265. # remote also depends on libcurl, this is already added above.
  266. SYSTEMD_DEPENDENCIES += libmicrohttpd
  267. SYSTEMD_CONF_OPTS += -Dremote=true -Dmicrohttpd=true
  268. SYSTEMD_REMOTE_USER = systemd-journal-remote -1 systemd-journal-remote -1 * - - - systemd Journal Remote
  269. else
  270. SYSTEMD_CONF_OPTS += -Dremote=false -Dmicrohttpd=false
  271. endif
  272. ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
  273. SYSTEMD_DEPENDENCIES += libqrencode
  274. SYSTEMD_CONF_OPTS += -Dqrencode=true
  275. else
  276. SYSTEMD_CONF_OPTS += -Dqrencode=false
  277. endif
  278. ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
  279. SYSTEMD_DEPENDENCIES += libselinux
  280. SYSTEMD_CONF_OPTS += -Dselinux=true
  281. else
  282. SYSTEMD_CONF_OPTS += -Dselinux=false
  283. endif
  284. ifneq ($(BR2_PACKAGE_LIBGCRYPT)$(BR2_PACKAGE_LIBOPENSSL),)
  285. SYSTEMD_CONF_OPTS += -Ddefault-dnssec=allow-downgrade
  286. else
  287. SYSTEMD_CONF_OPTS += -Ddefault-dnssec=no
  288. endif
  289. ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
  290. SYSTEMD_CONF_OPTS += -Dhwdb=true
  291. define SYSTEMD_BUILD_HWDB
  292. $(HOST_DIR)/bin/systemd-hwdb update --root $(TARGET_DIR) --strict --usr
  293. endef
  294. SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_BUILD_HWDB
  295. define SYSTEMD_RM_HWBD_UPDATE_SERVICE
  296. rm -rf $(TARGET_DIR)/usr/lib/systemd/system/systemd-hwdb-update.service \
  297. $(TARGET_DIR)/usr/lib/systemd/system/*/systemd-hwdb-update.service \
  298. $(TARGET_DIR)/usr/bin/systemd-hwdb
  299. endef
  300. SYSTEMD_POST_INSTALL_TARGET_HOOKS += SYSTEMD_RM_HWBD_UPDATE_SERVICE
  301. else
  302. SYSTEMD_CONF_OPTS += -Dhwdb=false
  303. endif
  304. ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
  305. SYSTEMD_CONF_OPTS += -Dbinfmt=true
  306. else
  307. SYSTEMD_CONF_OPTS += -Dbinfmt=false
  308. endif
  309. ifeq ($(BR2_PACKAGE_SYSTEMD_UTMP),y)
  310. SYSTEMD_CONF_OPTS += -Dutmp=true
  311. else
  312. SYSTEMD_CONF_OPTS += -Dutmp=false
  313. endif
  314. ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
  315. SYSTEMD_CONF_OPTS += \
  316. -Dvconsole=true \
  317. -Ddefault-keymap=$(call qstrip,$(BR2_PACKAGE_SYSTEMD_VCONSOLE_DEFAULT_KEYMAP))
  318. else
  319. SYSTEMD_CONF_OPTS += -Dvconsole=false
  320. endif
  321. ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y)
  322. SYSTEMD_CONF_OPTS += -Dquotacheck=true
  323. else
  324. SYSTEMD_CONF_OPTS += -Dquotacheck=false
  325. endif
  326. ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
  327. SYSTEMD_CONF_OPTS += -Dsysusers=true
  328. else
  329. SYSTEMD_CONF_OPTS += -Dsysusers=false
  330. endif
  331. ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y)
  332. SYSTEMD_CONF_OPTS += -Dfirstboot=true
  333. else
  334. SYSTEMD_CONF_OPTS += -Dfirstboot=false
  335. endif
  336. ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y)
  337. SYSTEMD_CONF_OPTS += -Drandomseed=true
  338. else
  339. SYSTEMD_CONF_OPTS += -Drandomseed=false
  340. endif
  341. ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y)
  342. SYSTEMD_CONF_OPTS += -Dbacklight=true
  343. else
  344. SYSTEMD_CONF_OPTS += -Dbacklight=false
  345. endif
  346. ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y)
  347. SYSTEMD_CONF_OPTS += -Drfkill=true
  348. else
  349. SYSTEMD_CONF_OPTS += -Drfkill=false
  350. endif
  351. ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
  352. SYSTEMD_CONF_OPTS += -Dlogind=true
  353. SYSTEMD_LOGIND_PERMISSIONS = /var/lib/systemd/linger d 755 0 0 - - - - -
  354. else
  355. SYSTEMD_CONF_OPTS += -Dlogind=false
  356. endif
  357. ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
  358. SYSTEMD_CONF_OPTS += -Dmachined=true -Dnss-mymachines=true
  359. SYSTEMD_MACHINED_PERMISSIONS = /var/lib/machines d 700 0 0 - - - - -
  360. else
  361. SYSTEMD_CONF_OPTS += -Dmachined=false -Dnss-mymachines=false
  362. endif
  363. ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
  364. SYSTEMD_CONF_OPTS += -Dimportd=true
  365. else
  366. SYSTEMD_CONF_OPTS += -Dimportd=false
  367. endif
  368. ifeq ($(BR2_PACKAGE_SYSTEMD_HOMED),y)
  369. SYSTEMD_CONF_OPTS += -Dhomed=true
  370. SYSTEMD_DEPENDENCIES += cryptsetup openssl
  371. SYSTEMD_HOMED_PERMISSIONS = /var/lib/systemd/home d 755 0 0 - - - - -
  372. else
  373. SYSTEMD_CONF_OPTS += -Dhomed=false
  374. endif
  375. ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
  376. SYSTEMD_CONF_OPTS += -Dhostnamed=true
  377. else
  378. SYSTEMD_CONF_OPTS += -Dhostnamed=false
  379. endif
  380. ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y)
  381. SYSTEMD_CONF_OPTS += -Dnss-myhostname=true
  382. else
  383. SYSTEMD_CONF_OPTS += -Dnss-myhostname=false
  384. endif
  385. ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y)
  386. SYSTEMD_CONF_OPTS += -Dtimedated=true
  387. else
  388. SYSTEMD_CONF_OPTS += -Dtimedated=false
  389. endif
  390. ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y)
  391. SYSTEMD_CONF_OPTS += -Dlocaled=true
  392. else
  393. SYSTEMD_CONF_OPTS += -Dlocaled=false
  394. endif
  395. ifeq ($(BR2_PACKAGE_SYSTEMD_REPART),y)
  396. SYSTEMD_CONF_OPTS += -Drepart=true
  397. SYSTEMD_DEPENDENCIES += openssl
  398. else
  399. SYSTEMD_CONF_OPTS += -Drepart=false
  400. endif
  401. ifeq ($(BR2_PACKAGE_SYSTEMD_USERDB),y)
  402. SYSTEMD_CONF_OPTS += -Duserdb=true
  403. else
  404. SYSTEMD_CONF_OPTS += -Duserdb=false
  405. endif
  406. ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
  407. SYSTEMD_CONF_OPTS += -Dcoredump=true
  408. SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * - - - systemd core dump processing
  409. SYSTEMD_COREDUMP_PERMISSIONS = /var/lib/systemd/coredump d 755 0 0 - - - - -
  410. else
  411. SYSTEMD_CONF_OPTS += -Dcoredump=false
  412. endif
  413. ifeq ($(BR2_PACKAGE_SYSTEMD_PSTORE),y)
  414. SYSTEMD_CONF_OPTS += -Dpstore=true
  415. SYSTEMD_PSTORE_PERMISSIONS = /var/lib/systemd/pstore d 755 0 0 - - - - -
  416. else
  417. SYSTEMD_CONF_OPTS += -Dpstore=false
  418. endif
  419. ifeq ($(BR2_PACKAGE_SYSTEMD_OOMD),y)
  420. SYSTEMD_CONF_OPTS += -Doomd=true
  421. SYSTEMD_OOMD_USER = systemd-oom -1 systemd-oom -1 * - - - systemd Userspace OOM Killer
  422. define SYSTEMD_OOMD_LINUX_CONFIG_FIXUPS
  423. $(call KCONFIG_ENABLE_OPT,CONFIG_PSI)
  424. $(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG)
  425. endef
  426. else
  427. SYSTEMD_CONF_OPTS += -Doomd=false
  428. endif
  429. ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y)
  430. SYSTEMD_CONF_OPTS += -Dpolkit=true
  431. SYSTEMD_DEPENDENCIES += polkit
  432. else
  433. SYSTEMD_CONF_OPTS += -Dpolkit=false
  434. endif
  435. ifeq ($(BR2_PACKAGE_SYSTEMD_PORTABLED),y)
  436. SYSTEMD_CONF_OPTS += -Dportabled=true
  437. else
  438. SYSTEMD_CONF_OPTS += -Dportabled=false
  439. endif
  440. ifeq ($(BR2_PACKAGE_SYSTEMD_SYSEXT),y)
  441. SYSTEMD_CONF_OPTS += -Dsysext=true
  442. else
  443. SYSTEMD_CONF_OPTS += -Dsysext=false
  444. endif
  445. ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUPDATE),y)
  446. SYSTEMD_CONF_OPTS += -Dsysupdate=true
  447. else
  448. SYSTEMD_CONF_OPTS += -Dsysupdate=false
  449. endif
  450. ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
  451. SYSTEMD_CONF_OPTS += -Dnetworkd=true
  452. SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - systemd Network Management
  453. SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
  454. ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
  455. define SYSTEMD_INSTALL_NETWORK_CONFS
  456. sed s/SYSTEMD_NETWORKD_DHCP_IFACE/$(SYSTEMD_NETWORKD_DHCP_IFACE)/ \
  457. $(SYSTEMD_PKGDIR)/dhcp.network > \
  458. $(TARGET_DIR)/etc/systemd/network/$(SYSTEMD_NETWORKD_DHCP_IFACE).network
  459. endef
  460. endif
  461. else
  462. SYSTEMD_CONF_OPTS += -Dnetworkd=false
  463. endif
  464. ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
  465. define SYSTEMD_INSTALL_RESOLVCONF_HOOK
  466. ln -sf ../run/systemd/resolve/resolv.conf \
  467. $(TARGET_DIR)/etc/resolv.conf
  468. endef
  469. SYSTEMD_CONF_OPTS += -Dnss-resolve=true -Dresolve=true
  470. SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - systemd Resolver
  471. else
  472. SYSTEMD_CONF_OPTS += -Dnss-resolve=false -Dresolve=false
  473. endif
  474. ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
  475. SYSTEMD_CONF_OPTS += \
  476. -Dgnutls=false \
  477. -Dopenssl=true \
  478. -Ddns-over-tls=openssl \
  479. -Ddefault-dns-over-tls=opportunistic
  480. SYSTEMD_DEPENDENCIES += openssl
  481. else ifeq ($(BR2_PACKAGE_GNUTLS),y)
  482. SYSTEMD_CONF_OPTS += \
  483. -Dgnutls=true \
  484. -Dopenssl=false \
  485. -Ddns-over-tls=gnutls \
  486. -Ddefault-dns-over-tls=opportunistic
  487. SYSTEMD_DEPENDENCIES += gnutls
  488. else
  489. SYSTEMD_CONF_OPTS += \
  490. -Dgnutls=false \
  491. -Dopenssl=false \
  492. -Ddns-over-tls=false \
  493. -Ddefault-dns-over-tls=no
  494. endif
  495. ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
  496. SYSTEMD_CONF_OPTS += -Dtimesyncd=true
  497. SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - systemd Time Synchronization
  498. SYSTEMD_TIMESYNCD_PERMISSIONS = /var/lib/systemd/timesync d 755 systemd-timesync systemd-timesync - - - - -
  499. else
  500. SYSTEMD_CONF_OPTS += -Dtimesyncd=false
  501. endif
  502. ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
  503. SYSTEMD_CONF_OPTS += -Dsmack=true
  504. else
  505. SYSTEMD_CONF_OPTS += -Dsmack=false
  506. endif
  507. ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y)
  508. SYSTEMD_CONF_OPTS += -Dhibernate=true
  509. else
  510. SYSTEMD_CONF_OPTS += -Dhibernate=false
  511. endif
  512. ifeq ($(BR2_PACKAGE_TPM2_TSS),y)
  513. SYSTEMD_DEPENDENCIES += tpm2-tss
  514. SYSTEMD_CONF_OPTS += -Dtpm2=true
  515. else
  516. SYSTEMD_CONF_OPTS += -Dtpm2=false
  517. endif
  518. ifeq ($(BR2_PACKAGE_SYSTEMD_BOOT),y)
  519. SYSTEMD_INSTALL_IMAGES = YES
  520. SYSTEMD_DEPENDENCIES += gnu-efi host-python-pyelftools
  521. SYSTEMD_CONF_OPTS += -Defi=true -Dbootloader=true
  522. SYSTEMD_BOOT_EFI_ARCH = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH))
  523. define SYSTEMD_INSTALL_BOOT_FILES
  524. $(INSTALL) -D -m 0644 $(@D)/build/src/boot/efi/systemd-boot$(SYSTEMD_BOOT_EFI_ARCH).efi \
  525. $(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(SYSTEMD_BOOT_EFI_ARCH).efi
  526. $(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/loader.conf \
  527. $(BINARIES_DIR)/efi-part/loader/loader.conf
  528. $(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/buildroot.conf \
  529. $(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf
  530. endef
  531. else
  532. SYSTEMD_CONF_OPTS += -Defi=false -Dbootloader=false
  533. endif # BR2_PACKAGE_SYSTEMD_BOOT == y
  534. SYSTEMD_FALLBACK_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
  535. ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),)
  536. SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME)
  537. endif
  538. SYSTEMD_DEFAULT_TARGET = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET))
  539. ifneq ($(SYSTEMD_DEFAULT_TARGET),)
  540. define SYSTEMD_INSTALL_INIT_HOOK
  541. ln -fs "$(SYSTEMD_DEFAULT_TARGET)" \
  542. $(TARGET_DIR)/usr/lib/systemd/system/default.target
  543. endef
  544. SYSTEMD_POST_INSTALL_TARGET_HOOKS += SYSTEMD_INSTALL_INIT_HOOK
  545. endif
  546. define SYSTEMD_INSTALL_MACHINEID_HOOK
  547. touch $(TARGET_DIR)/etc/machine-id
  548. endef
  549. SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
  550. SYSTEMD_INSTALL_MACHINEID_HOOK
  551. define SYSTEMD_INSTALL_IMAGES_CMDS
  552. $(SYSTEMD_INSTALL_BOOT_FILES)
  553. endef
  554. define SYSTEMD_PERMISSIONS
  555. /boot d 700 0 0 - - - - -
  556. /var/spool d 755 0 0 - - - - -
  557. /var/lib d 755 0 0 - - - - -
  558. /var/lib/private d 700 0 0 - - - - -
  559. /var/log/private d 700 0 0 - - - - -
  560. /var/cache/private d 700 0 0 - - - - -
  561. $(SYSTEMD_JOURNALD_PERMISSIONS)
  562. $(SYSTEMD_LOGIND_PERMISSIONS)
  563. $(SYSTEMD_MACHINED_PERMISSIONS)
  564. $(SYSTEMD_HOMED_PERMISSIONS)
  565. $(SYSTEMD_COREDUMP_PERMISSIONS)
  566. $(SYSTEMD_PSTORE_PERMISSIONS)
  567. $(SYSTEMD_TIMESYNCD_PERMISSIONS)
  568. endef
  569. define SYSTEMD_USERS
  570. # udev user groups
  571. - - render -1 * - - - DRI rendering nodes
  572. # systemd user groups
  573. - - systemd-journal -1 * - - - Journal
  574. $(SYSTEMD_REMOTE_USER)
  575. $(SYSTEMD_COREDUMP_USER)
  576. $(SYSTEMD_OOMD_USER)
  577. $(SYSTEMD_NETWORKD_USER)
  578. $(SYSTEMD_RESOLVED_USER)
  579. $(SYSTEMD_TIMESYNCD_USER)
  580. endef
  581. define SYSTEMD_INSTALL_NSSCONFIG_HOOK
  582. $(SED) '/^passwd:/ {/systemd/! s/$$/ systemd/}' \
  583. -e '/^group:/ {/systemd/! s/$$/ [SUCCESS=merge] systemd/}' \
  584. -e '/^shadow:/ {/systemd/! s/$$/ systemd/}' \
  585. -e '/^gshadow:/ {/systemd/! s/$$/ systemd/}' \
  586. $(if $(BR2_PACKAGE_SYSTEMD_RESOLVED), \
  587. -e '/^hosts:/ s/[[:space:]]*mymachines//' \
  588. -e '/^hosts:/ {/resolve/! s/files/resolve [!UNAVAIL=return] files/}' ) \
  589. $(if $(BR2_PACKAGE_SYSTEMD_MYHOSTNAME), \
  590. -e '/^hosts:/ {/myhostname/! s/files/files myhostname/}' ) \
  591. $(if $(BR2_PACKAGE_SYSTEMD_MACHINED), \
  592. -e '/^hosts:/ {/mymachines/! s/^\(hosts:[[:space:]]*\)/\1mymachines /}' ) \
  593. $(TARGET_DIR)/etc/nsswitch.conf
  594. endef
  595. SYSTEMD_TARGET_FINALIZE_HOOKS += \
  596. SYSTEMD_INSTALL_NSSCONFIG_HOOK \
  597. SYSTEMD_INSTALL_RESOLVCONF_HOOK
  598. ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
  599. # systemd provides multiple units to autospawn getty as needed
  600. # * getty@.service to start a getty on normal TTY
  601. # * serial-getty@.service to start a getty on serial lines
  602. # * console-getty.service for generic /dev/console
  603. # * container-getty@.service for a getty on /dev/pts/*
  604. #
  605. # the generator systemd-getty-generator will
  606. # * read the console= kernel command line parameter
  607. # * enable one of the above units depending on what it finds
  608. #
  609. # Systemd defaults to enabling getty@tty1.service
  610. #
  611. # What we want to do
  612. # * Enable a getty on $BR2_TARGET_GENERIC_GETTY_PORT
  613. # * Set the baudrate for all units according to BR2_TARGET_GENERIC_GETTY_BAUDRATE
  614. # * Always enable a getty on the console using systemd-getty-generator
  615. # (backward compatibility with previous releases of buildroot)
  616. #
  617. # What we do
  618. # * disable getty@tty1 (enabled by upstream systemd)
  619. # * enable getty@xxx if $BR2_TARGET_GENERIC_GETTY_PORT is a tty
  620. # * enable serial-getty@xxx for other $BR2_TARGET_GENERIC_GETTY_PORT
  621. # * rewrite baudrates if a baudrate is provided
  622. define SYSTEMD_INSTALL_SERVICE_TTY
  623. mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d; \
  624. printf '[Install]\nDefaultInstance=\n' \
  625. >$(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d/buildroot-console.conf; \
  626. if [ $(BR2_TARGET_GENERIC_GETTY_PORT) = "console" ]; \
  627. then \
  628. : ; \
  629. elif echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
  630. then \
  631. printf '[Install]\nDefaultInstance=%s\n' \
  632. $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) \
  633. >$(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d/buildroot-console.conf; \
  634. else \
  635. mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/serial-getty@.service.d;\
  636. printf '[Install]\nDefaultInstance=%s\n' \
  637. $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) \
  638. >$(TARGET_DIR)/usr/lib/systemd/system/serial-getty@.service.d/buildroot-console.conf;\
  639. fi; \
  640. if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \
  641. then \
  642. $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/getty@.service; \
  643. $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/serial-getty@.service; \
  644. $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/console-getty@.service; \
  645. $(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/container-getty@.service; \
  646. fi
  647. endef
  648. endif
  649. define SYSTEMD_INSTALL_PRESET
  650. $(INSTALL) -D -m 644 $(SYSTEMD_PKGDIR)/80-buildroot.preset $(TARGET_DIR)/usr/lib/systemd/system-preset/80-buildroot.preset
  651. endef
  652. define SYSTEMD_INSTALL_INIT_SYSTEMD
  653. $(SYSTEMD_INSTALL_PRESET)
  654. $(SYSTEMD_INSTALL_SERVICE_TTY)
  655. $(SYSTEMD_INSTALL_NETWORK_CONFS)
  656. endef
  657. ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
  658. # Go through all files with scheme <basename>.<langext>.catalog
  659. # and remove those where <langext> is not in LOCALE_NOPURGE
  660. define SYSTEMD_LOCALE_PURGE_CATALOGS
  661. for cfile in `find $(TARGET_DIR)/usr/lib/systemd/catalog -name '*.*.catalog'`; \
  662. do \
  663. basename=$${cfile##*/}; \
  664. basename=$${basename%.catalog}; \
  665. langext=$${basename#*.}; \
  666. [ "$$langext" = "$${basename}" ] && continue; \
  667. expr '$(LOCALE_NOPURGE)' : ".*\b$${langext}\b" >/dev/null && continue; \
  668. rm -f "$$cfile"; \
  669. done
  670. endef
  671. SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_LOCALE_PURGE_CATALOGS
  672. endif
  673. ifeq ($(BR2_PACKAGE_SYSTEMD_CATALOGDB),y)
  674. define SYSTEMD_UPDATE_CATALOGS
  675. $(HOST_DIR)/bin/journalctl --root=$(TARGET_DIR) --update-catalog
  676. install -D $(TARGET_DIR)/var/lib/systemd/catalog/database \
  677. $(TARGET_DIR)/usr/share/factory/var/lib/systemd/catalog/database
  678. rm $(TARGET_DIR)/var/lib/systemd/catalog/database
  679. ln -sf /usr/share/factory/var/lib/systemd/catalog/database \
  680. $(TARGET_DIR)/var/lib/systemd/catalog/database
  681. grep -q '^L /var/lib/systemd/catalog/database' $(TARGET_DIR)/usr/lib/tmpfiles.d/var.conf || \
  682. printf "\nL /var/lib/systemd/catalog/database\n" >> $(TARGET_DIR)/usr/lib/tmpfiles.d/var.conf
  683. endef
  684. SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_UPDATE_CATALOGS
  685. endif
  686. define SYSTEMD_RM_CATALOG_UPDATE_SERVICE
  687. rm -rf $(TARGET_DIR)/usr/lib/systemd/catalog \
  688. $(TARGET_DIR)/usr/lib/systemd/system/systemd-journal-catalog-update.service \
  689. $(TARGET_DIR)/usr/lib/systemd/system/*/systemd-journal-catalog-update.service
  690. endef
  691. SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_CATALOG_UPDATE_SERVICE
  692. define SYSTEMD_PRESET_ALL
  693. $(HOST_DIR)/bin/systemctl --root=$(TARGET_DIR) preset-all
  694. endef
  695. SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_PRESET_ALL
  696. SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV)
  697. SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV)
  698. define SYSTEMD_LINUX_CONFIG_FIXUPS
  699. $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS)
  700. $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
  701. $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
  702. $(call KCONFIG_ENABLE_OPT,CONFIG_SIGNALFD)
  703. $(call KCONFIG_ENABLE_OPT,CONFIG_TIMERFD)
  704. $(call KCONFIG_ENABLE_OPT,CONFIG_EPOLL)
  705. $(call KCONFIG_ENABLE_OPT,CONFIG_UNIX)
  706. $(call KCONFIG_ENABLE_OPT,CONFIG_SYSFS)
  707. $(call KCONFIG_ENABLE_OPT,CONFIG_PROC_FS)
  708. $(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE)
  709. $(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
  710. $(call KCONFIG_DISABLE_OPT,CONFIG_SYSFS_DEPRECATED)
  711. $(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS_FS)
  712. $(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS)
  713. $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL)
  714. $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR)
  715. $(SYSTEMD_OOMD_LINUX_CONFIG_FIXUPS)
  716. endef
  717. # We need a very minimal host variant, so we disable as much as possible.
  718. HOST_SYSTEMD_CONF_OPTS = \
  719. -Dsplit-bin=true \
  720. -Dsplit-usr=false \
  721. --prefix=/usr \
  722. --libdir=lib \
  723. --sysconfdir=/etc \
  724. --localstatedir=/var \
  725. -Dcreate-log-dirs=false \
  726. -Dmode=release \
  727. -Dutmp=false \
  728. -Dhibernate=false \
  729. -Dldconfig=false \
  730. -Dresolve=false \
  731. -Dbootloader=false \
  732. -Defi=false \
  733. -Dtpm=false \
  734. -Denvironment-d=false \
  735. -Dbinfmt=false \
  736. -Drepart=false \
  737. -Dcoredump=false \
  738. -Ddbus=false \
  739. -Ddbus-interfaces-dir=no \
  740. -Dpstore=false \
  741. -Doomd=false \
  742. -Dlogind=false \
  743. -Dhostnamed=false \
  744. -Dlocaled=false \
  745. -Dmachined=false \
  746. -Dpasswdqc=false \
  747. -Dportabled=false \
  748. -Dsysext=false \
  749. -Dsysupdate=false \
  750. -Duserdb=false \
  751. -Dhomed=false \
  752. -Dnetworkd=false \
  753. -Dtimedated=false \
  754. -Dtimesyncd=false \
  755. -Dremote=false \
  756. -Dcreate-log-dirs=false \
  757. -Dnss-myhostname=false \
  758. -Dnss-mymachines=false \
  759. -Dnss-resolve=false \
  760. -Dnss-systemd=false \
  761. -Dfirstboot=false \
  762. -Drandomseed=false \
  763. -Dbacklight=false \
  764. -Dvconsole=false \
  765. -Dquotacheck=false \
  766. -Dsysusers=false \
  767. -Dtmpfiles=true \
  768. -Dimportd=false \
  769. -Dhwdb=true \
  770. -Drfkill=false \
  771. -Dman=false \
  772. -Dhtml=false \
  773. -Dsmack=false \
  774. -Dpolkit=false \
  775. -Dblkid=false \
  776. -Didn=false \
  777. -Dadm-group=false \
  778. -Dwheel-group=false \
  779. -Dzlib=false \
  780. -Dgshadow=false \
  781. -Dima=false \
  782. -Dtests=false \
  783. -Dglib=false \
  784. -Dacl=false \
  785. -Dsysvinit-path='' \
  786. -Dinitrd=false \
  787. -Dxdg-autostart=false \
  788. -Dkernel-install=false \
  789. -Dukify=false \
  790. -Danalyze=false \
  791. -Dlibcryptsetup=false \
  792. -Daudit=false \
  793. -Dxenctrl=false \
  794. -Dzstd=false
  795. HOST_SYSTEMD_DEPENDENCIES = \
  796. $(BR2_COREUTILS_HOST_DEPENDENCY) \
  797. host-util-linux \
  798. host-patchelf \
  799. host-libcap \
  800. host-gperf \
  801. host-python-jinja2
  802. HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
  803. # Fix RPATH After installation
  804. # * systemd provides a install_rpath instruction to meson because the binaries
  805. # need to link with libsystemd which is not in a standard path
  806. # * meson can only replace the RPATH, not append to it
  807. # * the original rpath is thus lost.
  808. # * the original path had been tweaked by buildroot via LDFLAGS to add
  809. # $(HOST_DIR)/lib
  810. # * thus re-tweak rpath after the installation for all binaries that need it
  811. HOST_SYSTEMD_HOST_TOOLS = busctl journalctl systemctl systemd-* udevadm
  812. define HOST_SYSTEMD_FIX_RPATH
  813. for f in $(addprefix $(HOST_DIR)/bin/,$(HOST_SYSTEMD_HOST_TOOLS)); do \
  814. [ -e $$f ] || continue; \
  815. $(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $${f} \
  816. || exit 1; \
  817. done
  818. endef
  819. HOST_SYSTEMD_POST_INSTALL_HOOKS += HOST_SYSTEMD_FIX_RPATH
  820. $(eval $(meson-package))
  821. $(eval $(host-meson-package))