fi
# delete myself
-rm -f /etc/rcS.d/S98configure
+rm -f /etc/rcS.d/S40configure
+++ /dev/null
-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.
+++ /dev/null
---- 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: $*
DESCRIPTION = "opkg configuration files"
SECTION = "base"
LICENSE = "MIT"
-PR = "r2"
+PR = "r3"
SRC_URI = "file://opkg.conf.comments \
file://lists \
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
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"
--- /dev/null
+dest root /opt
--- /dev/null
+lists_dir ext /opt/var/lib/opkg
+
--- /dev/null
+# 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
+++ /dev/null
-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
-}
-
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}"
# 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
# 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
}
-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"
+++ /dev/null
-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"
target_libdir := "${libdir}"
inherit sdk
-EXTRA_OECONF += "--with-opkglibdir=${target_libdir} --disable-gpg"
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir}"
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"
+++ /dev/null
-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) {
+++ /dev/null
----
- 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);
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
}
}
require update-alternatives-merge.inc
+
+EXTRA_OECONF_append_visstrim_m10 = " --with-opkglockfile=/var/lock/opkg.lock"
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