]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
glibc: Disable libcrypt and ship libxcrypt instead
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Feb 2021 14:51:26 +0000 (09:51 -0500)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 5 Feb 2021 18:43:05 +0000 (18:43 +0000)
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>
config/rootfiles/common/aarch64/glibc
config/rootfiles/common/armv5tel/glibc
config/rootfiles/common/i586/glibc
config/rootfiles/common/libxcrypt [new file with mode: 0644]
config/rootfiles/common/x86_64/glibc
lfs/glibc
lfs/libxcrypt [new file with mode: 0644]
make.sh

index 6a01217e0bdcc13780a3f41519839fc660724e84..9f295786662713510ee34c1d7dc430b218406f63 100644 (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
index dce188845d95d372432984395b706b697bc279ee..27607f496f32ff23aa35f91b300af63cedd312cb 100644 (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
index a397b906e15a46ea26a1d71f0dc34f97f7139446..256e9eefe710c611a64f60f95ec588ea56f86782 100644 (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
diff --git a/config/rootfiles/common/libxcrypt b/config/rootfiles/common/libxcrypt
new file mode 100644 (file)
index 0000000..c866c2d
--- /dev/null
@@ -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
index b99f5221288d66acd6492602612ec63738825867..43f9afb873c1338f0beb9725b4862367e01fb0c4 100644 (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
index 281c290dcd2b7d92d14138ff57cc45c8c60351b2..50217fab6e40ac52cf9f11e81a42b208fbe2160a 100644 (file)
--- 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 (file)
index 0000000..8fb937c
--- /dev/null
@@ -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)
diff --git a/make.sh b/make.sh
index 99f1c41d1835b518f7b296d060d6dd750b579efa..164fd7c729e56483de8fc74a26da8d7222d8ff37 100755 (executable)
--- 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