diff options
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch | 78 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/add-exclude.patch | 131 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch | 39 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/no-install-recommends.patch | 91 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/opkg-configure.service | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_0.3.0-rc2.bb (renamed from meta/recipes-devtools/opkg/opkg_0.2.4.bb) | 18 |
6 files changed, 6 insertions, 353 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch b/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch deleted file mode 100644 index ae319ce2bb..0000000000 --- a/meta/recipes-devtools/opkg/opkg/0001-opkg-key-Backport-improvements.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 87bec8300a1122829b2ed565db7da5bacfa88919 Mon Sep 17 00:00:00 2001 -From: Paul Barker <paul@paulbarker.me.uk> -Date: Sun, 12 Oct 2014 09:59:53 +0000 -Subject: [PATCH] opkg-key: Backport improvements - -The improvements to opkg-key made for v0.3.0 are backported. The rest of v0.3.0 -needs further testing and bugfixing prior to release, but the improvements to -opkg-key have been tested and work well. - - 1) opkg-key: Add 'reset' option - - This option removes the keyrings used to verify package signatures, - effectively resetting opkg to the initial state where it recognises no - keys. - - 2) opkg-key: Add 'populate' option - - This option causes all keyrings in /usr/share/opkg/keyrings to be - imported. Thus distributions may install their keys into this directory - and use 'opkg-key populate' to ensure the correct keys are loaded. - - 3) opkg-key: Improve usage output - -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> -Upstream-status: Backport ---- - utils/opkg-key | 26 ++++++++++++++++++++++---- - 1 file changed, 22 insertions(+), 4 deletions(-) - -diff --git a/utils/opkg-key b/utils/opkg-key -index 266bb66..085f1e8 100755 ---- a/utils/opkg-key -+++ b/utils/opkg-key -@@ -10,12 +10,17 @@ usage() { - echo - echo "Manage opkg's list of trusted keys" - echo -- echo " opkg-key add <file> - add the key contained in <file> ('-' for stdin)" -- echo " opkg-key del <keyid> - remove the key <keyid>" -- echo " opkg-key list - list keys" -+ echo "Commands and arguments:" -+ echo " add <file> - Add the key contained in <file> ('-' for stdin)" -+ echo " del <keyid> - Remove the key <keyid>" -+ echo " list - List keys" -+ echo " fingerprint - List keys with fingerprints" -+ echo " reset - Remove all keys, resetting the keyring" -+ echo " populate - Import keys from /usr/share/opkg/keyrings" -+ echo " help - Print this usage message and exit" - echo - echo "Options:" -- echo " -o <root> Use <root> as the offline root directory" -+ echo " -o <root> - Use <root> as the offline root directory" - echo - } - -@@ -64,6 +69,19 @@ case "$command" in - echo "Executing: $GPG $*" - $GPG $* - ;; -+ reset) -+ rm -f $ROOT/etc/opkg/trusted.gpg $ROOT/etc/opkg/trusted.gpg~ -+ rm -f $ROOT/etc/opkg/secring.gpg $ROOT/etc/opkg/secring.gpg~ -+ rm -f $ROOT/etc/opkg/trustdb.gpg $ROOT/etc/opkg/trustdb.gpg~ -+ echo "OK" -+ ;; -+ populate) -+ for f in $ROOT/usr/share/opkg/keyrings/*.gpg; do -+ echo "Importing keys from '`basename $f`'..." -+ $GPG --quiet --batch --import "$f" -+ done -+ echo "OK" -+ ;; - help) - usage - ;; --- -1.9.1 - diff --git a/meta/recipes-devtools/opkg/opkg/add-exclude.patch b/meta/recipes-devtools/opkg/opkg/add-exclude.patch deleted file mode 100644 index 48de923590..0000000000 --- a/meta/recipes-devtools/opkg/opkg/add-exclude.patch +++ /dev/null @@ -1,131 +0,0 @@ -From 60c3f93e95a3ca54ef0a7eebc5ef29a5d92d3110 Mon Sep 17 00:00:00 2001 -From: Paul Barker <paul@paulbarker.me.uk> -Date: Fri, 28 Mar 2014 15:20:22 +0000 -Subject: [PATCH 2/2] opkg-0.2.x: add-exclude - -Add a way to exclude specific packages from the install - -When an excluded package is required by another package an error -will be generated. If the excluded package is only recommended, -no error will be generated. - -The lifespan of the exclude_list covers the execution of the process, -so there is no need to free the data. - -v2: Use xmalloc instead of malloc and xrealloc instead of realloc. In opkg, -these functions are guaranteed not to return NULL. - -Upstream-Status: Accepted for v0.3.0 release with modifications - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> -Signed-off-by: Jonathan Liu <net147@gmail.com> -Signed-off-by: Paul Barker <paul@paulbarker.me.uk> ---- - libopkg/opkg_conf.c | 1 + - libopkg/opkg_conf.h | 2 ++ - libopkg/pkg_depends.c | 16 ++++++++++++++++ - src/opkg-cl.c | 15 +++++++++++++++ - 4 files changed, 34 insertions(+) - -diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c -index 4eee37b..1ab63fb 100644 ---- a/libopkg/opkg_conf.c -+++ b/libopkg/opkg_conf.c -@@ -447,6 +447,7 @@ opkg_conf_init(void) - pkg_dest_list_init(&conf->pkg_dest_list); - pkg_dest_list_init(&conf->tmp_dest_list); - nv_pair_list_init(&conf->arch_list); -+ conf->exclude_list = NULL; - - return 0; - } -diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h -index 2f189e0..6d6e613 100644 ---- a/libopkg/opkg_conf.h -+++ b/libopkg/opkg_conf.h -@@ -51,6 +51,8 @@ struct opkg_conf - pkg_dest_list_t pkg_dest_list; - pkg_dest_list_t tmp_dest_list; - nv_pair_list_t arch_list; -+ size_t exclude_count; -+ char ** exclude_list; - - int restrict_to_default_dest; - pkg_dest_t *default_dest; -diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c -index 41bf206..eb630d1 100644 ---- a/libopkg/pkg_depends.c -+++ b/libopkg/pkg_depends.c -@@ -204,6 +204,22 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied, - continue; - } - -+ /* Check for excluded packages */ -+ if (satisfying_pkg != NULL && conf->exclude_list) { -+ int i, exclude = 0; -+ for (i = 0; i < conf->exclude_count; i++) { -+ if (!strcmp(satisfying_pkg->name, conf->exclude_list[i])) { -+ opkg_msg(NOTICE, "%s: exclude required package %s" -+ "at users request\n", -+ pkg->name, satisfying_pkg->name); -+ exclude = 1; -+ break; -+ } -+ } -+ if (exclude) -+ continue; -+ } -+ - opkg_msg(DEBUG, "satisfying_pkg=%p\n", satisfying_pkg); - if (satisfying_pkg != NULL) { - satisfier_entry_pkg = satisfying_pkg; -diff --git a/src/opkg-cl.c b/src/opkg-cl.c -index 6378380..f10d10b 100644 ---- a/src/opkg-cl.c -+++ b/src/opkg-cl.c -@@ -45,6 +45,7 @@ enum { - ARGS_OPT_PREFER_ARCH_TO_VERSION, - ARGS_OPT_ADD_ARCH, - ARGS_OPT_ADD_DEST, -+ ARGS_OPT_ADD_EXCLUDE, - ARGS_OPT_NOACTION, - ARGS_OPT_DOWNLOAD_ONLY, - ARGS_OPT_NODEPS, -@@ -97,6 +98,7 @@ static struct option long_options[] = { - {"offline-root", 1, 0, 'o'}, - {"add-arch", 1, 0, ARGS_OPT_ADD_ARCH}, - {"add-dest", 1, 0, ARGS_OPT_ADD_DEST}, -+ {"add-exclude", 1, 0, ARGS_OPT_ADD_EXCLUDE}, - {"test", 0, 0, ARGS_OPT_NOACTION}, - {"tmp-dir", 1, 0, 't'}, - {"tmp_dir", 1, 0, 't'}, -@@ -200,6 +202,18 @@ args_parse(int argc, char *argv[]) - } - free(tuple); - break; -+ case ARGS_OPT_ADD_EXCLUDE: -+ tuple = xstrdup(optarg); -+ if (!conf->exclude_list) { -+ conf->exclude_count = 1; -+ conf->exclude_list = xmalloc(sizeof(char *) * conf->exclude_count); -+ conf->exclude_list[conf->exclude_count - 1] = tuple; -+ } else { -+ conf->exclude_count++; -+ conf->exclude_list = xrealloc(conf->exclude_list, sizeof(char *) * conf->exclude_count); -+ conf->exclude_list[conf->exclude_count - 1] = tuple; -+ } -+ break; - case ARGS_OPT_NOACTION: - conf->noaction = 1; - break; -@@ -287,6 +301,7 @@ usage() - printf("\t--offline-root <dir> offline installation of packages.\n"); - printf("\t--add-arch <arch>:<prio> Register architecture with given priority\n"); - printf("\t--add-dest <name>:<path> Register destination with given path\n"); -+ printf("\t--add-exclude <name> Register package to be excluded from install\n"); - printf("\t--prefer-arch-to-version Use the architecture priority package rather\n"); - printf("\t than the higher version one if more\n"); - printf("\t than one candidate is found.\n"); --- -2.1.3 - diff --git a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch b/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch deleted file mode 100644 index 5e5eafcd97..0000000000 --- a/meta/recipes-devtools/opkg/opkg/libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 41425d67d3589b1912416a17f740d6407c7834f2 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Wed, 8 Oct 2014 19:53:13 +0800 -Subject: [PATCH] libopkg/opkg_remove.c: avoid remove pkg repeatly with option - --force-removal-of-dependent-packages - -While remove pkg with '--force-removal-of-dependent-packages', -pkg may be added to pkgs remove list multiple times, add status -check to make sure pkg only be removed once. - -Upstream-Status: Backport -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> - ---- - libopkg/opkg_remove.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c -index 34f9154..a225e41 100644 ---- a/libopkg/opkg_remove.c -+++ b/libopkg/opkg_remove.c -@@ -250,6 +250,14 @@ opkg_remove_pkg(pkg_t *pkg, int from_upgrade) - if ((parent_pkg = pkg->parent) == NULL) - return 0; - -+ /* While remove pkg with '--force-removal-of-dependent-packages', -+ pkg may be added to remove list multiple times, add status -+ check to make sure pkg only be removed once. */ -+ if (conf->force_removal_of_dependent_packages && -+ pkg->state_flag & SF_FILELIST_CHANGED && -+ pkg->state_status == SS_NOT_INSTALLED) -+ return 0; -+ - /* only attempt to remove dependent installed packages if - * force_depends is not specified or the package is being - * replaced. --- -1.9.1 - diff --git a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch b/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch deleted file mode 100644 index c2d244d26e..0000000000 --- a/meta/recipes-devtools/opkg/opkg/no-install-recommends.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 2e2ccc7e7fc81a7eee2d004d3644efbc1be1ad73 Mon Sep 17 00:00:00 2001 -From: Paul Barker <paul@paulbarker.me.uk> -Date: Fri, 28 Mar 2014 15:19:08 +0000 -Subject: [PATCH 1/2] opkg-0.2.x: no-install-recommends - -Add the ability to not install ANY recommended packages. - -Upstream-Status: Accepted for v0.3.0 release with modifications - -Signed-off-by: Mark Hatle <mark.hatle@windriver.com> ---- - libopkg/opkg_conf.h | 1 + - libopkg/pkg_depends.c | 3 ++- - src/opkg-cl.c | 7 +++++++ - 3 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/libopkg/opkg_conf.h b/libopkg/opkg_conf.h -index e0e045a..2f189e0 100644 ---- a/libopkg/opkg_conf.h -+++ b/libopkg/opkg_conf.h -@@ -82,6 +82,7 @@ struct opkg_conf - int prefer_arch_to_version; - int check_signature; - int nodeps; /* do not follow dependencies */ -+ int noinstall_recommends; - char *offline_root; - char *overlay_root; - int query_all; -diff --git a/libopkg/pkg_depends.c b/libopkg/pkg_depends.c -index 8ab6508..41bf206 100644 ---- a/libopkg/pkg_depends.c -+++ b/libopkg/pkg_depends.c -@@ -21,6 +21,7 @@ - #include <ctype.h> - - #include "pkg.h" -+#include "opkg_conf.h" - #include "opkg_utils.h" - #include "pkg_hash.h" - #include "opkg_message.h" -@@ -196,7 +197,7 @@ pkg_hash_fetch_unsatisfied_dependencies(pkg_t * pkg, pkg_vec_t *unsatisfied, - /* user request overrides package recommendation */ - if (satisfying_pkg != NULL - && (compound_depend->type == RECOMMEND || compound_depend->type == SUGGEST) -- && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE)) { -+ && (satisfying_pkg->state_want == SW_DEINSTALL || satisfying_pkg->state_want == SW_PURGE || conf->noinstall_recommends)) { - opkg_msg(NOTICE, "%s: ignoring recommendation for " - "%s at user request\n", - pkg->name, satisfying_pkg->name); -diff --git a/src/opkg-cl.c b/src/opkg-cl.c -index a1d121f..6378380 100644 ---- a/src/opkg-cl.c -+++ b/src/opkg-cl.c -@@ -51,6 +51,7 @@ enum { - ARGS_OPT_AUTOREMOVE, - ARGS_OPT_CACHE, - ARGS_OPT_COMBINE, -+ ARGS_OPT_NOINSTALL_RECOMMENDS, - }; - - static struct option long_options[] = { -@@ -91,6 +92,7 @@ static struct option long_options[] = { - {"noaction", 0, 0, ARGS_OPT_NOACTION}, - {"download-only", 0, 0, ARGS_OPT_DOWNLOAD_ONLY}, - {"nodeps", 0, 0, ARGS_OPT_NODEPS}, -+ {"no-install-recommends", 0, 0, ARGS_OPT_NOINSTALL_RECOMMENDS}, - {"offline", 1, 0, 'o'}, - {"offline-root", 1, 0, 'o'}, - {"add-arch", 1, 0, ARGS_OPT_ADD_ARCH}, -@@ -201,6 +203,9 @@ args_parse(int argc, char *argv[]) - case ARGS_OPT_NOACTION: - conf->noaction = 1; - break; -+ case ARGS_OPT_NOINSTALL_RECOMMENDS: -+ conf->noinstall_recommends = 1; -+ break; - case ARGS_OPT_DOWNLOAD_ONLY: - conf->download_only = 1; - break; -@@ -300,6 +305,8 @@ usage() - printf("\t--noaction No action -- test only\n"); - printf("\t--download-only No action -- download only\n"); - printf("\t--nodeps Do not follow dependencies\n"); -+ printf("\t--no-install-recommends\n"); -+ printf("\t Do not install any recommended packages\n"); - printf("\t--force-removal-of-dependent-packages\n"); - printf("\t Remove package and all dependencies\n"); - printf("\t--autoremove Remove packages that were installed\n"); --- -2.1.3 - diff --git a/meta/recipes-devtools/opkg/opkg/opkg-configure.service b/meta/recipes-devtools/opkg/opkg/opkg-configure.service index b18295b45e..8e74026ec2 100644 --- a/meta/recipes-devtools/opkg/opkg/opkg-configure.service +++ b/meta/recipes-devtools/opkg/opkg/opkg-configure.service @@ -7,7 +7,7 @@ Before=sysinit.target [Service] Type=oneshot EnvironmentFile=-@SYSCONFDIR@/default/postinst -ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg-cl configure > $LOGFILE 2>&1; else @BINDIR@/opkg-cl configure; fi" +ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/opkg configure > $LOGFILE 2>&1; else @BINDIR@/opkg configure; fi" ExecStartPost=@BASE_BINDIR@/systemctl disable opkg-configure.service StandardOutput=syslog RemainAfterExit=No diff --git a/meta/recipes-devtools/opkg/opkg_0.2.4.bb b/meta/recipes-devtools/opkg/opkg_0.3.0-rc2.bb index 7b49d5efe6..6617eb2d59 100644 --- a/meta/recipes-devtools/opkg/opkg_0.2.4.bb +++ b/meta/recipes-devtools/opkg/opkg_0.3.0-rc2.bb @@ -5,24 +5,22 @@ 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" + file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0" + +DEPENDS = "libarchive" PE = "1" SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ - file://no-install-recommends.patch \ - file://add-exclude.patch \ - file://libopkg-opkg_remove.c-avoid-remove-pkg-repeatly-with.patch \ file://remove-ACLOCAL_AMFLAGS-I-shave-I-m4.patch \ file://opkg-configure.service \ file://opkg.conf \ - file://0001-opkg-key-Backport-improvements.patch \ " S = "${WORKDIR}/${BPN}-${PV}" -SRC_URI[md5sum] = "40ed2aee15abc8d550539449630091bd" -SRC_URI[sha256sum] = "0f40c7e457d81edf9aedc07c778f4697111ab163a38ef95999faece015453086" +SRC_URI[md5sum] = "7114589bd821efd5b9a0b5bf0ec82b8d" +SRC_URI[sha256sum] = "2bb3c09e7b216e57290dc65a63221981d9c34e74b25033b25a27899113ec6a84" inherit autotools pkgconfig systemd @@ -73,12 +71,6 @@ do_install_append () { -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ ${D}${systemd_unitdir}/system/opkg-configure.service fi - - # The installed binary is 'opkg-cl' but people and scripts often expect - # it to just be 'opkg' - ln -sf opkg-cl ${D}${bindir}/opkg - - rm ${D}${bindir}/update-alternatives } RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts" |