Skip to contentSkip to conversation

alsa-utils: fix packaging

PATCH In review Ross Burton 3 participants 3 messages Jan 16 – Jan 17

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alsa-utils: fix packaging

In the previous refactoring of this package[1] I forgot to add provides when merging some packages, which meant that installation of alsa-utils wouldn't succeed:

- nothing provides alsa-utils-aplaymidi needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-aplaymidi2 needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-arecordmidi needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-arecordmidi2 needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-axfer needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo

This is because the auto-splitting generates a package for each of the binaries, but there are explicit FILES that take priority which result in the binaries being in another package. However, the dependencies still exist. We could filter the package list after the split, but it is easier to add RPROVIDES for arecord and a*midi to the relevant packages, so that the dependencies are satisfied.

Also axfer is a separate tool, so put that in its own package instead of merging with aplay.

Finally, add a PR, as it appears that dynamically-generated packaging isn't enough to change the hash, and the wrong packages were being pulled from sstate.

---
 meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb +8 -1
index 927f94afb6..2e85f936fa 100644
@@ -11,6 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                     file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
 DEPENDS = "alsa-lib ncurses libsamplerate0 bash"
 
+# Only needed as the dynamic packaging was altered, remove on upgrade
+PR = "r1"
+
 # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
 SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
 SRC_URI[sha256sum] = "5ad79f349e59c30c9a4929ad4995ebee33267473e0e632d7c1a30e2b093d3327"
@@ -35,7 +38,7 @@ FILES:${PN}-alsabat      = "${sbindir}/alsabat-test.sh"
 FILES:${PN}-alsactl      = "*/udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
 FILES:${PN}-alsatplg     = "${libdir}/alsa-topology"
 FILES:${PN}-amidi        = "${bindir}/amidi ${bindir}/aplaymidi* ${bindir}/arecordmidi*"
-FILES:${PN}-aplay        = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
+FILES:${PN}-aplay        = "${bindir}/aplay ${bindir}/arecord"
 FILES:${PN}-speaker-test = "${datadir}/sounds/alsa/"
 
 SUMMARY:${PN}-aconnect       = "ALSA sequencer connection manager"
@@ -53,12 +56,16 @@ SUMMARY:${PN}-aplay          = "Play (and record) sound files using ALSA"
 SUMMARY:${PN}-aseqdump       = "Shows the events received at an ALSA sequencer port"
 SUMMARY:${PN}-aseqnet        = "Network client/server for ALSA sequencer"
 SUMMARY:${PN}-aseqsend       = "Send arbitrary messages to ALSA seqencer port"
+SUMMARY:${PN}-axfer          = "Transfer audio data frames"
 SUMMARY:${PN}-iecset         = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
 SUMMARY:${PN}-nhlt-dmic-info = "Dumps microphone array information from ACPI NHLT table"
 SUMMARY:${PN}-speaker-test   = "ALSA surround speaker test utility"
 
 RRECOMMENDS:${PN}-alsactl = "alsa-states"
 
+RPROVIDES:${PN}-aplay += "${PN}-arecord"
+RPROVIDES:${PN}-amidi += "${PN}-aplaymidi ${PN}-aplaymidi2 ${PN}-arecordmidi ${PN}-arecordmidi2"
+
 do_install:append() {
 	# If udev is disabled, we told configure to install the rules
 	# in /unwanted, so we can remove them now. If udev is enabled,
Signature · 1 line
2.43.0
Tested-by on v1 1/1
#1 lore raw
Quoted 17 lines · Ross Burton via lists.openembedded.org

In the previous refactoring of this package[1] I forgot to add provides when merging some packages, which meant that installation of alsa-utils wouldn't succeed:

- nothing provides alsa-utils-aplaymidi needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-aplaymidi2 needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-arecordmidi needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-arecordmidi2 needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-axfer needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo

This is because the auto-splitting generates a package for each of the binaries, but there are explicit FILES that take priority which result in the binaries being in another package. However, the dependencies still exist. We could filter the package list after the split, but it is easier to add RPROVIDES for arecord and a*midi to the relevant packages, so that the dependencies are satisfied.

Quoted 8 lines

Also axfer is a separate tool, so put that in its own package instead of merging with aplay.

Finally, add a PR, as it appears that dynamically-generated packaging isn't enough to change the hash, and the wrong packages were being pulled from sstate.

Quoted 44 lines
---
  meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb +8 -1
index 927f94afb6..2e85f936fa 100644
@@ -11,6 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                      file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
  DEPENDS = "alsa-lib ncurses libsamplerate0 bash"
 
+# Only needed as the dynamic packaging was altered, remove on upgrade
+PR = "r1"
+
  # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
  SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
  SRC_URI[sha256sum] = "5ad79f349e59c30c9a4929ad4995ebee33267473e0e632d7c1a30e2b093d3327"
@@ -35,7 +38,7 @@ FILES:${PN}-alsabat      = "${sbindir}/alsabat-test.sh"
  FILES:${PN}-alsactl      = "*/udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
  FILES:${PN}-alsatplg     = "${libdir}/alsa-topology"
  FILES:${PN}-amidi        = "${bindir}/amidi ${bindir}/aplaymidi* ${bindir}/arecordmidi*"
-FILES:${PN}-aplay        = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
+FILES:${PN}-aplay        = "${bindir}/aplay ${bindir}/arecord"
  FILES:${PN}-speaker-test = "${datadir}/sounds/alsa/"
 
  SUMMARY:${PN}-aconnect       = "ALSA sequencer connection manager"
@@ -53,12 +56,16 @@ SUMMARY:${PN}-aplay          = "Play (and record) sound files using ALSA"
  SUMMARY:${PN}-aseqdump       = "Shows the events received at an ALSA sequencer port"
  SUMMARY:${PN}-aseqnet        = "Network client/server for ALSA sequencer"
  SUMMARY:${PN}-aseqsend       = "Send arbitrary messages to ALSA seqencer port"
+SUMMARY:${PN}-axfer          = "Transfer audio data frames"
  SUMMARY:${PN}-iecset         = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
  SUMMARY:${PN}-nhlt-dmic-info = "Dumps microphone array information from ACPI NHLT table"
  SUMMARY:${PN}-speaker-test   = "ALSA surround speaker test utility"
 
  RRECOMMENDS:${PN}-alsactl = "alsa-states"
 
+RPROVIDES:${PN}-aplay += "${PN}-arecord"
+RPROVIDES:${PN}-amidi += "${PN}-aplaymidi ${PN}-aplaymidi2 ${PN}-arecordmidi ${PN}-arecordmidi2"
+
  do_install:append() {
  	# If udev is disabled, we told configure to install the rules
  	# in /unwanted, so we can remove them now. If udev is enabled,
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#2 lore raw
In reply to Ross Burton

Hi Ross

Thanks for the fix!

Quoted 59 lines · Ross Burton via lists.openembedded.org

In the previous refactoring of this package[1] I forgot to add provides when merging some packages, which meant that installation of alsa-utils wouldn't succeed:

- nothing provides alsa-utils-aplaymidi needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-aplaymidi2 needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-arecordmidi needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-arecordmidi2 needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo
- nothing provides alsa-utils-axfer needed by alsa-utils-1.2.15.1-r0.cortexa57 from oe-repo

This is because the auto-splitting generates a package for each of the binaries, but there are explicit FILES that take priority which result in the binaries being in another package. However, the dependencies still exist. We could filter the package list after the split, but it is easier to add RPROVIDES for arecord and a*midi to the relevant packages, so that the dependencies are satisfied.

Also axfer is a separate tool, so put that in its own package instead of merging with aplay.

Finally, add a PR, as it appears that dynamically-generated packaging isn't enough to change the hash, and the wrong packages were being pulled from sstate.

---
  meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb | 9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb +5 -1
index 927f94afb6..2e85f936fa 100644
@@ -11,6 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
                      file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642"
  DEPENDS = "alsa-lib ncurses libsamplerate0 bash"
 
+# Only needed as the dynamic packaging was altered, remove on upgrade
+PR = "r1"
+
  # alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe
  SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2"
  SRC_URI[sha256sum] = "5ad79f349e59c30c9a4929ad4995ebee33267473e0e632d7c1a30e2b093d3327"
@@ -35,7 +38,7 @@ FILES:${PN}-alsabat      = "${sbindir}/alsabat-test.sh"
  FILES:${PN}-alsactl      = "*/udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
  FILES:${PN}-alsatplg     = "${libdir}/alsa-topology"
  FILES:${PN}-amidi        = "${bindir}/amidi ${bindir}/aplaymidi* ${bindir}/arecordmidi*"
-FILES:${PN}-aplay        = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer"
+FILES:${PN}-aplay        = "${bindir}/aplay ${bindir}/arecord"
  FILES:${PN}-speaker-test = "${datadir}/sounds/alsa/"
 
  SUMMARY:${PN}-aconnect       = "ALSA sequencer connection manager"
@@ -53,12 +56,16 @@ SUMMARY:${PN}-aplay          = "Play (and record) sound files using ALSA"
  SUMMARY:${PN}-aseqdump       = "Shows the events received at an ALSA sequencer port"
  SUMMARY:${PN}-aseqnet        = "Network client/server for ALSA sequencer"
  SUMMARY:${PN}-aseqsend       = "Send arbitrary messages to ALSA seqencer port"
+SUMMARY:${PN}-axfer          = "Transfer audio data frames"
  SUMMARY:${PN}-iecset         = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
  SUMMARY:${PN}-nhlt-dmic-info = "Dumps microphone array information from ACPI NHLT table"

meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb SUMMARY:${PN}-aplay = "Play (and record) sound files using ALSA" · line 71

Quoted 10 lines
meta/recipes-multimedia/alsa/alsa-utils_1.2.15.1.bb +3 -0
  SUMMARY:${PN}-speaker-test   = "ALSA surround speaker test utility"
 
  RRECOMMENDS:${PN}-alsactl = "alsa-states"
 
+RPROVIDES:${PN}-aplay += "${PN}-arecord"
+RPROVIDES:${PN}-amidi += "${PN}-aplaymidi ${PN}-aplaymidi2 ${PN}-arecordmidi ${PN}-arecordmidi2"
+
  do_install:append() {
  	# If udev is disabled, we told configure to install the rules
  	# in /unwanted, so we can remove them now. If udev is enabled,

This looks good to me.
Tested-by: Michael Opdenacker

To minimize rework, I'd suggest to merge this change first. And then I'll update and send the Alsa 1.2.15.2 and 1.2.15.3 updates. Cheers
Michael.

Signature · 3 lines
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com