Skip to contentSkip to conversation

package/udpcast: fix build without pod2man

PATCH Applied Fabrice Fontaine 3 participants 3 messages Apr 1, 2022 – Apr 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/udpcast: fix build without pod2man

udpcast unconditionally build manpages which will raise the following build failure without pod2man since at least bump to version 20200328 in commit 4fb91d8b9dff314fc53438144f843b3e3ceaacaa:

sh: line 1: pod2man: command not found

To fix this issue, rework how udpcast is built and installed to always build and install the sender or the receiver and never build the manpages. As a side effect, this will also avoid to install the unneeded rateGovernor.h

Fixes:
- http://autobuild.buildroot.org/results/ce602a09357e950d79794391cd4a852d565914f1

---
 package/udpcast/Config.in  |  2 ++
 package/udpcast/udpcast.mk | 24 ++++++++----------------
 2 files changed, 10 insertions(+), 16 deletions(-)
package/udpcast/Config.in +2 -0
index ef94b30a99..cc38c6e57c 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_UDPCAST
 	bool "udpcast"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_UDPCAST_SENDER \
+		if !BR2_PACKAGE_UDPCAST_RECEIVER
 	help
 	  A multicast protocol implementation which happens to
 	  be very handy for imaging drives over the network.
package/udpcast/udpcast.mk +8 -16
index 34ebddd2d5..4c151bb41f 100644
@@ -9,23 +9,15 @@ UDPCAST_SITE = http://www.udpcast.linux.lu/download
 UDPCAST_DEPENDENCIES = host-m4
 UDPCAST_LICENSE = BSD-2-Clause, GPL-2.0+
 UDPCAST_LICENSE_FILES = COPYING
+UDPCAST_TARGETS = \
+	$(if $(BR2_PACKAGE_UDPCAST_RECEIVER),udp-receiver) \
+	$(if $(BR2_PACKAGE_UDPCAST_SENDER),udp-sender)
+UDPCAST_MAKE_OPTS = $(UDPCAST_TARGETS)
 
-define UDPCAST_REMOVE_UDP_SENDER
-	rm -f $(TARGET_DIR)/usr/sbin/udp-sender
-	rm -f $(TARGET_DIR)/usr/sbin/udp-sender.1
+define UDPCAST_INSTALL_TARGET_CMDS
+	$(foreach f,$(UDPCAST_TARGETS),\
+		$(INSTALL) -D -m 755 $(@D)/$(f) $(TARGET_DIR)/usr/sbin/$(f)
+	)
 endef
 
-ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y)
-UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER
-endif
-
-define UDPCAST_REMOVE_UDP_RECEIVER
-	rm -f $(TARGET_DIR)/usr/sbin/udp-receiver
-	rm -f $(TARGET_DIR)/usr/sbin/udp-receiver.1
-endef
-
-ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y)
-UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER
-endif
-
 $(eval $(autotools-package))
Signature · 6 lines
2.35.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · Fabrice Fontaine

udpcast unconditionally build manpages which will raise the following build failure without pod2man since at least bump to version 20200328 in commit 4fb91d8b9dff314fc53438144f843b3e3ceaacaa:

sh: line 1: pod2man: command not found

To fix this issue, rework how udpcast is built and installed to always build and install the sender or the receiver and never build the manpages. As a side effect, this will also avoid to install the unneeded rateGovernor.h

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/ce602a09357e950d79794391cd4a852d565914f1

Applied to master, thanks.

Regards,
Arnout

Quoted 44 lines
---
  package/udpcast/Config.in  |  2 ++
  package/udpcast/udpcast.mk | 24 ++++++++----------------
  2 files changed, 10 insertions(+), 16 deletions(-)
package/udpcast/Config.in +2 -0
index ef94b30a99..cc38c6e57c 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_UDPCAST
  	bool "udpcast"
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_UDPCAST_SENDER \
+		if !BR2_PACKAGE_UDPCAST_RECEIVER
  	help
  	  A multicast protocol implementation which happens to
  	  be very handy for imaging drives over the network.
package/udpcast/udpcast.mk +8 -7
index 34ebddd2d5..4c151bb41f 100644
@@ -9,23 +9,15 @@ UDPCAST_SITE = http://www.udpcast.linux.lu/download
  UDPCAST_DEPENDENCIES = host-m4
  UDPCAST_LICENSE = BSD-2-Clause, GPL-2.0+
  UDPCAST_LICENSE_FILES = COPYING
+UDPCAST_TARGETS = \
+	$(if $(BR2_PACKAGE_UDPCAST_RECEIVER),udp-receiver) \
+	$(if $(BR2_PACKAGE_UDPCAST_SENDER),udp-sender)
+UDPCAST_MAKE_OPTS = $(UDPCAST_TARGETS)
 
-define UDPCAST_REMOVE_UDP_SENDER
-	rm -f $(TARGET_DIR)/usr/sbin/udp-sender
-	rm -f $(TARGET_DIR)/usr/sbin/udp-sender.1
+define UDPCAST_INSTALL_TARGET_CMDS
+	$(foreach f,$(UDPCAST_TARGETS),\
+		$(INSTALL) -D -m 755 $(@D)/$(f) $(TARGET_DIR)/usr/sbin/$(f)
+	)
  endef
 
-ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y)
-UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER
-endif
-

package/udpcast/udpcast.mk UDPCAST_SITE = http://www.udpcast.linux.lu/download · line 23

Quoted 10 lines
package/udpcast/udpcast.mk +0 -9
-define UDPCAST_REMOVE_UDP_RECEIVER
-	rm -f $(TARGET_DIR)/usr/sbin/udp-receiver
-	rm -f $(TARGET_DIR)/usr/sbin/udp-receiver.1
-endef
-
-ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y)
-UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER
-endif
-
  $(eval $(autotools-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Fabrice Fontaine
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

udpcast unconditionally build manpages which will raise the following build failure without pod2man since at least bump to version 20200328 in commit 4fb91d8b9dff314fc53438144f843b3e3ceaacaa:

sh: line 1: pod2man: command not found

To fix this issue, rework how udpcast is built and installed to always build and install the sender or the receiver and never build the manpages. As a side effect, this will also avoid to install the unneeded rateGovernor.h

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/ce602a09357e950d79794391cd4a852d565914f1

Committed to 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot