summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-03-15 13:18:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-18 16:47:56 +0000
commit4957992f2e92c9d29bc3763aaf2b46ae66cbb3ac (patch)
tree3ed44599d7bb3927d6794fb1186c27dd0e66f21e /meta/recipes-core
parent21d5d3cf5e2062f8d76ef052681c2111255c043b (diff)
downloadpoky-4957992f2e92c9d29bc3763aaf2b46ae66cbb3ac.tar.gz
util-linux: Setup for GPLv2 Recipe
* add task to remove the GPLv3 lscpu code * Add patch to remove the reference to lscpu in Makfiles (From OE-Core rev: ebd181cf6ce3fe233b61aef3af093228aa925f4d) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/util-linux/util-linux-2.17.2/remove-lscpu.patch101
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc14
-rw-r--r--meta/recipes-core/util-linux/util-linux_2.17.2.bb31
3 files changed, 137 insertions, 9 deletions
diff --git a/meta/recipes-core/util-linux/util-linux-2.17.2/remove-lscpu.patch b/meta/recipes-core/util-linux/util-linux-2.17.2/remove-lscpu.patch
new file mode 100644
index 0000000000..200dc2c86a
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux-2.17.2/remove-lscpu.patch
@@ -0,0 +1,101 @@
1Take out lscpu stuff from the code
2
32011/03/17
4Saul Wold <saul.wold@intel.com>
5Nitin A Kamble <nitin.a.kamble@intel.com>
6
7Index: util-linux-ng-2.17.2/sys-utils/Makefile.am
8===================================================================
9--- util-linux-ng-2.17.2.orig/sys-utils/Makefile.am
10+++ util-linux-ng-2.17.2/sys-utils/Makefile.am
11@@ -11,11 +11,11 @@ dist_man_MANS = flock.1 ipcrm.1 ipcs.1 i
12 if LINUX
13 bin_PROGRAMS += dmesg
14 sbin_PROGRAMS += ctrlaltdel
15-usrbin_exec_PROGRAMS += cytune setarch lscpu
16+usrbin_exec_PROGRAMS += cytune setarch
17 usrsbin_exec_PROGRAMS += ldattach tunelp rtcwake
18
19 dist_man_MANS += dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
20- ldattach.8 lscpu.1 tunelp.8 rtcwake.8
21+ ldattach.8 tunelp.8 rtcwake.8
22 endif
23
24 cytune_SOURCES = cytune.c cyclades.h
25Index: util-linux-ng-2.17.2/sys-utils/Makefile.in
26===================================================================
27--- util-linux-ng-2.17.2.orig/sys-utils/Makefile.in
28+++ util-linux-ng-2.17.2/sys-utils/Makefile.in
29@@ -47,10 +47,10 @@ usrsbin_exec_PROGRAMS = readprofile$(EXE
30 $(am__EXEEXT_10)
31 @LINUX_TRUE@am__append_1 = dmesg
32 @LINUX_TRUE@am__append_2 = ctrlaltdel
33-@LINUX_TRUE@am__append_3 = cytune setarch lscpu
34+@LINUX_TRUE@am__append_3 = cytune setarch
35 @LINUX_TRUE@am__append_4 = ldattach tunelp rtcwake
36 @LINUX_TRUE@am__append_5 = dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
37-@LINUX_TRUE@ ldattach.8 lscpu.1 tunelp.8 rtcwake.8
38+@LINUX_TRUE@ ldattach.8 tunelp.8 rtcwake.8
39
40 @BUILD_FALLOCATE_TRUE@am__append_6 = fallocate
41 @BUILD_FALLOCATE_TRUE@am__append_7 = fallocate.1
42@@ -100,7 +100,7 @@ am__installdirs = "$(DESTDIR)$(bindir)"
43 @BUILD_PIVOT_ROOT_TRUE@am__EXEEXT_4 = pivot_root$(EXEEXT)
44 @BUILD_SWITCH_ROOT_TRUE@am__EXEEXT_5 = switch_root$(EXEEXT)
45 @LINUX_TRUE@am__EXEEXT_6 = cytune$(EXEEXT) setarch$(EXEEXT) \
46-@LINUX_TRUE@ lscpu$(EXEEXT)
47+@LINUX_TRUE@
48 @BUILD_FALLOCATE_TRUE@am__EXEEXT_7 = fallocate$(EXEEXT)
49 @BUILD_UNSHARE_TRUE@am__EXEEXT_8 = unshare$(EXEEXT)
50 @LINUX_TRUE@am__EXEEXT_9 = ldattach$(EXEEXT) tunelp$(EXEEXT) \
51@@ -141,9 +141,6 @@ ipcs_LDADD = $(LDADD)
52 ldattach_SOURCES = ldattach.c
53 ldattach_OBJECTS = ldattach.$(OBJEXT)
54 ldattach_LDADD = $(LDADD)
55-lscpu_SOURCES = lscpu.c
56-lscpu_OBJECTS = lscpu.$(OBJEXT)
57-lscpu_LDADD = $(LDADD)
58 pivot_root_SOURCES = pivot_root.c
59 pivot_root_OBJECTS = pivot_root.$(OBJEXT)
60 pivot_root_LDADD = $(LDADD)
61@@ -201,11 +198,11 @@ AM_V_GEN = $(am__v_GEN_$(V))
62 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
63 am__v_GEN_0 = @echo " GEN " $@;
64 SOURCES = arch.c ctrlaltdel.c $(cytune_SOURCES) dmesg.c fallocate.c \
65- flock.c ipcmk.c ipcrm.c ipcs.c ldattach.c lscpu.c pivot_root.c \
66+ flock.c ipcmk.c ipcrm.c ipcs.c ldattach.c pivot_root.c \
67 rdev.c readprofile.c renice.c rtcwake.c setarch.c setsid.c \
68 switch_root.c $(tunelp_SOURCES) unshare.c
69 DIST_SOURCES = arch.c ctrlaltdel.c $(cytune_SOURCES) dmesg.c \
70- fallocate.c flock.c ipcmk.c ipcrm.c ipcs.c ldattach.c lscpu.c \
71+ fallocate.c flock.c ipcmk.c ipcrm.c ipcs.c ldattach.c \
72 pivot_root.c rdev.c readprofile.c renice.c rtcwake.c setarch.c \
73 setsid.c switch_root.c $(tunelp_SOURCES) unshare.c
74 INFO_DEPS = $(srcdir)/ipc.info
75@@ -248,7 +245,7 @@ NROFF = nroff
76 MANS = $(dist_man_MANS) $(man_MANS)
77 am__dist_noinst_DATA_DIST = flock.1 ipcrm.1 ipcs.1 ipcmk.1 renice.1 \
78 setsid.1 readprofile.1 dmesg.1 ctrlaltdel.8 cytune.8 setarch.8 \
79- ldattach.8 lscpu.1 tunelp.8 rtcwake.8 fallocate.1 pivot_root.8 \
80+ ldattach.8 tunelp.8 rtcwake.8 fallocate.1 pivot_root.8 \
81 switch_root.8 unshare.1 arch.1 rdev.8
82 DATA = $(dist_noinst_DATA)
83 ETAGS = etags
84@@ -678,9 +675,6 @@ ipcs$(EXEEXT): $(ipcs_OBJECTS) $(ipcs_DE
85 ldattach$(EXEEXT): $(ldattach_OBJECTS) $(ldattach_DEPENDENCIES)
86 @rm -f ldattach$(EXEEXT)
87 $(AM_V_CCLD)$(LINK) $(ldattach_OBJECTS) $(ldattach_LDADD) $(LIBS)
88-lscpu$(EXEEXT): $(lscpu_OBJECTS) $(lscpu_DEPENDENCIES)
89- @rm -f lscpu$(EXEEXT)
90- $(AM_V_CCLD)$(LINK) $(lscpu_OBJECTS) $(lscpu_LDADD) $(LIBS)
91 pivot_root$(EXEEXT): $(pivot_root_OBJECTS) $(pivot_root_DEPENDENCIES)
92 @rm -f pivot_root$(EXEEXT)
93 $(AM_V_CCLD)$(LINK) $(pivot_root_OBJECTS) $(pivot_root_LDADD) $(LIBS)
94@@ -728,7 +722,6 @@ distclean-compile:
95 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipcrm.Po@am__quote@
96 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipcs.Po@am__quote@
97 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldattach.Po@am__quote@
98-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lscpu.Po@am__quote@
99 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pivot_root.Po@am__quote@
100 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rdev.Po@am__quote@
101 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readprofile.Po@am__quote@
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 6f8bcb34bc..861747d1f0 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -5,9 +5,7 @@ disk partitioning, kernel message management, filesystem creation, and system lo
5 5
6SECTION = "base" 6SECTION = "base"
7 7
8# note that `lscpu' is under GPLv3+
9LICENSE = "GPLv2+ & LGPLv2.1+ & BSD" 8LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
10LICENSE_util-linux-lscpu = "GPLv3+"
11 9
12LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \ 10LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \
13 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ 11 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
@@ -27,11 +25,11 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${MAJOR_VERSION}/u
27 file://make_include \ 25 file://make_include \
28 " 26 "
29 27
30PACKAGES =+ "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff \ 28PACKAGES =+ "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
31 util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile \ 29 util-linux-swaponoff util-linux-losetup util-linux-umount \
32 util-linux-libblkid util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \ 30 util-linux-mount util-linux-readprofile util-linux-libblkid \
33 util-linux-lscpu util-linux-uuidgen \ 31 util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
34 " 32 util-linux-uuidgen util-linux-lscpu"
35 33
36S = "${WORKDIR}/util-linux-ng-${PV}" 34S = "${WORKDIR}/util-linux-ng-${PV}"
37 35
@@ -49,13 +47,13 @@ FILES_util-linux-losetup = "${base_sbindir}/losetup.${PN}"
49FILES_util-linux-mount = "${base_bindir}/mount.${PN}" 47FILES_util-linux-mount = "${base_bindir}/mount.${PN}"
50FILES_util-linux-umount = "${base_bindir}/umount.${PN}" 48FILES_util-linux-umount = "${base_bindir}/umount.${PN}"
51FILES_util-linux-readprofile = "${base_sbindir}/readprofile" 49FILES_util-linux-readprofile = "${base_sbindir}/readprofile"
52FILES_util-linux-lscpu = "${bindir}/lscpu"
53FILES_util-linux-uuidgen = "${bindir}/uuidgen" 50FILES_util-linux-uuidgen = "${bindir}/uuidgen"
54 51
55FILES_util-linux-libblkid = "${libdir}/libblkid.so.*" 52FILES_util-linux-libblkid = "${libdir}/libblkid.so.*"
56FILES_util-linux-libblkid-dev = "${libdir}/libblkid.so ${libdir}/libblkid.a ${libdir}/libblkid.la ${includedir}/blkid" 53FILES_util-linux-libblkid-dev = "${libdir}/libblkid.so ${libdir}/libblkid.a ${libdir}/libblkid.la ${includedir}/blkid"
57FILES_util-linux-libuuid = "${libdir}/libuuid.so.*" 54FILES_util-linux-libuuid = "${libdir}/libuuid.so.*"
58FILES_util-linux-libuuid-dev = "${libdir}/libuuid.so ${libdir}/libuuid.a ${libdir}/libuuid.la ${includedir}/uuid" 55FILES_util-linux-libuuid-dev = "${libdir}/libuuid.so ${libdir}/libuuid.a ${libdir}/libuuid.la ${includedir}/uuid"
56FILES_util-linux-lscpu = "${bindir}/lscpu"
59 57
60RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile " 58RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile "
61RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup" 59RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup"
diff --git a/meta/recipes-core/util-linux/util-linux_2.17.2.bb b/meta/recipes-core/util-linux/util-linux_2.17.2.bb
index 190a9e3784..f6bdfd4988 100644
--- a/meta/recipes-core/util-linux/util-linux_2.17.2.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.17.2.bb
@@ -1,6 +1,9 @@
1MAJOR_VERSION = "2.17" 1MAJOR_VERSION = "2.17"
2PR = "r7"
2require util-linux.inc 3require util-linux.inc
3PR = "r6" 4
5# note that `lscpu' is under GPLv3+
6LICENSE_util-linux-lscpu = "GPLv3+"
4 7
5SRC_URI += "file://uclibc-compile.patch \ 8SRC_URI += "file://uclibc-compile.patch \
6 file://util-linux-ng-replace-siginterrupt.patch \ 9 file://util-linux-ng-replace-siginterrupt.patch \
@@ -9,6 +12,32 @@ SRC_URI += "file://uclibc-compile.patch \
9SRC_URI[md5sum] = "4635725a3eef1c57090bac8ea5e082e6" 12SRC_URI[md5sum] = "4635725a3eef1c57090bac8ea5e082e6"
10SRC_URI[sha256sum] = "c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f" 13SRC_URI[sha256sum] = "c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f"
11 14
15# Only lscpu part is gplv3; rest of the code is not,
16# so take out the lscpu parts while running non-gplv3 build.
17python () {
18 d.setVar("REMOVELSCPU", "no")
19 if (d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1:
20 # avoid GPLv3
21 d.setVar("REMOVELSCPU", "yes")
22 packages = (d.getVar("PACKAGES", False) or "").split()
23 if "util-linux-lscpu" in packages:
24 packages.remove("util-linux-lscpu")
25 d.setVar("PACKAGES", " ".join(packages))
26
27 src_uri = (d.getVar("SRC_URI", False) or "").split()
28 src_uri.append("file://remove-lscpu.patch")
29 d.setVar("SRC_URI", " ".join(src_uri))
30}
31
32do_remove_lscpu() {
33 if [ "x${REMOVELSCPU}" = "xyes" ]; then
34 rm -f sys-utils/lscpu.c sys-utils/lscpu.1
35 rm -rf tests/ts/lscpu tests/expected/lscpu
36 fi
37}
38
39addtask remove_lscpu before do_configure after do_patch
40
12# fallocate is glibc 2.10, fallocate64 is glibc 2.11 41# fallocate is glibc 2.10, fallocate64 is glibc 2.11
13# we need to disable it for older versions 42# we need to disable it for older versions
14EXTRA_OECONF += "ac_cv_func_fallocate=no" 43EXTRA_OECONF += "ac_cv_func_fallocate=no"