[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#820007: ipmitool: FTBFS on !linux: usb.c:43:21: fatal error: scsi/sg.h: No such file or directory



tags 820007 + patch
user debian-bsd@lists.debian.org
usertags 820007 + kfreebsd
thanks

Hi,

Andreas Beckmann wrote:
> ipmitool FTBFS on non-linux architectures due to a missing scsi/sg.h:

Apart from the USB plugin, the rest of ipmitool seems like portable
code.  Please consider disabling the USB plugin on non-Linux arches.

A patch is attached for this.  I've tested it builds again on
kfreebsd-amd64 with this;  maybe it fixes hurd also?

Thanks,
-- 
Steven Chamberlain
steven@pyro.eu.org
--- debian/rules.orig	2016-03-13 07:31:31.000000000 +0000
+++ debian/rules	2016-04-05 23:46:41.519210465 +0100
@@ -10,6 +10,14 @@
 #
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+# Platform-specific features
+DEB_HOST_ARCH_OS	?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+ifneq ($(DEB_HOST_ARCH_OS),linux)
+	# USB implementation is Linux-specific
+	extra_config_opts += --disable-intf-usb
+endif
+
 %:
 	dh $@ --with systemd,autoreconf
 
@@ -31,4 +39,4 @@
 	dh_systemd_enable --no-enable ipmievd.service
 
 override_dh_auto_configure:
-	dh_auto_configure -- --prefix=/usr --with-kerneldir --mandir=/usr/share/man
+	dh_auto_configure -- --prefix=/usr --with-kerneldir --mandir=/usr/share/man $(extra_config_opts)

Attachment: signature.asc
Description: Digital signature


Reply to: