alsa-utils: install systemd sevice files
PATCH v2 1/1 alsa-utils: install systemd sevice files
---
Changes v1 -> v2:
- fix symlinks (reported by ????? ??????????)
--- package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
package/alsa-utils/alsa-utils.mk +14 -0
@@ -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))
Signature · 1 line
2.19.1
PATCH v2 1/1 alsa-utils: install systemd sevice files
Hello,
Quoted 7 lines · Peter Seiderer
Signed-off-by Peter Seiderer <[email protected]>---
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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/1 alsa-utils: install systemd sevice files
In reply to Peter SeidererPeter, All,
On 2018-10-30 23:41 +0100, Peter Seiderer spake thusly:
Quoted 19 lines
Signed-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- fix symlinks (reported by ????? ??????????)--- package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)package/alsa-utils/alsa-utils.mk +3
-0@@ -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 \
package/alsa-utils/alsa-utils.mk define ALSA_UTILS_INSTALL_TARGET_CMDS · line 97
Quoted 10 lines
package/alsa-utils/alsa-utils.mk +10
-0+ $(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.
Quoted 8 lines
package/alsa-utils/alsa-utils.mk +0
-0$(eval $(autotools-package))Signature · 6 lines
2.19.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 alsa-utils: install systemd sevice files
Hello Yann,
Quoted 49 lines · Yann E. MORIN
Peter, All,
On 2018-10-30 23:41 +0100, Peter Seiderer spake thusly:
Quoted 19 lines
Signed-off-by Peter Seiderer <[email protected]>---
Changes v1 -> v2:
- fix symlinks (reported by ????? ??????????)--- package/alsa-utils/alsa-utils.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)package/alsa-utils/alsa-utils.mk +3
-0@@ -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 \package/alsa-utils/alsa-utils.mk define ALSA_UTILS_INSTALL_TARGET_CMDS · line 97
Quoted 10 lines
package/alsa-utils/alsa-utils.mk +10
-0+ $(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 +endifThis 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_TARis not set
Quoted 6 lines
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 directoryCare to have a look, please?
Should be fixed (besides the systemd/uclibc problems) with:
https://patchwork.ozlabs.org/patch/1001417
Regards,
Peter
Quoted 13 lines
Regards,
Yann E. MORIN.Quoted 8 lines
package/alsa-utils/alsa-utils.mk +0
-0$(eval $(autotools-package))Signature · 6 lines
2.19.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot