From e5b4e9f563f66f70a0e747723ff779fcff3ccd05 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 3 Apr 2014 17:37:47 -0400 Subject: [PATCH] Initial import --- .gitignore | 1 + 0001-Explicitly-link-to-libc.patch | 31 ++++++++++++++++++++++ nss-altfiles.spec | 41 ++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 74 insertions(+) create mode 100644 0001-Explicitly-link-to-libc.patch create mode 100644 nss-altfiles.spec diff --git a/.gitignore b/.gitignore index e69de29..a9c4d70 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/v2.18.1.tar.gz diff --git a/0001-Explicitly-link-to-libc.patch b/0001-Explicitly-link-to-libc.patch new file mode 100644 index 0000000..c90adae --- /dev/null +++ b/0001-Explicitly-link-to-libc.patch @@ -0,0 +1,31 @@ +From d8b586ca4108a50c9badce61c8e820779c58e764 Mon Sep 17 00:00:00 2001 +From: Michael Marineau +Date: Tue, 17 Dec 2013 22:51:27 -0800 +Subject: [PATCH] Explicitly link to libc. + +Previously the library was linked using the -nostdlib flag which made +ldd --verbose look suspicious but everything still worked by virtue of +libpthread dynamically linking to libc. I don't know of any particular +reason for using -nostdlib and the documentation doesn't list it. + +http://www.gnu.org/software/libc/manual/html_node/Adding-another-Service-to-NSS.html +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 8d9b7d2..6b56baf 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ O := files-pwd.o \ + files-have_o_cloexec.o + + CFLAGS += $(EXTRA_CFLAGS) -pthread -fpic +-LDFLAGS += $(CFLAGS) -Wl,-soname,$T -Wl,-as-needed -nostdlib -lpthread ++LDFLAGS += $(CFLAGS) -Wl,-soname,$T -Wl,-as-needed -lpthread + CPPFLAGS += -D_GNU_SOURCE + + ifneq ($(strip $(DATADIR)),) +-- +1.8.3.1 + diff --git a/nss-altfiles.spec b/nss-altfiles.spec new file mode 100644 index 0000000..3df90dc --- /dev/null +++ b/nss-altfiles.spec @@ -0,0 +1,41 @@ +%global commit 89f3f0b390f3bbc58d8964b11a517173ed4eed78 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Summary: NSS module to look up users in /usr/lib/passwd too +Name: nss-altfiles +Version: 2.18.1 +Release: 1%{?dist} +#VCS: https://github.com/aperezdc/nss-altfiles +Source0: https://github.com/aperezdc/nss-altfiles/archive/v%{version}.tar.gz +# From pull request: https://github.com/marineam/nss-altfiles/commit/dda5073238b88b4537f2d2707b0ef67bdd11fe06 +Patch0: 0001-Explicitly-link-to-libc.patch +License: LGPLv2+ +URL: https://github.com/aperezdc/nss-altfiles + +BuildRequires: glibc-devel + +%description +When installed, this package allows looking up users +in %{prefix}/lib/passwd, similarly, groups in %{prefix}/lib/group. + +%prep +%autosetup + +%build +env CFLAGS=%{_optflags} ./configure --prefix=%{_prefix} --libdir=%{_libdir} +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +%files +%doc README.md +%{_libdir}/*.so.* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%changelog +* Sat Mar 22 2014 Colin Walters +- Initial packaging diff --git a/sources b/sources index e69de29..37de565 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9b7974fe70147d38f778b2ef7d153405 v2.18.1.tar.gz