summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-06 14:53:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-04-07 22:34:45 +0100
commit29f65bda6d2c9fea4adb125c4857ee64f9312b9f (patch)
tree6307faafef6062f31fffe55cc5ca5689be1a7f03
parentff282528be3efa5733c7ee61dba7105e267879e2 (diff)
downloadpoky-29f65bda6d2c9fea4adb125c4857ee64f9312b9f.tar.gz
nativesdk-glibc: Split glibc and libcrypt to use libxcrypt instead
Fedora28[1] has decided to go ahead and use libxcrypt to replace libcrypt from glibc despite the change not having merged into glibc upstream yet. This breaks the use of uninative in OE on fedora28 since binaries there are now using new symbols only found in libxcrypt. libxcrypt is meant to be backwards compatible with libcrypt but not the reverse. Since this will impact OE in the next release cycle, this changes nativesdk only to use this new model and adds libxcrypt to work in that case. This allows us to build a uninative which is compatible with fedora28 and previous other OSes. In order to work, recipes will now need to depend on virtual/crypt where they use libcrypt since its now a separate library and we can't depend on it from glibc to preseve backwards compatibility since glibc needs to build first. For now, only the problematic nativesdk recipes have been fixed up. For target use, the default provider remains glibc for now. Assuming this change is merged into upstream glibc, we will need to roll this change out for the target but we will do this in the next release cycle when we can better deal with the resulting bugs. [1] https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt Original patch from Charles-Antoine Couret <charles-antoine.couret@essensium.com>, tweaked by RP to add virtual provides, SkipRecipe for libxcrypt and other minor tweaks. (From OE-Core rev: c1573cb7faeb296fe7077a60d02443d5ed5bded0) Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@essensium.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/bitbake.conf1
-rw-r--r--meta/recipes-core/glibc/glibc.inc5
-rw-r--r--meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch419
-rw-r--r--meta/recipes-core/glibc/glibc_2.27.bb1
-rw-r--r--meta/recipes-core/glibc/site_config/headers1
-rw-r--r--meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb31
-rw-r--r--meta/recipes-core/meta/uninative-tarball.bb1
-rw-r--r--meta/recipes-core/musl/musl_git.bb2
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc2
-rw-r--r--meta/recipes-devtools/perl/perl_5.24.1.bb2
-rw-r--r--meta/recipes-extended/shadow/shadow.inc3
11 files changed, 461 insertions, 7 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 93f57f3c9e..60590e23cc 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -187,6 +187,7 @@ ASSUME_PROVIDED = "\
187 tar-native \ 187 tar-native \
188 virtual/libintl-native \ 188 virtual/libintl-native \
189 virtual/libiconv-native \ 189 virtual/libiconv-native \
190 virtual/crypt-native \
190 texinfo-native \ 191 texinfo-native \
191 bash-native \ 192 bash-native \
192 sed-native \ 193 sed-native \
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index 361a6fde10..9e02ffdff1 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -35,7 +35,10 @@ siteconfig_do_siteconfig_gencache_prepend = " \
35DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial" 35DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers virtual/${TARGET_PREFIX}libc-initial"
36# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this 36# nptl needs libgcc but dlopens it, so our shlibs code doesn't detect this
37#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}" 37#RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
38PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc" 38
39CRYPTPROVIDES = "virtual/crypt"
40CRYPTPROVIDES_class-nativesdk = ""
41PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc ${CRYPTPROVIDES}"
39PROVIDES += "virtual/libintl virtual/libiconv" 42PROVIDES += "virtual/libintl virtual/libiconv"
40inherit autotools texinfo distro_features_check systemd 43inherit autotools texinfo distro_features_check systemd
41 44
diff --git a/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch b/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
new file mode 100644
index 0000000000..a9132ed3d2
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0031-nativesdk-deprecate-libcrypt.patch
@@ -0,0 +1,419 @@
1Background information:
2
3https://sourceware.org/ml/libc-alpha/2017-08/msg01257.html
4https://fedoraproject.org/wiki/Changes/Replace_glibc_libcrypt_with_libxcrypt
5
6Upstream-Status: Submitted [libc-alpha@sourceware.org]
7Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8
9From: Zack Weinberg <zackw@panix.com>
10Subject: [PATCH] Deprecate libcrypt and don't build it by default
11
12Back in June, Björn Esser proposed to add OpenBSD-compatible bcrypt
13support to our implementation of crypt(3), and Zack Weinberg replied
14that it might actually make more sense to _remove_ libcrypt from
15glibc, freeing up libcrypt.so.1 and crypt.h to be provided by a
16separate project that could move faster. (For instance, libxcrypt:
17https://github.com/besser82/libxcrypt)
18
19This patch disables build and installation of libcrypt by default. It
20can be re-enabled with --enable-obsolete-crypt to configure. Unlike
21libnsl, we do *not* install a runtime shared library; that's left to
22the replacement. (Unlike the SunRPC situation, I think we can
23probably drop this code altogether in a release or two.)
24
25The function prototypes for crypt and encrypt are removed from
26unistd.h, and the function prototype for setkey is removed from
27stdlib.h; they do *not* come back with --enable-obsolete-crypt. This
28means glibc no longer provides the POSIX CRYPT option, and the macro
29_XOPEN_CRYPT is also removed from unistd.h to indicate that.
30(_SC_XOPEN_CRYPT is still defined, but sysconf(_SC_XOPEN_CRYPT) will
31return -1 at runtime.) These functions are also unconditionally
32removed from conform/data/{stdlib,unistd}.h-data.
33
34 * posix/unistd.h (_XOPEN_CRYPT, crypt, encrypt): Don't declare.
35 * stdlib/stdlib.h (setkey): Don't declare.
36
37 * configure.ac (--enable-obsolete-crypt): New configure option.
38 * configure: Regenerate.
39 * config.make.in (build-obsolete-crypt): New makefile variable.
40 * crypt/Banner: Delete file.
41 * crypt/Makefile: Don't build anything unless
42 $(build-obsolete-crypt) is 'yes'.
43 * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile: Only add things
44 to libcrypt-sysdep_routines when $(build-obsolete-crypt) is 'yes'.
45 * sysdeps/sparc/sparc64/multiarch/Makefile: Likewise.
46 * sysdeps/unix/sysv/linux/arm/Makefile: Likewise.
47
48 * conform/Makefile: Only include libcrypt.a in linknamespace tests
49 when $(build-obsolete-crypt) is 'yes'.
50 * conform/data/stdlib.h-data (setkey): Don't expect.
51 * conform/data/unistd.h-data (crypt, encrypt): Don't expect.
52 * elf/Makefile: Only perform various tests of libcrypt.so/libcrypt.a
53 when $(build-obsolete-crypt) is 'yes'.
54 * elf/tst-linkall-static.c: Don't include crypt.h when USE_CRYPT
55 is false.
56---
57 NEWS | 18 ++++++++++++++++++
58 config.make.in | 1 +
59 configure | 13 +++++++++++++
60 configure.ac | 8 ++++++++
61 conform/Makefile | 14 ++++++++++----
62 conform/data/stdlib.h-data | 3 ---
63 conform/data/unistd.h-data | 6 ------
64 crypt/Makefile | 5 +++++
65 elf/Makefile | 16 ++++++++++++----
66 elf/tst-linkall-static.c | 2 ++
67 posix/unistd.h | 16 ----------------
68 stdlib/stdlib.h | 6 ------
69 sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile | 2 ++
70 sysdeps/sparc/sparc64/multiarch/Makefile | 2 ++
71 sysdeps/unix/sysv/linux/arm/Makefile | 2 ++
72 15 files changed, 75 insertions(+), 39 deletions(-)
73
74diff --git a/config.make.in b/config.make.in
75index 9e5e24b2c6..8fe610d04d 100644
76--- a/config.make.in
77+++ b/config.make.in
78@@ -82,6 +82,7 @@ mach-interface-list = @mach_interface_list@
79
80 experimental-malloc = @experimental_malloc@
81
82+build-obsolete-crypt = @build_obsolete_crypt@
83 nss-crypt = @libc_cv_nss_crypt@
84 static-nss-crypt = @libc_cv_static_nss_crypt@
85
86diff --git a/configure b/configure
87index 7a8bd3f817..46f6bd7f86 100755
88--- a/configure
89+++ b/configure
90@@ -672,6 +672,7 @@ base_machine
91 have_tunables
92 build_pt_chown
93 build_nscd
94+build_obsolete_crypt
95 build_obsolete_nsl
96 link_obsolete_rpc
97 libc_cv_static_nss_crypt
98@@ -782,6 +783,7 @@ enable_experimental_malloc
99 enable_nss_crypt
100 enable_obsolete_rpc
101 enable_obsolete_nsl
102+enable_obsolete_crypt
103 enable_systemtap
104 enable_build_nscd
105 enable_nscd
106@@ -1453,6 +1455,7 @@ Optional Features:
107 link-time usage
108 --enable-obsolete-nsl build and install the obsolete libnsl library and
109 depending NSS modules
110+ --enable-obsolete-crypt build and install the obsolete libcrypt library
111 --enable-systemtap enable systemtap static probe points [default=no]
112 --disable-build-nscd disable building and installing the nscd daemon
113 --disable-nscd library functions will not contact the nscd daemon
114@@ -3632,6 +3635,16 @@ if test "$build_obsolete_nsl" = yes; then
115
116 fi
117
118+# Check whether --enable-obsolete-crypt was given.
119+if test "${enable_obsolete_crypt+set}" = set; then :
120+ enableval=$enable_obsolete_crypt; build_obsolete_crypt=$enableval
121+else
122+ build_obsolete_crypt=no
123+fi
124+
125+
126+
127+
128 # Check whether --enable-systemtap was given.
129 if test "${enable_systemtap+set}" = set; then :
130 enableval=$enable_systemtap; systemtap=$enableval
131diff --git a/configure.ac b/configure.ac
132index ca1282a6b3..0142353740 100644
133--- a/configure.ac
134+++ b/configure.ac
135@@ -378,6 +378,14 @@ if test "$build_obsolete_nsl" = yes; then
136 AC_DEFINE(LINK_OBSOLETE_NSL)
137 fi
138
139+AC_ARG_ENABLE([obsolete-crypt],
140+ AC_HELP_STRING([--enable-obsolete-crypt],
141+ [build and install the obsolete libcrypt library]),
142+ [build_obsolete_crypt=$enableval],
143+ [build_obsolete_crypt=no])
144+AC_SUBST(build_obsolete_crypt)
145+
146+
147 AC_ARG_ENABLE([systemtap],
148 [AS_HELP_STRING([--enable-systemtap],
149 [enable systemtap static probe points @<:@default=no@:>@])],
150diff --git a/conform/Makefile b/conform/Makefile
151index 864fdeca21..5ef474fb24 100644
152--- a/conform/Makefile
153+++ b/conform/Makefile
154@@ -193,22 +193,28 @@ linknamespace-libs-thr = $(linknamespace-libs-isoc) \
155 $(common-objpfx)rt/librt.a $(static-thread-library)
156 linknamespace-libs-posix = $(linknamespace-libs-thr) \
157 $(common-objpfx)dlfcn/libdl.a
158-linknamespace-libs-xsi = $(linknamespace-libs-posix) \
159- $(common-objpfx)crypt/libcrypt.a
160+linknamespace-libs-xsi = $(linknamespace-libs-posix)
161 linknamespace-libs-ISO = $(linknamespace-libs-isoc)
162 linknamespace-libs-ISO99 = $(linknamespace-libs-isoc)
163 linknamespace-libs-ISO11 = $(linknamespace-libs-isoc)
164-linknamespace-libs-XPG4 = $(linknamespace-libs-isoc) \
165- $(common-objpfx)crypt/libcrypt.a
166+linknamespace-libs-XPG4 = $(linknamespace-libs-isoc)
167 linknamespace-libs-XPG42 = $(linknamespace-libs-XPG4)
168 linknamespace-libs-POSIX = $(linknamespace-libs-thr)
169 linknamespace-libs-UNIX98 = $(linknamespace-libs-xsi)
170 linknamespace-libs-XOPEN2K = $(linknamespace-libs-xsi)
171 linknamespace-libs-POSIX2008 = $(linknamespace-libs-posix)
172 linknamespace-libs-XOPEN2K8 = $(linknamespace-libs-xsi)
173+
174+ifeq ($(build-obsolete-crypt),yes)
175+linknamespace-libs-xsi += $(common-objpfx)crypt/libcrypt.a
176+linknamespace-libs-XPG4 += $(common-objpfx)crypt/libcrypt.a
177+endif
178+
179 linknamespace-libs = $(foreach std,$(conformtest-standards),\
180 $(linknamespace-libs-$(std)))
181
182+
183+
184 $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \
185 $(linknamespace-libs)
186 LC_ALL=C $(READELF) -W -s $(linknamespace-libs-$*) > $@; \
187diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
188index d8fcccc2fb..6913828196 100644
189--- a/conform/data/stdlib.h-data
190+++ b/conform/data/stdlib.h-data
191@@ -149,9 +149,6 @@ function {unsigned short int*} seed48 (unsigned short int[3])
192 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
193 function int setenv (const char*, const char*, int)
194 #endif
195-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
196-function void setkey (const char*)
197-#endif
198 #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
199 function {char*} setstate (char*)
200 #endif
201diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
202index ddf4f25132..aa070528e8 100644
203--- a/conform/data/unistd.h-data
204+++ b/conform/data/unistd.h-data
205@@ -437,9 +437,6 @@ function int chroot (const char*)
206 function int chown (const char*, uid_t, gid_t)
207 function int close (int)
208 function size_t confstr (int, char*, size_t)
209-#if !defined POSIX && !defined POSIX2008
210-function {char*} crypt (const char*, const char*)
211-#endif
212 #if defined XPG4 || defined XPG42 || defined UNIX98
213 function {char*} ctermid (char*)
214 function {char*} cuserid (char*)
215@@ -449,9 +446,6 @@ allow cuserid
216 #endif
217 function int dup (int)
218 function int dup2 (int, int)
219-#if !defined POSIX && !defined POSIX2008
220-function void encrypt (char[64], int)
221-#endif
222 function int execl (const char*, const char*, ...)
223 function int execle (const char*, const char*, ...)
224 function int execlp (const char*, const char*, ...)
225diff --git a/crypt/Makefile b/crypt/Makefile
226index 303800df73..024ec2c6ab 100644
227--- a/crypt/Makefile
228+++ b/crypt/Makefile
229@@ -22,6 +22,8 @@ subdir := crypt
230
231 include ../Makeconfig
232
233+ifeq ($(build-obsolete-crypt),yes)
234+
235 headers := crypt.h
236
237 extra-libs := libcrypt
238@@ -52,9 +54,11 @@ tests += md5test sha256test sha512test
239 # machine over a minute.
240 xtests = md5test-giant
241 endif
242+endif
243
244 include ../Rules
245
246+ifeq ($(build-obsolete-crypt),yes)
247 ifneq ($(nss-crypt),yes)
248 md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
249 sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
250@@ -71,3 +75,4 @@ $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
251 else
252 $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
253 endif
254+endif
255diff --git a/elf/Makefile b/elf/Makefile
256index 2a432d8bee..366f7b80ec 100644
257--- a/elf/Makefile
258+++ b/elf/Makefile
259@@ -385,15 +385,19 @@ $(objpfx)tst-_dl_addr_inside_object: $(objpfx)dl-addr-obj.os
260 CFLAGS-tst-_dl_addr_inside_object.c += $(PIE-ccflag)
261 endif
262
263-# By default tst-linkall-static should try to use crypt routines to test
264-# static libcrypt use.
265-CFLAGS-tst-linkall-static.c += -DUSE_CRYPT=1
266+ifeq ($(build-obsolete-crypt),yes)
267+# If the libcrypt library is being built, tst-linkall-static should
268+# try to use crypt routines to test static libcrypt use.
269+CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=1
270 # However, if we are using NSS crypto and we don't have a static
271 # library, then we exclude the use of crypt functions in the test.
272 # We similarly exclude libcrypt.a from the static link (see below).
273 ifeq (yesno,$(nss-crypt)$(static-nss-crypt))
274 CFLAGS-tst-linkall-static.c += -UUSE_CRYPT -DUSE_CRYPT=0
275 endif
276+else
277+CFLAGS-tst-linkall-static.c = -DUSE_CRYPT=0
278+endif
279
280 include ../Rules
281
282@@ -1113,8 +1117,10 @@ localplt-built-dso := $(addprefix $(common-objpfx),\
283 rt/librt.so \
284 dlfcn/libdl.so \
285 resolv/libresolv.so \
286- crypt/libcrypt.so \
287 )
288+ifeq ($(build-obsolete-crypt),yes)
289+localplt-built-dso += $(addprefix $(common-objpfx), crypt/libcrypt.so)
290+endif
291 ifeq ($(build-mathvec),yes)
292 localplt-built-dso += $(addprefix $(common-objpfx), mathvec/libmvec.so)
293 endif
294@@ -1395,6 +1401,7 @@ $(objpfx)tst-linkall-static: \
295 $(common-objpfx)resolv/libanl.a \
296 $(static-thread-library)
297
298+ifeq ($(build-obsolete-crypt),yes)
299 # If we are using NSS crypto and we have the ability to link statically
300 # then we include libcrypt.a, otherwise we leave out libcrypt.a and
301 # link as much as we can into the tst-linkall-static test. This assumes
302@@ -1410,6 +1417,7 @@ ifeq (no,$(nss-crypt))
303 $(objpfx)tst-linkall-static: \
304 $(common-objpfx)crypt/libcrypt.a
305 endif
306+endif
307
308 # The application depends on the DSO, and the DSO loads the plugin.
309 # The plugin also depends on the DSO. This creates the circular
310diff --git a/elf/tst-linkall-static.c b/elf/tst-linkall-static.c
311index e8df38f74e..0ffae7c723 100644
312--- a/elf/tst-linkall-static.c
313+++ b/elf/tst-linkall-static.c
314@@ -18,7 +18,9 @@
315
316 #include <math.h>
317 #include <pthread.h>
318+#if USE_CRYPT
319 #include <crypt.h>
320+#endif
321 #include <resolv.h>
322 #include <dlfcn.h>
323 #include <utmp.h>
324diff --git a/posix/unistd.h b/posix/unistd.h
325index 4d149f9945..e75ce4d4ec 100644
326--- a/posix/unistd.h
327+++ b/posix/unistd.h
328@@ -107,9 +107,6 @@ __BEGIN_DECLS
329 /* The X/Open Unix extensions are available. */
330 #define _XOPEN_UNIX 1
331
332-/* Encryption is present. */
333-#define _XOPEN_CRYPT 1
334-
335 /* The enhanced internationalization capabilities according to XPG4.2
336 are present. */
337 #define _XOPEN_ENH_I18N 1
338@@ -1118,20 +1115,7 @@ ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
339 extern int fdatasync (int __fildes);
340 #endif /* Use POSIX199309 */
341
342-
343-/* XPG4.2 specifies that prototypes for the encryption functions must
344- be defined here. */
345 #ifdef __USE_XOPEN
346-/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
347-extern char *crypt (const char *__key, const char *__salt)
348- __THROW __nonnull ((1, 2));
349-
350-/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
351- block in place. */
352-extern void encrypt (char *__glibc_block, int __edflag)
353- __THROW __nonnull ((1));
354-
355-
356 /* Swab pairs bytes in the first N bytes of the area pointed to by
357 FROM and copy the result to TO. The value of TO must not be in the
358 range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
359diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
360index 6b1ead31e0..8e23e93557 100644
361--- a/stdlib/stdlib.h
362+++ b/stdlib/stdlib.h
363@@ -958,12 +958,6 @@ extern int getsubopt (char **__restrict __optionp,
364 #endif
365
366
367-#ifdef __USE_XOPEN
368-/* Setup DES tables according KEY. */
369-extern void setkey (const char *__key) __THROW __nonnull ((1));
370-#endif
371-
372-
373 /* X/Open pseudo terminal handling. */
374
375 #ifdef __USE_XOPEN2KXSI
376diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
377index a6d08f3a00..d8b8297fb0 100644
378--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
379+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile
380@@ -1,6 +1,8 @@
381 ifeq ($(subdir),crypt)
382+ifeq ($(build-obsolete-crypt),yes)
383 libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
384 endif
385+endif
386
387 ifeq ($(subdir),locale)
388 localedef-aux += md5-crop
389diff --git a/sysdeps/sparc/sparc64/multiarch/Makefile b/sysdeps/sparc/sparc64/multiarch/Makefile
390index eaf758e7aa..0198f9886f 100644
391--- a/sysdeps/sparc/sparc64/multiarch/Makefile
392+++ b/sysdeps/sparc/sparc64/multiarch/Makefile
393@@ -1,6 +1,8 @@
394 ifeq ($(subdir),crypt)
395+ifeq ($(build-obsolete-crypt),yes)
396 libcrypt-sysdep_routines += md5-crop sha256-crop sha512-crop
397 endif
398+endif
399
400 ifeq ($(subdir),locale)
401 localedef-aux += md5-crop
402diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
403index 4adc35de04..6cab4f3a31 100644
404--- a/sysdeps/unix/sysv/linux/arm/Makefile
405+++ b/sysdeps/unix/sysv/linux/arm/Makefile
406@@ -19,8 +19,10 @@ endif
407 # Add a syscall function to each library that needs one.
408
409 ifeq ($(subdir),crypt)
410+ifeq ($(build-obsolete-crypt),yes)
411 libcrypt-sysdep_routines += libc-do-syscall
412 endif
413+endif
414
415 ifeq ($(subdir),rt)
416 librt-sysdep_routines += libc-do-syscall
417--
4182.16.0
419
diff --git a/meta/recipes-core/glibc/glibc_2.27.bb b/meta/recipes-core/glibc/glibc_2.27.bb
index 772351ad46..c814798bbd 100644
--- a/meta/recipes-core/glibc/glibc_2.27.bb
+++ b/meta/recipes-core/glibc/glibc_2.27.bb
@@ -54,6 +54,7 @@ NATIVESDKFIXES_class-nativesdk = "\
54 file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ 54 file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
55 file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ 55 file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
56 file://relocate-locales.patch \ 56 file://relocate-locales.patch \
57 file://0031-nativesdk-deprecate-libcrypt.patch \
57" 58"
58 59
59S = "${WORKDIR}/git" 60S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/glibc/site_config/headers b/meta/recipes-core/glibc/site_config/headers
index 609ab53797..69fedea4e1 100644
--- a/meta/recipes-core/glibc/site_config/headers
+++ b/meta/recipes-core/glibc/site_config/headers
@@ -9,7 +9,6 @@ asm/page.h
9asm/types.h 9asm/types.h
10assert.h 10assert.h
11byteswap.h 11byteswap.h
12crypt.h
13ctype.h 12ctype.h
14dirent.h 13dirent.h
15dlfcn.h 14dlfcn.h
diff --git a/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb b/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb
new file mode 100644
index 0000000000..b1982c1991
--- /dev/null
+++ b/meta/recipes-core/libxcrypt/libxcrypt_4.0.0.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Extended cryptographic library (from glibc)"
2DESCRIPTION = "Forked code from glibc libary to extract only crypto part."
3HOMEPAGE = "https://github.com/besser82/libxcrypt"
4SECTION = "libs"
5LICENSE = "LGPLv2.1"
6LIC_FILES_CHKSUM ?= "file://LICENSING;md5=d1cc18f512ded3bd6000f3729f31be08 \
7 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
8"
9
10inherit autotools
11
12SRCREV ?= "215b32aa4e0b255c3356a96bd6d257661bad73ca"
13SRCBRANCH ?= "master"
14
15SRC_URI = "git://github.com/besser82/libxcrypt.git;branch=${SRCBRANCH}"
16
17PROVIDES = "virtual/crypt"
18
19FILES_${PN} = "${libdir}/libcrypt*.so.* ${libdir}/libcrypt-*.so ${libdir}/libowcrypt*.so.* ${libdir}/libowcrypt-*.so"
20
21S = "${WORKDIR}/git"
22
23BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
24TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
25
26python () {
27 if not bb.data.inherits_class('nativesdk', d):
28 raise bb.parse.SkipRecipe("Recipe only applies in nativesdk case for now")
29}
30
31BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-core/meta/uninative-tarball.bb b/meta/recipes-core/meta/uninative-tarball.bb
index 5fabf7fa39..38c3a314e1 100644
--- a/meta/recipes-core/meta/uninative-tarball.bb
+++ b/meta/recipes-core/meta/uninative-tarball.bb
@@ -13,6 +13,7 @@ TOOLCHAIN_HOST_TASK = "\
13 nativesdk-glibc-gconv-utf-16 \ 13 nativesdk-glibc-gconv-utf-16 \
14 nativesdk-glibc-gconv-cp1252 \ 14 nativesdk-glibc-gconv-cp1252 \
15 nativesdk-patchelf \ 15 nativesdk-patchelf \
16 nativesdk-libxcrypt \
16 " 17 "
17 18
18INHIBIT_DEFAULT_DEPS = "1" 19INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 8906ac6beb..9f8c5126e8 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -15,7 +15,7 @@ SRC_URI = "git://git.musl-libc.org/musl \
15 15
16S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
17 17
18PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl" 18PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl virtual/crypt"
19 19
20DEPENDS = "virtual/${TARGET_PREFIX}binutils \ 20DEPENDS = "virtual/${TARGET_PREFIX}binutils \
21 virtual/${TARGET_PREFIX}gcc-initial \ 21 virtual/${TARGET_PREFIX}gcc-initial \
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 5e40b2019a..157416df48 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
20 20
21#gtk-doc is not enabled as it requires xmlto which requires util-linux 21#gtk-doc is not enabled as it requires xmlto which requires util-linux
22inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest 22inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
23DEPENDS = "zlib ncurses" 23DEPENDS = "zlib ncurses virtual/crypt"
24DEPENDS_append_class-native = " lzo-native" 24DEPENDS_append_class-native = " lzo-native"
25DEPENDS_append_class-nativesdk = " lzo-native" 25DEPENDS_append_class-nativesdk = " lzo-native"
26 26
diff --git a/meta/recipes-devtools/perl/perl_5.24.1.bb b/meta/recipes-devtools/perl/perl_5.24.1.bb
index 66ccd7f0be..222dd88675 100644
--- a/meta/recipes-devtools/perl/perl_5.24.1.bb
+++ b/meta/recipes-devtools/perl/perl_5.24.1.bb
@@ -1,7 +1,7 @@
1require perl.inc 1require perl.inc
2 2
3# We need gnugrep (for -I) 3# We need gnugrep (for -I)
4DEPENDS = "db grep-native gdbm zlib" 4DEPENDS = "db grep-native gdbm zlib virtual/crypt"
5 5
6# Pick up patches from debian 6# Pick up patches from debian
7# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz 7# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
index 48a3be87e6..673207fc9b 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -6,8 +6,7 @@ LICENSE = "BSD | Artistic-1.0"
6LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=ed80ff1c2b40843cf5768e5229cf16e5 \
7 file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" 7 file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
8 8
9DEPENDS_class-native = "" 9DEPENDS = "virtual/crypt"
10DEPENDS_class-nativesdk = ""
11 10
12SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \ 11SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.xz \
13 file://shadow-4.1.3-dots-in-usernames.patch \ 12 file://shadow-4.1.3-dots-in-usernames.patch \