]> code.ossystems Code Review - openembedded-core.git/commitdiff
opkg: Upgraded to version 0.1.8
authorDongxiao Xu <dongxiao.xu@intel.com>
Wed, 21 Jul 2010 02:58:28 +0000 (10:58 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 21 Jul 2010 15:00:58 +0000 (16:00 +0100)
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>
meta/conf/distro/include/poky-default-revisions.inc
meta/packages/opkg/opkg-0.1.8/add_vercmp.patch [new file with mode: 0644]
meta/packages/opkg/opkg-0.1.8/headerfix.patch [new file with mode: 0644]
meta/packages/opkg/opkg-0.1.8/opkg_unarchive.patch [new file with mode: 0644]
meta/packages/opkg/opkg-nogpg_0.1.8.bb [new file with mode: 0644]
meta/packages/opkg/opkg.inc
meta/packages/opkg/opkg_0.1.8.bb [new file with mode: 0644]
meta/packages/opkg/opkg_svn.bb

index cc73ba3a0b16426c67ccb4bd1704f7fbed0fe556..4e5c4614ad7aed8f1ed853cbf00e31e3db0878f5 100644 (file)
@@ -98,9 +98,6 @@ SRCREV_pn-networkmanager ??= "2984"
 SRCREV_pn-ofono ??= "14544d5996836f628613c2ce544380ee6fc8f514"
 SRCREV_pn-oh-puzzles ??= "23"
 SRCREV_pn-ohm ??= "edfe25d49d67884bf004de7ae0724c162bb5e65e"
-SRCREV_pn-opkg-native ??= "518"
-SRCREV_pn-opkg-nativesdk ??= "518"
-SRCREV_pn-opkg ??= "518"
 SRCREV_pn-opkg-utils-native ??= "4534"
 SRCREV_pn-opkg-utils ??= "4534"
 SRCREV_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 (file)
index 0000000..540be83
--- /dev/null
@@ -0,0 +1,34 @@
+Index: trunk/libopkg/opkg.c
+===================================================================
+--- trunk.orig/libopkg/opkg.c  2010-01-26 20:32:19.000000000 +0000
++++ trunk/libopkg/opkg.c       2010-01-26 20:40:34.000000000 +0000
+@@ -876,3 +876,18 @@
+       return ret;
+ }
++
++int
++opkg_compare_versions (const char *ver1, const char *ver2)
++{
++  pkg_t *pkg1, *pkg2;
++
++  pkg1 = pkg_new();
++  pkg2 = pkg_new();
++
++  parse_version(pkg1, ver1);
++  parse_version(pkg2, ver2);
++
++  return pkg_compare_versions(pkg1, pkg2);
++}
++
+Index: trunk/libopkg/opkg.h
+===================================================================
+--- trunk.orig/libopkg/opkg.h  2010-01-26 20:32:19.000000000 +0000
++++ trunk/libopkg/opkg.h       2010-01-26 20:35:19.000000000 +0000
+@@ -58,4 +58,6 @@
+ int opkg_repository_accessibility_check(void);
++int opkg_compare_versions (const char *ver1, const char *ver2);
++
+ #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 (file)
index 0000000..d0711ec
--- /dev/null
@@ -0,0 +1,17 @@
+Without this, the FILE reference in this header can cause compile issues.
+
+RP - 29/1/10
+
+Index: trunk/libopkg/pkg_dest.h
+===================================================================
+--- trunk.orig/libopkg/pkg_dest.h      2010-01-29 09:37:22.000000000 +0000
++++ trunk/libopkg/pkg_dest.h   2010-01-29 09:37:33.000000000 +0000
+@@ -18,6 +18,8 @@
+ #ifndef PKG_DEST_H
+ #define PKG_DEST_H
++#include <stdio.h>
++
+ typedef struct pkg_dest pkg_dest_t;
+ struct pkg_dest
+ {
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 (file)
index 0000000..4b12448
--- /dev/null
@@ -0,0 +1,17 @@
+Rebase for the latest version
+Dongxiao Xu <dongxiao.xu@intel.com>
+
+diff -ruN opkg-0.1.8-orig/libbb/unarchive.c opkg-0.1.8/libbb/unarchive.c
+--- opkg-0.1.8-orig/libbb/unarchive.c  2010-07-20 09:39:02.266424893 +0800
++++ opkg-0.1.8/libbb/unarchive.c       2010-07-20 09:39:50.474435569 +0800
+@@ -523,6 +523,10 @@
+                 }
+         }
++        if (strlen(tar_entry->name) > 100) {
++                tar_entry->name[100] = 0;
++        }
++
+       // tar_entry->name = xstrdup(tar.formated.name);
+ /*
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 (file)
index 0000000..259a60e
--- /dev/null
@@ -0,0 +1,8 @@
+require opkg_${PV}.bb
+
+DEPENDS = "curl"
+PROVIDES += "opkg"
+
+EXTRA_OECONF += "--disable-gpg"
+
+DEFAULT_PREFERENCE = "-1"
index 84ce74c936f53a4ac70601fa7a080b9577966a21..a602a6ff8fcfa3b4ab685936543ff1411c35a704 100644 (file)
@@ -2,26 +2,22 @@ DESCRIPTION = "Open Package Manager"
 DESCRIPTION_libopkg = "Open Package Manager Library"
 DESCRIPTION_update-alternatives-cworth = "Update alternatives"
 SECTION = "base"
-LICENSE = "GPL"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://src/opkg-cl.c;beginline=1;endline=20;md5=321f658c3f6b6c832e25c8850b5dffba"
 DEPENDS = "curl gpgme openssl"
 DEPENDS_virtclass-native = "curl-native"
 DEPENDS_virtclass-nativesdk = "curl-nativesdk"
-PV = "0.0+svnr${SRCREV}"
-PE = "1"
-
-SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
-       file://opkg_unarchive.patch;patch=1;maxrev=201 \
-       file://add_vercmp.patch;patch=1 \
-       file://headerfix.patch;patch=1 \
-       file://logfix.patch;patch=1 "
 
-S = "${WORKDIR}/trunk"
+PE = "1"
 
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opkg"
 
 # Werror gives all kinds bounds issuses with gcc 4.3.3
 do_configure_prepend() {
-    sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+       sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
 }
 
 inherit 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 (file)
index 0000000..dcd6fb6
--- /dev/null
@@ -0,0 +1,53 @@
+require opkg.inc
+
+PROVIDES += "virtual/update-alternatives"
+RPROVIDES_update-alternatives-cworth += "update-alternatives"
+RCONFLICTS_update-alternatives-cworth = "update-alternatives-dpkg"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-config-base"
+RDEPENDS_${PN}_virtclass-native = ""
+RDEPENDS_${PN}_virtclass-nativesdk = ""
+PACKAGE_ARCH_update-alternatives-cworth = "all"
+
+SRC_URI = "http://opkg.googlecode.com/files/opkg-${PV}.tar.gz \
+           file://opkg_unarchive.patch \
+           file://add_vercmp.patch \
+           file://headerfix.patch"
+
+PR = "r0"
+
+PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
+
+FILES_update-alternatives-cworth = "${bindir}/update-alternatives"
+FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
+FILES_libopkg = "${libdir}/*.so.* ${libdir}/opkg/"
+
+# We need to create the lock directory
+do_install_append() {
+       install -d ${D}${libdir}/opkg
+}
+
+# Define a variable to allow distros to run configure earlier.
+# (for example, to enable loading of ethernet kernel modules before networking starts)
+OPKG_INIT_POSITION = "98"
+OPKG_INIT_POSITION_slugos = "41"
+
+pkg_postinst_${PN} () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+       install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
+       # this happens at S98 where our good 'ole packages script used to run
+       echo "#!/bin/sh
+opkg-cl configure
+rm -f /${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+       chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+fi
+
+update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
+}
+
+pkg_postrm_${PN} () {
+#!/bin/sh
+update-alternatives --remove opkg ${bindir}/opkg-cl
+}
+
index c3192bea50e00b741b07b53805e6c82059748442..73bde7766ba386652c3ad1242d3b77b61cd0035f 100644 (file)
@@ -8,6 +8,15 @@ RDEPENDS_${PN}_virtclass-native = ""
 RDEPENDS_${PN}_virtclass-nativesdk = ""
 PACKAGE_ARCH_update-alternatives-cworth = "all"
 
+SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
+           file://opkg_unarchive.patch \
+           file://add_vercmp.patch \
+           file://headerfix.patch \
+           file://logfix.patch"
+
+S = "${WORKDIR}/trunk"
+
+PV = "0.0+svnr${SRCREV}"
 PR = "r13"
 
 PACKAGES =+ "libopkg-dev libopkg update-alternatives-cworth"
@@ -18,7 +27,7 @@ FILES_libopkg = "${libdir}/*.so.* ${libdir}/opkg/"
 
 # We need to create the lock directory
 do_install_append() {
-    install -d ${D}${libdir}/opkg
+       install -d ${D}${libdir}/opkg
 }
 
 # Define a variable to allow distros to run configure earlier.