Patchwork [1/7] util-linux: Setup for GPLv2 Recipe

login
register
mail settings
Submitter Saul Wold
Date March 17, 2011, 9:58 a.m.
Message ID <e13762b10af724def4290582b53f8072eaa8de9f.1300355683.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/1499/
State New, archived
Headers show

Comments

Saul Wold - March 17, 2011, 9:58 a.m.
From: Saul Wold <sgw@linux.intel.com>

 * add task to remove the GPLv3 lscpu code
 * Add patch to remove the reference to lscpu in Makfiles

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/util-linux/util-linux.inc       |    5 +---
 meta/recipes-core/util-linux/util-linux_2.17.2.bb |    9 +++++++-
 meta/recipes-core/util-linux/util-linux_gplv2.bb  |   24 +++++++++++++++++++++
 3 files changed, 33 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-core/util-linux/util-linux_gplv2.bb

Patch

diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 6f8bcb3..446c8e4 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
 
 SECTION = "base"
 
-# note that `lscpu' is under GPLv3+
 LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
-LICENSE_util-linux-lscpu = "GPLv3+"
 
 LIC_FILES_CHKSUM = "file://README.licensing;md5=1530e36fe1304d4535513de90a290df9 \
                     file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
@@ -30,7 +28,7 @@  SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/util-linux-ng/v${MAJOR_VERSION}/u
 PACKAGES =+ "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-swaponoff \
                     util-linux-losetup util-linux-umount util-linux-mount util-linux-readprofile \
                     util-linux-libblkid util-linux-libblkid-dev util-linux-libuuid util-linux-libuuid-dev \
-                    util-linux-lscpu util-linux-uuidgen \
+                    util-linux-uuidgen \
                    "
 
 S = "${WORKDIR}/util-linux-ng-${PV}"
@@ -49,7 +47,6 @@  FILES_util-linux-losetup = "${base_sbindir}/losetup.${PN}"
 FILES_util-linux-mount = "${base_bindir}/mount.${PN}"
 FILES_util-linux-umount = "${base_bindir}/umount.${PN}"
 FILES_util-linux-readprofile = "${base_sbindir}/readprofile"
-FILES_util-linux-lscpu = "${bindir}/lscpu"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
 
 FILES_util-linux-libblkid = "${libdir}/libblkid.so.*"
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 190a9e3..b1f5b13 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 @@ 
 MAJOR_VERSION = "2.17"
 require util-linux.inc
-PR = "r6"
+PR = "r7"
+
+# note that `lscpu' is under GPLv3+
+LICENSE_util-linux-lscpu = "GPLv3+"
 
 SRC_URI += "file://uclibc-compile.patch \
 	          file://util-linux-ng-replace-siginterrupt.patch \
@@ -9,6 +12,10 @@  SRC_URI += "file://uclibc-compile.patch \
 SRC_URI[md5sum] = "4635725a3eef1c57090bac8ea5e082e6"
 SRC_URI[sha256sum] = "c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f"
 
+PACKAGES =+ " util-linux-lscp "
+
+FILES_util-linux-lscpu = "${bindir}/lscpu"
+
 # fallocate is glibc 2.10, fallocate64 is glibc 2.11
 # we need to disable it for older versions
 EXTRA_OECONF += "ac_cv_func_fallocate=no"
diff --git a/meta/recipes-core/util-linux/util-linux_gplv2.bb b/meta/recipes-core/util-linux/util-linux_gplv2.bb
new file mode 100644
index 0000000..c711fac
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux_gplv2.bb
@@ -0,0 +1,24 @@ 
+MAJOR_VERSION = "2.17"
+PV = "2.17.1"
+
+require util-linux.inc
+PR = "r1"
+
+SRC_URI += "file://uclibc-compile.patch \
+	          file://util-linux-ng-replace-siginterrupt.patch \
+                  file://util-linux-ng-2.16-mount_lock_path.patch \
+                  file://remove-lscpu.patch"
+
+do_remove_lscpu() {
+	rm -f sys-utils/lscpu.c
+	rm -f sys-utils/lscpu.1
+}
+addtask remove_lscpu before do_configure after do_patch
+
+SRC_URI[md5sum] = "4635725a3eef1c57090bac8ea5e082e6"
+SRC_URI[sha256sum] = "c9ae801b6a5ab20b7749a278a8bf6830ef53adc5e8b7eb0ac1a9f410c774118f"
+
+# fallocate is glibc 2.10, fallocate64 is glibc 2.11
+# we need to disable it for older versions
+EXTRA_OECONF += "ac_cv_func_fallocate=no"
+EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group"