Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files
@ 2018-10-30 22:41 Peter Seiderer
  2018-11-01 13:51 ` Thomas Petazzoni
  2018-11-21 17:35 ` Yann E. MORIN
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Seiderer @ 2018-10-30 22:41 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - fix symlinks (reported by ????? ??????????)
---
 package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk
index e9a45c675f..0c65082a14 100644
--- a/package/alsa-utils/alsa-utils.mk
+++ b/package/alsa-utils/alsa-utils.mk
@@ -82,4 +82,18 @@ define ALSA_UTILS_INSTALL_TARGET_CMDS
 	fi
 endef
 
+ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL),y)
+define ALSA_UTILS_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-restore.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service
+	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/sound.target.wants
+	ln -sf ../../../../lib/systemd/system/alsa-restore.service \
+		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-restore.service
+	ln -sf ../../../../lib/systemd/system/alsa-state.service \
+		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-state.service
+endef
+endif
+
 $(eval $(autotools-package))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files
  2018-10-30 22:41 [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files Peter Seiderer
@ 2018-11-01 13:51 ` Thomas Petazzoni
  2018-11-21 17:35 ` Yann E. MORIN
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-11-01 13:51 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 30 Oct 2018 23:41:39 +0100, Peter Seiderer wrote:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - fix symlinks (reported by ????? ??????????)
> ---
>  package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)

So, I have applied (after fixing the typo in the commit title), but I
am not a big fan in fact. Indeed, the alsa-utils build system has all
the logic to install those service files, provided --enable-systemd is
passed.

Unfortunately, we completely override the alsa-utils "make install"
before since we define ALSA_UTILS_INSTALL_TARGET_CMDS.

Perhaps the alsa-utils package should be reworked to use
ALSA_UTILS_INSTALL_TARGET_CMDS, and then use post-install target hooks
to remove unwanted programs/data if applicable.

But since that was clearly a larger effort, I took your patch as-is as
it does the right thing considering how alsa-utils.mk works today.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files
  2018-10-30 22:41 [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files Peter Seiderer
  2018-11-01 13:51 ` Thomas Petazzoni
@ 2018-11-21 17:35 ` Yann E. MORIN
  2018-11-21 22:03   ` Peter Seiderer
  1 sibling, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2018-11-21 17:35 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-10-30 23:41 +0100, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - fix symlinks (reported by ????? ??????????)
> ---
>  package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk
> index e9a45c675f..0c65082a14 100644
> --- a/package/alsa-utils/alsa-utils.mk
> +++ b/package/alsa-utils/alsa-utils.mk
> @@ -82,4 +82,18 @@ define ALSA_UTILS_INSTALL_TARGET_CMDS
>  	fi
>  endef
>  
> +ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL),y)
> +define ALSA_UTILS_INSTALL_INIT_SYSTEMD
> +	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-restore.service \
> +		$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service
> +	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \
> +		$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service
> +	mkdir -p $(TARGET_DIR)/etc/systemd/system/sound.target.wants
> +	ln -sf ../../../../lib/systemd/system/alsa-restore.service \
> +		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-restore.service
> +	ln -sf ../../../../lib/systemd/system/alsa-state.service \
> +		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-state.service
> +endef
> +endif

This does not works with that defconfig:

BR2_arm=y
BR2_cortex_a53=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_INIT_SYSTEMD=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
# BR2_TARGET_ROOTFS_TAR is not set

And fails with this error:

/usr/bin/install -D -m 0644 /home/ymorin/dev/buildroot/O2/build/alsa-utils-1.1.6/alsactl/alsa-restore.service /home/ymorin/dev/buildroot/O2/target/usr/lib/systemd/system/alsa-restore.service
/usr/bin/install: cannot stat '/home/ymorin/dev/buildroot/O2/build/alsa-utils-1.1.6/alsactl/alsa-restore.service': No such file or directory

Care to have a look, please?

Regards,
Yann E. MORIN.

>  $(eval $(autotools-package))
> -- 
> 2.19.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files
  2018-11-21 17:35 ` Yann E. MORIN
@ 2018-11-21 22:03   ` Peter Seiderer
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2018-11-21 22:03 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Wed, 21 Nov 2018 18:35:14 +0100, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> On 2018-10-30 23:41 +0100, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > Changes v1 -> v2:
> >   - fix symlinks (reported by ????? ??????????)
> > ---
> >  package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> > 
> > diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk
> > index e9a45c675f..0c65082a14 100644
> > --- a/package/alsa-utils/alsa-utils.mk
> > +++ b/package/alsa-utils/alsa-utils.mk
> > @@ -82,4 +82,18 @@ define ALSA_UTILS_INSTALL_TARGET_CMDS
> >  	fi
> >  endef
> >  
> > +ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSACTL),y)
> > +define ALSA_UTILS_INSTALL_INIT_SYSTEMD
> > +	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-restore.service \
> > +		$(TARGET_DIR)/usr/lib/systemd/system/alsa-restore.service
> > +	$(INSTALL) -D -m 0644 $(@D)/alsactl/alsa-state.service \
> > +		$(TARGET_DIR)/usr/lib/systemd/system/alsa-state.service
> > +	mkdir -p $(TARGET_DIR)/etc/systemd/system/sound.target.wants
> > +	ln -sf ../../../../lib/systemd/system/alsa-restore.service \
> > +		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-restore.service
> > +	ln -sf ../../../../lib/systemd/system/alsa-state.service \
> > +		$(TARGET_DIR)/etc/systemd/system/sound.target.wants/alsa-state.service
> > +endef
> > +endif  
> 
> This does not works with that defconfig:
> 
> BR2_arm=y
> BR2_cortex_a53=y
> BR2_ARM_FPU_NEON_VFPV4=y
> BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
> BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_INIT_SYSTEMD=y
> BR2_PACKAGE_ALSA_UTILS=y
> BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
> BR2_PACKAGE_ALSA_UTILS_AMIXER=y
> BR2_PACKAGE_ALSA_UTILS_APLAY=y
> BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
> # BR2_TARGET_ROOTFS_TAR is not set
> 
> And fails with this error:
> 
> /usr/bin/install -D -m 0644 /home/ymorin/dev/buildroot/O2/build/alsa-utils-1.1.6/alsactl/alsa-restore.service /home/ymorin/dev/buildroot/O2/target/usr/lib/systemd/system/alsa-restore.service
> /usr/bin/install: cannot stat '/home/ymorin/dev/buildroot/O2/build/alsa-utils-1.1.6/alsactl/alsa-restore.service': No such file or directory
> 
> Care to have a look, please?

Should be fixed (besides the systemd/uclibc problems) with:

	https://patchwork.ozlabs.org/patch/1001417

Regards,
Peter

> 
> Regards,
> Yann E. MORIN.
> 
> >  $(eval $(autotools-package))
> > -- 
> > 2.19.1
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-21 22:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-30 22:41 [Buildroot] [PATCH v2] alsa-utils: install systemd sevice files Peter Seiderer
2018-11-01 13:51 ` Thomas Petazzoni
2018-11-21 17:35 ` Yann E. MORIN
2018-11-21 22:03   ` Peter Seiderer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox