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 <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2021-02-05 09:51:26 -05:00
parent 83e6fa56a5
commit cf6c8e67fb
8 changed files with 115 additions and 24 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -69,7 +69,7 @@ EXTRA_CONFIG += \
--without-selinux \
--enable-experimental-malloc \
--enable-bind-now \
--disable-nss-crypt
--disable-crypt
###############################################################################
# Top-level Rules

89
lfs/libxcrypt Normal file
View File

@@ -0,0 +1,89 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
# #
# 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 <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# 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)

View File

@@ -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