Message ID | 20201215163610.12070-1-edmundo.ferreira@esa.int |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/openvpn: adds target install of systemd unit files | expand |
On Tue, 15 Dec 2020 17:36:10 +0100 Edmundo Ferreira <fc.edmundo@gmail.com> wrote: > From: Edmundo Ferreira <fc.edmundo@gmail.com> > > Signed-off-by: Edmundo Ferreira <fc.edmundo@gmail.com> > --- > package/openvpn/openvpn.mk | 8 ++++++++ > 1 file changed, 8 insertions(+) Hum, I've applied, but reading again distro/systemd/Makefile.am, it seems like manually copying those files is not needed. If you pass --enable-systemd, which we already do when BR2_PACKAGE_SYSTEMD=y. Isn't that working ? Thanks, Thomas
On Thu, 31 Dec 2020 15:43:32 +0100 Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > Hum, I've applied, but reading again distro/systemd/Makefile.am, it > seems like manually copying those files is not needed. If you pass > --enable-systemd, which we already do when BR2_PACKAGE_SYSTEMD=y. Isn't > that working ? I found why: we had a custom OPENVPN_INSTALL_TARGET_CMDS instead of relying on the default "make install" behavior of the autotools-package infra. So, I made a follow-up commit that drops this as well as the custom systemd installation stuff, as "make install" does it all properly. See: https://git.buildroot.org/buildroot/commit/?id=30bc58d3766b240017120a25d843da0a2c5cf501 Best regards, Thomas
Indeed I just arrived at the same conclusion, that OPENVPN_INSTALL_TARGET_CMDS, was overriding the default autotools install. The following items get added now correctly to the target ./usr/share/doc/openvpn ./usr/include/openvpn-msg.h ./usr/include/openvpn-plugin.h ./usr/lib/systemd/system/openvpn-server@.service ./usr/lib/systemd/system/openvpn-client@.service ./usr/lib/openvpn ./usr/lib/openvpn/plugins/openvpn-plugin-auth-pam.la ./usr/lib/openvpn/plugins/openvpn-plugin-down-root.so ./usr/lib/openvpn/plugins/openvpn-plugin-auth-pam.so ./usr/lib/openvpn/plugins/openvpn-plugin-down-root.la ./usr/lib/tmpfiles.d/openvpn.conf ./usr/sbin/openvpn Add after the documentation, headers and statics libs (in my case shared only) get removed. ./usr/lib/systemd/system/openvpn-server@.service ./usr/lib/systemd/system/openvpn-client@.service ./usr/lib/openvpn ./usr/lib/openvpn/plugins/openvpn-plugin-down-root.so ./usr/lib/openvpn/plugins/openvpn-plugin-auth-pam.so ./usr/lib/tmpfiles.d/openvpn.conf ./usr/sbin/openvpn Thank you, for the fix. Best regards, Edmundo On Thu, Dec 31, 2020 at 5:31 PM Thomas Petazzoni < thomas.petazzoni@bootlin.com> wrote: > On Thu, 31 Dec 2020 15:43:32 +0100 > Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > > > Hum, I've applied, but reading again distro/systemd/Makefile.am, it > > seems like manually copying those files is not needed. If you pass > > --enable-systemd, which we already do when BR2_PACKAGE_SYSTEMD=y. Isn't > > that working ? > > I found why: we had a custom OPENVPN_INSTALL_TARGET_CMDS instead of > relying on the default "make install" behavior of the autotools-package > infra. So, I made a follow-up commit that drops this as well as the > custom systemd installation stuff, as "make install" does it all > properly. > > See: > > > https://git.buildroot.org/buildroot/commit/?id=30bc58d3766b240017120a25d843da0a2c5cf501 > > Best regards, > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com >
>>>>> "Edmundo" == Edmundo Ferreira <fc.edmundo@gmail.com> writes: > From: Edmundo Ferreira <fc.edmundo@gmail.com> > Signed-off-by: Edmundo Ferreira <fc.edmundo@gmail.com> Committed to 2020.02.x and 2020.11.x, thanks.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes: > On Thu, 31 Dec 2020 15:43:32 +0100 > Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: >> Hum, I've applied, but reading again distro/systemd/Makefile.am, it >> seems like manually copying those files is not needed. If you pass >> --enable-systemd, which we already do when BR2_PACKAGE_SYSTEMD=y. Isn't >> that working ? > I found why: we had a custom OPENVPN_INSTALL_TARGET_CMDS instead of > relying on the default "make install" behavior of the autotools-package > infra. So, I made a follow-up commit that drops this as well as the > custom systemd installation stuff, as "make install" does it all > properly. Committed to 2020.02.x and 2020.11.x, thanks.
diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk index 3efc9e2354..399cbf7a85 100644 --- a/package/openvpn/openvpn.mk +++ b/package/openvpn/openvpn.mk @@ -79,4 +79,12 @@ define OPENVPN_INSTALL_INIT_SYSV $(TARGET_DIR)/etc/init.d/S60openvpn endef +define OPENVPN_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/distro/systemd/openvpn-client@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/openvpn-client@.service + + $(INSTALL) -D -m 0644 $(@D)/distro/systemd/openvpn-server@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/openvpn-server@.service +endef + $(eval $(autotools-package))