diff mbox

[PATCHv3,10/74] stunnel: use the <pkg>_INSTALL_INIT_SYSV mechanism

Message ID 1417357142-14307-11-git-send-email-thomas.petazzoni@free-electrons.com
State Accepted
Headers show

Commit Message

Thomas Petazzoni Nov. 30, 2014, 2:17 p.m. UTC
Since the existing STUNNEL_INSTALL_CONF_SCRIPT hook no longer installs
the init script, we rename it to STUNNEL_INSTALL_CONF.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/stunnel/stunnel.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Yann E. MORIN Nov. 30, 2014, 3:04 p.m. UTC | #1
Thomas, All,

On 2014-11-30 15:17 +0100, Thomas Petazzoni spake thusly:
> Since the existing STUNNEL_INSTALL_CONF_SCRIPT hook no longer installs
> the init script, we rename it to STUNNEL_INSTALL_CONF.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  package/stunnel/stunnel.mk | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk
> index dc56261..ac2963e 100644
> --- a/package/stunnel/stunnel.mk
> +++ b/package/stunnel/stunnel.mk
> @@ -18,14 +18,17 @@ else
>  STUNNEL_CONF_OPTS += --disable-systemd
>  endif
>  
> -define STUNNEL_INSTALL_CONF_SCRIPT
> -	$(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel
> +define STUNNEL_INSTALL_CONF
>  	[ -f $(TARGET_DIR)/etc/stunnel/stunnel.conf ] || \

What is the stance on removing those conditional installs? I thought we
wanted to get rid oif all of them, in favour of using a post-build
script or rootfs-overlay.

Can be done in a separate patch, maybe.

Otherwise, loks good:

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  		$(INSTALL) -m 0644 -D $(@D)/tools/stunnel.conf \
>  			$(TARGET_DIR)/etc/stunnel/stunnel.conf
>  	rm -f $(TARGET_DIR)/etc/stunnel/stunnel.conf-sample
>  endef
>  
> -STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF_SCRIPT
> +STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF
> +
> +define STUNNEL_INSTALL_INIT_SYSV
> +	$(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel
> +endef
>  
>  $(eval $(autotools-package))
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Yann E. MORIN Nov. 30, 2014, 5:25 p.m. UTC | #2
Thomas, All,

On 2014-11-30 16:04 +0100, Yann E. MORIN spake thusly:
> On 2014-11-30 15:17 +0100, Thomas Petazzoni spake thusly:
> > Since the existing STUNNEL_INSTALL_CONF_SCRIPT hook no longer installs
> > the init script, we rename it to STUNNEL_INSTALL_CONF.
> > 
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > ---
> >  package/stunnel/stunnel.mk | 9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> > 
> > diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk
> > index dc56261..ac2963e 100644
> > --- a/package/stunnel/stunnel.mk
> > +++ b/package/stunnel/stunnel.mk
> > @@ -18,14 +18,17 @@ else
> >  STUNNEL_CONF_OPTS += --disable-systemd
> >  endif
> >  
> > -define STUNNEL_INSTALL_CONF_SCRIPT
> > -	$(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel
> > +define STUNNEL_INSTALL_CONF
> >  	[ -f $(TARGET_DIR)/etc/stunnel/stunnel.conf ] || \
> 
> What is the stance on removing those conditional installs? I thought we
> wanted to get rid oif all of them, in favour of using a post-build
> script or rootfs-overlay.
> 
> Can be done in a separate patch, maybe.

Seen it is done later in the series. Good! :-)

> Otherwise, loks good:
> 
> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Still valid! ;-)

Regards,
Yann E. MORIN.
Peter Korsgaard Dec. 1, 2014, 9:46 p.m. UTC | #3
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Since the existing STUNNEL_INSTALL_CONF_SCRIPT hook no longer installs
 > the init script, we rename it to STUNNEL_INSTALL_CONF.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.
diff mbox

Patch

diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk
index dc56261..ac2963e 100644
--- a/package/stunnel/stunnel.mk
+++ b/package/stunnel/stunnel.mk
@@ -18,14 +18,17 @@  else
 STUNNEL_CONF_OPTS += --disable-systemd
 endif
 
-define STUNNEL_INSTALL_CONF_SCRIPT
-	$(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel
+define STUNNEL_INSTALL_CONF
 	[ -f $(TARGET_DIR)/etc/stunnel/stunnel.conf ] || \
 		$(INSTALL) -m 0644 -D $(@D)/tools/stunnel.conf \
 			$(TARGET_DIR)/etc/stunnel/stunnel.conf
 	rm -f $(TARGET_DIR)/etc/stunnel/stunnel.conf-sample
 endef
 
-STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF_SCRIPT
+STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF
+
+define STUNNEL_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel
+endef
 
 $(eval $(autotools-package))