From: Grazvydas Ignotas Date: Sun, 16 Nov 2014 23:57:06 +0000 (+0200) Subject: opkg: update to 0.2.0 X-Git-Tag: sz_173~61 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f54e7a6dbdaf39c061eab8ee69177579d920402;p=openembedded.git opkg: update to 0.2.0 --- diff --git a/recipes/opkg/files/configure b/recipes/opkg/files/configure index d5dd74dbf3..633d8d3371 100644 --- a/recipes/opkg/files/configure +++ b/recipes/opkg/files/configure @@ -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 index 8632ce5658..0000000000 --- a/recipes/opkg/files/fix_endianness.patch +++ /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 index 1d48b9a6bf..0000000000 --- a/recipes/opkg/files/opkg-libdir.patch +++ /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: $* diff --git a/recipes/opkg/opkg-collateral.bb b/recipes/opkg/opkg-collateral.bb index a7ec321c6f..67499afe19 100644 --- a/recipes/opkg/opkg-collateral.bb +++ b/recipes/opkg/opkg-collateral.bb @@ -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 index 0000000000..c2b9657912 --- /dev/null +++ b/recipes/opkg/opkg-collateral/visstrim_m10/dest @@ -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 index 0000000000..77c0834d17 --- /dev/null +++ b/recipes/opkg/opkg-collateral/visstrim_m10/lists @@ -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 index 0000000000..b3f8d53a36 --- /dev/null +++ b/recipes/opkg/opkg-collateral/visstrim_m10/tmp_dir @@ -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 index 58c81451ae..0000000000 --- a/recipes/opkg/opkg-ipkg-compat.bb +++ /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 -} - diff --git a/recipes/opkg/opkg-native_svn.bb b/recipes/opkg/opkg-native_svn.bb index f5bd992132..33d84ff2a2 100644 --- a/recipes/opkg/opkg-native_svn.bb +++ b/recipes/opkg/opkg-native_svn.bb @@ -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}" diff --git a/recipes/opkg/opkg-nogpg-nocurl-slugos_svn.bb b/recipes/opkg/opkg-nogpg-nocurl-slugos_svn.bb index 253bded098..d39e6cee7f 100644 --- a/recipes/opkg/opkg-nogpg-nocurl-slugos_svn.bb +++ b/recipes/opkg/opkg-nogpg-nocurl-slugos_svn.bb @@ -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 @@ -10,29 +10,42 @@ # 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 } diff --git a/recipes/opkg/opkg-nogpg-nocurl_svn.bb b/recipes/opkg/opkg-nogpg-nocurl_svn.bb index 66e8dbcda5..9e3c73e686 100644 --- a/recipes/opkg/opkg-nogpg-nocurl_svn.bb +++ b/recipes/opkg/opkg-nogpg-nocurl_svn.bb @@ -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 index bee639ff8c..0000000000 --- a/recipes/opkg/opkg-nogpg_svn.bb +++ /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" diff --git a/recipes/opkg/opkg-sdk_svn.bb b/recipes/opkg/opkg-sdk_svn.bb index f7f9c9e20a..5970f8ec85 100644 --- a/recipes/opkg/opkg-sdk_svn.bb +++ b/recipes/opkg/opkg-sdk_svn.bb @@ -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}" diff --git a/recipes/opkg/opkg.inc b/recipes/opkg/opkg.inc index 7865f1a0a7..06e51c97db 100644 --- a/recipes/opkg/opkg.inc +++ b/recipes/opkg/opkg.inc @@ -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 index c935f153d1..0000000000 --- a/recipes/opkg/opkg/isatty.patch +++ /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 index 12893e3852..0000000000 --- a/recipes/opkg/opkg/opkg-intercept-cleanup.patch +++ /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 - #include -+#include - - #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); diff --git a/recipes/opkg/opkg_svn.bb b/recipes/opkg/opkg_svn.bb index 5138458498..f43fdb4279 100644 --- a/recipes/opkg/opkg_svn.bb +++ b/recipes/opkg/opkg_svn.bb @@ -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" diff --git a/recipes/opkg/update-alternatives-merge.inc b/recipes/opkg/update-alternatives-merge.inc index f129fdbe84..69813c61d8 100644 --- a/recipes/opkg/update-alternatives-merge.inc +++ b/recipes/opkg/update-alternatives-merge.inc @@ -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