Package: sudo
Version: 1.8.3p1-3
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the past)

Hi,

sudo 1.8.3p1-3 adds support for selinux, but enabling it
unconditionally everywhere. This makes sudo unbuildable on non-Linux
architectures (kfreebsd* and hurd*).

Attached there is a patch to limit the libselinux1-dev b-d to linux-any
archs, and pass --with-selinux to configure only if the current OS is
linux.

Thanks,
-- 
Pino
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@
 Section: admin
 Priority: optional
 Maintainer: Bdale Garbee <bd...@gag.com>
-Build-Depends: debhelper (>= 7), libpam0g-dev, libldap2-dev, libsasl2-dev, libselinux1-dev, autotools-dev, bison, flex
+Build-Depends: debhelper (>= 7), libpam0g-dev, libldap2-dev, libsasl2-dev, libselinux1-dev [linux-any], autotools-dev, bison, flex
 Standards-Version: 3.9.2
 Vcs-Git: git://git.gag.com/debian/sudo
 Vcs-Browser: http://git.gag.com/?p=debian/sudo
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,11 @@
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`
 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+  configure_args += --with-selinux
+endif
+
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
@@ -19,7 +24,6 @@
 	    CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(CURDIR)/configure \
 		--prefix=/usr -v \
 		--with-all-insults \
-		--with-selinux \
 		--with-pam \
 		--with-fqdn \
 		--with-logging=syslog \
@@ -33,7 +37,8 @@
 		--with-sendmail=/usr/sbin/sendmail \
 		--with-timedir=/var/lib/sudo \
 		--mandir=/usr/share/man \
-		--libexecdir=/usr/lib/sudo
+		--libexecdir=/usr/lib/sudo \
+		$(configure_args)
 
 	# LDAP version
 	mkdir -p build-ldap

Reply via email to