diff mbox series

[v2,4/4] configure: Disable building libcrypt by default

Message ID 20230630014248.2819836-5-siddhesh@sourceware.org
State New
Headers show
Series Update default build configuration | expand

Commit Message

Siddhesh Poyarekar June 30, 2023, 1:42 a.m. UTC
We mentioned eventual dropping of libcrypt in the 2.28 NEWS.  Actually
put that plan in motion by first disabling building libcrypt by default.
In the near future we need to drop it completely but ISTM that Gentoo
still uses it to fix some perl compatibility issues.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
---
 INSTALL             | 12 ++++++------
 NEWS                |  5 +++++
 configure           |  6 +++---
 configure.ac        |  6 +++---
 manual/install.texi | 13 +++++++------
 5 files changed, 24 insertions(+), 18 deletions(-)

Comments

Florian Weimer July 13, 2023, 9:40 a.m. UTC | #1
* Siddhesh Poyarekar via Libc-alpha:

> We mentioned eventual dropping of libcrypt in the 2.28 NEWS.  Actually
> put that plan in motion by first disabling building libcrypt by default.
> In the near future we need to drop it completely but ISTM that Gentoo
> still uses it to fix some perl compatibility issues.
>
> Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

This needs some build-many-glibcs.py updates.  I think we should
re-enable libcrypt on the sparc targets (it has custom hash
implementations) and at least another target, so that all code we can
build is actually built somewhere.

Thanks,
Florian
Mark Harris July 14, 2023, 4:16 a.m. UTC | #2
> We mentioned eventual dropping of libcrypt in the 2.28 NEWS.  Actually
> put that plan in motion by first disabling building libcrypt by default.
> In the near future we need to drop it completely but ISTM that Gentoo
> still uses it to fix some perl compatibility issues.

The following paragraph in INSTALL concerning --disable-crypt should
also be updated, since the patch makes it disabled by default.
Perhaps this should instead clarify who might need to enable it.

> This option is for hackers and distributions experimenting with
> independently-maintained implementations of libcrypt.  It may become
> the default in a future release.

 - Mark
Siddhesh Poyarekar July 17, 2023, 3:13 p.m. UTC | #3
On 2023-07-14 00:16, Mark Harris via Libc-alpha wrote:
>> We mentioned eventual dropping of libcrypt in the 2.28 NEWS.  Actually
>> put that plan in motion by first disabling building libcrypt by default.
>> In the near future we need to drop it completely but ISTM that Gentoo
>> still uses it to fix some perl compatibility issues.
> 
> The following paragraph in INSTALL concerning --disable-crypt should
> also be updated, since the patch makes it disabled by default.
> Perhaps this should instead clarify who might need to enable it.

Thanks, fixed.

Sid
diff mbox series

Patch

diff --git a/INSTALL b/INSTALL
index 88ffe7748f..adc38d9150 100644
--- a/INSTALL
+++ b/INSTALL
@@ -229,12 +229,12 @@  if ‘CFLAGS’ is specified it must enable optimization.  For example:
      By default for x86_64, the GNU C Library is built with the vector
      math library.  Use this option to disable the vector math library.
 
-‘--disable-crypt’
-     Do not install the passphrase-hashing library ‘libcrypt’ or the
-     header file ‘crypt.h’.  ‘unistd.h’ will still declare the function
-     ‘crypt’.  Using this option does not change the set of programs
-     that may need to be linked with ‘-lcrypt’; it only means that the
-     GNU C Library will not provide that library.
+‘--enable-crypt’
+     Install the passphrase-hashing library ‘libcrypt’ and the header
+     file ‘crypt.h’.  ‘unistd.h’ will declare the function ‘crypt’
+     regardless of this option.  Using this option does not change the
+     set of programs that may need to be linked with ‘-lcrypt’; it only
+     means that the GNU C Library will provide that library.
 
      This option is for hackers and distributions experimenting with
      independently-maintained implementations of libcrypt.  It may
diff --git a/NEWS b/NEWS
index 264fad5d86..9d82c5ba62 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,11 @@  Major new features:
 * Lazy binding is now disabled by default and can be overridden with the
   --disable-bind-now configure flag.
 
+* libcrypt is no longer built by default, one may use the --enable-crypt
+  option to build libcrypt.  It is recommended that applications port
+  away from the GNU C Library implementation of libcrypt since it will
+  likely be removed in a future release.
+
 Deprecated and removed features, and other changes affecting compatibility:
 
 * In the Linux kernel for the hppa/parisc architecture some of the
diff --git a/configure b/configure
index 6d4b05df18..4d924c4c21 100755
--- a/configure
+++ b/configure
@@ -1480,8 +1480,8 @@  Optional Features:
                           architectures
   --enable-memory-tagging enable memory tagging if supported by the
                           architecture [default=no]
-  --disable-crypt         do not build nor install the passphrase hashing
-                          library, libcrypt
+  --enable-crypt          build and install the passphrase hashing library,
+                          libcrypt
   --enable-nss-crypt      enable libcrypt to use nss
   --enable-systemtap      enable systemtap static probe points [default=no]
   --disable-build-nscd    disable building and installing the nscd daemon
@@ -4569,7 +4569,7 @@  if test ${enable_crypt+y}
 then :
   enableval=$enable_crypt; build_crypt=$enableval
 else $as_nop
-  build_crypt=yes
+  build_crypt=no
 fi
 
 
diff --git a/configure.ac b/configure.ac
index 6fc72df700..8d9ab7d0b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,10 +316,10 @@  fi
 AC_SUBST(memory_tagging)
 
 AC_ARG_ENABLE([crypt],
-              AS_HELP_STRING([--disable-crypt],
-                             [do not build nor install the passphrase hashing library, libcrypt]),
+              AS_HELP_STRING([--enable-crypt],
+                             [build and install the passphrase hashing library, libcrypt]),
               [build_crypt=$enableval],
-              [build_crypt=yes])
+              [build_crypt=no])
 AC_SUBST(build_crypt)
 
 AC_ARG_ENABLE([nss-crypt],
diff --git a/manual/install.texi b/manual/install.texi
index ae43dc51ac..34a4065bda 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -256,12 +256,13 @@  configure with @option{--disable-werror}.
 By default for x86_64, @theglibc{} is built with the vector math library.
 Use this option to disable the vector math library.
 
-@item --disable-crypt
-Do not install the passphrase-hashing library @file{libcrypt} or the
-header file @file{crypt.h}.  @file{unistd.h} will still declare the
-function @code{crypt}.  Using this option does not change the set of
-programs that may need to be linked with @option{-lcrypt}; it only
-means that @theglibc{} will not provide that library.
+@item --enable-crypt
+Install the passphrase-hashing library @file{libcrypt} and the
+header file @file{crypt.h}.  @file{unistd.h} will declare the
+function @code{crypt} regardless of this option.  Using this option does
+not change the set of programs that may need to be linked with
+@option{-lcrypt}; it only means that @theglibc{} will provide that
+library.
 
 This option is for hackers and distributions experimenting with
 independently-maintained implementations of libcrypt.  It may become