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

vendor wicked service units #1798

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/wicked/0001-avoid-gcrypt-dependency.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From e7c79e21ea1110155660587b084fdae1e1ca7df1 Mon Sep 17 00:00:00 2001
From d7c3d65bf98d3695bfb2a831b1a6b3c65aa2a9fd Mon Sep 17 00:00:00 2001
From: Ben Cressey <bcressey@amazon.com>
Date: Fri, 9 Aug 2019 16:39:28 +0000
Subject: [PATCH 1/3] avoid gcrypt dependency
Expand All @@ -20,10 +20,10 @@ Signed-off-by: Ben Cressey <bcressey@amazon.com>
3 files changed, 15 insertions(+), 83 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8ed0e2a..9721991 100644
index 08df65c..b94dcf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -249,14 +249,6 @@ AC_CHECK_LIB([anl], [getaddrinfo_a], [LIBANL_LIBS="-lanl"],[
@@ -242,14 +242,6 @@ AC_CHECK_LIB([anl], [getaddrinfo_a], [LIBANL_LIBS="-lanl"],[
])
AC_SUBST(LIBANL_LIBS)

Expand Down Expand Up @@ -160,7 +160,7 @@ index 4fc0dfc..eeb41ee 100644
}

diff --git a/src/netinfo.c b/src/netinfo.c
index 6a1348c..dcf0ec7 100644
index 9598155..63bb6a9 100644
--- a/src/netinfo.c
+++ b/src/netinfo.c
@@ -33,7 +33,6 @@
Expand Down Expand Up @@ -227,5 +227,5 @@ index 6a1348c..dcf0ec7 100644
if (appname == NULL) {
/* Backward compatible - for now.
--
2.21.0
2.21.3

8 changes: 4 additions & 4 deletions packages/wicked/0002-exclude-unused-components.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 07708281e6caae63d207e3640a1a92f4b8c9474f Mon Sep 17 00:00:00 2001
From 73a6d2a91625771f2b3c87651fe234ac4dae4e75 Mon Sep 17 00:00:00 2001
From: Ben Cressey <bcressey@amazon.com>
Date: Sat, 10 Aug 2019 04:53:31 +0000
Subject: [PATCH 2/3] exclude unused components
Expand All @@ -14,18 +14,18 @@ Signed-off-by: Ben Cressey <bcressey@amazon.com>
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 8f6bffc..fcac7be 100644
index 8f6bffc..2fa645a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.* \
$(DIST_ARCHIVES) $(PACKAGE)-*.tar.bz2

SUBDIRS = include src util schema client server nanny \
- autoip4 dhcp4 dhcp6 etc extensions man doc testing
+ autoip4 dhcp4 dhcp6 etc
+ dhcp4 dhcp6 etc


pkgconfig_DATA = wicked.pc
--
2.21.0
2.21.3

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 859c79f5df14d9cff3383b6ee2709080f38b88c4 Mon Sep 17 00:00:00 2001
From d108d9eee746b0d9a03f8fd124cbf651da9ba254 Mon Sep 17 00:00:00 2001
From: Ben Cressey <bcressey@amazon.com>
Date: Sat, 10 Aug 2019 18:31:42 +0000
Subject: [PATCH 3/3] ship mkconst and schema sources for runtime use
Expand Down Expand Up @@ -44,5 +44,5 @@ index 2af1435..bb9697e 100644
AM_CPPFLAGS = -I$(top_srcdir)/src \
-I$(top_srcdir)/include
--
2.21.0
2.21.3

18 changes: 18 additions & 0 deletions packages/wicked/wicked.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=wicked managed network interfaces
Wants=network.target wickedd.service wickedd-nanny.service
After=network-pre.target wickedd.service wickedd-nanny.service
Before=network-online.target network.target

[Service]
Type=oneshot
RemainAfterExit=yes
LimitCORE=infinity
ExecStart=/usr/sbin/wicked --systemd ifup all
ExecStop=/usr/sbin/wicked --systemd ifdown all
ExecReload=/usr/sbin/wicked --systemd ifreload all

[Install]
WantedBy=multi-user.target network-online.target
Alias=network.service
Also=wickedd.service
27 changes: 24 additions & 3 deletions packages/wicked/wicked.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ Source12: common.xml
Source13: nanny.xml
Source14: server.xml

# Override service units to make it easier to pass new options.
Source20: wicked.service
Source21: wickedd.service
Source22: wickedd-dhcp4.service
Source23: wickedd-dhcp6.service
Source24: wickedd-nanny.service

%if %{without bootstrap}
Source99: constants.xml
%endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't use auto4, can we also remove autoip4 in 0002-exclude-unused-components.patch?

Expand Down Expand Up @@ -89,6 +96,10 @@ install -p -m 0644 %{S:11} %{S:12} %{S:13} %{S:14} \
install -d %{buildroot}%{_cross_tmpfilesdir}
install -p -m 0644 %{S:10} %{buildroot}%{_cross_tmpfilesdir}/wicked.conf

rm -f %{buildroot}%{_cross_unitdir}/*.service
install -p -m 0644 %{S:20} %{S:21} %{S:22} %{S:23} %{S:24} \
%{buildroot}%{_cross_unitdir}

%if %{without bootstrap}
# install our pre-generated constants
install -p -m 0644 %{S:99} %{buildroot}%{_cross_datadir}/wicked/schema/constants.xml
Expand All @@ -106,10 +117,20 @@ install -p -m 0644 %{S:99} %{buildroot}%{_cross_datadir}/wicked/schema/constants
%exclude %{_cross_sbindir}/mkconst
%endif
%dir %{_cross_libexecdir}/wicked
%{_cross_libexecdir}/wicked/*
%dir %{_cross_libexecdir}/wicked/bin
%{_cross_libexecdir}/wicked/bin/wickedd-dhcp4
%{_cross_libexecdir}/wicked/bin/wickedd-dhcp6
%{_cross_libdir}/libwicked-%{version}.so
%{_cross_unitdir}/wicked*.service
%{_cross_datadir}/dbus-1/system.d/*.conf
%{_cross_unitdir}/wicked.service
%{_cross_unitdir}/wickedd.service
%{_cross_unitdir}/wickedd-dhcp4.service
%{_cross_unitdir}/wickedd-dhcp6.service
%{_cross_unitdir}/wickedd-nanny.service
%{_cross_datadir}/dbus-1/system.d/org.opensuse.Network.DHCP4.conf
%{_cross_datadir}/dbus-1/system.d/org.opensuse.Network.DHCP6.conf
%{_cross_datadir}/dbus-1/system.d/org.opensuse.Network.Nanny.conf
%{_cross_datadir}/dbus-1/system.d/org.opensuse.Network.conf
%exclude %{_cross_datadir}/dbus-1/system.d/org.opensuse.Network.AUTO4.conf
%dir %{_cross_datadir}/wicked
%{_cross_datadir}/wicked/*
%if %{without bootstrap}
Expand Down
13 changes: 13 additions & 0 deletions packages/wicked/wickedd-dhcp4.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=wicked DHCPv4 supplicant service
Requisite=dbus.service
After=local-fs.target dbus.service network-pre.target
Before=wickedd.service wicked.service network.target
PartOf=wickedd.service

[Service]
Type=notify
LimitCORE=infinity
ExecStart=/usr/libexec/wicked/bin/wickedd-dhcp4 --systemd --foreground
StandardError=null
Restart=on-abort
13 changes: 13 additions & 0 deletions packages/wicked/wickedd-dhcp6.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=wicked DHCPv6 supplicant service
Requisite=dbus.service
After=local-fs.target dbus.service network-pre.target
Before=wickedd.service wicked.service network.target
PartOf=wickedd.service

[Service]
Type=notify
LimitCORE=infinity
ExecStart=/usr/libexec/wicked/bin/wickedd-dhcp6 --systemd --foreground
StandardError=null
Restart=on-abort
13 changes: 13 additions & 0 deletions packages/wicked/wickedd-nanny.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=wicked network nanny service
Requisite=dbus.service
After=local-fs.target dbus.service network-pre.target wickedd.service
Before=wicked.service network.target
PartOf=wickedd.service

[Service]
Type=notify
LimitCORE=infinity
ExecStart=/usr/sbin/wickedd-nanny --systemd --foreground
StandardError=null
Restart=on-abort
18 changes: 18 additions & 0 deletions packages/wicked/wickedd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=wicked network management service daemon
Requisite=dbus.service
Wants=wickedd-nanny.service wickedd-dhcp6.service wickedd-dhcp4.service systemd-udev-settle.service
After=local-fs.target dbus.service network-pre.target systemd-udev-settle.service
Before=wickedd-nanny.service wicked.service network.target

[Service]
Type=notify
LimitCORE=infinity
ExecStart=/usr/sbin/wickedd --systemd --foreground
StandardError=null
Restart=on-abort

[Install]
Also=wickedd-nanny.service
Also=wickedd-dhcp4.service
Also=wickedd-dhcp6.service