From: Michael Tremer Date: Fri, 5 Feb 2021 14:51:26 +0000 (-0500) Subject: glibc: Disable libcrypt and ship libxcrypt instead X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf6c8e67fbbcbd465748055992d4c0af83697884;p=people%2Fms%2Fipfire-2.x.git glibc: Disable libcrypt and ship libxcrypt instead libcrypt is deprecated in glibc, and is now explicitely disabled. Instead we ship libxcrypt which is an alternative implemenation and can be used as a drop-in replacement. Signed-off-by: Michael Tremer --- diff --git a/config/rootfiles/common/aarch64/glibc b/config/rootfiles/common/aarch64/glibc index 6a01217e0b..9f29578666 100644 --- a/config/rootfiles/common/aarch64/glibc +++ b/config/rootfiles/common/aarch64/glibc @@ -9,8 +9,6 @@ lib/libanl-2.32.so lib/libanl.so.1 lib/libc-2.32.so lib/libc.so.6 -lib/libcrypt-2.32.so -lib/libcrypt.so.1 lib/libdl-2.32.so lib/libdl.so.2 lib/libm-2.32.so @@ -279,7 +277,6 @@ usr/bin/locale #usr/include/byteswap.h #usr/include/complex.h #usr/include/cpio.h -#usr/include/crypt.h #usr/include/ctype.h #usr/include/dirent.h #usr/include/dlfcn.h @@ -794,8 +791,6 @@ usr/lib/gconv #usr/lib/libc.a #usr/lib/libc.so #usr/lib/libc_nonshared.a -#usr/lib/libcrypt.a -#usr/lib/libcrypt.so #usr/lib/libdl.a #usr/lib/libdl.so #usr/lib/libg.a diff --git a/config/rootfiles/common/armv5tel/glibc b/config/rootfiles/common/armv5tel/glibc index dce188845d..27607f496f 100644 --- a/config/rootfiles/common/armv5tel/glibc +++ b/config/rootfiles/common/armv5tel/glibc @@ -9,8 +9,6 @@ lib/libanl-2.32.so lib/libanl.so.1 lib/libc-2.32.so lib/libc.so.6 -lib/libcrypt-2.32.so -lib/libcrypt.so.1 lib/libdl-2.32.so lib/libdl.so.2 lib/libm-2.32.so @@ -279,7 +277,6 @@ usr/bin/locale #usr/include/byteswap.h #usr/include/complex.h #usr/include/cpio.h -#usr/include/crypt.h #usr/include/ctype.h #usr/include/dirent.h #usr/include/dlfcn.h @@ -796,8 +793,6 @@ usr/lib/gconv #usr/lib/libc.a #usr/lib/libc.so #usr/lib/libc_nonshared.a -#usr/lib/libcrypt.a -#usr/lib/libcrypt.so #usr/lib/libdl.a #usr/lib/libdl.so #usr/lib/libg.a diff --git a/config/rootfiles/common/i586/glibc b/config/rootfiles/common/i586/glibc index a397b906e1..256e9eefe7 100644 --- a/config/rootfiles/common/i586/glibc +++ b/config/rootfiles/common/i586/glibc @@ -9,8 +9,6 @@ lib/libanl-2.32.so lib/libanl.so.1 lib/libc-2.32.so lib/libc.so.6 -lib/libcrypt-2.32.so -lib/libcrypt.so.1 lib/libdl-2.32.so lib/libdl.so.2 lib/libm-2.32.so @@ -280,7 +278,6 @@ usr/bin/locale #usr/include/byteswap.h #usr/include/complex.h #usr/include/cpio.h -#usr/include/crypt.h #usr/include/ctype.h #usr/include/dirent.h #usr/include/dlfcn.h @@ -802,8 +799,6 @@ usr/lib/gconv #usr/lib/libc.a #usr/lib/libc.so #usr/lib/libc_nonshared.a -#usr/lib/libcrypt.a -#usr/lib/libcrypt.so #usr/lib/libdl.a #usr/lib/libdl.so #usr/lib/libg.a diff --git a/config/rootfiles/common/libxcrypt b/config/rootfiles/common/libxcrypt new file mode 100644 index 0000000000..c866c2ddb2 --- /dev/null +++ b/config/rootfiles/common/libxcrypt @@ -0,0 +1,20 @@ +#usr/include/crypt.h +#usr/include/xcrypt.h +#usr/lib/libcrypt.la +#usr/lib/libcrypt.so +usr/lib/libcrypt.so.1 +usr/lib/libcrypt.so.1.1.0 +#usr/lib/libowcrypt.so +#usr/lib/libowcrypt.so.1 +#usr/lib/libxcrypt.so +#usr/lib/pkgconfig/libcrypt.pc +#usr/lib/pkgconfig/libxcrypt.pc +#usr/share/man/man3/crypt_checksalt.3 +#usr/share/man/man3/crypt_gensalt.3 +#usr/share/man/man3/crypt_gensalt_ra.3 +#usr/share/man/man3/crypt_gensalt_rn.3 +#usr/share/man/man3/crypt_preferred_method.3 +#usr/share/man/man3/crypt_r.3 +#usr/share/man/man3/crypt_ra.3 +#usr/share/man/man3/crypt_rn.3 +#usr/share/man/man5/crypt.5 diff --git a/config/rootfiles/common/x86_64/glibc b/config/rootfiles/common/x86_64/glibc index b99f522128..43f9afb873 100644 --- a/config/rootfiles/common/x86_64/glibc +++ b/config/rootfiles/common/x86_64/glibc @@ -9,8 +9,6 @@ lib/libanl-2.32.so lib/libanl.so.1 lib/libc-2.32.so lib/libc.so.6 -lib/libcrypt-2.32.so -lib/libcrypt.so.1 lib/libdl-2.32.so lib/libdl.so.2 lib/libm-2.32.so @@ -281,7 +279,6 @@ usr/bin/locale #usr/include/byteswap.h #usr/include/complex.h #usr/include/cpio.h -#usr/include/crypt.h #usr/include/ctype.h #usr/include/dirent.h #usr/include/dlfcn.h @@ -800,8 +797,6 @@ usr/lib/gconv #usr/lib/libc.a #usr/lib/libc.so #usr/lib/libc_nonshared.a -#usr/lib/libcrypt.a -#usr/lib/libcrypt.so #usr/lib/libdl.a #usr/lib/libdl.so #usr/lib/libg.a diff --git a/lfs/glibc b/lfs/glibc index 281c290dcd..50217fab6e 100644 --- a/lfs/glibc +++ b/lfs/glibc @@ -69,7 +69,7 @@ EXTRA_CONFIG += \ --without-selinux \ --enable-experimental-malloc \ --enable-bind-now \ - --disable-nss-crypt + --disable-crypt ############################################################################### # Top-level Rules diff --git a/lfs/libxcrypt b/lfs/libxcrypt new file mode 100644 index 0000000000..8fb937c9b7 --- /dev/null +++ b/lfs/libxcrypt @@ -0,0 +1,89 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2018 IPFire Team # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program 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 General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 4.4.17 + +THISAPP = libxcrypt-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) + +ifeq "$(TOOLCHAIN)" "1" + TARGET = $(DIR_INFO)/$(THISAPP)-tools +else + TARGET = $(DIR_INFO)/$(THISAPP) +endif + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = 12118d098ead971f9a8377cacfdd0da7 + +install : $(TARGET) + +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && autoreconf -vfi + cd $(DIR_APP) && \ + ./configure \ + --prefix=$(PREFIX) \ + --disable-static \ + --enable-hashes=strong,glibc \ + --enable-obsolete-api \ + --disable-failure-tokens + cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && make install + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 99f1c41d18..164fd7c729 100755 --- a/make.sh +++ b/make.sh @@ -1031,6 +1031,7 @@ buildtoolchain() { lfsmake1 binutils PASS=2 lfsmake1 gcc PASS=2 lfsmake1 zlib + lfsmake1 libxcrypt lfsmake1 ccache PASS=2 lfsmake1 tcl lfsmake1 expect @@ -1074,16 +1075,18 @@ buildbase() { lfsmake2 cleanup-toolchain lfsmake2 zlib lfsmake2 zstd + lfsmake2 autoconf + lfsmake2 automake + lfsmake2 libtool lfsmake2 binutils lfsmake2 gmp lfsmake2 gmp-compat lfsmake2 mpfr lfsmake2 libmpc + lfsmake2 libxcrypt lfsmake2 file lfsmake2 gcc lfsmake2 sed - lfsmake2 autoconf - lfsmake2 automake lfsmake2 berkeley lfsmake2 berkeley-compat lfsmake2 coreutils @@ -1091,7 +1094,6 @@ buildbase() { lfsmake2 m4 lfsmake2 bison lfsmake2 ncurses - lfsmake2 libtool lfsmake2 perl lfsmake2 readline lfsmake2 readline-compat