* [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET @ 2022-07-19 13:16 Norbert Lange 2022-07-19 13:16 ` [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system Norbert Lange 2022-07-19 15:41 ` [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET Yann E. MORIN 0 siblings, 2 replies; 8+ messages in thread From: Norbert Lange @ 2022-07-19 13:16 UTC (permalink / raw) To: buildroot; +Cc: Norbert Lange, Yann E. MORIN Once you allow systemd to be build while not using it as init system, the variable will be mpty and the build fails. Signed-off-by: Norbert Lange <nolange79@gmail.com> --- package/systemd/systemd.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index b6fffc553f..1510437617 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -586,7 +586,7 @@ SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME) endif define SYSTEMD_INSTALL_INIT_HOOK - ln -fs "$(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET))" \ + ln -fs "$(or $(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET)),multi-user.target)" \ $(TARGET_DIR)/usr/lib/systemd/system/default.target endef -- 2.35.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system 2022-07-19 13:16 [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET Norbert Lange @ 2022-07-19 13:16 ` Norbert Lange 2022-07-19 15:45 ` Yann E. MORIN 2022-07-19 15:41 ` [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET Yann E. MORIN 1 sibling, 1 reply; 8+ messages in thread From: Norbert Lange @ 2022-07-19 13:16 UTC (permalink / raw) To: buildroot; +Cc: Norbert Lange, Yann E. MORIN Allow systemd to be built as normal package, this for example allows building systemd-boot without any init system. Signed-off-by: Norbert Lange <nolange79@gmail.com> --- package/systemd/Config.in | 1 - 1 file changed, 1 deletion(-) diff --git a/package/systemd/Config.in b/package/systemd/Config.in index 9f1a778e59..e0f5dbce0d 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -16,7 +16,6 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS menuconfig BR2_PACKAGE_SYSTEMD bool "systemd" - depends on BR2_INIT_SYSTEMD depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS depends on BR2_USE_MMU depends on !BR2_STATIC_LIBS # kmod -- 2.35.1 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system 2022-07-19 13:16 ` [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system Norbert Lange @ 2022-07-19 15:45 ` Yann E. MORIN 2022-07-21 14:59 ` Norbert Lange 2022-07-22 21:29 ` Arnout Vandecappelle 0 siblings, 2 replies; 8+ messages in thread From: Yann E. MORIN @ 2022-07-19 15:45 UTC (permalink / raw) To: Norbert Lange; +Cc: buildroot Norbert, All, On 2022-07-19 15:16 +0200, Norbert Lange spake thusly: > Allow systemd to be built as normal package, this for example > allows building systemd-boot without any init system. How has the situation with upstream evolved since last time the topic was raised here: https://lore.kernel.org/buildroot/cover.1545814334.git.yann.morin.1998@free.fr/#t and especially the sub-thread: https://lore.kernel.org/buildroot/d38239f86f99924e87dcb6e045b2de3ac0cb435f.1545814334.git.yann.morin.1998@free.fr/ As far as I know (and understand), upstream has decided to tie the build of systemd-boot (formerly the standalone gummiboot) to the build of the rest of the systemd suite; they did not accept to make it possible to only build systemd-boot to use it outside the systemd ecosystem. From Buildroot's perspective, allowing to build systemd without it being an init system, and without the possibility to just build systemd-boot, is asking for troubles down the line. The triviality of your patch does not make it possible to only just build systemd-boot; instead, it still builds the whole systemd suite, which hints that upstream did not make it possible to do separate builds. So, unless things have evolved substantially, I am not very fond of alowing this, and stand by the decision that was made back then (i.e. abide by upstream decision and tie systemd-boot to the systemd ecosystem). Regards, Yann E. MORIN. > Signed-off-by: Norbert Lange <nolange79@gmail.com> > --- > package/systemd/Config.in | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/package/systemd/Config.in b/package/systemd/Config.in > index 9f1a778e59..e0f5dbce0d 100644 > --- a/package/systemd/Config.in > +++ b/package/systemd/Config.in > @@ -16,7 +16,6 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS > > menuconfig BR2_PACKAGE_SYSTEMD > bool "systemd" > - depends on BR2_INIT_SYSTEMD > depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS > depends on BR2_USE_MMU > depends on !BR2_STATIC_LIBS # kmod > -- > 2.35.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system 2022-07-19 15:45 ` Yann E. MORIN @ 2022-07-21 14:59 ` Norbert Lange 2022-07-22 21:23 ` Arnout Vandecappelle 2022-07-22 21:29 ` Arnout Vandecappelle 1 sibling, 1 reply; 8+ messages in thread From: Norbert Lange @ 2022-07-21 14:59 UTC (permalink / raw) To: Yann E. MORIN; +Cc: buildroot Am Di., 19. Juli 2022 um 17:45 Uhr schrieb Yann E. MORIN <yann.morin.1998@free.fr>: > > Norbert, All, > > On 2022-07-19 15:16 +0200, Norbert Lange spake thusly: > > Allow systemd to be built as normal package, this for example > > allows building systemd-boot without any init system. > > How has the situation with upstream evolved since last time the topic > was raised here: > https://lore.kernel.org/buildroot/cover.1545814334.git.yann.morin.1998@free.fr/#t > and especially the sub-thread: > https://lore.kernel.org/buildroot/d38239f86f99924e87dcb6e045b2de3ac0cb435f.1545814334.git.yann.morin.1998@free.fr/ > > As far as I know (and understand), upstream has decided to tie the build > of systemd-boot (formerly the standalone gummiboot) to the build of the > rest of the systemd suite; they did not accept to make it possible to > only build systemd-boot to use it outside the systemd ecosystem. > > From Buildroot's perspective, allowing to build systemd without it being > an init system, and without the possibility to just build systemd-boot, > is asking for troubles down the line. > > The triviality of your patch does not make it possible to only just > build systemd-boot; instead, it still builds the whole systemd suite, > which hints that upstream did not make it possible to do separate > builds. This was an example, and I do just that, even you built more than just systemd-boot, picking "no init" speeds things up a bit. > So, unless things have evolved substantially, I am not very fond of > alowing this, and stand by the decision that was made back then (i.e. > abide by upstream decision and tie systemd-boot to the systemd > ecosystem). I want to build systemd without using it as init system. Is there any reason to artificially prohibit that? It's just a regular package for me. Norbert _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system 2022-07-21 14:59 ` Norbert Lange @ 2022-07-22 21:23 ` Arnout Vandecappelle 0 siblings, 0 replies; 8+ messages in thread From: Arnout Vandecappelle @ 2022-07-22 21:23 UTC (permalink / raw) To: Norbert Lange, Yann E. MORIN; +Cc: buildroot On 21/07/2022 16:59, Norbert Lange wrote: > Am Di., 19. Juli 2022 um 17:45 Uhr schrieb Yann E. MORIN > <yann.morin.1998@free.fr>: >> >> Norbert, All, >> >> On 2022-07-19 15:16 +0200, Norbert Lange spake thusly: >>> Allow systemd to be built as normal package, this for example >>> allows building systemd-boot without any init system. >> >> How has the situation with upstream evolved since last time the topic >> was raised here: >> https://lore.kernel.org/buildroot/cover.1545814334.git.yann.morin.1998@free.fr/#t >> and especially the sub-thread: >> https://lore.kernel.org/buildroot/d38239f86f99924e87dcb6e045b2de3ac0cb435f.1545814334.git.yann.morin.1998@free.fr/ >> >> As far as I know (and understand), upstream has decided to tie the build >> of systemd-boot (formerly the standalone gummiboot) to the build of the >> rest of the systemd suite; they did not accept to make it possible to >> only build systemd-boot to use it outside the systemd ecosystem. >> >> From Buildroot's perspective, allowing to build systemd without it being >> an init system, and without the possibility to just build systemd-boot, >> is asking for troubles down the line. >> >> The triviality of your patch does not make it possible to only just >> build systemd-boot; instead, it still builds the whole systemd suite, >> which hints that upstream did not make it possible to do separate >> builds. > > This was an example, and I do just that, even you built more than just > systemd-boot, picking "no init" speeds things up a bit. > >> So, unless things have evolved substantially, I am not very fond of >> alowing this, and stand by the decision that was made back then (i.e. >> abide by upstream decision and tie systemd-boot to the systemd >> ecosystem). > > I want to build systemd without using it as init system. Is there any > reason to artificially prohibit that? > It's just a regular package for me. AFAIU, systemd will unconditionally install /sbin/init, which will conflict with the other init system you have defined. So to complete this patch you should make the prompt depend on BR2_INIT_NONE. Same reasoning for udev (possible conflict with eudev), I'm not sure how to fix that one. There may be other conflicts as well, but the autobuilders will report those (once we re-enable the conflict check...). Regards, Arnout > > Norbert > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system 2022-07-19 15:45 ` Yann E. MORIN 2022-07-21 14:59 ` Norbert Lange @ 2022-07-22 21:29 ` Arnout Vandecappelle 2022-07-23 10:34 ` Arnout Vandecappelle 1 sibling, 1 reply; 8+ messages in thread From: Arnout Vandecappelle @ 2022-07-22 21:29 UTC (permalink / raw) To: Yann E. MORIN, Norbert Lange; +Cc: buildroot On 19/07/2022 17:45, Yann E. MORIN wrote: > Norbert, All, > > On 2022-07-19 15:16 +0200, Norbert Lange spake thusly: >> Allow systemd to be built as normal package, this for example >> allows building systemd-boot without any init system. > > How has the situation with upstream evolved since last time the topic > was raised here: > https://lore.kernel.org/buildroot/cover.1545814334.git.yann.morin.1998@free.fr/#t > and especially the sub-thread: > https://lore.kernel.org/buildroot/d38239f86f99924e87dcb6e045b2de3ac0cb435f.1545814334.git.yann.morin.1998@free.fr/ > > As far as I know (and understand), upstream has decided to tie the build > of systemd-boot (formerly the standalone gummiboot) to the build of the > rest of the systemd suite; they did not accept to make it possible to > only build systemd-boot to use it outside the systemd ecosystem. > > From Buildroot's perspective, allowing to build systemd without it being > an init system, and without the possibility to just build systemd-boot, > is asking for troubles down the line. However, it does make sense if you're not actually building a full system. That's not a use case that is really well supported by buildroot, but we shouldn't go out of our way to actively block that use case. I've been thinking for a while to make an explicit option for this, which would basically override/disable all the system/Config.in stuff. There's just one thing though: in such a use case, ou probably do still want to install the appropriate init scripts, so setting BR2_INIT_NONE is not exactly the correct either... Regards, Arnout > > The triviality of your patch does not make it possible to only just > build systemd-boot; instead, it still builds the whole systemd suite, > which hints that upstream did not make it possible to do separate > builds. > > So, unless things have evolved substantially, I am not very fond of > alowing this, and stand by the decision that was made back then (i.e. > abide by upstream decision and tie systemd-boot to the systemd > ecosystem). > > Regards, > Yann E. MORIN. > >> Signed-off-by: Norbert Lange <nolange79@gmail.com> >> --- >> package/systemd/Config.in | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/package/systemd/Config.in b/package/systemd/Config.in >> index 9f1a778e59..e0f5dbce0d 100644 >> --- a/package/systemd/Config.in >> +++ b/package/systemd/Config.in >> @@ -16,7 +16,6 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS >> >> menuconfig BR2_PACKAGE_SYSTEMD >> bool "systemd" >> - depends on BR2_INIT_SYSTEMD >> depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS >> depends on BR2_USE_MMU >> depends on !BR2_STATIC_LIBS # kmod >> -- >> 2.35.1 >> >> _______________________________________________ >> buildroot mailing list >> buildroot@buildroot.org >> https://lists.buildroot.org/mailman/listinfo/buildroot > _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system 2022-07-22 21:29 ` Arnout Vandecappelle @ 2022-07-23 10:34 ` Arnout Vandecappelle 0 siblings, 0 replies; 8+ messages in thread From: Arnout Vandecappelle @ 2022-07-23 10:34 UTC (permalink / raw) To: Yann E. MORIN, Norbert Lange; +Cc: buildroot On 22/07/2022 23:29, Arnout Vandecappelle wrote: > > > On 19/07/2022 17:45, Yann E. MORIN wrote: >> Norbert, All, >> >> On 2022-07-19 15:16 +0200, Norbert Lange spake thusly: >>> Allow systemd to be built as normal package, this for example >>> allows building systemd-boot without any init system. >> >> How has the situation with upstream evolved since last time the topic >> was raised here: >> https://lore.kernel.org/buildroot/cover.1545814334.git.yann.morin.1998@free.fr/#t >> and especially the sub-thread: >> https://lore.kernel.org/buildroot/d38239f86f99924e87dcb6e045b2de3ac0cb435f.1545814334.git.yann.morin.1998@free.fr/ >> >> As far as I know (and understand), upstream has decided to tie the build >> of systemd-boot (formerly the standalone gummiboot) to the build of the >> rest of the systemd suite; they did not accept to make it possible to >> only build systemd-boot to use it outside the systemd ecosystem. >> >> From Buildroot's perspective, allowing to build systemd without it being >> an init system, and without the possibility to just build systemd-boot, >> is asking for troubles down the line. > > However, it does make sense if you're not actually building a full system. > That's not a use case that is really well supported by buildroot, but we > shouldn't go out of our way to actively block that use case. ... on the other hand, you can just select systemd as the init system even in that case. In the end, its only effects are: - using the systemd skeleton rather than the empty skeleton; - installing the systemd unit files for packages. The skeleton is not much of an overhead and is probably what you want anyway; the systemd unit files you probably want as well, as I observed before. So simply use BR2_INIT_SYSTEMD even if you're not actually using any init. Regards, Arnout > > I've been thinking for a while to make an explicit option for this, which > would basically override/disable all the system/Config.in stuff. There's just > one thing though: in such a use case, ou probably do still want to install the > appropriate init scripts, so setting BR2_INIT_NONE is not exactly the correct > either... > > Regards, > Arnout > >> >> The triviality of your patch does not make it possible to only just >> build systemd-boot; instead, it still builds the whole systemd suite, >> which hints that upstream did not make it possible to do separate >> builds. >> >> So, unless things have evolved substantially, I am not very fond of >> alowing this, and stand by the decision that was made back then (i.e. >> abide by upstream decision and tie systemd-boot to the systemd >> ecosystem). >> >> Regards, >> Yann E. MORIN. >> >>> Signed-off-by: Norbert Lange <nolange79@gmail.com> >>> --- >>> package/systemd/Config.in | 1 - >>> 1 file changed, 1 deletion(-) >>> >>> diff --git a/package/systemd/Config.in b/package/systemd/Config.in >>> index 9f1a778e59..e0f5dbce0d 100644 >>> --- a/package/systemd/Config.in >>> +++ b/package/systemd/Config.in >>> @@ -16,7 +16,6 @@ config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS >>> menuconfig BR2_PACKAGE_SYSTEMD >>> bool "systemd" >>> - depends on BR2_INIT_SYSTEMD >>> depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS >>> depends on BR2_USE_MMU >>> depends on !BR2_STATIC_LIBS # kmod >>> -- >>> 2.35.1 >>> >>> _______________________________________________ >>> buildroot mailing list >>> buildroot@buildroot.org >>> https://lists.buildroot.org/mailman/listinfo/buildroot >> _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET 2022-07-19 13:16 [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET Norbert Lange 2022-07-19 13:16 ` [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system Norbert Lange @ 2022-07-19 15:41 ` Yann E. MORIN 1 sibling, 0 replies; 8+ messages in thread From: Yann E. MORIN @ 2022-07-19 15:41 UTC (permalink / raw) To: Norbert Lange; +Cc: buildroot Norbert, All, On 2022-07-19 15:16 +0200, Norbert Lange spake thusly: > Once you allow systemd to be build while not using it as init > system, the variable will be mpty and the build fails. A better commit log would be: Currently, we forcefully require that a default target be specified. However, systemd does install a default target, but it's not possible to just use that target. Allow the user to blank-out the config setting to not override whatever systemd installed and keep that. (I don't think we want to be able to build systemd when it is not selected as an init system, so we should not refer to that in the commit log; see my reply to your next patch...) > Signed-off-by: Norbert Lange <nolange79@gmail.com> > --- > package/systemd/systemd.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk > index b6fffc553f..1510437617 100644 > --- a/package/systemd/systemd.mk > +++ b/package/systemd/systemd.mk > @@ -586,7 +586,7 @@ SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME) > endif > > define SYSTEMD_INSTALL_INIT_HOOK > - ln -fs "$(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET))" \ > + ln -fs "$(or $(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET)),multi-user.target)" \ > $(TARGET_DIR)/usr/lib/systemd/system/default.target > endef Instead, the whole hook should be made conditional to whether the default target is to be overriden: SYSTEMD_DEFAULT_TARGET = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET)) ifneq ($(SYSTEMD_DEFAULT_TARGET),) define SYSTEMD_INSTALL_FORCE_TARGET ln -fs $(SYSTEMD_DEFAULT_TARGET) \ $(TARGET_DIR)/usr/lib/systemd/system/default.target endef SYSTEMD_POST_INSTALL_TARGET_HOOKS += SYSTEMD_INSTALL_FORCE_TARGET endif ... and drop the assignment a few lines later, of course. Regards, Yann E. MORIN. > -- > 2.35.1 > > _______________________________________________ > buildroot mailing list > buildroot@buildroot.org > https://lists.buildroot.org/mailman/listinfo/buildroot -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-07-23 10:34 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-07-19 13:16 [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET Norbert Lange 2022-07-19 13:16 ` [Buildroot] [PATCH 2/2] package/systemd: allow package to be used without init system Norbert Lange 2022-07-19 15:45 ` Yann E. MORIN 2022-07-21 14:59 ` Norbert Lange 2022-07-22 21:23 ` Arnout Vandecappelle 2022-07-22 21:29 ` Arnout Vandecappelle 2022-07-23 10:34 ` Arnout Vandecappelle 2022-07-19 15:41 ` [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET Yann E. MORIN
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.