opkg: update to 0.2.0
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 16 Nov 2014 23:57:06 +0000 (01:57 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 17 Nov 2014 00:04:35 +0000 (02:04 +0200)
18 files changed:
recipes/opkg/files/configure
recipes/opkg/files/fix_endianness.patch [deleted file]
recipes/opkg/files/opkg-libdir.patch [deleted file]
recipes/opkg/opkg-collateral.bb
recipes/opkg/opkg-collateral/visstrim_m10/dest [new file with mode: 0644]
recipes/opkg/opkg-collateral/visstrim_m10/lists [new file with mode: 0644]
recipes/opkg/opkg-collateral/visstrim_m10/tmp_dir [new file with mode: 0644]
recipes/opkg/opkg-ipkg-compat.bb [deleted file]
recipes/opkg/opkg-native_svn.bb
recipes/opkg/opkg-nogpg-nocurl-slugos_svn.bb
recipes/opkg/opkg-nogpg-nocurl_svn.bb
recipes/opkg/opkg-nogpg_svn.bb [deleted file]
recipes/opkg/opkg-sdk_svn.bb
recipes/opkg/opkg.inc
recipes/opkg/opkg/isatty.patch [deleted file]
recipes/opkg/opkg/opkg-intercept-cleanup.patch [deleted file]
recipes/opkg/opkg_svn.bb
recipes/opkg/update-alternatives-merge.inc

index d5dd74d..633d8d3 100644 (file)
@@ -22,4 +22,4 @@ else
 fi
 
 # delete myself
-rm -f /etc/rcS.d/S98configure
+rm -f /etc/rcS.d/S40configure
diff --git a/recipes/opkg/files/fix_endianness.patch b/recipes/opkg/files/fix_endianness.patch
deleted file mode 100644 (file)
index 8632ce5..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN opkg.orig/configure.ac opkg/configure.ac
---- opkg.orig/configure.ac     2008-03-20 13:29:09.000000000 +0100
-+++ opkg/configure.ac  2008-03-25 09:39:52.000000000 +0100
-@@ -94,7 +94,7 @@
- AC_CHECK_MEMBERS([struct stat.st_rdev])
- # Checks endianness
--AC_C_BIGENDIAN(ENDIAN_CFLAGS="-DWORDS_BIGENDIAN=1",)
-+AC_C_BIGENDIAN(BIGENDIAN_CFLAGS="-DWORDS_BIGENDIAN=1",)
- AC_SUBST(BIGENDIAN_CFLAGS)
- # Don't do annoying tests that don't work when cross-compiling, just trust them.
diff --git a/recipes/opkg/files/opkg-libdir.patch b/recipes/opkg/files/opkg-libdir.patch
deleted file mode 100644 (file)
index 1d48b9a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- trunk/utils/update-alternatives.orig       2009-06-23 15:33:56.000000000 -0300
-+++ trunk/utils/update-alternatives    2009-06-23 15:34:10.000000000 -0300
-@@ -21,7 +21,7 @@
- set -e
- # admin dir
--ad="$OPKG_OFFLINE_ROOT/usr/lib/opkg/alternatives"
-+ad="$OPKG_OFFLINE_ROOT/${libdir}/opkg/alternatives"
- usage() {
-       echo "update-alternatives: $*
index a7ec321..67499af 100644 (file)
@@ -1,7 +1,7 @@
 DESCRIPTION = "opkg configuration files"
 SECTION = "base"
 LICENSE = "MIT"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "file://opkg.conf.comments \
           file://lists \
@@ -20,6 +20,14 @@ do_compile_append_shr () {
        cat ${WORKDIR}/tmp_dir  >>${WORKDIR}/opkg.conf
 }
 
+do_compile_append_angstrom () {
+       cat ${WORKDIR}/tmp_dir  >>${WORKDIR}/opkg.conf
+}
+
+do_compile_append_slugos () {
+       cat ${WORKDIR}/tmp_dir  >>${WORKDIR}/opkg.conf
+}
+
 do_install () {
        install -d ${D}${sysconfdir}/opkg
        install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
@@ -29,4 +37,13 @@ do_install_append_shr () {
        install -d ${D}/var/lib/opkg/tmp
 }
 
+do_install_append_angstrom () {
+       install -d ${D}/var/lib/opkg/tmp
+}
+
+do_install_append_slugos () {
+       install -d ${D}/var/lib/opkg/tmp
+}
+
+PACKAGE_ARCH = "all"
 CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/recipes/opkg/opkg-collateral/visstrim_m10/dest b/recipes/opkg/opkg-collateral/visstrim_m10/dest
new file mode 100644 (file)
index 0000000..c2b9657
--- /dev/null
@@ -0,0 +1 @@
+dest root /opt
diff --git a/recipes/opkg/opkg-collateral/visstrim_m10/lists b/recipes/opkg/opkg-collateral/visstrim_m10/lists
new file mode 100644 (file)
index 0000000..77c0834
--- /dev/null
@@ -0,0 +1,2 @@
+lists_dir ext /opt/var/lib/opkg
+
diff --git a/recipes/opkg/opkg-collateral/visstrim_m10/tmp_dir b/recipes/opkg/opkg-collateral/visstrim_m10/tmp_dir
new file mode 100644 (file)
index 0000000..b3f8d53
--- /dev/null
@@ -0,0 +1,4 @@
+# We have whole /tmp in volatile tmpfs which is better than wear leveling NAND or uSD
+# But also bad for big upgrades where tmpfs eats whole memory,
+# device starts swapping (possibly using more NAND/uSD than temporary unpack) and then segfaults because of lack of space
+option tmp_dir /tmp
diff --git a/recipes/opkg/opkg-ipkg-compat.bb b/recipes/opkg/opkg-ipkg-compat.bb
deleted file mode 100644 (file)
index 58c8145..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "Files to make opkg and ipkg coexist"
-RDEPENDS = "opkg ipkg ipkg-collateral"
-
-PR = "r0"
-PACKAGE_ARCH = "all"
-
-do_compile() {
-       :
-}
-
-
-do_install () {
-       install -d ${D}${sysconfdir}
-       install -d ${D}/var/lib/ipkg
-       ln -sf ${sysconfdir}/ipkg.conf ${D}${sysconfdir}/opkg.conf
-       ln -sf ${sysconfdir}/ipkg/ ${D}${sysconfdir}/opkg
-       ln -sf /var/lib/ipkg ${D}/var/lib/ipkg
-}
-
index f5bd992..33d84ff 100644 (file)
@@ -1,19 +1,10 @@
 require opkg.inc
 
-DEPENDS = "curl-native openssl-native"
 PR = "${INC_PR}"
 PROVIDES =+ "virtual/update-alternatives-native"
 
-SRC_URI += "file://opkg-libdir.patch;patch=1;maxrev=342"
-
 target_libdir := "${libdir}"
 
 inherit native
 
-# The nogpg version isn't getting much love and has an unused variable which trips up -Werror
-do_configure_prepend() {
-        sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
-}
-
-
-EXTRA_OECONF += "--with-opkglibdir=${target_libdir} --disable-gpg"
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir}"
index 253bded..d39e6ce 100644 (file)
@@ -2,7 +2,7 @@
 # recipe, intended for temporary use by the SlugOS distro.
 
 # DO NOT USE this recipe for anything other than SlugOS and svn version 160
-# of the opkg sources.  Also note that This recipe will be removed without
+# of the opkg sources.  Also note that this recipe will be removed without
 # notice when the unfortunate commits to the original opkg-nogpg-nocurl_svn.bb
 # recipe are repaired, the small-memory patches updated to a newer opkg svn
 # version, and appropriate testing confirms that the resulting binary actually
 
 # DO NOT CHANGE THIS RECIPE!
 
-require opkg.inc
+DESCRIPTION = "Opkg Package Manager"
+DESCRIPTION_libopkg = "Opkg Package Manager Library"
+SECTION = "base"
+LICENSE = "GPLv2"
+SRCREV = "160"
+PV = "0.1.6+svnr${SRCPV}"
+PR = "r22"
 
-DEPENDS = ""
 PROVIDES += "opkg"
+S = "${WORKDIR}/trunk"
+
+inherit autotools pkgconfig
 
 SRC_URI += " \
-           file://isatty.patch;patch=1 \
-           file://opkg_wget.patch;patch=1;maxrev=180 \
-           file://reduce-nogpg-noise.patch;patch=1;maxrev=180 \
-           file://opkg_wget_nogpg_01_use_vfork_gunzip.patch;patch=1 \
-           file://opkg_wget_nogpg_02_use_vfork_system.patch;patch=1 \
-           file://opkg_wget_nogpg_03_fix_tmpdirs.patch;patch=1 \
-           file://opkg_wget_nogpg_04_default_tmpdir.patch;patch=1 \
+           svn://opkg.googlecode.com/svn;module=trunk;proto=http \
+           file://opkg_unarchive.patch;maxrev=201 \
+           file://opkg-intercept-cleanup.patch;maxrev=241 \
+           file://isatty.patch \
+           file://opkg_wget.patch;maxrev=180 \
+           file://reduce-nogpg-noise.patch;maxrev=180 \
+           file://opkg_wget_nogpg_01_use_vfork_gunzip.patch \
+           file://opkg_wget_nogpg_02_use_vfork_system.patch \
+           file://opkg_wget_nogpg_03_fix_tmpdirs.patch \
+           file://opkg_wget_nogpg_04_default_tmpdir.patch \
+           file://configure \
           "
-PR = "${INC_PR}"
 
 EXTRA_OECONF += "--disable-gpg --enable-static --disable-shared"
 
-# Not sure this is needed; needs to be investigated and removed if not
-do_stage() {
-       autotools_stage_all
+do_install_prepend() {
+  install -d ${D}${sysconfdir}/rcS.d
+  install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S98configure
 }
 
+# Not sure this is needed; needs to be investigated and removed if not
+
 # The nogpg version isn't getting much love and has an unused variable which trips up -Werror
 do_configure_prepend() {
        sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
@@ -44,11 +57,6 @@ FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
 # not happens automatically for opkg-nogpg:
 FILES_${PN} += "${datadir}/opkg/intercept"
 
-# 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} () {
   update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
index 66e8dbc..9e3c73e 100644 (file)
@@ -1,15 +1,24 @@
-require opkg-nogpg_svn.bb
-
-DEPENDS = ""
-PROVIDES += "opkg"
+require opkg.inc
 
 PR = "${INC_PR}"
 
-EXTRA_OECONF += " --disable-curl --enable-static --disable-shared"
+PROVIDES =+ "virtual/update-alternatives"
+RPROVIDES_${PN} = "update-alternatives"
+PACKAGES =+ "libopkg-dev libopkg"
+RREPLACES_${PN} = "opkg-nogpg"
+
+FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
+FILES_libopkg = "${libdir}/*.so.*"
+FILES_${PN} += "${datadir}/opkg/intercept"
 
-# The nogpg version isn't getting much love and has an unused variable which trips up -Werror
-do_configure_prepend() {
-       sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
+pkg_postinst_${PN} () {
+  update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
-DEFAULT_PREFERENCE = "-1"
+pkg_postrm_${PN} () {
+  update-alternatives --remove opkg ${bindir}/opkg-cl
+}
+
+require update-alternatives-merge.inc
+
+EXTRA_OECONF_append_visstrim_m10 = " --with-opkglockfile=/var/lock/opkg.lock"
diff --git a/recipes/opkg/opkg-nogpg_svn.bb b/recipes/opkg/opkg-nogpg_svn.bb
deleted file mode 100644 (file)
index bee639f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-require opkg_svn.bb
-
-DEPENDS = "curl"
-PROVIDES += "opkg"
-
-PR = "${INC_PR}.1"
-
-EXTRA_OECONF += " --disable-gpg \ 
-                  --disable-openssl \ 
-                  --disable-ssl-curl \
-                  --enable-gpg=no \
-                  --enable-ssl-curl=no \
-                  --enable-openssl=no"
-
-LDFLAGS_append = " -Wl,--as-needed"
-
-# The nogpg version isn't getting much love and has an unused variable which trips up -Werror
-do_configure_prepend() {
-       sed -i -e s:-Werror::g ${S}/libopkg/Makefile.am
-}
-do_configure_prepend_nylon() {
-       LDFLAGS="`echo "$LDFLAGS" | sed "s/ -Wl,--as-needed//"`"
-}
-
-DEFAULT_PREFERENCE = "-1"
index f7f9c9e..5970f8e 100644 (file)
@@ -5,4 +5,4 @@ PR = "${INC_PR}"
 target_libdir := "${libdir}"
 inherit sdk
 
-EXTRA_OECONF += "--with-opkglibdir=${target_libdir} --disable-gpg"
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir}"
index 7865f1a..06e51c9 100644 (file)
@@ -2,26 +2,26 @@ DESCRIPTION = "Opkg Package Manager"
 DESCRIPTION_libopkg = "Opkg Package Manager Library"
 SECTION = "base"
 LICENSE = "GPLv2"
-DEPENDS = "curl gpgme openssl"
-SRCREV = ${OPKG_SRCREV}
-PV = "0.1.6+svnr${SRCPV}"
-INC_PR = "r21"
+SRCREV = "704"
+PV = "0.2.0+svnr${SRCPV}"
+CONFLICTS = "ipkg"
+INC_PR = "r5"
 
-FILESPATHPKG =. "opkg:"
-
-SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \
-       file://opkg_unarchive.patch;patch=1;maxrev=201 \
-       file://opkg-intercept-cleanup.patch;patch=1;maxrev=241 \
+SRC_URI = "svn://opkg.googlecode.com/svn/branches;module=opkg-0.2.x;proto=http \
+          file://configure \
 "
 
-SRC_URI += "file://configure"
-
-S = "${WORKDIR}/trunk"
+S = "${WORKDIR}/opkg-0.2.x"
 
 inherit autotools pkgconfig
 
 do_install_prepend() {
   install -d ${D}${sysconfdir}/rcS.d
-  install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S98configure
+  install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S40configure
 }
 
+EXTRA_OECONF += " --disable-gpg \ 
+                  --disable-openssl \ 
+                  --disable-ssl-curl \
+                  --disable-curl \
+                  --disable-sha256"
diff --git a/recipes/opkg/opkg/isatty.patch b/recipes/opkg/opkg/isatty.patch
deleted file mode 100644 (file)
index c935f15..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-Copyright (c) 2009 MontaVista Software, Inc.  All rights reserved.
-
-Don't prompt for user input from stdin if it's not a tty.  Fixes a minor
-memory leak while we're at it, as the code was strdup'ing the malloc'd string
-read from stdin without ever freeing the original.
----
- libopkg/libopkg.c      |   13 ++++++++-----
- libopkg/opkg_install.c |    3 +++
- libopkg/user.c         |   10 +++++++---
- 3 files changed, 18 insertions(+), 8 deletions(-)
-
---- trunk.orig/libopkg/libopkg.c
-+++ trunk/libopkg/libopkg.c
-@@ -71,11 +71,14 @@ int default_opkg_status_callback(char *n
- char* default_opkg_response_callback(char *question)
- {
-      char *response = NULL;
--     printf("%s",question);
--     fflush(stdout);
--     do {
--        response = (char *)file_read_line_alloc(stdin);
--     } while (response == NULL);
-+     if (isatty(fileno(stdin)))
-+     {
-+        printf("%s",question);
-+        fflush(stdout);
-+        do {
-+             response = (char *)file_read_line_alloc(stdin);
-+        } while (response == NULL);
-+     }
-      return response;
- }
---- trunk.orig/libopkg/user.c
-+++ trunk/libopkg/user.c
-@@ -44,9 +44,13 @@ char *get_user_response(const char *form
-         len = vsnprintf(question,question_len,format,ap);
-           va_end(ap);
-      } while (len > question_len);
--     response = strdup(opkg_cb_response(question));
--     str_chomp(response);
--     str_tolower(response);
-+
-+     response = opkg_cb_response(question);
-+     if (response)
-+     {
-+         str_chomp(response);
-+         str_tolower(response);
-+     }
-      return response;
- }
---- trunk.orig/libopkg/opkg_install.c
-+++ trunk/libopkg/opkg_install.c
-@@ -1613,6 +1613,9 @@ static int user_prefers_old_conffile(con
-                                      "          D     : show the differences between the versions (if diff is installed)\n"
-                                      "     The default action is to keep your current version.\n"
-                                      "    *** %s (Y/I/N/O/D) [default=N] ? ", file_name, short_file_name);
-+        if (!response)
-+             return 1;
-+
-         if (strcmp(response, "y") == 0
-             || strcmp(response, "i") == 0
-             || strcmp(response, "yes") == 0) {
diff --git a/recipes/opkg/opkg/opkg-intercept-cleanup.patch b/recipes/opkg/opkg/opkg-intercept-cleanup.patch
deleted file mode 100644 (file)
index 12893e3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
----
- libopkg/opkg_cmd.c |   13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
---- trunk.orig/libopkg/opkg_cmd.c
-+++ trunk/libopkg/opkg_cmd.c
-@@ -19,6 +19,7 @@
- #include "includes.h"
- #include <dirent.h>
- #include <glob.h>
-+#include <unistd.h>
- #include "opkg_conf.h"
- #include "opkg_cmd.h"
-@@ -350,7 +351,6 @@ static opkg_intercept_t opkg_prep_interc
- static int opkg_finalize_intercepts(opkg_intercept_t ctx)
- {
--    char *cmd;
-     DIR *dir;
-     int err = 0;
-@@ -376,6 +376,10 @@ static int opkg_finalize_intercepts(opkg
-                   err = errno;
-                   perror (de->d_name);
-               }
-+              if (unlink (path)) {
-+                  err = errno;
-+                  perror (path);
-+              }
-           }
-           free (path);
-       }
-@@ -383,9 +387,10 @@ static int opkg_finalize_intercepts(opkg
-     } else
-       perror (ctx->statedir);
-       
--    sprintf_alloc (&cmd, "rm -rf %s", ctx->statedir);
--    err = system (cmd);
--    free (cmd);
-+    if (rmdir (ctx->statedir)) {
-+      err = errno;
-+      perror (ctx->statedir);
-+    }
-     free (ctx->statedir);
-     free (ctx);
index 5138458..f43fdb4 100644 (file)
@@ -5,17 +5,12 @@ PR = "${INC_PR}"
 PROVIDES =+ "virtual/update-alternatives"
 RPROVIDES_${PN} = "update-alternatives"
 PACKAGES =+ "libopkg-dev libopkg"
+RREPLACES_${PN} = "opkg-nogpg opkg-nogpg-nocurl"
 
 FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
 FILES_libopkg = "${libdir}/*.so.*"
-# not happens automatically for opkg-nogpg:
 FILES_${PN} += "${datadir}/opkg/intercept"
 
-# 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} () {
   update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
@@ -25,3 +20,5 @@ pkg_postrm_${PN} () {
 }
 
 require update-alternatives-merge.inc
+
+EXTRA_OECONF_append_visstrim_m10 = " --with-opkglockfile=/var/lock/opkg.lock"
index f129fdb..69813c6 100644 (file)
@@ -11,8 +11,8 @@ pkg_postinst_${PN}_append () {
                 fi
                 echo "Old alternatives directory ${alternatives_dir_old} exists, moving entries to new one ${alternatives_dir_new}"
                 echo "Creating backup copy of both ${alternatives_dir_old}-backup and ${alternatives_dir_new}-backup"
-                cp -ra "${alternatives_dir_old}" "${alternatives_dir_old}-backup"
-                cp -ra "${alternatives_dir_new}" "${alternatives_dir_new}-backup"
+                cp -Ra "${alternatives_dir_old}" "${alternatives_dir_old}-backup"
+                cp -Ra "${alternatives_dir_new}" "${alternatives_dir_new}-backup"
 
                 cd ${alternatives_dir_old}
                 for alt_file in * ; do