Dear maintainer, I've prepared an NMU for util-linux (versioned as 2.20.1-1.2) and uploaded it to DELAYED/1. Please feel free to tell me if I should delay it longer.
Regards.
diff -u util-linux-2.20.1/debian/changelog util-linux-2.20.1/debian/changelog --- util-linux-2.20.1/debian/changelog +++ util-linux-2.20.1/debian/changelog @@ -1,3 +1,13 @@ +util-linux (2.20.1-1.2) unstable; urgency=low + + * Non-maintainer upload. + * Fixing FTBFS on !linux (Closes: #659185) + * Only enable partx where it is supported + * Handle vc flags missing on FreeBSD + * Fix tty creation on kFreeBSD taking patch from 2.19 + + -- Christoph Egger <christ...@debian.org> Mon, 16 Jan 2012 22:30:04 +0100 + util-linux (2.20.1-1.1) unstable; urgency=high * Non-maintainer upload. diff -u util-linux-2.20.1/debian/rules util-linux-2.20.1/debian/rules --- util-linux-2.20.1/debian/rules +++ util-linux-2.20.1/debian/rules @@ -32,9 +32,9 @@ version := $(shell sed -e '1{;s|^util-linux (\(.*\))\ .*|\1|;q;}' debian/changelog) Upstream := $(shell sed 's/^.*(\(.*\)-.*).*/\1/; q' debian/changelog) -CONFOPTS= --enable-raw --enable-rdev --enable-partx --with-slang +CONFOPTS= --enable-raw --enable-rdev --with-slang ifeq ($(DEB_HOST_ARCH_OS),linux) -CONFOPTS += --with-selinux --enable-libmount-mount +CONFOPTS += --with-selinux --enable-libmount-mount --enable-partx endif build: build-arch build-indep only in patch2: unchanged: --- util-linux-2.20.1.orig/term-utils/Makefile.am +++ util-linux-2.20.1/term-utils/Makefile.am @@ -23,6 +23,7 @@ sbin_PROGRAMS += agetty dist_man_MANS += agetty.8 agetty_SOURCES = agetty.c +agetty_LDADD = -lutil if !HAVE_LANGINFO agetty_SOURCES += $(top_srcdir)/lib/langinfo.c endif only in patch2: unchanged: --- util-linux-2.20.1.orig/term-utils/agetty.c +++ util-linux-2.20.1/term-utils/agetty.c @@ -10,6 +10,7 @@ * * This program is freely distributable. */ + #include <stdio.h> #include <unistd.h> #include <stdlib.h> @@ -39,6 +40,12 @@ #include "c.h" #include "widechar.h" +#if defined(__FreeBSD_kernel__) +#include <pty.h> +#include <sys/param.h> +#endif + + #ifdef __linux__ # include <sys/kd.h> # include <sys/param.h> @@ -66,6 +73,10 @@ # endif #endif +#ifdef __FreeBSD_kernel__ +#define USE_SYSLOG +#endif + /* If USE_SYSLOG is undefined all diagnostics go to /dev/console. */ #ifdef USE_SYSLOG # include <syslog.h> @@ -980,6 +991,10 @@ if (tcgetattr(STDIN_FILENO, tp) < 0) log_err("%s: tcgetattr: %m", tty); +#if defined(__FreeBSD_kernel__) + login_tty (0); +#endif + /* * Detect if this is a virtual console or serial/modem line. * In case of a virtual console the ioctl TIOCMGET fails and @@ -1141,6 +1156,46 @@ /* Sane setting, allow eight bit characters, no carriage return delay * the same result as `stty sane cr0 pass8' */ +#ifndef IUCLC +# define IUCLC 0 +#endif +#ifndef NL0 +# define NL0 0 +#endif +#ifndef CR0 +# define CR0 0 +#endif +#ifndef BS0 +# define BS0 0 +#endif +#ifndef VT0 +# define VT0 0 +#endif +#ifndef FF0 +# define FF0 0 +#endif +#ifndef OLCUC +# define OLCUC 0 +#endif +#ifndef OFILL +# define OFILL 0 +#endif +#ifndef NLDLY +# define NLDLY 0 +#endif +#ifndef CRDLY +# define CRDLY 0 +#endif +#ifndef BSDLY +# define BSDLY 0 +#endif +#ifndef VTDLY +# define VTDLY 0 +#endif +#ifndef FFDLY +# define FFDLY 0 +#endif + tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL); tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP); tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);