Spec URL: http://0pointer.de/public/nss-myhostname.spec SRPM URL: http://0pointer.de/public/nss-myhostname-0.2-1.fc10.src.rpm Description: 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). A lot of software relies on that the local host name is resolvable via DNS to an IPv4 or IPv6 address. When using dynamic hostnames this is usually achieved by patching /etc/hosts which however is suboptimal since it requires a writable /etc file system and is fragile because the file might also be edited by the administrator. nss-myhostname simply returns 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/hostname is thus no longer necessary. --- When we make the system host name a bit more more dynamic this should allow us to still guarantee that the hostname stays resolvable under all circumstances without having to rewrite /etc/hosts all the time.
Sorry that nobody has looked at this in so long. Fortunately it still builds fine in current rawhide. rpmlint complains: nss-myhostname.x86_64: W: summary-not-capitalized glibc plugin for local system host name resolution which is technically correct, but I personally would see "Glibc" as being a bit odd. I'll leave that up to you. The LICENSE file needs to be included in the package as %doc. %post calls ldconfig and sed without explicit dependencies; %preun calls sed without a dependency on it. %postun is OK because rpm gets that dependency right. I installed this and it seems to work as advertised. The scriptlets seem the same as those in nss-mdns and look OK to me. * source files match upstream. sha256sum: e28b93ca1cabb1c09f16c5d69706ad99952146078cd3cf8565eae26e99af8207 nss-myhostname-0.2.tar.gz * package meets naming and versioning guidelines. * specfile is properly named, is cleanly written and uses macros consistently. * summary is OK. * description is OK. * dist tag is present. * build root is OK. * license field matches the actual license. * license is open source-compatible. X license text not included in package. * latest version is being packaged. * BuildRequires are proper. * compiler flags are appropriate. * %clean is present. * package builds in mock (rawhide, x86_64). * package installs properly. * debuginfo package looks complete. * rpmlint has acceptable complaints. X final provides and requires: libnss_myhostname.so.2()(64bit) nss-myhostname = 0.2-1.fc11 nss-myhostname(x86-64) = 0.2-1.fc11 = /bin/sh /sbin/ldconfig X missing sed * %check is not present; no test suite upstream. I tested this and it seems to work as far as I can tell. * shared libraries are installed; ldconfig called properly. * owns the directories it creates. * doesn't own any directories it shouldn't. * no duplicates in %files. * file permissions are appropriate. * no generically named files X scriptlets are OK but dependencies are missing. * code, not content. * documentation is small, so no -doc subpackage is necessary. * %docs are not necessary for the proper functioning of the package. * no headers. * no pkgconfig files. * no static libraries. * no libtool .la files.
Spec file updated at same place. Happy?
It's nice to give a new src.rpm so that I can do another build, but I just updated the old package. It looks good to me. APPROVED
New Package CVS Request ======================= Package Name: nss-myhostname Short Description: glibc plugin for local system host name resolution Owners: lennart Branches: devel
cvs done.
Now commited to rawhide.