summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-08 21:46:41 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-02-08 21:46:41 +0000
commitd142fe3e56f3713438112818d6fc3e89e95c6291 (patch)
tree50b5a2bc05a71ddd2e7b176ec34447a7ea2416a8 /sys-auth
parentx86 stable per bug 402011 (diff)
downloadhistorical-d142fe3e56f3713438112818d6fc3e89e95c6291.tar.gz
historical-d142fe3e56f3713438112818d6fc3e89e95c6291.tar.bz2
historical-d142fe3e56f3713438112818d6fc3e89e95c6291.zip
New ebuild for an nss module that ensures the system's hostname is always resolvable.
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/nss-myhostname/ChangeLog11
-rw-r--r--sys-auth/nss-myhostname/Manifest14
-rw-r--r--sys-auth/nss-myhostname/metadata.xml19
-rw-r--r--sys-auth/nss-myhostname/nss-myhostname-0.3.ebuild37
4 files changed, 81 insertions, 0 deletions
diff --git a/sys-auth/nss-myhostname/ChangeLog b/sys-auth/nss-myhostname/ChangeLog
new file mode 100644
index 000000000000..83592a8f18d5
--- /dev/null
+++ b/sys-auth/nss-myhostname/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sys-auth/nss-myhostname
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/nss-myhostname/ChangeLog,v 1.1 2012/02/08 21:46:41 tetromino Exp $
+
+*nss-myhostname-0.3 (08 Feb 2012)
+
+ 08 Feb 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +nss-myhostname-0.3.ebuild, +metadata.xml:
+ New ebuild for an nss module that ensures the system's hostname is always
+ resolvable.
+
diff --git a/sys-auth/nss-myhostname/Manifest b/sys-auth/nss-myhostname/Manifest
new file mode 100644
index 000000000000..7ea6bca7975f
--- /dev/null
+++ b/sys-auth/nss-myhostname/Manifest
@@ -0,0 +1,14 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST nss-myhostname-0.3.tar.gz 330031 RMD160 d833f62f338333243d3c8477a30e51a6ac04d7af SHA1 d62b0daffa7d37bb1c94b3aa25c75a97e5cf0d47 SHA256 2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2
+EBUILD nss-myhostname-0.3.ebuild 1041 RMD160 eb30f2af27091c532a20bcc2ade459d152c6c448 SHA1 63878410e3a2b3240a203cfdf181678f6741a046 SHA256 dd0c69404eadeb52c0157a4d796b2b7d60c1ec0dcde2d9e1dae0f8a55075c217
+MISC ChangeLog 452 RMD160 6a93f3cfdb34eaf64625b0959d03f217fc753f37 SHA1 5ca3db76a780469f4398dd9516759d258cd00296 SHA256 a92f1afb4b2c9df5668ff50b30e0e9148fc2d6e1d81710346fd33771f5156619
+MISC metadata.xml 1085 RMD160 df32e2c8581a089b56fd820e5419db596a2fe8f7 SHA1 c68701d8e4c2731bea38594394c561fade9103c1 SHA256 c65899e5b6d9b5392edecdaf8a027212c10bb6903eb7de0297c8c2fb58719c6c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iF4EAREIAAYFAk8y7UcACgkQdjK8w9WeBnCFngEAtIawM5y6CfC9MDogWqdNVBW/
+Y6sy2tKHpz//AIfPGWIA/jy70NF051lb3KT/bVNQ3TDVV94gY+Kkj52WV+tsA3Se
+=EFDD
+-----END PGP SIGNATURE-----
diff --git a/sys-auth/nss-myhostname/metadata.xml b/sys-auth/nss-myhostname/metadata.xml
new file mode 100644
index 000000000000..1aba3db38f01
--- /dev/null
+++ b/sys-auth/nss-myhostname/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>freedesktop</herd>
+<longdescription lang="en">
+nss-myhostname is a plugin for the GNU Name Service Switch (NSS) functionality
+of the GNU C Library (glibc) providing host name resolution for the locally
+configured system hostname as returned by gethostname(2). Various software
+relies on an always resolvable local host name. When using dynamic hostnames
+this is usually achieved by patching /etc/hosts at the same time as changing
+the host name. This however is not ideal since it requires a writable /etc
+file system and is fragile because the file might be edited by the
+administrator at the same time. nss-myhostname simply returns all locally
+configure public IP addresses, or -- if none are configured -- the IPv4
+address 127.0.0.2 (wich is on the local loopback) and the IPv6 address ::1
+(which is the local host) for whatever system hostname is configured locally.
+Patching /etc/hosts is thus no longer necessary.
+</longdescription>
+</pkgmetadata>
diff --git a/sys-auth/nss-myhostname/nss-myhostname-0.3.ebuild b/sys-auth/nss-myhostname/nss-myhostname-0.3.ebuild
new file mode 100644
index 000000000000..9d7ac8b9493b
--- /dev/null
+++ b/sys-auth/nss-myhostname/nss-myhostname-0.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/nss-myhostname/nss-myhostname-0.3.ebuild,v 1.1 2012/02/08 21:46:41 tetromino Exp $
+
+EAPI="4"
+
+DESCRIPTION="Name Service Switch module for resolving the local hostname"
+HOMEPAGE="http://0pointer.de/lennart/projects/nss-myhostname/"
+SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # The documentation in doc/ is just the README file in other formats
+ sed -e 's:SUBDIRS *= *doc:SUBDIRS =:' -i Makefile.{am,in} ||
+ die "sed failed"
+}
+
+src_configure() {
+ econf --disable-lynx
+}
+
+pkg_postinst() {
+ elog "You must modify your name service switch lookup file to enable"
+ elog "nss-myhostname. To do so, add 'myhostname' to the hosts line in"
+ elog "/etc/nsswitch.conf"
+ elog
+ elog "An example hosts line looks like this:"
+ elog "hosts: files dns myhostname"
+ elog
+}