diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-07-17 21:34:15 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-07-17 21:34:15 +0000 |
commit | 7849f4b5795595596e1ccb4848530604fa870b6d (patch) | |
tree | de253c87a7be9041b4476f96fe18883a1f54b850 /sys-apps | |
parent | Add the O option to agetty to display DNS domainname in the issue file (diff) | |
download | gentoo-2-7849f4b5795595596e1ccb4848530604fa870b6d.tar.gz gentoo-2-7849f4b5795595596e1ccb4848530604fa870b6d.tar.bz2 gentoo-2-7849f4b5795595596e1ccb4848530604fa870b6d.zip |
Add the O option to agetty to display DNS domainname in the issue file
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/util-linux/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/util-linux/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/util-linux/files/digest-util-linux-2.11z-r6 | 2 | ||||
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch | 69 | ||||
-rw-r--r-- | sys-apps/util-linux/util-linux-2.11z-r6.ebuild | 113 |
5 files changed, 195 insertions, 3 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog index b9b2266333d1..ae712bc76e64 100644 --- a/sys-apps/util-linux/ChangeLog +++ b/sys-apps/util-linux/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-apps/util-linux # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.46 2003/07/13 17:44:32 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.47 2003/07/17 21:32:20 azarah Exp $ + +*util-linux-2.11z-r6 (17 Jul 2003) + + 17 Jul 2003; Martin Schlemmer <azarah@gentoo.org> + util-linux-2.11z-r6.ebuild, + files/util-linux-2.11z-agetty-domainname-option.patch: + Add the O option to agetty to display DNS domainname in the issue file, thanks + to Marius Mauch <genone@genone.de>, bug #22275. 13 Jul 2003; <solar@gentoo.org> util-linux-2.11z-r5.ebuild: verified -fPIC works with this pkg on sparc,ppc and hppa diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest index b2828bb4a1b4..cbc601d874a2 100644 --- a/sys-apps/util-linux/Manifest +++ b/sys-apps/util-linux/Manifest @@ -1,6 +1,6 @@ -MD5 13d257339ec0ca2ba7c20613f0a0cbd0 ChangeLog 7628 +MD5 eef69898b79c2ea8e23b8d547e074bc6 ChangeLog 7629 MD5 c6692828888581ffce700c60c14ea9b8 util-linux-2.11z-r5.ebuild 2776 -MD5 9a35ab45ff1a9a6a0001e4cec8e83718 util-linux-2.11z-r6.ebuild 3144 +MD5 64dd00d9b5bf0874da357a4e8c0203b2 util-linux-2.11z-r6.ebuild 3145 MD5 b73abbe53ce7a49cad81cc855b7d5924 util-linux-2.11z-r4.ebuild 2410 MD5 fdc6f7ebf1e7f279d96f19c330868aa2 util-linux-2.11y.ebuild 2109 MD5 02afa4d774f45ab0b9ef42ecc1748005 files/digest-util-linux-2.11z-r5 153 diff --git a/sys-apps/util-linux/files/digest-util-linux-2.11z-r6 b/sys-apps/util-linux/files/digest-util-linux-2.11z-r6 new file mode 100644 index 000000000000..b479cd78fc10 --- /dev/null +++ b/sys-apps/util-linux/files/digest-util-linux-2.11z-r6 @@ -0,0 +1,2 @@ +MD5 abaab0a441233d6b7763b89ea5ab4078 util-linux-2.11z.tar.bz2 1266784 +MD5 9d6c4c8a99188b6696b0735fa48f67c2 util-linux-2.11z-crypt-gentoo.patch.bz2 18249 diff --git a/sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch b/sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch new file mode 100644 index 000000000000..b0e0caa76bd7 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.11z-agetty-domainname-option.patch @@ -0,0 +1,69 @@ +--- util-linux-2.11z/login-utils/agetty.c 2002-07-29 09:36:42.000000000 +0200 ++++ util-linux-2.11z.O/login-utils/agetty-with-dns.c 2003-07-13 04:24:01.000000000 +0200 +@@ -30,6 +30,7 @@ + #include <getopt.h> + #include <time.h> + #include <sys/file.h> ++#include <netdb.h> + #include "xstrncpy.h" + #include "nls.h" + +@@ -122,6 +123,17 @@ + #define BUFSIZ 1024 + #endif + ++/* set a maximum length for the hostname, */ ++#ifdef HOST_NAME_MAX ++ /* defined by POSIX */ ++ #define HOSTNAME_LENGTH HOST_NAME_MAX ++#elif defined(MAXHOSTNAMELEN) ++ /* implemented in current Unix-versions */ ++ #define HOSTNAME_LENGTH MAXHOSTNAMELEN ++#else ++ #define HOSTNAME_LENGTH 500 ++#endif ++ + /* + * When multiple baud rates are specified on the command line, the first one + * we will try is the first one specified. +@@ -878,7 +890,25 @@ + printf ("%s", domainname); + } + break; +- ++ ++ case 'O': ++ { ++ char *domain = NULL; ++ char host[HOSTNAME_LENGTH + 1]; ++ struct hostent *hp = NULL; ++ ++ if (gethostname(host, HOSTNAME_LENGTH) || !(hp = gethostbyname(host))) { ++ domain = "unknown_domain"; ++ } else { ++ /* get the substring after the first . */ ++ domain = strchr(hp->h_name, '.'); ++ if (domain == NULL) ++ domain = ".(none)"; ++ } ++ printf("%s", ++domain); ++ } ++ break; ++ + case 'd': + case 't': + { +--- util-linux-2.11z/login-utils/agetty.8 1999-11-03 00:28:11.000000000 +0100 ++++ util-linux-2.11z.O/login-utils/agetty-with-dns.8 2003-07-13 04:27:17.000000000 +0200 +@@ -217,7 +217,10 @@ + Insert the nodename of the machine, also known as the hostname. + .TP + o +-Insert the domainname of the machine. ++Insert the NIS domainname of the machine. ++.TP ++O ++Insert the DNS domainname of the machine. + .TP + r + Insert the release number of the OS, eg. 1.1.9. diff --git a/sys-apps/util-linux/util-linux-2.11z-r6.ebuild b/sys-apps/util-linux/util-linux-2.11z-r6.ebuild new file mode 100644 index 000000000000..3ae58e7f4ada --- /dev/null +++ b/sys-apps/util-linux/util-linux-2.11z-r6.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.11z-r6.ebuild,v 1.1 2003/07/17 21:32:20 azarah Exp $ + +IUSE="crypt nls static pam" + +inherit eutils flag-o-matic + +## see below for details on pic.patch +# Added back for now until other archs can be tested. +filter-flags -fPIC + +S="${WORKDIR}/${P}" +CRYPT_PATCH_P="${P}-crypt-gentoo" +DESCRIPTION="Various useful Linux utilities" +SRC_URI="mirror://kernel/linux/utils/${PN}/${P}.tar.bz2 + crypt? ( mirror://gentoo/${CRYPT_PATCH_P}.patch.bz2 )" +HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/" + +KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~alpha ~arm ~mips ~hppa" +SLOT="0" +LICENSE="GPL-2" + +DEPEND="virtual/glibc + >=sys-apps/sed-4.0.5 + >=sys-libs/ncurses-5.2-r2 + pam? ( sys-apps/pam-login )" + +RDEPEND="${DEPEND} dev-lang/perl + nls? ( sys-devel/gettext )" + +src_unpack() { + unpack ${A} + + cd ${S} + + if [ ! -z "`use crypt`" ] ; then + epatch ${DISTDIR}/${CRYPT_PATCH_P}.patch.bz2 + fi + + # Fix rare failures with -j4 or higher + epatch ${FILESDIR}/${P}-parallel-make.patch + + # Fix unreadable df output + epatch ${FILESDIR}/no-symlink-resolve.patch + + # Support the upcoming "script -c COMMAND" feature now. + epatch ${FILESDIR}/${P}-script.patch + + # Add the O option to agetty to display DNS domainname in the issue + # file, thanks to Marius Mauch <genone@genone.de>, bug #22275. + # + # NOTE: Removing this will break future baselayout, so PLEASE + # consult with me before doing so. + # + # <azarah@gentoo.og> (17 Jul 2003) + epatch ${FILESDIR}/${P}-agetty-domainname-option.patch + + # <kumba@gentoo.org> (22 Apr 2003) + # Fix fdisk so it works on SGI Disk Labels and lets the user + # Actually select a partition, rather than automatically + # choosing "4". + if [ "${ARCH}" = "mips" ] + then + epatch ${FILESDIR}/${P}-mips-fdisk-fix.patch + fi + + # <solar@gentoo.org> This patch should allow us to remove -fPIC + # out of the filter-flags we need this be able to emit position + # independent code so we can link our elf executables as shared + # objects. "prelink" should now also be able to take advantage + epatch ${FILESDIR}/${P}-pic.patch + + #enable pam only if we use it + use pam && sed -i "s:HAVE_PAM=no:HAVE_PAM=yes:" MCONFIG + + sed -i \ + -e "s:-pipe -O2 \$(CPUOPT) -fomit-frame-pointer:${CFLAGS}:" \ + -e "s:CPU=.*:CPU=${CHOST%%-*}:" \ + -e "s:HAVE_SLN=no:HAVE_SLN=yes:" \ + -e "s:HAVE_TSORT=no:HAVE_TSORT=yes:" \ + -e "s:usr/man:usr/share/man:" \ + -e "s:usr/info:usr/share/info:" \ + -e "s:SUIDMODE=.*4755:SUIDMODE=4711:" \ + MCONFIG || die "MCONFIG sed" + + if [ -z "`use nls`" ] ; then + sed -i -e 's/DISABLE_NLS=no/DISABLE_NLS=yes/' MCONFIG || + die "MCONFIG nls sed" + fi +} + +src_compile() { + + econf || die "configure failed" + + if [ "`use static`" ] ; then + export LDFLAGS=-static + fi + emake || die "emake failed" + cd sys-utils && makeinfo *.texi || die "makeinfo failed" +} + +src_install() { + make DESTDIR="${D}" install || die "install failed" + + dodoc HISTORY MAINTAINER README VERSION + docinto licenses + dodoc licenses/* HISTORY + docinto examples + dodoc example.files/* +} + |