patch to allow visudo to work on hurd
authorBdale Garbee <bdale@gag.com>
Wed, 16 May 2012 17:09:14 +0000 (11:09 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 16 May 2012 17:09:14 +0000 (11:09 -0600)
debian/patches/use-flock-on-hurd.diff [new file with mode: 0644]
debian/rules

diff --git a/debian/patches/use-flock-on-hurd.diff b/debian/patches/use-flock-on-hurd.diff
new file mode 100644 (file)
index 0000000..fb0b81c
--- /dev/null
@@ -0,0 +1,15 @@
+Use flock instead of lockf for visudo on hurd
+Index: sudo-1.8.3p1/configure.in
+===================================================================
+--- sudo-1.8.3p1.orig/configure.in     2011-10-25 14:11:40.000000000 +0000
++++ sudo-1.8.3p1/configure.in  2012-01-08 04:05:23.000000000 +0000
+@@ -1864,6 +1864,9 @@
+               ;;
+     *-gnu*)
+               OSDEFS="${OSDEFS} -D_GNU_SOURCE"
++              # lockf() isn't implemented on the Hurd -- use flock instead
++              ac_cv_func_lockf=no
++              ac_cv_func_flock=yes
+               ;;
+ esac
index dfa19ed78cdb19120e1e97bc68832b5e34f95627..017ec5edfd590bee6684f657a0bbf35433e88493 100755 (executable)
@@ -12,8 +12,14 @@ ifeq ($(DEB_HOST_ARCH_OS),linux)
   configure_args += --with-selinux
 endif
 
+reconf-stamp:
+       cp -f /usr/share/misc/config.sub build-aux/config.sub
+       cp -f /usr/share/misc/config.guess build-aux/config.guess
+       autoreconf -v
+       touch $@
+
 configure: configure-stamp
-configure-stamp:
+configure-stamp: reconf-stamp
        dh_testdir
        cp -f /usr/share/misc/config.sub config.sub
        cp -f /usr/share/misc/config.guess config.guess