summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2010-07-21 10:58:28 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-21 16:00:58 +0100
commit36bc4592f4f0e4b4afaba6a0eba21ee9d4ffcfb1 (patch)
tree5f8934d0c7fde07abcdfdcb81c9144646675694c
parent21fae7e2ec4891e00a611413f1be14ab71947236 (diff)
downloadpoky-36bc4592f4f0e4b4afaba6a0eba21ee9d4ffcfb1.tar.gz
opkg: Upgraded to version 0.1.8
Use stable release as default recipe. Remove logfix.patch since the logic is already in latest version package Also fix the metadata Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-rw-r--r--meta/conf/distro/include/poky-default-revisions.inc3
-rw-r--r--meta/packages/opkg/opkg-0.1.8/add_vercmp.patch34
-rw-r--r--meta/packages/opkg/opkg-0.1.8/headerfix.patch17
-rw-r--r--meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch17
-rw-r--r--meta/packages/opkg/opkg-nogpg_0.1.8.bb8
-rw-r--r--meta/packages/opkg/opkg.inc18
-rw-r--r--meta/packages/opkg/opkg_0.1.8.bb53
-rw-r--r--meta/packages/opkg/opkg_svn.bb11
8 files changed, 146 insertions, 15 deletions
diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
index cc73ba3a0b..4e5c4614ad 100644
--- a/meta/conf/distro/include/poky-default-revisions.inc
+++ b/meta/conf/distro/include/poky-default-revisions.inc
@@ -98,9 +98,6 @@ SRCREV_pn-networkmanager ??= "2984"
98SRCREV_pn-ofono ??= "14544d5996836f628613c2ce544380ee6fc8f514" 98SRCREV_pn-ofono ??= "14544d5996836f628613c2ce544380ee6fc8f514"
99SRCREV_pn-oh-puzzles ??= "23" 99SRCREV_pn-oh-puzzles ??= "23"
100SRCREV_pn-ohm ??= "edfe25d49d67884bf004de7ae0724c162bb5e65e" 100SRCREV_pn-ohm ??= "edfe25d49d67884bf004de7ae0724c162bb5e65e"
101SRCREV_pn-opkg-native ??= "518"
102SRCREV_pn-opkg-nativesdk ??= "518"
103SRCREV_pn-opkg ??= "518"
104SRCREV_pn-opkg-utils-native ??= "4534" 101SRCREV_pn-opkg-utils-native ??= "4534"
105SRCREV_pn-opkg-utils ??= "4534" 102SRCREV_pn-opkg-utils ??= "4534"
106SRCREV_pn-oprofileui ??= "197" 103SRCREV_pn-oprofileui ??= "197"
diff --git a/meta/packages/opkg/opkg-0.1.8/add_vercmp.patch b/meta/packages/opkg/opkg-0.1.8/add_vercmp.patch
new file mode 100644
index 0000000000..540be83950
--- /dev/null
+++ b/meta/packages/opkg/opkg-0.1.8/add_vercmp.patch
@@ -0,0 +1,34 @@
1Index: trunk/libopkg/opkg.c
2===================================================================
3--- trunk.orig/libopkg/opkg.c 2010-01-26 20:32:19.000000000 +0000
4+++ trunk/libopkg/opkg.c 2010-01-26 20:40:34.000000000 +0000
5@@ -876,3 +876,18 @@
6
7 return ret;
8 }
9+
10+int
11+opkg_compare_versions (const char *ver1, const char *ver2)
12+{
13+ pkg_t *pkg1, *pkg2;
14+
15+ pkg1 = pkg_new();
16+ pkg2 = pkg_new();
17+
18+ parse_version(pkg1, ver1);
19+ parse_version(pkg2, ver2);
20+
21+ return pkg_compare_versions(pkg1, pkg2);
22+}
23+
24Index: trunk/libopkg/opkg.h
25===================================================================
26--- trunk.orig/libopkg/opkg.h 2010-01-26 20:32:19.000000000 +0000
27+++ trunk/libopkg/opkg.h 2010-01-26 20:35:19.000000000 +0000
28@@ -58,4 +58,6 @@
29
30 int opkg_repository_accessibility_check(void);
31
32+int opkg_compare_versions (const char *ver1, const char *ver2);
33+
34 #endif /* OPKG_H */
diff --git a/meta/packages/opkg/opkg-0.1.8/headerfix.patch b/meta/packages/opkg/opkg-0.1.8/headerfix.patch
new file mode 100644
index 0000000000..d0711ecd0e
--- /dev/null
+++ b/meta/packages/opkg/opkg-0.1.8/headerfix.patch
@@ -0,0 +1,17 @@
1Without this, the FILE reference in this header can cause compile issues.
2
3RP - 29/1/10
4
5Index: trunk/libopkg/pkg_dest.h
6===================================================================
7--- trunk.orig/libopkg/pkg_dest.h 2010-01-29 09:37:22.000000000 +0000
8+++ trunk/libopkg/pkg_dest.h 2010-01-29 09:37:33.000000000 +0000
9@@ -18,6 +18,8 @@
10 #ifndef PKG_DEST_H
11 #define PKG_DEST_H
12
13+#include <stdio.h>
14+
15 typedef struct pkg_dest pkg_dest_t;
16 struct pkg_dest
17 {
diff --git a/meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch b/meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch
new file mode 100644
index 0000000000..4b12448155
--- /dev/null
+++ b/meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch
@@ -0,0 +1,17 @@
1Rebase for the latest version
2Dongxiao Xu <dongxiao.xu@intel.com>
3
4diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c
5--- opkg-0.1.8-orig/libbb/unarchive.c 2010-07-20 09:39:02.266424893 +0800
6+++ opkg-0.1.8/libbb/unarchive.c 2010-07-20 09:39:50.474435569 +0800
7@@ -523,6 +523,10 @@
8 }
9 }
10
11+ if (strlen(tar_entry->name) > 100) {
12+ tar_entry->name[100] = 0;
13+ }
14+
15 // tar_entry->name = xstrdup(tar.formated.name);
16
17 /*
diff --git a/meta/packages/opkg/opkg-nogpg_0.1.8.bb b/meta/packages/opkg/opkg-nogpg_0.1.8.bb
new file mode 100644
index 0000000000..259a60ebc9
--- /dev/null
+++ b/meta/packages/opkg/opkg-nogpg_0.1.8.bb
@@ -0,0 +1,8 @@
1require opkg_${PV}.bb
2
3DEPENDS = "curl"
4PROVIDES += "opkg"
5
6EXTRA_OECONF += "--disable-gpg"
7
8DEFAULT_PREFERENCE = "-1"
diff --git a/meta/packages/opkg/opkg.inc b/meta/packages/opkg/opkg.inc
index 84ce74c936..a602a6ff8f 100644
--- a/meta/packages/opkg/opkg.inc
+++ b/meta/packages/opkg/opkg.inc
@@ -2,26 +2,22 @@ DESCRIPTION = "Open Package Manager"
2DESCRIPTION_libopkg = "Open Package Manager Library" 2DESCRIPTION_libopkg = "Open Package Manager Library"
3DESCRIPTION_update-alternatives-cworth = "Update alternatives" 3DESCRIPTION_update-alternatives-cworth = "Update alternatives"
4SECTION = "base" 4SECTION = "base"
5LICENSE = "GPL" 5HOMEPAGE = "http://code.google.com/p/opkg/"
6BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
7LICENSE = "GPLv2+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
9 file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba"
6DEPENDS = "curl gpgme openssl" 10DEPENDS = "curl gpgme openssl"
7DEPENDS_virtclass-native = "curl-native" 11DEPENDS_virtclass-native = "curl-native"
8DEPENDS_virtclass-nativesdk = "curl-nativesdk" 12DEPENDS_virtclass-nativesdk = "curl-nativesdk"
9PV = "0.0+svnr${SRCREV}"
10PE = "1"
11
12SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
13 file://opkg_unarchive.patch;patch=1;maxrev=201 \
14 file://add_vercmp.patch;patch=1 \
15 file://headerfix.patch;patch=1 \
16 file://logfix.patch;patch=1 "
17 13
18S = "${WORKDIR}/trunk" 14PE = "1"
19 15
20FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg" 16FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg"
21 17
22# Werror gives all kinds bounds issuses with gcc 4.3.3 18# Werror gives all kinds bounds issuses with gcc 4.3.3
23do_configure_prepend() { 19do_configure_prepend() {
24 sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am 20 sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
25} 21}
26 22
27inherit autotools pkgconfig 23inherit autotools pkgconfig
diff --git a/meta/packages/opkg/opkg_0.1.8.bb b/meta/packages/opkg/opkg_0.1.8.bb
new file mode 100644
index 0000000000..dcd6fb62ea
--- /dev/null
+++ b/meta/packages/opkg/opkg_0.1.8.bb
@@ -0,0 +1,53 @@
1require opkg.inc
2
3PROVIDES += "virtual/update-alternatives"
4RPROVIDES_update-alternatives-cworth += "update-alternatives"
5RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
6RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
7RDEPENDS_${PN}_virtclass-native = ""
8RDEPENDS_${PN}_virtclass-nativesdk = ""
9PACKAGE_ARCH_update-alternatives-cworth = "all"
10
11SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
12 file://opkg_unarchive.patch \
13 file://add_vercmp.patch \
14 file://headerfix.patch"
15
16PR = "r0"
17
18PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
19
20FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
21FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
22FILES_libopkg = "${libdir}/*.so.* ${libdir}/opkg/"
23
24# We need to create the lock directory
25do_install_append() {
26 install -d ${D}${libdir}/opkg
27}
28
29# Define a variable to allow distros to run configure earlier.
30# (for example, to enable loading of ethernet kernel modules before networking starts)
31OPKG_INIT_POSITION = "98"
32OPKG_INIT_POSITION_slugos = "41"
33
34pkg_postinst_${PN} () {
35#!/bin/sh
36if [ "x$D" != "x" ]; then
37 install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
38 # this happens at S98 where our good 'ole packages script used to run
39 echo "#!/bin/sh
40opkg-cl configure
41rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
42" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
43 chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
44fi
45
46update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
47}
48
49pkg_postrm_${PN} () {
50#!/bin/sh
51update-alternatives --remove opkg ${bindir}/opkg-cl
52}
53
diff --git a/meta/packages/opkg/opkg_svn.bb b/meta/packages/opkg/opkg_svn.bb
index c3192bea50..73bde7766b 100644
--- a/meta/packages/opkg/opkg_svn.bb
+++ b/meta/packages/opkg/opkg_svn.bb
@@ -8,6 +8,15 @@ RDEPENDS_${PN}_virtclass-native = ""
8RDEPENDS_${PN}_virtclass-nativesdk = "" 8RDEPENDS_${PN}_virtclass-nativesdk = ""
9PACKAGE_ARCH_update-alternatives-cworth = "all" 9PACKAGE_ARCH_update-alternatives-cworth = "all"
10 10
11SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
12 file://opkg_unarchive.patch \
13 file://add_vercmp.patch \
14 file://headerfix.patch \
15 file://logfix.patch"
16
17S = "${WORKDIR}/trunk"
18
19PV = "0.0+svnr${SRCREV}"
11PR = "r13" 20PR = "r13"
12 21
13PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth" 22PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
@@ -18,7 +27,7 @@ FILES_libopkg = "${libdir}/*.so.* ${libdir}/opkg/"
18 27
19# We need to create the lock directory 28# We need to create the lock directory
20do_install_append() { 29do_install_append() {
21 install -d ${D}${libdir}/opkg 30 install -d ${D}${libdir}/opkg
22} 31}
23 32
24# Define a variable to allow distros to run configure earlier. 33# Define a variable to allow distros to run configure earlier.