[Glibc-bsd-commits] r2504 - trunk/web/patches
Aurelien Jarno
aurel32 at alioth.debian.org
Thu May 7 14:18:26 UTC 2009
Author: aurel32
Date: 2009-05-07 14:18:25 +0000 (Thu, 07 May 2009)
New Revision: 2504
Added:
trunk/web/patches/util-linux_2.15.diff
Removed:
trunk/web/patches/util-linux_2.12.diff
Log:
Add submitted patch for util-linux 2.15
Deleted: trunk/web/patches/util-linux_2.12.diff
===================================================================
--- trunk/web/patches/util-linux_2.12.diff 2009-05-07 04:43:04 UTC (rev 2503)
+++ trunk/web/patches/util-linux_2.12.diff 2009-05-07 14:18:25 UTC (rev 2504)
@@ -1,492 +0,0 @@
-diff -ur util-linux-2.12r.old/debian/patches/00list util-linux-2.12r/debian/patches/00list
---- util-linux-2.12r.old/debian/patches/00list 2006-04-21 18:28:31.000000000 +0200
-+++ util-linux-2.12r/debian/patches/00list 2006-04-21 18:28:48.000000000 +0200
-@@ -1,4 +1,3 @@
--10agetty
- 10cal-widechar
- 10cfdisk
- 10cramfs-udebsize
-diff -ur util-linux-2.12r.old/debian/rules util-linux-2.12r/debian/rules
---- util-linux-2.12r.old/debian/rules 2006-04-21 18:28:31.000000000 +0200
-+++ util-linux-2.12r/debian/rules 2006-04-21 18:28:48.000000000 +0200
-@@ -25,7 +25,7 @@
- sparc = $(findstring $(arch),sparc sparc64)
- nohwclock = $(findstring $(arch),s390)
-
--SUBDIRS=po lib getopt disk-utils login-utils misc-utils mount sys-utils text-utils
-+SUBDIRS=po lib getopt disk-utils login-utils misc-utils sys-utils text-utils
- ifeq ($(arch),$(fdisk_arch))
- SUBDIRS += fdisk
- endif
-@@ -36,6 +36,7 @@
- ifneq ($(arch),$(nohwclock))
- SUBDIRS += hwclock
- endif
-+SUBDIRS += mount
- endif
-
- ifneq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-@@ -68,9 +69,12 @@
-
- SUIDFILES = debian/tmp-mount/bin/{u,}mount
- BINFILES = sys-utils/arch text-utils/more
--UBINFILES = sys-utils/{ipcs,ipcrm,setsid} \
-- misc-utils/{namei,setterm,mcookie,whereis,ddate} \
-+UBINFILES = sys-utils/{ipcrm,setsid} \
-+ misc-utils/{namei,mcookie,whereis,ddate} \
- getopt/getopt text-utils/{rev,line,pg}
-+ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-+UBINFILES += sys-utils/ipcs misc-utils/setterm
-+endif
- SBINFILES = disk-utils/mkswap
-
- ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-@@ -79,11 +83,15 @@
- SBINFILES += hwclock/hwclock
- endif
- BINFILES += sys-utils/dmesg
--SBINFILES += disk-utils/{blockdev,raw} mount/pivot_root login-utils/agetty
-+SBINFILES += disk-utils/{blockdev,raw} mount/pivot_root
- UBINFILES += disk-utils/fdformat
- USBINFILES = sys-utils/readprofile disk-utils/elvtune # disk-utils/setfdprm
- endif
-
-+ifneq ($(DEB_HOST_GNU_SYSTEM),gnu)
-+SBINFILES += login-utils/agetty
-+endif
-+
- UBINFILES2= misc-utils/chkdupexe # debian/fdformat # don't strip these
-
- ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-@@ -111,11 +119,14 @@
- MAN8FILES += hwclock/hwclock.8
- endif
- MAN1FILES += sys-utils/readprofile.1
--MAN8FILES += login-utils/agetty.8 disk-utils/{blockdev.8,elvtune.8} \
-+MAN8FILES += disk-utils/{blockdev.8,elvtune.8} \
- sys-utils/dmesg.8 mount/pivot_root.8 \
- disk-utils/fdformat.8 disk-utils/raw.8 # disk-utils/setfdprm.8
- endif
-
-+ifneq ($(DEB_HOST_GNU_SYSTEM),gnu)
-+MAN8FILES += login-utils/agetty.8
-+endif
-
- EXAMPLES = fdisk/sfdisk.examples getopt/getopt-{test,parse}.{ba,tc}sh
- ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-@@ -123,8 +134,11 @@
- endif
-
- INFOFILES = sys-utils/ipc.info
--ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-+ifneq ($(DEB_HOST_GNU_SYSTEM),gnu)
- DOCFILES = login-utils/{README.getty,README.modems-with-agetty,README.poeigl}
-+endif
-+
-+ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
- ifneq ($(arch),$(nohwclock))
- DOCFILES += debian/README.Debian.hwclock
- endif
-@@ -204,11 +218,11 @@
- mv -f debian/tmp/sbin/fdisk debian/tmp/sbin/ddisk
- mv -f debian/tmp/usr/share/man/man8/fdisk.8 debian/tmp/usr/share/man/man8/ddisk.8
- endif
--ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
-+ifneq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
- (cd debian/tmp/sbin ; mv mkswap mkswap.linux)
- (cd debian/tmp/usr/share/man/man8 ; mv mkswap.8 mkswap.linux.8)
- endif
--ifeq ($(DEB_HOST_GNU_SYSTEM),linux-gnu)
-+ifneq ($(DEB_HOST_GNU_SYSTEM),gnu)
- (cd debian/tmp/sbin ; mv agetty getty)
- (cd debian/tmp/usr/share/man/man8 ; mv agetty.8 getty.8)
- ifneq ($(arch), $(nohwclock))
-diff -ur util-linux-2.12r.old/disk-utils/Makefile util-linux-2.12r/disk-utils/Makefile
---- util-linux-2.12r.old/disk-utils/Makefile 2004-12-21 18:14:16.000000000 +0100
-+++ util-linux-2.12r/disk-utils/Makefile 2006-04-21 18:28:48.000000000 +0200
-@@ -16,16 +16,19 @@
-
- SBIN= mkfs mkswap blockdev elvtune fsck.minix mkfs.minix mkfs.bfs
-
--USRBIN= fdformat isosize
-+USRBIN= isosize
-
--ETC= fdprm
--
--MAYBE= setfdprm raw fsck.cramfs mkfs.cramfs
-+MAYBE= raw fsck.cramfs mkfs.cramfs
-
-+ifeq ($(shell uname -s), Linux)
-+USRBIN += fdformat
-+ETC= fdprm
-+MAYBE += setfdprm
- ifneq "$(HAVE_FDUTILS)" "yes"
- USRBIN:=$(USRBIN) setfdprm
- MAN8:=$(MAN8) setfdprm.8
- endif
-+endif
-
- ifeq "$(HAVE_RAW_H)" "yes"
- USRBIN:=$(USRBIN) raw
-diff -ur util-linux-2.12r.old/disk-utils/fsck.cramfs.c util-linux-2.12r/disk-utils/fsck.cramfs.c
---- util-linux-2.12r.old/disk-utils/fsck.cramfs.c 2004-12-11 15:53:16.000000000 +0100
-+++ util-linux-2.12r/disk-utils/fsck.cramfs.c 2006-04-21 18:28:48.000000000 +0200
-@@ -76,7 +76,7 @@
-
- #define PAD_SIZE 512
-
--#include <asm/page.h>
-+#include <sys/user.h> /* PAGE_SIZE */
- #ifdef PAGE_SIZE
- #define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
- #elif defined __ia64__
-diff -ur util-linux-2.12r.old/login-utils/Makefile util-linux-2.12r/login-utils/Makefile
---- util-linux-2.12r.old/login-utils/Makefile 2004-11-23 17:06:57.000000000 +0100
-+++ util-linux-2.12r/login-utils/Makefile 2006-04-21 18:30:49.000000000 +0200
-@@ -101,6 +101,7 @@
- wall.o: ttymsg.h $(LIB)/carefulputc.h
-
- agetty: agetty.o $(LIB)/xstrncpy.o
-+ $(CC) $(LDFLAGS) -o $@ $^ -lutil
- chfn: chfn.o islocal.o setpwnam.o $(SELINUXOBJS) $(LIB)/env.o $(LIB)/xstrncpy.o
- $(CC) $(LDFLAGS) -o $@ $^ $(CRYPT) $(PAM) $(SELINUXLLIB)
- chsh: chsh.o islocal.o setpwnam.o $(SELINUXOBJS) $(LIB)/env.o
-diff -ur util-linux-2.12r.old/login-utils/agetty.c util-linux-2.12r/login-utils/agetty.c
---- util-linux-2.12r.old/login-utils/agetty.c 2002-07-29 09:36:42.000000000 +0200
-+++ util-linux-2.12r/login-utils/agetty.c 2006-04-21 18:28:48.000000000 +0200
-@@ -18,7 +18,8 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/ioctl.h>
--#include <termio.h>
-+#include <termios.h>
-+#define termio termios
- #include <signal.h>
- #include <errno.h>
- #include <sys/types.h>
-@@ -33,11 +34,9 @@
- #include "xstrncpy.h"
- #include "nls.h"
-
--#ifdef __linux__
- #include "pathnames.h"
- #include <sys/param.h>
- #define USE_SYSLOG
--#endif
-
- /* If USE_SYSLOG is undefined all diagnostics go directly to /dev/console. */
-
-@@ -299,9 +298,7 @@
-
- parse_args(argc, argv, &options);
-
--#ifdef __linux__
- setsid();
--#endif
-
- /* Update the utmp file. */
-
-@@ -686,8 +683,13 @@
- * 5 seconds seems to be a good value.
- */
-
-- if (ioctl(0, TCGETA, tp) < 0)
-- error("%s: ioctl: %m", tty);
-+ if (tcgetattr(0, tp) < 0)
-+ error("%s: tcgetattr: %m", tty);
-+
-+ /*
-+ * login_tty: steal tty from other process group.
-+ */
-+ login_tty (0);
-
- /*
- * It seems to be a terminal. Set proper protections and ownership. Mode
-@@ -723,17 +725,18 @@
- * reads will be done in raw mode anyway. Errors will be dealt with
- * lateron.
- */
--#ifdef __linux__
- /* flush input and output queues, important for modems! */
-- (void) ioctl(0, TCFLSH, TCIOFLUSH);
--#endif
-+ tcflush(0, TCIOFLUSH);
-
- tp->c_cflag = CS8 | HUPCL | CREAD | speed;
- if (op->flags & F_LOCAL) {
- tp->c_cflag |= CLOCAL;
- }
-
-- tp->c_iflag = tp->c_lflag = tp->c_oflag = tp->c_line = 0;
-+ tp->c_iflag = tp->c_lflag = tp->c_oflag = 0;
-+#ifdef __linux__
-+ tp->c_line = 0;
-+#endif
- tp->c_cc[VMIN] = 1;
- tp->c_cc[VTIME] = 0;
-
-@@ -744,7 +747,7 @@
- tp->c_cflag |= CRTSCTS;
- #endif
-
-- (void) ioctl(0, TCSETA, tp);
-+ tcsetattr(0, TCSANOW, tp);
-
- /* go to blocking input even in local mode */
- fcntl(0, F_SETFL, fcntl(0, F_GETFL, 0) & ~O_NONBLOCK);
-@@ -788,7 +791,7 @@
- tp->c_iflag |= ISTRIP; /* enable 8th-bit stripping */
- vmin = tp->c_cc[VMIN];
- tp->c_cc[VMIN] = 0; /* don't block if queue empty */
-- (void) ioctl(0, TCSETA, tp);
-+ tcsetattr(0, TCSANOW, tp);
-
- /*
- * Wait for a while, then read everything the modem has said so far and
-@@ -801,8 +804,7 @@
- for (bp = buf; bp < buf + nread; bp++) {
- if (isascii(*bp) && isdigit(*bp)) {
- if ((speed = bcode(bp))) {
-- tp->c_cflag &= ~CBAUD;
-- tp->c_cflag |= speed;
-+ cfsetospeed(tp, speed);
- }
- break;
- }
-@@ -812,7 +814,7 @@
-
- tp->c_iflag = iflag;
- tp->c_cc[VMIN] = vmin;
-- (void) ioctl(0, TCSETA, tp);
-+ tcsetattr(0, TCSANOW, tp);
- }
-
- /* do_prompt - show login prompt, optionally preceded by /etc/issue contents */
-@@ -835,8 +837,7 @@
- if ((op->flags & F_ISSUE) && (fd = fopen(op->issue, "r"))) {
- oflag = tp->c_oflag; /* save current setting */
- tp->c_oflag |= (ONLCR | OPOST); /* map NL in output to CR-NL */
-- (void) ioctl(0, TCSETAW, tp);
--
-+ tcsetattr(0, TCSADRAIN, tp);
-
- while ((c = getc(fd)) != EOF)
- {
-@@ -915,7 +916,7 @@
- int i;
-
- for (i = 0; speedtab[i].speed; i++) {
-- if (speedtab[i].code == (tp->c_cflag & CBAUD)) {
-+ if (speedtab[i].code == cfgetospeed(tp)) {
- printf("%ld", speedtab[i].speed);
- break;
- }
-@@ -947,18 +948,18 @@
- fflush(stdout);
-
- tp->c_oflag = oflag; /* restore settings */
-- (void) ioctl(0, TCSETAW, tp); /* wait till output is gone */
-+ tcsetattr(0, TCSADRAIN, tp);
- (void) fclose(fd);
- }
- #endif
--#ifdef __linux__
-+#ifdef MAXHOSTNAMELEN
- {
- char hn[MAXHOSTNAMELEN+1];
-
- (void) gethostname(hn, MAXHOSTNAMELEN);
- write(1, hn, strlen(hn));
- }
--#endif
-+#endif
- (void) write(1, LOGIN, sizeof(LOGIN) - 1); /* always show login prompt */
- }
-
-@@ -971,9 +972,8 @@
- static int baud_index = FIRST_SPEED;/* current speed index */
-
- baud_index = (baud_index + 1) % op->numspeed;
-- tp->c_cflag &= ~CBAUD;
-- tp->c_cflag |= op->speeds[baud_index];
-- (void) ioctl(0, TCSETA, tp);
-+ cfsetospeed(tp, op->speeds[baud_index]);
-+ tcsetattr(0, TCSANOW, tp);
- }
-
- /* get_logname - get user name, establish parity, speed, erase, kill, eol */
-@@ -1003,7 +1003,7 @@
- /* Flush pending input (esp. after parsing or switching the baud rate). */
-
- (void) sleep(1);
-- (void) ioctl(0, TCFLSH, TCIFLUSH);
-+ tcflush(0, TCIFLUSH);
-
- /* Prompt for and read a login name. */
-
-@@ -1105,9 +1105,9 @@
- tp->c_cc[VQUIT] = DEF_QUIT; /* default quit */
- tp->c_cc[VEOF] = DEF_EOF; /* default EOF character */
- tp->c_cc[VEOL] = DEF_EOL;
--#ifdef __linux__
-+#if defined(VSWTC)
- tp->c_cc[VSWTC] = DEF_SWITCH; /* default switch character */
--#else
-+#elif defined(VSWTCH)
- tp->c_cc[VSWTCH] = DEF_SWITCH; /* default switch character */
- #endif
-
-@@ -1140,9 +1140,15 @@
- /* Account for upper case without lower case. */
-
- if (cp->capslock) {
-+#ifdef IUCLC
- tp->c_iflag |= IUCLC;
-+#endif
-+#ifdef XCASE
- tp->c_lflag |= XCASE;
-+#endif
-+#ifdef OLCUC
- tp->c_oflag |= OLCUC;
-+#endif
- }
- /* Optionally enable hardware flow control */
-
-@@ -1153,8 +1159,8 @@
-
- /* Finally, make the new settings effective */
-
-- if (ioctl(0, TCSETA, tp) < 0)
-- error("%s: ioctl: TCSETA: %m", op->tty);
-+ if (tcsetattr(0, TCSANOW, tp) < 0)
-+ error("%s: tcsetattr: %m", op->tty);
- }
-
- /* caps_lock - string contains upper case without lower case */
-diff -ur util-linux-2.12r.old/misc-utils/Makefile util-linux-2.12r/misc-utils/Makefile
---- util-linux-2.12r.old/misc-utils/Makefile 2004-12-05 20:09:12.000000000 +0100
-+++ util-linux-2.12r/misc-utils/Makefile 2006-04-21 18:28:48.000000000 +0200
-@@ -22,7 +22,11 @@
- USRBIN= cal chkdupexe ddate logger look mcookie \
- namei rename script whereis
-
--MAYBE= reset setterm
-+MAYBE= reset
-+
-+ifeq ($(shell uname -s), Linux)
-+MAYBE += setterm
-+endif
-
- ifeq "$(HAVE_RESET)" "no"
- USRBIN:=$(USRBIN) reset
-@@ -39,10 +43,12 @@
- MAN1:=$(MAN1) kill.1
- endif
-
-+ifeq ($(shell uname -s), Linux)
- ifeq "$(HAVE_NCURSES)" "yes"
- USRBIN:=$(USRBIN) setterm
- MAN1:=$(MAN1) setterm.1
- endif
-+endif
-
- # For script only
- LIBPTY=
-@@ -51,7 +57,9 @@
- endif
-
- # Programs requiring special compilation
-+ifeq ($(shell uname -s), Linux)
- NEEDS_CURSES= setterm
-+endif
- NEEDS_OPENPTY= script
-
- all: $(BIN) $(USRBIN) $(USRBIN.NONSHADOW)
-@@ -99,9 +107,11 @@
- write.o: $(LIB)/carefulputc.h
- write: write.o $(LIB)/carefulputc.o
-
-+ifeq ($(shell uname -s), Linux)
- ifeq "$(HAVE_NCURSES)" "yes"
- setterm: setterm.o
- endif
-+endif
-
- install: all
- $(INSTALLDIR) $(BINDIR) $(USRBINDIR)
-diff -ur util-linux-2.12r.old/misc-utils/mcookie.c util-linux-2.12r/misc-utils/mcookie.c
---- util-linux-2.12r.old/misc-utils/mcookie.c 2002-03-09 00:00:52.000000000 +0100
-+++ util-linux-2.12r/misc-utils/mcookie.c 2006-04-21 18:28:48.000000000 +0200
-@@ -20,7 +20,7 @@
- *
- */
-
--#ifdef __linux__
-+#if defined(__linux__) || defined(__GLIBC__)
- #define HAVE_GETTIMEOFDAY 1
- #endif
-
-diff -ur util-linux-2.12r.old/misc-utils/script.c util-linux-2.12r/misc-utils/script.c
---- util-linux-2.12r.old/misc-utils/script.c 2004-03-26 18:07:16.000000000 +0100
-+++ util-linux-2.12r/misc-utils/script.c 2006-04-21 18:28:48.000000000 +0200
-@@ -54,10 +54,8 @@
- #include <sys/signal.h>
- #include "nls.h"
-
--#ifdef __linux__
- #include <unistd.h>
- #include <string.h>
--#endif
-
- #include "../defines.h"
- #ifdef HAVE_openpty
-diff -ur util-linux-2.12r.old/sys-utils/Makefile util-linux-2.12r/sys-utils/Makefile
---- util-linux-2.12r.old/sys-utils/Makefile 2004-11-15 18:47:47.000000000 +0100
-+++ util-linux-2.12r/sys-utils/Makefile 2006-04-21 18:28:48.000000000 +0200
-@@ -17,9 +17,9 @@
- # Where to put binaries?
- # See the "install" rule for the links. . .
-
--BIN= arch dmesg
-+BIN= arch
-
--USRBIN= cytune flock ipcrm ipcs renice setsid
-+USRBIN= flock ipcrm renice setsid
-
- USRSBIN= readprofile tunelp
-
-@@ -27,6 +27,11 @@
-
- NOTMADE=
-
-+ifeq ($(shell uname -s), Linux)
-+BIN += dmesg
-+USRBIN += cytune ipcs
-+endif
-+
- CWFLAGS := $(subst -Wmissing-prototypes,,$(CFLAGS))
-
- ifeq "$(HAVE_SLN)" "no"
-diff -ur util-linux-2.12r.old/text-utils/more.c util-linux-2.12r/text-utils/more.c
---- util-linux-2.12r.old/text-utils/more.c 2004-12-22 11:46:25.000000000 +0100
-+++ util-linux-2.12r/text-utils/more.c 2006-04-21 18:28:48.000000000 +0200
-@@ -1560,10 +1560,6 @@
- }
- if (feof (file)) {
- if (!no_intty) {
--#ifndef __linux__
-- /* No longer in libc 4.5.8. . . */
-- file->_flags &= ~STDIO_S_EOF_SEEN; /* why doesn't fseek do this ??!!??! */
--#endif
- Currline = saveln;
- Fseek (file, startline);
- }
-@@ -1804,7 +1800,7 @@
- no_intty = tcgetattr(fileno(stdin), &otty);
- tcgetattr(fileno(stderr), &otty);
- savetty0 = otty;
-- slow_tty = (otty.c_cflag & CBAUD) < B1200;
-+ slow_tty = cfgetospeed(&otty) < B1200;
- hardtabs = (otty.c_oflag & TABDLY) != XTABS;
- if (!no_tty) {
- otty.c_lflag &= ~(ICANON|ECHO);
Added: trunk/web/patches/util-linux_2.15.diff
===================================================================
--- trunk/web/patches/util-linux_2.15.diff (rev 0)
+++ trunk/web/patches/util-linux_2.15.diff 2009-05-07 14:18:25 UTC (rev 2504)
@@ -0,0 +1,230 @@
+diff -u util-linux-2.15~rc2/debian/rules util-linux-2.15~rc2/debian/rules
+--- util-linux-2.15~rc2/debian/rules
++++ util-linux-2.15~rc2/debian/rules
+@@ -70,11 +70,6 @@
+ $(MAKE) install DESTDIR=`pwd`/debian/util-linux INSTALL_STRIP_FLAG=""
+ dh_installdocs -i -s
+ install -m 644 login-utils/README.modems-with-agetty debian/util-linux/usr/share/doc/util-linux/README.modems-with-getty
+-ifeq ($(DEB_HOST_ARCH_OS),linux)
+- perl -pi.bak -e 's/agetty/getty/g' debian/util-linux/usr/share/man/man8/getty.8 \
+- debian/util-linux/usr/share/doc/util-linux/README.*
+- rm `find debian/util-linux/usr -name \*.bak`
+-endif
+ dh_installexamples -i -s
+ dh_installmenu -i -s
+ dh_installcron -i -s
+@@ -83,10 +78,12 @@
+ dh_movefiles --sourcedir=debian/util-linux -i -s
+ #
+ # XXX - push things to where debian has always(?) had them...
++ifeq ($(DEB_HOST_ARCH_OS),linux)
+ mv debian/util-linux/usr/sbin/*part* debian/util-linux/usr/bin
++ mv debian/util-linux/usr/bin/cytune debian/util-linux/usr/sbin
++endif
+ mv debian/util-linux/usr/bin/tailf debian/util-linux/bin
+ mv debian/util-linux/usr/bin/isosize debian/util-linux/sbin
+- mv debian/util-linux/usr/bin/cytune debian/util-linux/usr/sbin
+ mv debian/util-linux/usr/share/man/man8/linux32.8 debian/util-linux/usr/share/man/man1/linux32.1
+ mv debian/util-linux/usr/share/man/man8/linux64.8 debian/util-linux/usr/share/man/man1/linux64.1
+ # the version in bsdmainutils seems newer.
+@@ -125,17 +122,22 @@
+ fi
+ cd debian/util-linux-locales && find usr/share/locale -type f | while read x; do ln $$x ../cfdisk-udeb/$$x; done
+ ifeq ($(DEB_HOST_ARCH_OS),linux)
++ install -m 644 debian/mount.fstab debian/mount/usr/share/doc/mount/examples/fstab
+ ifeq ($(arch),$(findstring $(arch),powerpc ppc64))
+ mv -f debian/util-linux/sbin/fdisk debian/util-linux/sbin/ddisk
+ mv -f debian/util-linux/usr/share/man/man8/fdisk.8 debian/util-linux/usr/share/man/man8/ddisk.8
+ else
+ cd debian/util-linux && if [ -f sbin/hwclock ] ; then ln -sf hwclock.8.gz usr/share/man/man8/clock.8.gz; fi
+ endif
++endif
++ifneq ($(DEB_HOST_ARCH_OS),hurd)
+ cd debian/util-linux/sbin ; mv agetty getty
+ cd debian/util-linux/usr/share/man/man8 ; mv agetty.8 getty.8
+- install -m 644 debian/mount.fstab debian/mount/usr/share/doc/mount/examples/fstab
++ perl -pi.bak -e 's/agetty/getty/g' debian/util-linux/usr/share/man/man8/getty.8 \
++ debian/util-linux/usr/share/doc/util-linux/README.*
++ rm `find debian/util-linux/usr -name \*.bak`
+ endif
+-ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
++ifneq ($(DEB_HOST_ARCH_OS),linux)
+ cd debian/util-linux/sbin ; mv mkswap mkswap.linux
+ cd debian/util-linux/usr/share/man/man8 ; mv mkswap.8 mkswap.linux.8
+ endif
+@@ -163,7 +165,7 @@
+ dh_makeshlibs -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+-ifneq ($(DEB_HOST_ARCH_OS),linux)
++ifeq ($(DEB_HOST_ARCH_OS),hurd)
+ echo util-linux:Conflicts=getty >> debian/util-linux.substvars
+ endif
+ dh_gencontrol -s -Xbsdutils
+--- util-linux-2.15~rc2/debian/util-linux.conffiles
++++ util-linux-2.15~rc2.orig/debian/util-linux.conffiles
+@@ -1 +0,0 @@
+-/etc/init.d/hwclock.sh
+diff -u util-linux-2.15~rc2/login-utils/Makefile.in util-linux-2.15~rc2/login-utils/Makefile.in
+--- util-linux-2.15~rc2/login-utils/Makefile.in
++++ util-linux-2.15~rc2/login-utils/Makefile.in
+@@ -108,7 +108,7 @@
+ $(usrbinexec_PROGRAMS) $(usrsbinexec_PROGRAMS)
+ agetty_SOURCES = agetty.c
+ agetty_OBJECTS = agetty.$(OBJEXT)
+-agetty_LDADD = $(LDADD)
++agetty_DEPENDENCIES =
+ am_checktty_test_OBJECTS = checktty_test-checktty.$(OBJEXT)
+ checktty_test_OBJECTS = $(am_checktty_test_OBJECTS)
+ checktty_test_LDADD = $(LDADD)
+@@ -390,6 +390,7 @@
+ dist_man_MANS = $(am__append_2) $(am__append_4) $(am__append_6) \
+ $(am__append_10) $(am__append_26) $(am__append_28)
+ EXTRA_DIST = README.getty README.modems-with-agetty README.poeigl
++ at BUILD_AGETTY_TRUE@agetty_LDADD = -lutil
+ @BUILD_INIT_TRUE at simpleinit_SOURCES = simpleinit.c my_crypt.h simpleinit.h
+ @BUILD_INIT_TRUE at initctl_SOURCES = initctl.c simpleinit.h
+ @BUILD_INIT_TRUE@@NEED_LIBCRYPT_TRUE at simpleinit_LDADD = -lcrypt
+--- util-linux-2.15~rc2.orig/schedutils/chrt.c
++++ util-linux-2.15~rc2/schedutils/chrt.c
+@@ -34,7 +34,7 @@
+ /* the SCHED_BATCH is supported since Linux 2.6.16
+ * -- temporary workaround for people with old glibc headers
+ */
+-#ifndef SCHED_BATCH
++#if defined (__linux__) && !defined(SCHED_BATCH)
+ # define SCHED_BATCH 3
+ #endif
+
+@@ -42,7 +42,7 @@
+ * commit id 0e6aca43e08a62a48d6770e9a159dbec167bf4c6
+ * -- temporary workaround for people with old glibc headers
+ */
+-#ifndef SCHED_IDLE
++#if defined (__linux__) && !defined(SCHED_IDLE)
+ # define SCHED_IDLE 5
+ #endif
+
+@@ -95,15 +95,19 @@
+ case SCHED_FIFO:
+ printf("SCHED_FIFO\n");
+ break;
++#ifdef SCHED_IDLE
+ case SCHED_IDLE:
+ printf("SCHED_IDLE\n");
+ break;
++#endif
+ case SCHED_RR:
+ printf("SCHED_RR\n");
+ break;
++#ifdef SCHED_BATCH
+ case SCHED_BATCH:
+ printf("SCHED_BATCH\n");
+ break;
++#endif
+ default:
+ printf(_("unknown\n"));
+ }
+@@ -119,8 +123,21 @@
+ {
+ int i;
+ int policies[] = { SCHED_OTHER, SCHED_FIFO, SCHED_RR,
+- SCHED_BATCH, SCHED_IDLE };
+- const char *names[] = { "OTHER", "FIFO", "RR", "BATCH", "IDLE" };
++#ifdef SCHED_BATCH
++ SCHED_BATCH,
++#endif
++#ifdef SCHED_IDLE
++ SCHED_IDLE,
++#endif
++ };
++ const char *names[] = { "OTHER", "FIFO", "RR",
++#ifdef SCHED_BATCH
++ "BATCH",
++#endif
++#ifdef SCHED_IDLE
++ "IDLE",
++#endif
++ };
+
+ for (i = 0; i < ARRAY_SIZE(policies); i++) {
+ int max = sched_get_priority_max(policies[i]);
+@@ -164,13 +181,17 @@
+
+ switch (i) {
+ case 'b':
++#ifdef SCHED_BATCH
+ policy = SCHED_BATCH;
++#endif
+ break;
+ case 'f':
+ policy = SCHED_FIFO;
+ break;
+ case 'i':
++#ifdef SCHED_IDLE
+ policy = SCHED_IDLE;
++#endif
+ break;
+ case 'm':
+ show_min_max();
+--- util-linux-2.15~rc2.orig/sys-utils/ipcs.c
++++ util-linux-2.15~rc2/sys-utils/ipcs.c
+@@ -499,8 +499,10 @@
+
+ case STATUS:
+ printf (_("------ Messages: Status --------\n"));
++#ifndef __FreeBSD_kernel__
+ printf (_("allocated queues = %d\n"), msginfo.msgpool);
+ printf (_("used headers = %d\n"), msginfo.msgmap);
++#endif
+ printf (_("used space = %d bytes\n"), msginfo.msgtql);
+ return;
+
+--- util-linux-2.15~rc2.orig/login-utils/agetty.c
++++ util-linux-2.15~rc2/login-utils/agetty.c
+@@ -37,7 +37,11 @@
+ #include "nls.h"
+ #include "pathnames.h"
+
+-#ifdef __linux__
++#if defined(__FreeBSD_kernel__)
++#include <pty.h>
++#endif
++
++#if defined(__linux__) || defined(__FreeBSD_kernel__)
+ #include <sys/param.h>
+ #define USE_SYSLOG
+ #endif
+@@ -281,7 +285,7 @@
+
+ parse_args(argc, argv, &options);
+
+-#ifdef __linux__
++#if defined (__linux__) || defined(__FreeBSD_kernel__)
+ setsid();
+ #endif
+
+@@ -670,6 +674,13 @@
+ if (tcgetattr(0, tp) < 0)
+ error("%s: tcgetattr: %m", tty);
+
++ /*
++ * login_tty: steal tty from other process group.
++ */
++#if defined(__FreeBSD_kernel__)
++ login_tty (0);
++#endif
++
+ /*
+ * It seems to be a terminal. Set proper protections and ownership. Mode
+ * 0622 is suitable for SYSV <4 because /bin/login does not change
+--- util-linux-2.15~rc2.orig/login-utils/Makefile.am
++++ util-linux-2.15~rc2/login-utils/Makefile.am
+@@ -11,6 +11,7 @@
+ if BUILD_AGETTY
+ sbin_PROGRAMS += agetty
+ dist_man_MANS += agetty.8
++agetty_LDADD = -lutil
+ endif
+
+ if BUILD_INIT
More information about the Glibc-bsd-commits
mailing list