<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">On Sat, Apr 7, 2018, 05:44 Richard Purdie <<a href="mailto:richard.purdie@linuxfoundation.org" rel="noreferrer noreferrer noreferrer" target="_blank">richard.purdie@linuxfoundation.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fedora28[1] has decided to go ahead and use libxcrypt to replace libcrypt from glibc<br>
despite the change not having merged into glibc upstream yet. This breaks the use of<br>
uninative in OE on fedora28 since binaries there are now using new symbols only found<br>
in libxcrypt. libxcrypt is meant to be backwards compatible with libcrypt but not the<br>
reverse.<br>
<br>
Since this will impact OE in the next release cycle, this changes nativesdk only<br>
to use this new model and adds libxcrypt to work in that case. This allows us to<br>
build a uninative which is compatible with fedora28 and previous other OSes.<br>
<br>
In order to work, recipes will now need to depend on virtual/crypt where they use<br>
libcrypt since its now a separate library and we can't depend on it from glibc to<br>
preseve backwards compatibility since glibc needs to build first. For now, only the<br>
problematic nativesdk recipes have been fixed up. For target use, the default<br>
provider remains glibc for now. Assuming this change is merged into upstream glibc,<br>
we will need to roll this change out for the target but we will do this in the next<br>
release cycle when we can better deal with the resulting bugs.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto">Of course, after this I finished, I think up a new idea :)</div><div dir="auto"><br></div><div dir="auto">Would it be possible to add libxcrypt to the default dependencies (along side glibc)? The main advantage I can see is that it would maintain the "status quo" of libcrypt being there be default. My main observation from when I went though the exercise of getting this to build last night is that while we fixed the SDK for core-image-sato, others may be including additional recipes in their SDK that depend on libcrypt and these can fail in non-obvious ways (for example, util-linux would have been very puzzling to track down if I hadn't know it was related to the libcrypt changes).</div><div dir="auto"><br></div><div dir="auto">We would obviously remove it in the next dev cycle and make the recipes fix their DEPENDS, like we are already planning to do.</div><div dir="auto"><br></div><div dir="auto">It might even be possible to switch the target to using libxcrypt this way, but I don't think I would recommend it.</div><div dir="auto"><br></div><div dir="auto">The main disadvantage that I can think of is that the libxcrypt recipe will be ugly, since it would have to build with <span style="font-family:sans-serif">INHIBIT_DEFAULT_DEPS=1.</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">I'm not sure I sold myself on this idea. I don't think I know enough about all the implications and adding additional nativesdk recipes is not very common, so maybe a blurb in the release notes is sufficent?</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Anyway, I thought I would put it out there.</span></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto"><span style="font-family:sans-serif">Thanks,</span></div><div dir="auto"><span style="font-family:sans-serif">Joshua</span></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
[1] <a href="https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt</a><br>
<br>
Original patch from Charles-Antoine Couret <<a href="mailto:charles-antoine.couret@essensium.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">charles-antoine.couret@essensium.com</a>>,<br>
tweaked by RP to add virtual provides, SkipRecipe for libxcrypt and other minor<br>
tweaks.<br>
<br>
Signed-off-by: Charles-Antoine Couret <<a href="mailto:charles-antoine.couret@essensium.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">charles-antoine.couret@essensium.com</a>><br>
Signed-off-by: Richard Purdie <<a href="mailto:richard.purdie@linuxfoundation.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">richard.purdie@linuxfoundation.org</a>><br>
---<br>
meta/conf/bitbake.conf | 1 +<br>
meta/recipes-core/glibc/glibc.inc | 5 +-<br>
.../glibc/0031-nativesdk-deprecate-libcrypt.patch | 418 +++++++++++++++++++++<br>
meta/recipes-core/glibc/<a href="http://glibc_2.27.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">glibc_2.27.bb</a> | 1 +<br>
meta/recipes-core/glibc/site_config/headers | 1 -<br>
meta/recipes-core/libxcrypt/<a href="http://libxcrypt_4.0.0.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">libxcrypt_4.0.0.bb</a> | 31 ++<br>
meta/recipes-core/meta/<a href="http://uninative-tarball.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">uninative-tarball.bb</a> | 1 +<br>
meta/recipes-core/util-linux/util-linux.inc | 2 +-<br>
meta/recipes-devtools/perl/<a href="http://perl_5.24.1.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">perl_5.24.1.bb</a> | 2 +-<br>
meta/recipes-extended/shadow/shadow.inc | 3 +-<br>
10 files changed, 459 insertions(+), 6 deletions(-)<br>
create mode 100644 meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch<br>
create mode 100644 meta/recipes-core/libxcrypt/<a href="http://libxcrypt_4.0.0.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">libxcrypt_4.0.0.bb</a><br>
<br>
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf<br>
index 93f57f3..60590e2 100644<br>
--- a/meta/conf/bitbake.conf<br>
+++ b/meta/conf/bitbake.conf<br>
@@ -187,6 +187,7 @@ ASSUME_PROVIDED = "\<br>
tar-native \<br>
virtual/libintl-native \<br>
virtual/libiconv-native \<br>
+ virtual/crypt-native \<br>
texinfo-native \<br>
bash-native \<br>
sed-native \<br>
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc<br>
index 361a6fd..9e02ffd 100644<br>
--- a/meta/recipes-core/glibc/glibc.inc<br>
+++ b/meta/recipes-core/glibc/glibc.inc<br>
@@ -35,7 +35,10 @@ siteconfig_do_siteconfig_gencache_prepend = " \<br>
DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"<br>
# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this<br>
#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"<br>
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"<br>
+<br>
+CRYPTPROVIDES = "virtual/crypt"<br>
+CRYPTPROVIDES_class-nativesdk = ""<br>
+PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc ${CRYPTPROVIDES}"<br>
PROVIDES += "virtual/libintl virtual/libiconv"<br>
inherit autotools texinfo distro_features_check systemd<br>
<br>
diff --git a/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch b/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch<br>
new file mode 100644<br>
index 0000000..6b34c70<br>
--- /dev/null<br>
+++ b/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch<br>
@@ -0,0 +1,418 @@<br>
+Background information:<br>
+<br>
+<a href="https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html</a><br>
+<a href="https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt</a><br>
+<br>
+Upstream-Status: Submitted [<a href="mailto:libc-alpha@sourceware.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">libc-alpha@sourceware.org</a>]<br>
+<br>
+From: Zack Weinberg <<a href="mailto:zackw@panix.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">zackw@panix.com</a>><br>
+Subject: [PATCH] Deprecate libcrypt and don't build it by default<br>
+<br>
+Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt<br>
+support to our implementation of crypt(3), and Zack Weinberg replied<br>
+that it might actually make more sense to _remove_ libcrypt from<br>
+glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a<br>
+separate project that could move faster. (For instance, libxcrypt:<br>
+<a href="https://github.com/besser82/libxcrypt" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://github.com/besser82/libxcrypt</a>)<br>
+<br>
+This patch disables build and installation of libcrypt by default. It<br>
+can be re-enabled with --enable-obsolete-crypt to configure. Unlike<br>
+libnsl, we do *not* install a runtime shared library; that's left to<br>
+the replacement. (Unlike the SunRPC situation, I think we can<br>
+probably drop this code altogether in a release or two.)<br>
+<br>
+The function prototypes for crypt and encrypt are removed from<br>
+unistd.h, and the function prototype for setkey is removed from<br>
+stdlib.h; they do *not* come back with --enable-obsolete-crypt. This<br>
+means glibc no longer provides the POSIX CRYPT option, and the macro<br>
+_XOPEN_CRYPT is also removed from unistd.h to indicate that.<br>
+(_SC_XOPEN_CRYPT is still defined, but sysconf(_SC_XOPEN_CRYPT) will<br>
+return -1 at runtime.) These functions are also unconditionally<br>
+removed from conform/data/{stdlib,unistd}.h-data.<br>
+<br>
+ * posix/unistd.h (_XOPEN_CRYPT, crypt, encrypt): Don't declare.<br>
+ * stdlib/stdlib.h (setkey): Don't declare.<br>
+<br>
+ * <a href="http://configure.ac" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">configure.ac</a> (--enable-obsolete-crypt): New configure option.<br>
+ * configure: Regenerate.<br>
+ * <a href="http://config.make.in" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">config.make.in</a> (build-obsolete-crypt): New makefile variable.<br>
+ * crypt/Banner: Delete file.<br>
+ * crypt/Makefile: Don't build anything unless<br>
+ $(build-obsolete-crypt) is 'yes'.<br>
+ * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Only add things<br>
+ to libcrypt-sysdep_routines when $(build-obsolete-crypt) is 'yes'.<br>
+ * sysdeps/sparc/sparc64/multiarch/Makefile: Likewise.<br>
+ * sysdeps/unix/sysv/linux/arm/Makefile: Likewise.<br>
+<br>
+ * conform/Makefile: Only include libcrypt.a in linknamespace tests<br>
+ when $(build-obsolete-crypt) is 'yes'.<br>
+ * conform/data/stdlib.h-data (setkey): Don't expect.<br>
+ * conform/data/unistd.h-data (crypt, encrypt): Don't expect.<br>
+ * elf/Makefile: Only perform various tests of <a href="http://libcrypt.so/libcrypt.a" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">libcrypt.so/libcrypt.a</a><br>
+ when $(build-obsolete-crypt) is 'yes'.<br>
+ * elf/tst-linkall-static.c: Don't include crypt.h when USE_CRYPT<br>
+ is false.<br>
+---<br>
+ NEWS | 18 ++++++++++++++++++<br>
+ <a href="http://config.make.in" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">config.make.in</a> | 1 +<br>
+ configure | 13 +++++++++++++<br>
+ <a href="http://configure.ac" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">configure.ac</a> | 8 ++++++++<br>
+ conform/Makefile | 14 ++++++++++----<br>
+ conform/data/stdlib.h-data | 3 ---<br>
+ conform/data/unistd.h-data | 6 ------<br>
+ crypt/Makefile | 5 +++++<br>
+ elf/Makefile | 16 ++++++++++++----<br>
+ elf/tst-linkall-static.c | 2 ++<br>
+ posix/unistd.h | 16 ----------------<br>
+ stdlib/stdlib.h | 6 ------<br>
+ sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile | 2 ++<br>
+ sysdeps/sparc/sparc64/multiarch/Makefile | 2 ++<br>
+ sysdeps/unix/sysv/linux/arm/Makefile | 2 ++<br>
+ 15 files changed, 75 insertions(+), 39 deletions(-)<br>
+<br>
+diff --git a/<a href="http://config.make.in" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">config.make.in</a> b/<a href="http://config.make.in" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">config.make.in</a><br>
+index 9e5e24b2c6..8fe610d04d 100644<br>
+--- a/<a href="http://config.make.in" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">config.make.in</a><br>
++++ b/<a href="http://config.make.in" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">config.make.in</a><br>
+@@ -82,6 +82,7 @@ mach-interface-list = @mach_interface_list@<br>
+<br>
+ experimental-malloc = @experimental_malloc@<br>
+<br>
++build-obsolete-crypt = @build_obsolete_crypt@<br>
+ nss-crypt = @libc_cv_nss_crypt@<br>
+ static-nss-crypt = @libc_cv_static_nss_crypt@<br>
+<br>
+diff --git a/configure b/configure<br>
+index 7a8bd3f817..46f6bd7f86 100755<br>
+--- a/configure<br>
++++ b/configure<br>
+@@ -672,6 +672,7 @@ base_machine<br>
+ have_tunables<br>
+ build_pt_chown<br>
+ build_nscd<br>
++build_obsolete_crypt<br>
+ build_obsolete_nsl<br>
+ link_obsolete_rpc<br>
+ libc_cv_static_nss_crypt<br>
+@@ -782,6 +783,7 @@ enable_experimental_malloc<br>
+ enable_nss_crypt<br>
+ enable_obsolete_rpc<br>
+ enable_obsolete_nsl<br>
++enable_obsolete_crypt<br>
+ enable_systemtap<br>
+ enable_build_nscd<br>
+ enable_nscd<br>
+@@ -1453,6 +1455,7 @@ Optional Features:<br>
+ link-time usage<br>
+ --enable-obsolete-nsl build and install the obsolete libnsl library and<br>
+ depending NSS modules<br>
++ --enable-obsolete-crypt build and install the obsolete libcrypt library<br>
+ --enable-systemtap enable systemtap static probe points [default=no]<br>
+ --disable-build-nscd disable building and installing the nscd daemon<br>
+ --disable-nscd library functions will not contact the nscd daemon<br>
+@@ -3632,6 +3635,16 @@ if test "$build_obsolete_nsl" = yes; then<br>
+<br>
+ fi<br>
+<br>
++# Check whether --enable-obsolete-crypt was given.<br>
++if test "${enable_obsolete_crypt+set}" = set; then :<br>
++ enableval=$enable_obsolete_crypt; build_obsolete_crypt=$enableval<br>
++else<br>
++ build_obsolete_crypt=no<br>
++fi<br>
++<br>
++<br>
++<br>
++<br>
+ # Check whether --enable-systemtap was given.<br>
+ if test "${enable_systemtap+set}" = set; then :<br>
+ enableval=$enable_systemtap; systemtap=$enableval<br>
+diff --git a/<a href="http://configure.ac" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">configure.ac</a><br>
+index ca1282a6b3..0142353740 100644<br>
+--- a/<a href="http://configure.ac" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">configure.ac</a><br>
++++ b/<a href="http://configure.ac" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">configure.ac</a><br>
+@@ -378,6 +378,14 @@ if test "$build_obsolete_nsl" = yes; then<br>
+ AC_DEFINE(LINK_OBSOLETE_NSL)<br>
+ fi<br>
+<br>
++AC_ARG_ENABLE([obsolete-crypt],<br>
++ AC_HELP_STRING([--enable-obsolete-crypt],<br>
++ [build and install the obsolete libcrypt library]),<br>
++ [build_obsolete_crypt=$enableval],<br>
++ [build_obsolete_crypt=no])<br>
++AC_SUBST(build_obsolete_crypt)<br>
++<br>
++<br>
+ AC_ARG_ENABLE([systemtap],<br>
+ [AS_HELP_STRING([--enable-systemtap],<br>
+ [enable systemtap static probe points @<:@default=no@:>@])],<br>
+diff --git a/conform/Makefile b/conform/Makefile<br>
+index 864fdeca21..5ef474fb24 100644<br>
+--- a/conform/Makefile<br>
++++ b/conform/Makefile<br>
+@@ -193,22 +193,28 @@ linknamespace-libs-thr = $(linknamespace-libs-isoc) \<br>
+ $(common-objpfx)rt/librt.a $(static-thread-library)<br>
+ linknamespace-libs-posix = $(linknamespace-libs-thr) \<br>
+ $(common-objpfx)dlfcn/libdl.a<br>
+-linknamespace-libs-xsi = $(linknamespace-libs-posix) \<br>
+- $(common-objpfx)crypt/libcrypt.a<br>
++linknamespace-libs-xsi = $(linknamespace-libs-posix)<br>
+ linknamespace-libs-ISO = $(linknamespace-libs-isoc)<br>
+ linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)<br>
+ linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)<br>
+-linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \<br>
+- $(common-objpfx)crypt/libcrypt.a<br>
++linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)<br>
+ linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)<br>
+ linknamespace-libs-POSIX = $(linknamespace-libs-thr)<br>
+ linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)<br>
+ linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)<br>
+ linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)<br>
+ linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)<br>
++<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
++linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a<br>
++linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a<br>
++endif<br>
++<br>
+ linknamespace-libs = $(foreach std,$(conformtest-standards),\<br>
+ $(linknamespace-libs-$(std)))<br>
+<br>
++<br>
++<br>
+ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \<br>
+ $(linknamespace-libs)<br>
+ LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \<br>
+diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data<br>
+index d8fcccc2fb..6913828196 100644<br>
+--- a/conform/data/stdlib.h-data<br>
++++ b/conform/data/stdlib.h-data<br>
+@@ -149,9 +149,6 @@ function {unsigned short int*} seed48 (unsigned short int[3])<br>
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98<br>
+ function int setenv (const char*, const char*, int)<br>
+ #endif<br>
+-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008<br>
+-function void setkey (const char*)<br>
+-#endif<br>
+ #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008<br>
+ function {char*} setstate (char*)<br>
+ #endif<br>
+diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data<br>
+index ddf4f25132..aa070528e8 100644<br>
+--- a/conform/data/unistd.h-data<br>
++++ b/conform/data/unistd.h-data<br>
+@@ -437,9 +437,6 @@ function int chroot (const char*)<br>
+ function int chown (const char*, uid_t, gid_t)<br>
+ function int close (int)<br>
+ function size_t confstr (int, char*, size_t)<br>
+-#if !defined POSIX && !defined POSIX2008<br>
+-function {char*} crypt (const char*, const char*)<br>
+-#endif<br>
+ #if defined XPG4 || defined XPG42 || defined UNIX98<br>
+ function {char*} ctermid (char*)<br>
+ function {char*} cuserid (char*)<br>
+@@ -449,9 +446,6 @@ allow cuserid<br>
+ #endif<br>
+ function int dup (int)<br>
+ function int dup2 (int, int)<br>
+-#if !defined POSIX && !defined POSIX2008<br>
+-function void encrypt (char[64], int)<br>
+-#endif<br>
+ function int execl (const char*, const char*, ...)<br>
+ function int execle (const char*, const char*, ...)<br>
+ function int execlp (const char*, const char*, ...)<br>
+diff --git a/crypt/Makefile b/crypt/Makefile<br>
+index 303800df73..024ec2c6ab 100644<br>
+--- a/crypt/Makefile<br>
++++ b/crypt/Makefile<br>
+@@ -22,6 +22,8 @@ subdir := crypt<br>
+<br>
+ include ../Makeconfig<br>
+<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
++<br>
+ headers := crypt.h<br>
+<br>
+ extra-libs := libcrypt<br>
+@@ -52,9 +54,11 @@ tests += md5test sha256test sha512test<br>
+ # machine over a minute.<br>
+ xtests = md5test-giant<br>
+ endif<br>
++endif<br>
+<br>
+ include ../Rules<br>
+<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
+ ifneq ($(nss-crypt),yes)<br>
+ md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))<br>
+ sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))<br>
+@@ -71,3 +75,4 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so<br>
+ else<br>
+ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a<br>
+ endif<br>
++endif<br>
+diff --git a/elf/Makefile b/elf/Makefile<br>
+index 2a432d8bee..366f7b80ec 100644<br>
+--- a/elf/Makefile<br>
++++ b/elf/Makefile<br>
+@@ -385,15 +385,19 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os<br>
+ CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)<br>
+ endif<br>
+<br>
+-# By default tst-linkall-static should try to use crypt routines to test<br>
+-# static libcrypt use.<br>
+-CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
++# If the libcrypt library is being built, tst-linkall-static should<br>
++# try to use crypt routines to test static libcrypt use.<br>
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=1<br>
+ # However, if we are using NSS crypto and we don't have a static<br>
+ # library, then we exclude the use of crypt functions in the test.<br>
+ # We similarly exclude libcrypt.a from the static link (see below).<br>
+ ifeq (yesno,$(nss-crypt)$(static-nss-crypt))<br>
+ CFLAGS-tst-linkall-static.c += -UUSE_CRYPT -DUSE_CRYPT=0<br>
+ endif<br>
++else<br>
++CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=0<br>
++endif<br>
+<br>
+ include ../Rules<br>
+<br>
+@@ -1113,8 +1117,10 @@ localplt-built-dso := $(addprefix $(common-objpfx),\<br>
+ rt/librt.so \<br>
+ dlfcn/libdl.so \<br>
+ resolv/libresolv.so \<br>
+- crypt/libcrypt.so \<br>
+ )<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
++localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)<br>
++endif<br>
+ ifeq ($(build-mathvec),yes)<br>
+ localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)<br>
+ endif<br>
+@@ -1395,6 +1401,7 @@ $(objpfx)tst-linkall-static: \<br>
+ $(common-objpfx)resolv/libanl.a \<br>
+ $(static-thread-library)<br>
+<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
+ # If we are using NSS crypto and we have the ability to link statically<br>
+ # then we include libcrypt.a, otherwise we leave out libcrypt.a and<br>
+ # link as much as we can into the tst-linkall-static test. This assumes<br>
+@@ -1410,6 +1417,7 @@ ifeq (no,$(nss-crypt))<br>
+ $(objpfx)tst-linkall-static: \<br>
+ $(common-objpfx)crypt/libcrypt.a<br>
+ endif<br>
++endif<br>
+<br>
+ # The application depends on the DSO, and the DSO loads the plugin.<br>
+ # The plugin also depends on the DSO. This creates the circular<br>
+diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c<br>
+index e8df38f74e..0ffae7c723 100644<br>
+--- a/elf/tst-linkall-static.c<br>
++++ b/elf/tst-linkall-static.c<br>
+@@ -18,7 +18,9 @@<br>
+<br>
+ #include <math.h><br>
+ #include <pthread.h><br>
++#if USE_CRYPT<br>
+ #include <crypt.h><br>
++#endif<br>
+ #include <resolv.h><br>
+ #include <dlfcn.h><br>
+ #include <utmp.h><br>
+diff --git a/posix/unistd.h b/posix/unistd.h<br>
+index 4d149f9945..e75ce4d4ec 100644<br>
+--- a/posix/unistd.h<br>
++++ b/posix/unistd.h<br>
+@@ -107,9 +107,6 @@ __BEGIN_DECLS<br>
+ /* The X/Open Unix extensions are available. */<br>
+ #define _XOPEN_UNIX 1<br>
+<br>
+-/* Encryption is present. */<br>
+-#define _XOPEN_CRYPT 1<br>
+-<br>
+ /* The enhanced internationalization capabilities according to XPG4.2<br>
+ are present. */<br>
+ #define _XOPEN_ENH_I18N 1<br>
+@@ -1118,20 +1115,7 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff,<br>
+ extern int fdatasync (int __fildes);<br>
+ #endif /* Use POSIX199309 */<br>
+<br>
+-<br>
+-/* XPG4.2 specifies that prototypes for the encryption functions must<br>
+- be defined here. */<br>
+ #ifdef __USE_XOPEN<br>
+-/* Encrypt at most 8 characters from KEY using salt to perturb DES. */<br>
+-extern char *crypt (const char *__key, const char *__salt)<br>
+- __THROW __nonnull ((1, 2));<br>
+-<br>
+-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt<br>
+- block in place. */<br>
+-extern void encrypt (char *__glibc_block, int __edflag)<br>
+- __THROW __nonnull ((1));<br>
+-<br>
+-<br>
+ /* Swab pairs bytes in the first N bytes of the area pointed to by<br>
+ FROM and copy the result to TO. The value of TO must not be in the<br>
+ range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM<br>
+diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h<br>
+index 6b1ead31e0..8e23e93557 100644<br>
+--- a/stdlib/stdlib.h<br>
++++ b/stdlib/stdlib.h<br>
+@@ -958,12 +958,6 @@ extern int getsubopt (char **__restrict __optionp,<br>
+ #endif<br>
+<br>
+<br>
+-#ifdef __USE_XOPEN<br>
+-/* Setup DES tables according KEY. */<br>
+-extern void setkey (const char *__key) __THROW __nonnull ((1));<br>
+-#endif<br>
+-<br>
+-<br>
+ /* X/Open pseudo terminal handling. */<br>
+<br>
+ #ifdef __USE_XOPEN2KXSI<br>
+diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile<br>
+index a6d08f3a00..d8b8297fb0 100644<br>
+--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile<br>
++++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile<br>
+@@ -1,6 +1,8 @@<br>
+ ifeq ($(subdir),crypt)<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop<br>
+ endif<br>
++endif<br>
+<br>
+ ifeq ($(subdir),locale)<br>
+ localedef-aux += md5-crop<br>
+diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile<br>
+index eaf758e7aa..0198f9886f 100644<br>
+--- a/sysdeps/sparc/sparc64/multiarch/Makefile<br>
++++ b/sysdeps/sparc/sparc64/multiarch/Makefile<br>
+@@ -1,6 +1,8 @@<br>
+ ifeq ($(subdir),crypt)<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
+ libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop<br>
+ endif<br>
++endif<br>
+<br>
+ ifeq ($(subdir),locale)<br>
+ localedef-aux += md5-crop<br>
+diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile<br>
+index 4adc35de04..6cab4f3a31 100644<br>
+--- a/sysdeps/unix/sysv/linux/arm/Makefile<br>
++++ b/sysdeps/unix/sysv/linux/arm/Makefile<br>
+@@ -19,8 +19,10 @@ endif<br>
+ # Add a syscall function to each library that needs one.<br>
+<br>
+ ifeq ($(subdir),crypt)<br>
++ifeq ($(build-obsolete-crypt),yes)<br>
+ libcrypt-sysdep_routines += libc-do-syscall<br>
+ endif<br>
++endif<br>
+<br>
+ ifeq ($(subdir),rt)<br>
+ librt-sysdep_routines += libc-do-syscall<br>
+--<br>
+2.16.0<br>
+<br>
diff --git a/meta/recipes-core/glibc/<a href="http://glibc_2.27.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">glibc_2.27.bb</a> b/meta/recipes-core/glibc/<a href="http://glibc_2.27.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">glibc_2.27.bb</a><br>
index 772351a..c814798 100644<br>
--- a/meta/recipes-core/glibc/<a href="http://glibc_2.27.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">glibc_2.27.bb</a><br>
+++ b/meta/recipes-core/glibc/<a href="http://glibc_2.27.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">glibc_2.27.bb</a><br>
@@ -54,6 +54,7 @@ NATIVESDKFIXES_class-nativesdk = "\<br>
file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \<br>
file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \<br>
file://relocate-locales.patch \<br>
+ file://0031-nativesdk-deprecate-libcrypt.patch \<br>
"<br>
<br>
S = "${WORKDIR}/git"<br>
diff --git a/meta/recipes-core/glibc/site_config/headers b/meta/recipes-core/glibc/site_config/headers<br>
index 609ab53..69fedea 100644<br>
--- a/meta/recipes-core/glibc/site_config/headers<br>
+++ b/meta/recipes-core/glibc/site_config/headers<br>
@@ -9,7 +9,6 @@ asm/page.h<br>
asm/types.h<br>
assert.h<br>
byteswap.h<br>
-crypt.h<br>
ctype.h<br>
dirent.h<br>
dlfcn.h<br>
diff --git a/meta/recipes-core/libxcrypt/<a href="http://libxcrypt_4.0.0.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">libxcrypt_4.0.0.bb</a> b/meta/recipes-core/libxcrypt/<a href="http://libxcrypt_4.0.0.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">libxcrypt_4.0.0.bb</a><br>
new file mode 100644<br>
index 0000000..b1982c1<br>
--- /dev/null<br>
+++ b/meta/recipes-core/libxcrypt/<a href="http://libxcrypt_4.0.0.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">libxcrypt_4.0.0.bb</a><br>
@@ -0,0 +1,31 @@<br>
+SUMMARY = "Extended cryptographic library (from glibc)"<br>
+DESCRIPTION = "Forked code from glibc libary to extract only crypto part."<br>
+HOMEPAGE = "<a href="https://github.com/besser82/libxcrypt" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">https://github.com/besser82/libxcrypt</a>"<br>
+SECTION = "libs"<br>
+LICENSE = "LGPLv2.1"<br>
+LIC_FILES_CHKSUM ?= "file://LICENSING;md5=d1cc18f512ded3bd6000f3729f31be08 \<br>
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \<br>
+"<br>
+<br>
+inherit autotools<br>
+<br>
+SRCREV ?= "215b32aa4e0b255c3356a96bd6d257661bad73ca"<br>
+SRCBRANCH ?= "master"<br>
+<br>
+SRC_URI = "git://<a href="http://github.com/besser82/libxcrypt.git;branch=$%7BSRCBRANCH%7D" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}</a>"<br>
+<br>
+PROVIDES = "virtual/crypt"<br>
+<br>
+FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowcrypt*.so.* ${libdir}/libowcrypt-*.so"<br>
+<br>
+S = "${WORKDIR}/git"<br>
+<br>
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"<br>
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"<br>
+<br>
+python () {<br>
+ if not bb.data.inherits_class('nativesdk', d):<br>
+ raise bb.parse.SkipRecipe("Recipe only applies in nativesdk case for now")<br>
+}<br>
+<br>
+BBCLASSEXTEND = "nativesdk"<br>
diff --git a/meta/recipes-core/meta/<a href="http://uninative-tarball.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">uninative-tarball.bb</a> b/meta/recipes-core/meta/<a href="http://uninative-tarball.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">uninative-tarball.bb</a><br>
index 5fabf7f..38c3a31 100644<br>
--- a/meta/recipes-core/meta/<a href="http://uninative-tarball.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">uninative-tarball.bb</a><br>
+++ b/meta/recipes-core/meta/<a href="http://uninative-tarball.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">uninative-tarball.bb</a><br>
@@ -13,6 +13,7 @@ TOOLCHAIN_HOST_TASK = "\<br>
nativesdk-glibc-gconv-utf-16 \<br>
nativesdk-glibc-gconv-cp1252 \<br>
nativesdk-patchelf \<br>
+ nativesdk-libxcrypt \<br>
"<br>
<br>
INHIBIT_DEFAULT_DEPS = "1"<br>
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc<br>
index 5e40b20..157416d 100644<br>
--- a/meta/recipes-core/util-linux/util-linux.inc<br>
+++ b/meta/recipes-core/util-linux/util-linux.inc<br>
@@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c<br>
<br>
#gtk-doc is not enabled as it requires xmlto which requires util-linux<br>
inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest<br>
-DEPENDS = "zlib ncurses"<br>
+DEPENDS = "zlib ncurses virtual/crypt"<br>
DEPENDS_append_class-native = " lzo-native"<br>
DEPENDS_append_class-nativesdk = " lzo-native"<br>
<br>
diff --git a/meta/recipes-devtools/perl/<a href="http://perl_5.24.1.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">perl_5.24.1.bb</a> b/meta/recipes-devtools/perl/<a href="http://perl_5.24.1.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">perl_5.24.1.bb</a><br>
index 66ccd7f..222dd88 100644<br>
--- a/meta/recipes-devtools/perl/<a href="http://perl_5.24.1.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">perl_5.24.1.bb</a><br>
+++ b/meta/recipes-devtools/perl/<a href="http://perl_5.24.1.bb" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">perl_5.24.1.bb</a><br>
@@ -1,7 +1,7 @@<br>
require perl.inc<br>
<br>
# We need gnugrep (for -I)<br>
-DEPENDS = "db grep-native gdbm zlib"<br>
+DEPENDS = "db grep-native gdbm zlib virtual/crypt"<br>
<br>
# Pick up patches from debian<br>
# <a href="http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz</a><br>
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc<br>
index 48a3be8..673207f 100644<br>
--- a/meta/recipes-extended/shadow/shadow.inc<br>
+++ b/meta/recipes-extended/shadow/shadow.inc<br>
@@ -6,8 +6,7 @@ LICENSE = "BSD | Artistic-1.0"<br>
LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \<br>
file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"<br>
<br>
-DEPENDS_class-native = ""<br>
-DEPENDS_class-nativesdk = ""<br>
+DEPENDS = "virtual/crypt"<br>
<br>
SRC_URI = "<a href="http://pkg-shadow.alioth.debian.org/releases/$%7BBPN%7D-$%7BPV%7D.tar.xz" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz</a> \<br>
file://shadow-4.1.3-dots-in-usernames.patch \<br>
--<br>
2.7.4<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div></div>