Obsolete the libcrypt-nss subpackage (#1525396)
This commit is contained in:
parent
29bd4db4f5
commit
08930d16b5
|
@ -1,114 +0,0 @@
|
|||
This patch creates a crypt-glibc subdirectory which builds the
|
||||
libgcrypt files, but this time against the glibc sources.
|
||||
|
||||
The default subdirs list does not include this subdirectory because
|
||||
the file names conflict with the crypt directory. The spec file does
|
||||
not use the install target to install the built libcrypt.so file,
|
||||
either.
|
||||
|
||||
Index: b/crypt-glibc/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/crypt-glibc/Makefile
|
||||
@@ -0,0 +1,61 @@
|
||||
+# Build libcrypt against internal cryptographic algorithms.
|
||||
+# Copyright (C) 1996-2016 Free Software Foundation, Inc.
|
||||
+# This file is part of the GNU C Library.
|
||||
+
|
||||
+# The GNU C Library is free software; you can redistribute it and/or
|
||||
+# modify it under the terms of the GNU Lesser General Public
|
||||
+# License as published by the Free Software Foundation; either
|
||||
+# version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+# The GNU C Library is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# Lesser General Public License for more details.
|
||||
+
|
||||
+# You should have received a copy of the GNU Lesser General Public
|
||||
+# License along with the GNU C Library; if not, see
|
||||
+# <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+#
|
||||
+# Sub-makefile for crypt() portion of the library.
|
||||
+#
|
||||
+subdir := crypt-glibc
|
||||
+
|
||||
+include ../Makeconfig
|
||||
+
|
||||
+extra-libs := libcrypt
|
||||
+extra-libs-others := $(extra-libs)
|
||||
+
|
||||
+# Use the sources in the crypt subdirectory.
|
||||
+vpath %.c ../crypt
|
||||
+vpath %.input ../crypt
|
||||
+
|
||||
+libcrypt-routines := \
|
||||
+ crypt-entry md5-crypt sha256-crypt sha512-crypt crypt crypt_util
|
||||
+
|
||||
+tests := cert md5c-test sha256c-test sha512c-test badsalttest
|
||||
+
|
||||
+libcrypt-routines += md5 sha256 sha512
|
||||
+
|
||||
+tests += md5test sha256test sha512test
|
||||
+
|
||||
+# The test md5test-giant uses up to 400 MB of RSS and runs on a fast
|
||||
+# machine over a minute.
|
||||
+xtests = md5test-giant
|
||||
+
|
||||
+include ../Rules
|
||||
+
|
||||
+md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
|
||||
+sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
|
||||
+sha512-routines := sha512 $(filter sha512%,$(libcrypt-sysdep_routines))
|
||||
+
|
||||
+$(objpfx)md5test: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
||||
+$(objpfx)md5test-giant: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
||||
+$(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines))
|
||||
+$(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
|
||||
+
|
||||
+ifeq (yes,$(build-shared))
|
||||
+$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
|
||||
+else
|
||||
+$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
|
||||
+endif
|
||||
Index: b/crypt/md5.c
|
||||
===================================================================
|
||||
--- a/crypt/md5.c
|
||||
+++ b/crypt/md5.c
|
||||
@@ -270,4 +270,4 @@ md5_process_bytes (const void *buffer, s
|
||||
}
|
||||
}
|
||||
|
||||
-#include <md5-block.c>
|
||||
+#include "md5-block.c"
|
||||
Index: b/crypt/sha256.c
|
||||
===================================================================
|
||||
--- a/crypt/sha256.c
|
||||
+++ b/crypt/sha256.c
|
||||
@@ -211,4 +211,4 @@ __sha256_process_bytes (const void *buff
|
||||
}
|
||||
}
|
||||
|
||||
-#include <sha256-block.c>
|
||||
+#include "sha256-block.c"
|
||||
Index: b/crypt/sha512.c
|
||||
===================================================================
|
||||
--- a/crypt/sha512.c
|
||||
+++ b/crypt/sha512.c
|
||||
@@ -235,4 +235,4 @@ __sha512_process_bytes (const void *buff
|
||||
}
|
||||
}
|
||||
|
||||
-#include <sha512-block.c>
|
||||
+#include "sha512-block.c"
|
||||
Index: b/crypt-glibc/Versions
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/crypt-glibc/Versions
|
||||
@@ -0,0 +1,5 @@
|
||||
+libcrypt {
|
||||
+ GLIBC_2.0 {
|
||||
+ crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
|
||||
+ }
|
||||
+}
|
92
glibc.spec
92
glibc.spec
|
@ -184,9 +184,6 @@ Patch0053: glibc-cs-path.patch
|
|||
# Add C.UTF-8 locale into /usr/lib/locale/
|
||||
Patch0059: glibc-c-utf8-locale.patch
|
||||
|
||||
# Build libcrypt twice, with and without NSS.
|
||||
Patch0060: glibc-rh1324623.patch
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Patches from upstream
|
||||
|
@ -236,11 +233,6 @@ Provides: ldconfig
|
|||
Provides: rtld(GNU_HASH)
|
||||
Requires: glibc-common = %{version}-%{release}
|
||||
|
||||
%if %{without bootstrap}
|
||||
# Use the NSS-based cryptographic libraries by default.
|
||||
Suggests: libcrypt-nss%{_isa}
|
||||
%endif
|
||||
|
||||
Requires(pre): basesystem
|
||||
|
||||
# This is for building auxiliary programs like memusage, nscd
|
||||
|
@ -257,7 +249,6 @@ BuildRequires: texinfo >= 5.0
|
|||
%endif
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: libselinux-devel >= 1.33.4-3
|
||||
BuildRequires: nss-devel
|
||||
%endif
|
||||
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext
|
||||
# We need procps-ng (/bin/ps), util-linux (/bin/kill), and gawk (/bin/awk),
|
||||
|
@ -352,19 +343,18 @@ library and the standard math library. Without these two libraries, a
|
|||
Linux system will not function.
|
||||
|
||||
######################################################################
|
||||
# crypt subpackages
|
||||
# libcrypt subpackage
|
||||
######################################################################
|
||||
|
||||
%package -n libcrypt
|
||||
Summary: Password hashing library (non-NSS version)
|
||||
Summary: Password hashing library
|
||||
Requires: %{name}%{_isa} = %{version}-%{release}
|
||||
Provides: libcrypt%{_isa}
|
||||
Conflicts: libcrypt-nss
|
||||
Obsoletes: libcrypt-nss
|
||||
|
||||
%description -n libcrypt
|
||||
This package provides the crypt function, which implements password
|
||||
hashing. The glibc implementation of the cryptographic algorithms is
|
||||
used by this package.
|
||||
hashing.
|
||||
|
||||
%post -n libcrypt
|
||||
/sbin/ldconfig
|
||||
|
@ -372,25 +362,6 @@ used by this package.
|
|||
%postun -n libcrypt
|
||||
/sbin/ldconfig
|
||||
|
||||
%if %{without bootstrap}
|
||||
%package -n libcrypt-nss
|
||||
Summary: Password hashing library (NSS version)
|
||||
Requires: %{name}%{_isa} = %{version}-%{release}
|
||||
Provides: libcrypt%{_isa}
|
||||
Conflicts: libcrypt
|
||||
|
||||
%description -n libcrypt-nss
|
||||
This package provides the crypt function, which implements password
|
||||
hashing. The cryptographic algorithm implementations are provided by
|
||||
the low-level NSS libraries.
|
||||
|
||||
%post -n libcrypt-nss
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun -n libcrypt-nss
|
||||
/sbin/ldconfig
|
||||
%endif
|
||||
|
||||
##############################################################################
|
||||
# glibc "devel" sub-package
|
||||
##############################################################################
|
||||
|
@ -764,7 +735,6 @@ microbenchmark tests on the system.
|
|||
%patch0047 -p1
|
||||
%patch0053 -p1
|
||||
%patch0059 -p1
|
||||
%patch0060 -p1
|
||||
%patch2037 -p1
|
||||
%patch2112 -p1
|
||||
|
||||
|
@ -955,10 +925,8 @@ build()
|
|||
--disable-profile \
|
||||
%if %{with bootstrap}
|
||||
--without-selinux \
|
||||
--disable-nss-crypt ||
|
||||
%else
|
||||
--enable-nss-crypt ||
|
||||
%endif
|
||||
--disable-nss-crypt ||
|
||||
{ cat config.log; false; }
|
||||
|
||||
make %{?_smp_mflags} -O -r CFLAGS="$build_CFLAGS"
|
||||
|
@ -1012,12 +980,6 @@ build
|
|||
)
|
||||
%endif
|
||||
|
||||
# Build libcrypt with glibc cryptographic implementations.
|
||||
%if %{without bootstrap}
|
||||
make %{?_smp_mflags} -O -C build-%{target} subdirs=crypt-glibc \
|
||||
CFLAGS="$build_CFLAGS"
|
||||
%endif
|
||||
|
||||
##############################################################################
|
||||
# Build the glibc post-upgrade program:
|
||||
# We only build one of these with the default set of options. This program
|
||||
|
@ -1112,31 +1074,6 @@ install_different()
|
|||
done
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# Install libcrypt
|
||||
#############################################################################
|
||||
|
||||
%if %{without bootstrap}
|
||||
# Move the NSS-based implementation out of the way.
|
||||
libcrypt_found=false
|
||||
for libcrypt in ${RPM_BUILD_ROOT}/%{_lib}/libcrypt-*.so ; do
|
||||
if $libcrypt_found; then
|
||||
# Multiple libcrypt files
|
||||
ls -l ${RPM_BUILD_ROOT}/%{_lib}/libcrypt-*.so
|
||||
exit 1
|
||||
fi
|
||||
mv "$libcrypt" "$(echo "$libcrypt" | sed s/libcrypt-/libcrypt-nss-/)"
|
||||
done
|
||||
|
||||
# Install the non-NSS implementation in the original path.
|
||||
install -m 755 build-%{target}/crypt-glibc/libcrypt.so "$libcrypt"
|
||||
|
||||
unset libcrypt libcrypt_found
|
||||
%endif
|
||||
|
||||
# This symbolic link will be generated by ldconfig.
|
||||
rm -f ${RPM_BUILD_ROOT}/%{_lib}/libcrypt.so.1
|
||||
|
||||
##############################################################################
|
||||
# Install the power6 build files.
|
||||
##############################################################################
|
||||
|
@ -1339,8 +1276,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_libdir}/*_p.a
|
|||
# - Contains the list of files for the headers subpackage.
|
||||
# * static.filelist
|
||||
# - Contains the list of files for the static subpackage.
|
||||
# * libcrypt.filelist, libcrypt-nss.filelist
|
||||
# - Contains the list of files for the crypt-related subpackages
|
||||
# * libcrypt.filelist
|
||||
# - Contains the list of files for the libcrypt subpackage
|
||||
# * nss_db.filelist, nss_nis.filelist, nss_hesiod.filelist
|
||||
# - File lists for nss_* NSS module subpackages.
|
||||
# * nss-devel.filelist
|
||||
|
@ -1522,9 +1459,6 @@ cat nss_files.filelist nss_dns.filelist nss_compat.filelist >> rpm.filelist
|
|||
# Prepare the libcrypt-related file lists.
|
||||
grep '/libcrypt-[0-9.]*.so$' rpm.filelist > libcrypt.filelist
|
||||
test $(wc -l < libcrypt.filelist) -eq 1
|
||||
%if %{without bootstrap}
|
||||
sed s/libcrypt/libcrypt-nss/ < libcrypt.filelist > libcrypt-nss.filelist
|
||||
%endif
|
||||
sed -i -e '\,/libcrypt,d' rpm.filelist
|
||||
|
||||
# Remove the zoneinfo files
|
||||
|
@ -1643,9 +1577,6 @@ find_debuginfo_args="$find_debuginfo_args \
|
|||
-o debuginfocommon.filelist \
|
||||
-l nss_db.filelist -l nss_nis.filelist -l nss_hesiod.filelist \
|
||||
-l libcrypt.filelist \
|
||||
%if %{without bootstrap}
|
||||
-l libcrypt-nss.filelist \
|
||||
%endif
|
||||
-l rpm.filelist \
|
||||
%if %{with benchtests}
|
||||
-l benchtests.filelist
|
||||
|
@ -1825,10 +1756,6 @@ run_tests () {
|
|||
done
|
||||
fi
|
||||
|
||||
# If the crypt-glibc test suite fails, something is completely
|
||||
# broken, so fail the build in this case.
|
||||
make %{?_smp_mflags} -O subdirs=crypt-glibc check
|
||||
|
||||
# Unconditonally dump differences in the system call list.
|
||||
echo "* System call consistency checks:"
|
||||
cat misc/tst-syscall-list.out
|
||||
|
@ -2089,10 +2016,6 @@ fi
|
|||
%files -f libcrypt.filelist -n libcrypt
|
||||
%doc documentation/README.ufc-crypt
|
||||
%ghost /%{_lib}/libcrypt.so.1
|
||||
%if %{without bootstrap}
|
||||
%files -f libcrypt-nss.filelist -n libcrypt-nss
|
||||
%ghost /%{_lib}/libcrypt.so.1
|
||||
%endif
|
||||
|
||||
%if 0%{?_enable_debug_packages}
|
||||
%files debuginfo -f debuginfo.filelist
|
||||
|
@ -2112,6 +2035,7 @@ fi
|
|||
|
||||
%changelog
|
||||
* Wed Dec 13 2017 Florian Weimer <fweimer@redhat.com> - 2.26.9000-32
|
||||
- Obsolete the libcrypt-nss subpackage (#1525396)
|
||||
- armhfp: Disable -fstack-clash-protection due to GCC bug (#1522678)
|
||||
- ppc64: Disable power6 multilib due to GCC bug (#1522675)
|
||||
- Auto-sync with upstream branch master,
|
||||
|
|
Loading…
Reference in New Issue