Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: create enablement symlinks in /etc during installation for cross builds #12769

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jameshilliard
Copy link
Contributor

We need to restore the previous behavior for cross builds since we often won't have access to a systemctl that can be executed on the build system.

This should hopefully resolve #12767.

@floppym
Copy link
Contributor

floppym commented Jun 11, 2019

I don't think it makes sense to couple this to cross compiling. If it really must be restored, maybe add a separate meson option for it.

@jameshilliard
Copy link
Contributor Author

Yeah, I'll do that.

…ss builds

We need to restore the previous behavior for cross builds since we often won't
have access to a systemctl that can be executed on the build system.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
@jameshilliard
Copy link
Contributor Author

I've added a link-units option.

@keszybz
Copy link
Member

keszybz commented Jun 11, 2019

I don't like this. I understand what why you want to do this, and why it makes sense in your circumstances, but I don't think the overall tradeoff is worth it for the project. Essentially, it comes down to re-implementing parts of the functionality of tools in the build system, because your host system is too old and too limited. That's something that should be solved at your end. I think building a second copy of systemd (with everything optional disabled) is an acceptable solution. -Dauto_features=disabled makes this pretty easy.

There are other steps which need to run in the installed image: journalctl --update-catalog, systemd-hwdb update, machine-id creation, etc. So it's not just systemctl that needs to be called. Overall, we're better off making the effort to use our "real" tooling to do this post-installation setup, rather than adding ad-hoc partial reimplementations.

And if calling the tools is not possible, we do preset-all at boot if /etc is empty. That's another solution to this issue.

@jameshilliard
Copy link
Contributor Author

Essentially, it comes down to re-implementing parts of the functionality of tools in the build system, because your host system is too old and too limited.

No, that's not the main reason, build systems like buildroot build everything from source including the toolchain itself, they intentionally do not rely on the toolchain that comes with the host OS for anything other than initial bootstrapping of the buildroot cross compilation toolchain to ensure reproducibility/consistency, having systemctl be a required part of the buildroot cross compilation toolchain significantly increases cross compliation complexity and points of failure.

That's something that should be solved at your end.

The only way buildroot could reasonably handle this is to build systemd twice which is not ideal, there's been a few other projects where this type of issue has come up and it's almost always a huge pain to deal with.

There are other steps which need to run in the installed image: journalctl --update-catalog, systemd-hwdb update, machine-id creation, etc.

Aren't these typically done at runtime on the target system?

And if calling the tools is not possible, we do preset-all at boot if /etc is empty. That's another solution to this issue.

That's not really a viable option IMO, it wouldn't work for read only rootfs builds from what I can tell.

@jktjkt
Copy link
Contributor

jktjkt commented Jun 11, 2019

Essentially, it comes down to re-implementing parts of the functionality of tools in the build system, because your host system is too old and too limited.

It is really just about not calling native code (built for target) on the build machine. An outdated host system is not an issue (for example, my Buildroot configuration uses GCC 8.3).

The other tools you mention (machine-id(5) setup, for example) run on the target once it boots. That's perfectly OK.

The original commit mentions concerns about not overwriting end users' configuration. Is there a reason why these enabling symlinks go to /etc instead of /lib/systemd/system/multi-user.target.wants/? That way, users would be free to keep their configuration in /etc while the vendor presets in /lib would remain, well, static vendor presets.

I think building a second copy of systemd (with everything optional disabled) is an acceptable solution. -Dauto_features=disabled makes this pretty easy.

It's doable, and Buildroot comes with excellent support for this. However, it has costs (time and energy in repeated CI builds and a slower turnaround), and if this is only about installing a couple of symlinks, I think it makes sense to look into alternatives.

@mbiebl
Copy link
Contributor

mbiebl commented Jun 11, 2019

Having a second way of creating those symlinks, means that it's yet another option which is likely not tested well and bound to bitrot.
If you can't run preset-all in your cross-build during deployment time, couldn't you just create the enablement symlinks manually? After all, you probably want control over what services are active by default anyway.

@yuwata
Copy link
Member

yuwata commented Jun 11, 2019

I do not like this. Even if you manually create the simlink by ln, then the command comes from the host system. Why you do not want to use the host's systemctl. Though I may not catch your point correctly...

@jameshilliard
Copy link
Contributor Author

Why you do not want to use the host's systemctl.

Since you have no guarantees a particular host even has a useable systemctl you would have to build systemd twice. This adds quite a bit of unnecessary complexity to the build process.

@yuwata
Copy link
Member

yuwata commented Jun 11, 2019

My question is why you believe host's ln, but not systemctl.

jktjkt added a commit to jktjkt/systemd that referenced this pull request Jun 11, 2019
During the v242 cycle, a change was merged [1] which prevents creating
enablement symlinks for various services, including systemd-networkd.
The main reason described in the commit message was that this
auto-provisioning undoes configuration for those end users who choose to
disable some of these services on their system. For them, running `ninja
install` caused these services to become enabled again, which was not
expected. Running `systemctl preset-all` is documented to be required to
enable these services prior to the first boot.

This has implications for cross-compilations. A build machine cannot
execute binaries (such as `sysrepoctl`) which were just built for the
target. There are workarounds for this, including QEMU, but they are
needlesly complex.

Systemd has a concept of vendor presets, bits which are intended to
represent default configuration. These settings are in no way affected
by the end-user configuration. This patch simply takes all services
which were, prior to 01d2041, enabled by symlinks in
`/etc/systemd/system/`, and puts these into `/lib/systemd/system/`. This
means that the usual way of overriding and masking stuff via `/etc` is
available to express a user's configuration. The stuff below `/lib`
represents the default system state, and people are free to override
this "policy" via a configuration below `/etc`.

Closes systemd#12767, systemd#12769

[1] systemd@01d2041

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
jktjkt added a commit to jktjkt/systemd that referenced this pull request Jun 11, 2019
During the v242 cycle, a change was merged [1] which stopped creating
enablement symlinks for various services, including systemd-networkd.
The main reason described in the commit message was that this
auto-provisioning undoes configuration for those end users who chose to
disable some of these services on their systems. For them, running
`ninja install` caused these services to become enabled again, which was
not expected. Running `systemctl preset-all` is documented to be a
recommended step prior to the first boot.

This change has implications for cross-compilations. A build machine
cannot execute binaries (such as `sysrepoctl`) which were just built for
the target. There are workarounds for this, including QEMU, but they are
needlesly complex. Creating these symlinks by hand works, but it's yet
another manual step which can get out of sync from the actual code.

Systemd has a concept of vendor presets, bits which are intended to
represent default configuration "from the factory". These settings are
in no way affected by the end-user configuration. This patch simply
takes all services which were, prior to 01d2041, enabled by symlinks
in `/etc/systemd/system/`, and puts these into an appropriate `*.wants`
below the `/lib/systemd/system/`.  This means that the usual way of
overriding and masking stuff via `/etc` is available to express a user's
configuration. As before, stuff below `/lib` represents the default
system state, and people are free to override this "policy" via a
configuration below `/etc`.

There's one change for people who already grew accustomed to the v242's
behavior. They will now have to mask each corresponding unit (because
this "enablement" is not an "enablement" as in `systemctl is-enabled`).

Closes systemd#12767, systemd#12769

[1] systemd@01d2041

Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
@jktjkt
Copy link
Contributor

jktjkt commented Jun 11, 2019

As an alternative, I just submitted a PR which moves the enablement symlinks below lib/systemd/system/*.target.wants/. That way, there's no additional code path, and users can still make their preference and mask these services (or choose not to build them in the first place, as usual).

@jameshilliard
Copy link
Contributor Author

jameshilliard commented Jun 11, 2019

My question is why you believe host's ln, but not systemctl.

Buildroot actually carries a patch to deal with ln issues already. All build hosts should have at least a basic ln, however with systemctl that is not the case.

@boucman
Copy link
Contributor

boucman commented Jun 11, 2019

There are all sorts of cases similar to systemd in buildroot, these are how they are usually dealt with

  • never rely on the host version of the tool (risk of incompatible version)
  • cross-build the tools and cross install them in a dedicates directory/sysroot

So, there is nothing special with systemd here, and building the host systemd, properly installed seems the way to go. There are a couple of things that can be done to help the cross-generation use-case, though

  • Avoiding as much of the build as possible on the host, especially parts that might not be compatible between host and target (kernel headers, libc version)
  • Being able to cross-execute as much of the first boot as possible as a systemd build target. This is safer from a maintanenc PoV, since the systemd people are more able to know what needs to be done.

I'm not worried about building the host systemd (yeah, it's wasted build time... ) I'm more worried about the first boot stuff being done properly offline.

@jameshilliard
Copy link
Contributor Author

I wonder if we can build a systemctl binary that can be executed as part of the compilation process using this. That we can avoid having to build systemd twice.

@michaelolbrich
Copy link
Contributor

@jameshilliard that just makes it more complicated. We just need to be able to compile as little as possible. And more importantly, do it on a platform that is a lot older that systemd expects to run on.
Right now, I usually start by building new kernel headers just to compile some networking code (I think) that won't be used anyways.

But fixing that won't be easy either. This means splitting the the static and shared libraries in a way that allows us to just build the code necessary to build the needed tool. I has been a while since I looked into this, but something like that won't be easy to maintain either.

jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Jun 18, 2019
Removed patches that have been committed upstream.

Backport patches required to build systemd on older kernels.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Jun 18, 2019
Removed patches that have been committed upstream.

Backport patches required to build systemd on older kernels.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Jun 18, 2019
Removed patches that have been committed upstream.

Backport patches required to build systemd on older kernels.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
@poettering
Copy link
Member

I fail to see why systemd is in any way special here now? There are plenty of packages that build tools that are needed to build the rest, most build systems distinguish the host and the output compiler due to that, for example the linux kernel. Why do we need to cover this specfically, if tons of other projects need this too and our build system brings all the right distinctions of the two compilers already?

jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Jun 19, 2019
Removed patches that have been committed upstream.

Backport patches required to build systemd on older kernels.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
@jameshilliard
Copy link
Contributor Author

jameshilliard commented Jun 19, 2019

The main issue seems to be that systemctl is fairly dependency heavy for a build tool, especially one that is only creating a few symlinks. From my understanding build tools usually are designed to be fairly self contained and have minimal build host dependencies, which is not the case for systemctl.

jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 3, 2019
Removed patches that have been committed upstream.

Backport patches required to build systemd on older kernels.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 3, 2019
Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 3, 2019
Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 3, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

---
Sending this based on top of current systemd master which is in the
release candidate stage for v243. Hopefully anything that needs to be
sent upstream can be caught here before v243 final.
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 7, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

---
Sending this based on top of current systemd master which is in the
release candidate stage for v243. Hopefully anything that needs to be
sent upstream can be caught here before v243 final.
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 7, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

---
Sending this based on top of current systemd master which is in the
release candidate stage for v243. Hopefully anything that needs to be
sent upstream can be caught here before v243 final.
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Aug 7, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

---
Sending this based on top of current systemd master which is in the
release candidate stage for v243. Hopefully anything that needs to be
sent upstream can be caught here before v243 final.
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Sep 3, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Sep 26, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
vladimiroltean pushed a commit to vladimiroltean/openil-community that referenced this pull request Sep 29, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

[VO] Fixes: systemd/systemd#7478

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Oct 11, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Oct 12, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Oct 15, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Oct 24, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Oct 25, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
jameshilliard added a commit to jameshilliard/buildroot that referenced this pull request Oct 25, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
woodsts pushed a commit to woodsts/buildroot that referenced this pull request Oct 26, 2019
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Tested-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Joseph-Conley pushed a commit to LairdCP/wb-buildroot that referenced this pull request Jun 10, 2020
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Tested-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Base automatically changed from master to main January 21, 2021 11:54
@keszybz keszybz added the please-review PR is ready for (re-)review by a maintainer label Dec 8, 2022
@DaanDeMeyer DaanDeMeyer added needs-rebase and removed please-review PR is ready for (re-)review by a maintainer labels Jan 10, 2023
jhatler pushed a commit to rfpros/wb-buildroot that referenced this pull request Feb 2, 2023
Added config option for new systemd-pstore feature.

Removed patches that have been committed upstream.

Added symlinks required to enable some services.

After extensive discussion with upstream it does not seem there is any
acceptable option to have symlink installation handled on their side.

The recommended solution from upstream is to have systemctl handle
service installation, however this has a number of downsides such as
requiring us to build a host-systemd just to install a few symlinks.

Since we already customize service installation it is simpler for us
to create the symlinks ourselves, this will also simplify service
customization on our side as we will not need to disable any systemd
default services in cases where we need to make customizations.

In addition using systemctl would introduce a minimum host headers
dependency in which we don't have the infrastructure to handle
properly.

The downside to this approach is that we need to track service creation
changes from upstream ourselves, however this is relatively straightforward
and since upstream service file locations are relatively stable regressions
should be limited. This will mostly be a concern in regards to adding
support for new systemd features.

Details:
systemd/systemd#12767
systemd/systemd#12164
systemd/systemd#12769
systemd/systemd#12775

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Tested-by: Jérémy Rosen <jeremy.rosen@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

systemctl preset-all makes cross-compilation hard
10 participants