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

sys-apps/systemd: bump to systemd v242 and adjust ebuilds #71

Merged
merged 1 commit into from Sep 17, 2019

Conversation

@dongsupark
Copy link
Contributor

commented Sep 6, 2019

Make the ebuild work with systemd v242.

  • Remove unnecessary checks for enabled units under /etc/systemd/system, because upstream commit changed the behavior of systemd, so that it does not enable units any more under /etc/systemd/system.
  • Import some code from upstream Gentoo.
  • update commit ID to include v242-flatcar changes

This PR should be merged together with flatcar-linux/systemd#4.

@dongsupark dongsupark added the edge label Sep 6, 2019
@pothos

This comment has been minimized.

Copy link

commented Sep 13, 2019

When I use this with Lokomotive through libvirt the network does not come up.

@pothos

This comment has been minimized.

Copy link

commented Sep 13, 2019

Hm, I also can't log in when using the qemu script anymore, but I had tested this before (I think), strange.

@pothos

This comment has been minimized.

Copy link

commented Sep 16, 2019

Yes, systemd-resolved and systemd-networkd are not enabled.

@pothos

This comment has been minimized.

Copy link

commented Sep 16, 2019

I will try a build with this:

diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
index dcfed77e7..6ad4d6e2a 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -381,6 +381,11 @@ multilib_src_install_all() {
        # Don't set any extra environment variables by default
        rm "${ED}/usr/lib/environment.d/99-environment.conf" || die
 
+       for f in systemd-networkd.service systemd-resolved.service
+       do
+               dosym ../"${f}" "${unitdir}/multi-user.target.wants/${f}"
+       done
+
        # Do not enable random services if /etc was detected as empty!!!
        rm "${ED}$(usex split-usr '' /usr)/lib/systemd/system-preset/90-systemd.preset" || die
        insinto $(usex split-usr '' /usr)/lib/systemd/system-preset
@pothos

This comment has been minimized.

Copy link

commented Sep 16, 2019

The above worked, next try is:

diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
index dcfed77e7..c08b32f19 100644
--- a/sys-apps/systemd/systemd-9999.ebuild
+++ b/sys-apps/systemd/systemd-9999.ebuild
@@ -381,6 +381,9 @@ multilib_src_install_all() {
        # Don't set any extra environment variables by default
        rm "${ED}/usr/lib/environment.d/99-environment.conf" || die
 
+       systemd_enable_service multi-user.target systemd-networkd.service
+       systemd_enable_service multi-user.target systemd-resolved.service
+
        # Do not enable random services if /etc was detected as empty!!!
        rm "${ED}$(usex split-usr '' /usr)/lib/systemd/system-preset/90-systemd.preset" || die
        insinto $(usex split-usr '' /usr)/lib/systemd/system-preset
@pothos

This comment has been minimized.

Copy link

commented Sep 16, 2019

Interesting, with systemd_enable_service they got started and then they terminate. It works but networkctl says unmanaged. Edit: my error, had to correct the paths above.

@pothos pothos force-pushed the dongsu/systemd-v242 branch from 7218cd9 to 02736d7 Sep 16, 2019
@pothos

This comment has been minimized.

Copy link

commented Sep 16, 2019

Have force-pushed the fix.

@pothos
pothos approved these changes Sep 16, 2019
Make the ebuild work with systemd v242.

* Remove unnecessary checks for enabled units under
  `/etc/systemd/system`, because upstream commit [1] changed the
  behavior of systemd, so that it does not enable units any more under
  `/etc/systemd/system`.
* Import some code from upstream Gentoo.
* update commit ID to include v242-flatcar changes

[1] systemd/systemd@01d2041
@pothos pothos force-pushed the dongsu/systemd-v242 branch from 02736d7 to 8b93c01 Sep 16, 2019
@dongsupark

This comment has been minimized.

Copy link
Contributor Author

commented Sep 17, 2019

@pothos Yes, you change looks good to me. Thanks!
I'm still not completely sure if this is the only way.
I have expected the ebuild from Gentoo upstream to work better than it actually does.
Anyway it's only a change in Edge channel, we still have chances for further improvements.
Let's merge it.

@dongsupark dongsupark merged commit b45b6ba into flatcar-master-edge Sep 17, 2019
@dongsupark dongsupark deleted the dongsu/systemd-v242 branch Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.