summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/build-compare
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-09-08 14:41:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:48:45 +0100
commit29e94f671b951aa28450160c4b3ec48a4ddf0063 (patch)
tree9957c66250e9d458a55b8402b19c5145bc13c9e5 /meta/recipes-devtools/build-compare
parent3a9e230b7a6763a64ff4a26522e444661fa74ddf (diff)
downloadpoky-29e94f671b951aa28450160c4b3ec48a4ddf0063.tar.gz
build-compare: add support for examining deb and ipk packages
This is just rudimentary support at the moment as we'd potentially want to compare the control files a bit more specifically than this does, but it's a start. (From OE-Core rev: 60564c6d6b8c1a3813baa04fb0d5597cf63f2a9f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/build-compare')
-rw-r--r--meta/recipes-devtools/build-compare/build-compare_git.bb8
-rw-r--r--meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch64
2 files changed, 69 insertions, 3 deletions
diff --git a/meta/recipes-devtools/build-compare/build-compare_git.bb b/meta/recipes-devtools/build-compare/build-compare_git.bb
index 418aee0d5e..7ac37846b6 100644
--- a/meta/recipes-devtools/build-compare/build-compare_git.bb
+++ b/meta/recipes-devtools/build-compare/build-compare_git.bb
@@ -5,9 +5,11 @@ HOMEPAGE = "https://github.com/openSUSE/build-compare"
5LICENSE = "GPLv2" 5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" 6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
7 7
8SRC_URI = "git://github.com/openSUSE/build-compare.git" 8SRC_URI = "git://github.com/openSUSE/build-compare.git \
9SRC_URI += "file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1" 9 file://Rename-rpm-check.sh-to-pkg-diff.sh.patch;striplevel=1 \
10SRC_URI += "file://Ignore-DWARF-sections.patch;striplevel=1" 10 file://Ignore-DWARF-sections.patch;striplevel=1 \
11 file://0001-Add-support-for-deb-and-ipk-packaging.patch \
12 "
11PATCHTOOL = "git" 13PATCHTOOL = "git"
12 14
13SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a" 15SRCREV = "c5352c054c6ef15735da31b76d6d88620f4aff0a"
diff --git a/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch b/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
new file mode 100644
index 0000000000..5c15218c8a
--- /dev/null
+++ b/meta/recipes-devtools/build-compare/files/0001-Add-support-for-deb-and-ipk-packaging.patch
@@ -0,0 +1,64 @@
1From 02dbc7e3478e409d6f5e3e1c53daddf8838be999 Mon Sep 17 00:00:00 2001
2From: Paul Eggleton <paul.eggleton@linux.intel.com>
3Date: Tue, 1 Sep 2015 12:04:33 +0100
4Subject: [PATCH] Add support for deb and ipk packaging
5
6Upstream-Status: Pending
7
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9---
10 functions.sh | 15 +++++++++++++++
11 pkg-diff.sh | 6 ++++++
12 2 files changed, 21 insertions(+)
13
14diff --git a/functions.sh b/functions.sh
15index 06079df..85c9003 100644
16--- a/functions.sh
17+++ b/functions.sh
18@@ -85,6 +85,13 @@ function unpackage()
19 CPIO_OPTS="--extract --unconditional --preserve-modification-time --make-directories --quiet"
20 rpm2cpio $file | cpio ${CPIO_OPTS}
21 ;;
22+ *.ipk|*.deb)
23+ ar x $file
24+ tar xf control.tar.gz
25+ rm control.tar.gz
26+ tar xf data.tar.gz
27+ rm data.tar.gz
28+ ;;
29 esac
30 popd 1>/dev/null
31 }
32@@ -255,4 +262,12 @@ function cmp_spec ()
33 rm $file1 $file2
34 return $RES
35 }
36+
37+function adjust_controlfile () {
38+ cat $1/control | sed '/^Version: /d' > $1/control.fixed
39+ mv $1/control.fixed $1/control
40+ cat $2/control | sed '/^Version: /d' > $2/control.fixed
41+ mv $2/control.fixed $2/control
42+}
43+
44 # vim: tw=666 ts=2 et
45diff --git a/pkg-diff.sh b/pkg-diff.sh
46index 0f1fa76..3cf10aa 100644
47--- a/pkg-diff.sh
48+++ b/pkg-diff.sh
49@@ -138,6 +138,12 @@ echo "Extracting packages"
50 unpackage $oldpkg $dir/old
51 unpackage $newpkg $dir/new
52
53+case $oldpkg in
54+ *.deb|*.ipk)
55+ adjust_controlfile $dir/old $dir/new
56+ ;;
57+esac
58+
59 # files is set in cmp_spec for rpms, so if RES is empty we should assume
60 # it wasn't an rpm and pick all files for comparison.
61 if [ -z $RES ]; then
62--
632.1.0
64