public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andreas K. Huttel <dilfridge@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] configure: Disable building libcrypt by default
Date: Thu, 20 Jul 2023 18:38:57 +0000 (GMT)	[thread overview]
Message-ID: <20230720183857.5DDF93858CDB@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6c85c5a1773d786ccdc375e34431488fbcdd88e0

commit 6c85c5a1773d786ccdc375e34431488fbcdd88e0
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Mon Jul 17 12:44:17 2023 -0400

    configure: Disable building libcrypt by default
    
    We mentioned eventual dropping of libcrypt in the 2.28 NEWS.  Actually
    put that plan in motion by first disabling building libcrypt by default.
    note in NEWS that the library will be dropped completely in a future
    release.
    
    Also add a couple of builds into build-many-glibcs.py.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
    Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>

Diff:
---
 INSTALL                      | 22 ++++++++++++----------
 NEWS                         |  5 +++++
 configure                    |  4 ++--
 configure.ac                 |  6 +++---
 manual/install.texi          | 22 ++++++++++++----------
 scripts/build-many-glibcs.py |  8 ++++++--
 6 files changed, 40 insertions(+), 27 deletions(-)

diff --git a/INSTALL b/INSTALL
index 30b874cd3a..da24b95c97 100644
--- a/INSTALL
+++ b/INSTALL
@@ -228,16 +228,18 @@ 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.
-
-     This option is for hackers and distributions experimenting with
-     independently-maintained implementations of libcrypt.  It may
-     become the default in a future release.
+‘--enable-crypt’
+     Install the legacy 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 who may not yet be
+     able to use libcrypt alternatives such as libxcrypt and need this
+     legacy implementation as a temporary workaround.  Note that
+     libcrypt may be removed in a future release.
 
 ‘--disable-scv’
      Disable using ‘scv’ instruction for syscalls.  All syscalls will
diff --git a/NEWS b/NEWS
index f976abccbd..93f7d9faaa 100644
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,11 @@ Major new features:
 
 Deprecated and removed features, and other changes affecting compatibility:
 
+* libcrypt is no longer built by default, one may use the --enable-crypt
+  option to build libcrypt.  libcrypt is likely to be removed from the
+  GNU C Library in a future release, so it is recommended that
+  applications port away from it to an alternative such as libxcrypt.
+
 * In the Linux kernel for the hppa/parisc architecture some of the
   MADV_XXX constants were changed to have the same values as the other
   architectures.  New programs compiled with this glibc version and which
diff --git a/configure b/configure
index c02c0b5825..d2a0eb9734 100755
--- a/configure
+++ b/configure
@@ -1484,7 +1484,7 @@ 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
+  --enable-crypt          build and install the legacy passphrase hashing
                           library, libcrypt
   --enable-nss-crypt      enable libcrypt to use nss
   --enable-systemtap      enable systemtap static probe points [default=no]
@@ -4577,7 +4577,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 09553541fb..f508a3722b 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 legacy 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 be27a1b600..623d64a4b5 100644
--- a/manual/install.texi
+++ b/manual/install.texi
@@ -256,16 +256,18 @@ 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.
-
-This option is for hackers and distributions experimenting with
-independently-maintained implementations of libcrypt.  It may become
-the default in a future release.
+@item --enable-crypt
+Install the legacy 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 who may not yet be able to
+use libcrypt alternatives such as libxcrypt and need this legacy
+implementation as a temporary workaround.  Note that libcrypt may be
+removed in a future release.
 
 @item --disable-scv
 Disable using @code{scv} instruction for syscalls. All syscalls will use
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index e4eaec01e3..73ffc57c86 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -431,7 +431,9 @@ class Context(object):
                                       {'variant': 'disable-multi-arch',
                                        'arch': 'sparcv9',
                                        'ccopts': '-m32 -mlong-double-128 -mcpu=v9',
-                                       'cfg': ['--disable-multi-arch']}])
+                                       'cfg': ['--disable-multi-arch']},
+                                      {'variant': 'enable-crypt',
+                                       'cfg': ['--enable-crypt']}])
         self.add_config(arch='x86_64',
                         os_name='linux-gnu',
                         gcc_cfg=['--with-multilib-list=m64,m32,mx32'],
@@ -466,7 +468,9 @@ class Context(object):
                                       {'arch': 'i586',
                                        'ccopts': '-m32 -march=i586'},
                                       {'variant': 'enable-fortify-source',
-                                       'cfg': ['--enable-fortify-source']}])
+                                       'cfg': ['--enable-fortify-source']},
+                                      {'variant': 'enable-crypt',
+                                       'cfg': ['--enable-crypt']}])
         self.add_config(arch='x86_64',
                         os_name='gnu',
                         gcc_cfg=['--disable-multilib'])

                 reply	other threads:[~2023-07-20 18:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230720183857.5DDF93858CDB@sourceware.org \
    --to=dilfridge@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).