All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Norbert Lange <nolange79@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/systemd: allow empty SYSTEMD_DEFAULT_TARGET
Date: Tue, 19 Jul 2022 17:41:20 +0200	[thread overview]
Message-ID: <20220719154120.GI2249625@scaer> (raw)
In-Reply-To: <20220719131605.337057-1-nolange79@gmail.com>

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

      parent reply	other threads:[~2022-07-19 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220719154120.GI2249625@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=nolange79@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.