summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-08-14 11:37:30 +0100
committerRoss Burton <ross.burton@intel.com>2018-08-14 12:24:24 +0100
commit4df61a34f13e9745f05a30506e9a34cdbfe0c252 (patch)
treebb2fa138ba4fed387ba655d6bd538f3a3a0c046a
parentf038b824192526a0d561ef977bba7c3fb1ed3fab (diff)
downloadmeta-gplv2-4df61a34f13e9745f05a30506e9a34cdbfe0c252.tar.gz
coreutils: don't build su
Previously we built su but didn't package it because util-linux is the preferred provider. However with glibc 2.28 libcrypt has been removed so su doesn't build. Instead of depending on virtual/crypt, lets just not build su at all. Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--recipes-core/coreutils/coreutils-6.9/no-su.patch56
-rw-r--r--recipes-core/coreutils/coreutils_6.9.bb5
2 files changed, 57 insertions, 4 deletions
diff --git a/recipes-core/coreutils/coreutils-6.9/no-su.patch b/recipes-core/coreutils/coreutils-6.9/no-su.patch
new file mode 100644
index 0000000..47339e5
--- /dev/null
+++ b/recipes-core/coreutils/coreutils-6.9/no-su.patch
@@ -0,0 +1,56 @@
1Newer versions of su don't provide su as util-linux is the preferred provider,
2so don't build it.
3
4Upstream-Status: Inappropriate
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7diff --git a/src/Makefile.am b/src/Makefile.am
8index 863a32b5a..28c060898 100644
9--- a/src/Makefile.am
10+++ b/src/Makefile.am
11@@ -16,7 +16,7 @@
12 ## along with this program; if not, write to the Free Software Foundation,
13 ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14
15-EXTRA_PROGRAMS = chroot df hostid nice pinky stty su uname uptime users who
16+EXTRA_PROGRAMS = chroot df hostid nice pinky stty uname uptime users who
17
18 bin_SCRIPTS = groups
19 bin_PROGRAMS = [ chgrp chown chmod cp dd dircolors du \
20@@ -131,8 +131,6 @@ RELEASE_YEAR = \
21 chmod +x $@-t
22 mv $@-t $@
23
24-all-local: su$(EXEEXT)
25-
26 installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
27
28 setuid_root_mode = a=rx,u+s
29@@ -146,27 +144,6 @@ INSTALL_SU = \
30 echo " chmod $(setuid_root_mode) $(installed_su)"; \
31 chmod $(setuid_root_mode) $(installed_su)
32
33-install-root: su$(EXEEXT)
34- @$(INSTALL_SU)
35-
36-install-exec-local: su$(EXEEXT)
37- @TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \
38- rm -f $$TMPFILE; \
39- echo > $$TMPFILE; \
40-## See if we can create a setuid root executable in $(bindir).
41-## If not, then don't even try to install su.
42- can_create_suid_root_executable=no; \
43- chown root $$TMPFILE > /dev/null 2>&1 \
44- && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \
45- && can_create_suid_root_executable=yes; \
46- rm -f $$TMPFILE; \
47- if test $$can_create_suid_root_executable = yes; then \
48- $(INSTALL_SU); \
49- else \
50- echo "WARNING: insufficient access; not installing su"; \
51- echo "NOTE: to install su, run 'make install-root' as root"; \
52- fi
53-
54 uninstall-local:
55 # Remove su only if it's one we installed.
56 @if grep '$(GNU_PACKAGE)' $(installed_su) > /dev/null 2>&1; then \
diff --git a/recipes-core/coreutils/coreutils_6.9.bb b/recipes-core/coreutils/coreutils_6.9.bb
index 0d236b2..ae941fd 100644
--- a/recipes-core/coreutils/coreutils_6.9.bb
+++ b/recipes-core/coreutils/coreutils_6.9.bb
@@ -28,6 +28,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.bz2 \
28 file://loadavg.patch \ 28 file://loadavg.patch \
29 file://no-man.patch \ 29 file://no-man.patch \
30 file://build-don-t-need-charset.alias-when-building-for-mus.patch \ 30 file://build-don-t-need-charset.alias-when-building-for-mus.patch \
31 file://no-su.patch \
31 " 32 "
32 33
33SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06" 34SRC_URI[md5sum] = "c9607d8495f16e98906e7ed2d9751a06"
@@ -78,10 +79,6 @@ do_install() {
78 # in update-alternatives to fail, therefore use lbracket - the name used 79 # in update-alternatives to fail, therefore use lbracket - the name used
79 # for the actual source file. 80 # for the actual source file.
80 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN} 81 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
81
82 # Newer versions of coreutils do not include su, to mimic this behavior
83 # we simply remove it.
84 rm -f ${D}${bindir}/su
85} 82}
86 83
87inherit update-alternatives 84inherit update-alternatives