commit
9056efe97e
@ -0,0 +1 @@
|
||||
SOURCES/nss-altfiles-2.23.0.tar.gz
|
@ -0,0 +1 @@
|
||||
dec35095f974b6dbe460c770443c0e70cbeb1b56 SOURCES/nss-altfiles-2.23.0.tar.gz
|
@ -0,0 +1,52 @@
|
||||
commit b87b28953cee248cffe05c8fd07d4a812a077e0d
|
||||
Author: Jan Pazdziora <jpazdziora@redhat.com>
|
||||
Date: Fri Dec 31 14:39:18 2021 +0100
|
||||
|
||||
build-sys: Inherit LDFLAGS
|
||||
|
||||
So that we can respect e.g. the Fedora hardening flags.
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index ea35529..f810fce 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -23,7 +23,7 @@ O := $(if $(HANDLE_rpc), src/nss_altfiles/files-rpc.o) \
|
||||
src/nss_altfiles/files-have_o_cloexec.o
|
||||
|
||||
CFLAGS += $(EXTRA_CFLAGS) -pthread -fpic -std=gnu99 -Wall
|
||||
-LDFLAGS += $(CFLAGS) -Wl,-soname,$T -Wl,-as-needed -lpthread
|
||||
+LDFLAGS += $(CFLAGS) $(EXTRA_LDFLAGS) -Wl,-soname,$T -Wl,-as-needed -lpthread
|
||||
CPPFLAGS += -D_GNU_SOURCE
|
||||
|
||||
ifneq ($(strip $(DATADIR)),)
|
||||
diff --git a/configure b/configure
|
||||
index 2b45e0b..74695b0 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -37,6 +37,7 @@ for var in "$@" ; do
|
||||
|
||||
CFLAGS Additional command line flags to be passed to the C compiler
|
||||
CXXFLAGS Additional command line flags to be passed to the C++ compiler
|
||||
+ LDFLAGS Additional command line flags to be passed to the linker
|
||||
|
||||
NOTE: This script tries to mimic the typical usage for configure scripts
|
||||
generated by autotools, hence it will silently ignore unrecognized
|
||||
@@ -54,7 +55,7 @@ echo EXTRA_CXXFLAGS= >> config.mk
|
||||
|
||||
for var in "$@" ; do
|
||||
case ${var} in
|
||||
- CFLAGS=* | CXXFLAGS=*)
|
||||
+ CFLAGS=* | CXXFLAGS=* | LDFLAGS=* )
|
||||
echo "Setting EXTRA_${var}"
|
||||
echo "EXTRA_${var}" >> config.mk
|
||||
;;
|
||||
@@ -107,5 +108,9 @@ if test -n "${CXXFLAGS}"; then
|
||||
echo "Setting EXTRA_CXXFLAGS+=${CXXFLAGS} (from environment)"
|
||||
echo "EXTRA_CXXFLAGS+=${CXXFLAGS}" >> config.mk
|
||||
fi
|
||||
+if test -n "${LDFLAGS}"; then
|
||||
+ echo "Setting EXTRA_LDFLAGS+=${LDFLAGS} (from environment)"
|
||||
+ echo "EXTRA_LDFLAGS+=${LDFLAGS}" >> config.mk
|
||||
+fi
|
||||
|
||||
echo "config.mk written"
|
@ -0,0 +1,106 @@
|
||||
commit de2b32289bf701ce3c8167a1b58436866922085e
|
||||
Author: Tan Shen Joon <shen.joon.tan@intel.com>
|
||||
Date: Thu Aug 15 10:43:34 2019 +0800
|
||||
|
||||
deprecate RES_USE_INET6
|
||||
|
||||
Following the remove of RES_USE_INET6, this patch
|
||||
is cherry picked from glibc patch to adopt the similar
|
||||
fix
|
||||
|
||||
https://sourceware.org/git/?p=glibc.git;a=commit;h=9c02d0784dfa0bb4b0bfec4fb6db35d3ea953288
|
||||
|
||||
Signed-off-by: Tan Shen Joon <shen.joon.tan@intel.com>
|
||||
|
||||
diff --git a/src/nss_altfiles/files-hosts.c b/src/nss_altfiles/files-hosts.c
|
||||
index 65661d8..8d31a1f 100644
|
||||
--- a/src/nss_altfiles/files-hosts.c
|
||||
+++ b/src/nss_altfiles/files-hosts.c
|
||||
@@ -33,8 +33,8 @@
|
||||
#define DATABASE "hosts"
|
||||
#define NEED_H_ERRNO
|
||||
|
||||
-#define EXTRA_ARGS , af, flags
|
||||
-#define EXTRA_ARGS_DECL , int af, int flags
|
||||
+#define EXTRA_ARGS , af
|
||||
+#define EXTRA_ARGS_DECL , int af
|
||||
|
||||
#define ENTDATA hostent_data
|
||||
struct hostent_data
|
||||
@@ -59,12 +59,7 @@ LINE_PARSER
|
||||
af = af == AF_UNSPEC ? AF_INET : af;
|
||||
else
|
||||
{
|
||||
- if (af == AF_INET6 && (flags & AI_V4MAPPED) != 0
|
||||
- && inet_pton (AF_INET, addr, entdata->host_addr) > 0)
|
||||
- map_v4v6_address ((char *) entdata->host_addr,
|
||||
- (char *) entdata->host_addr);
|
||||
- else if (af == AF_INET
|
||||
- && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
|
||||
+ if (af == AF_INET && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
|
||||
{
|
||||
if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr))
|
||||
memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ);
|
||||
@@ -97,16 +92,13 @@ LINE_PARSER
|
||||
STRING_FIELD (result->h_name, isspace, 1);
|
||||
})
|
||||
|
||||
-#define EXTRA_ARGS_VALUE \
|
||||
- , ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET), \
|
||||
- ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0)
|
||||
+#define EXTRA_ARGS_VALUE , AF_INET
|
||||
#include "files-XXX.c"
|
||||
#undef EXTRA_ARGS_VALUE
|
||||
|
||||
/* We only need to consider IPv4 mapped addresses if the input to the
|
||||
gethostbyaddr() function is an IPv6 address. */
|
||||
-#define EXTRA_ARGS_VALUE \
|
||||
- , af, (len == IN6ADDRSZ ? AI_V4MAPPED : 0)
|
||||
+#define EXTRA_ARGS_VALUE , af
|
||||
DB_LOOKUP (hostbyaddr, ,,,
|
||||
{
|
||||
if (result->h_length == (int) len
|
||||
@@ -130,12 +122,8 @@ ALTFILES_SYMBOL1(_gethostbyname3_r) (const char *name, int af, struct hostent *r
|
||||
|
||||
if (status == NSS_STATUS_SUCCESS)
|
||||
{
|
||||
- /* XXX Is using _res to determine whether we want to convert IPv4
|
||||
- addresses to IPv6 addresses really the right thing to do? */
|
||||
- int flags = ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0);
|
||||
-
|
||||
while ((status = internal_getent (stream, result, buffer, buflen, errnop,
|
||||
- herrnop, af, flags))
|
||||
+ herrnop, af))
|
||||
== NSS_STATUS_SUCCESS)
|
||||
{
|
||||
LOOKUP_NAME_CASE (h_name, h_aliases)
|
||||
@@ -162,8 +150,7 @@ ALTFILES_SYMBOL1(_gethostbyname3_r) (const char *name, int af, struct hostent *r
|
||||
|
||||
again:
|
||||
while ((status = internal_getent (stream, &tmp_result_buf, tmp_buffer,
|
||||
- tmp_buflen, errnop, herrnop, af,
|
||||
- flags))
|
||||
+ tmp_buflen, errnop, herrnop, af))
|
||||
== NSS_STATUS_SUCCESS)
|
||||
{
|
||||
int matches = 1;
|
||||
@@ -351,9 +338,7 @@ ALTFILES_SYMBOL1(_gethostbyname_r) (const char *name, struct hostent *result,
|
||||
char *buffer, size_t buflen, int *errnop,
|
||||
int *herrnop)
|
||||
{
|
||||
- int af = ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET);
|
||||
-
|
||||
- return ALTFILES_SYMBOL1(_gethostbyname3_r) (name, af, result, buffer, buflen,
|
||||
+ return ALTFILES_SYMBOL1(_gethostbyname3_r) (name, AF_INET, result, buffer, buflen,
|
||||
errnop, herrnop, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -390,7 +375,7 @@ ALTFILES_SYMBOL1(_gethostbyname4_r) (const char *name, struct gaih_addrtuple **p
|
||||
|
||||
struct hostent result;
|
||||
status = internal_getent (stream, &result, buffer, buflen, errnop,
|
||||
- herrnop, AF_UNSPEC, 0);
|
||||
+ herrnop, AF_UNSPEC);
|
||||
if (status != NSS_STATUS_SUCCESS)
|
||||
break;
|
||||
|
@ -0,0 +1,119 @@
|
||||
Summary: NSS module to look up from files in /usr/lib as well
|
||||
Name: nss-altfiles
|
||||
Version: 2.23.0
|
||||
Release: 4%{?dist}
|
||||
Source0: https://github.com/flatcar/nss-altfiles/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch1: 0001-build-sys-Inherit-LDFLAGS.patch
|
||||
# From https://github.com/flatcar/nss-altfiles/commit/de2b32289bf701ce3c8167a1b58436866922085e
|
||||
Patch2: 0003-deprecate-RES_USE_INET6.patch
|
||||
License: LGPL-2.1-or-later and MIT
|
||||
URL: https://github.com/flatcar/nss-altfiles
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: git
|
||||
|
||||
%description
|
||||
When installed, this package allows looking up users
|
||||
in %{prefix}/lib/passwd, and from respective files for all other NSS maps.
|
||||
|
||||
%prep
|
||||
%autosetup -Sgit
|
||||
|
||||
%build
|
||||
./configure --with-types=all --prefix=%{_prefix} --libdir=%{_libdir} CFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%changelog
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.23.0-4
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.23.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.23.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Jan Pazdziora <jpazdziora@redhat.com> - 2.23.0-1
|
||||
- Rebase to 2.23.0 (fedora#2036375)
|
||||
- Change upstream to https://github.com/flatcar/nss-altfiles
|
||||
- Enable all maps (fedora#2036375)
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 20 2018 Colin Walters <walters@verbum.org> - 2.18.1-13
|
||||
- BR gcc
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.18.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.18.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.18.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Wed May 28 2014 Ville Skyttä <ville.skytta@iki.fi> - 2.18.1-3
|
||||
- Build with $RPM_OPT_FLAGS
|
||||
|
||||
* Tue Apr 08 2014 Colin Walters <walters@verbum.org>
|
||||
- Revert patch to link to libc, causes a dep on GLIBC_PRIVATE
|
||||
|
||||
* Sat Mar 22 2014 Colin Walters <walters@verbum.org>
|
||||
- Initial packaging
|
Loading…
Reference in new issue