From cc72051e7f873d91f19a7dfc70999f0afc09eefc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 06 2016 20:53:50 +0000 Subject: import rpm-ostree-2016.11-2.atomic.el7 --- diff --git a/.gitignore b/.gitignore index 7ddc204..e3ffee7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/bubblewrap-0.1.1.tar.gz -SOURCES/rpm-ostree-2016.9.tar.xz +SOURCES/rpm-ostree-2016.11.tar.xz diff --git a/.rpm-ostree.metadata b/.rpm-ostree.metadata index 9ea1d11..e7eb271 100644 --- a/.rpm-ostree.metadata +++ b/.rpm-ostree.metadata @@ -1,2 +1,2 @@ 903322415b3e8824c6d6513a25a8b3ca03083186 SOURCES/bubblewrap-0.1.1.tar.gz -f9275c7c223481ad6a501bf19b8d038d646ff875 SOURCES/rpm-ostree-2016.9.tar.xz +d883126d557e57ac4136efca874cff417080e055 SOURCES/rpm-ostree-2016.11.tar.xz diff --git a/SOURCES/0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch b/SOURCES/0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch new file mode 100644 index 0000000..795bb72 --- /dev/null +++ b/SOURCES/0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch @@ -0,0 +1,127 @@ +From 1a32ea40288d88be40030665090bb2ae418cd0aa Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Tue, 25 Oct 2016 09:53:14 -0400 +Subject: [PATCH] Revert "selector: prefer obsoletes (Related:RhBug:1096506)" + +This reverts commit 94ac2e5b980f9095faa372568a8e381e8a4523bc. +--- + data/tests/hawkey/greedy.repo | 2 -- + libdnf/hy-goal.c | 34 ++-------------------------------- + tests/hawkey/test_goal.c | 23 ----------------------- + 3 files changed, 2 insertions(+), 57 deletions(-) + +diff --git a/data/tests/hawkey/greedy.repo b/data/tests/hawkey/greedy.repo +index d450885..64bb85a 100644 +--- a/libdnf/data/tests/hawkey/greedy.repo ++++ b/libdnf/data/tests/hawkey/greedy.repo +@@ -5,7 +5,5 @@ + =Pkg: B 1 0 noarch + =Rec: C + =Prv: somereq +-=Obs: somereq + =Pkg: C 1 0 noarch + =Prv: somereq +-=Pkg: somereq 1 0 noarch +diff --git a/libdnf/hy-goal.c b/libdnf/hy-goal.c +index b404921..c50e8f5 100644 +--- a/libdnf/libdnf/hy-goal.c ++++ b/libdnf/libdnf/hy-goal.c +@@ -523,36 +523,6 @@ filter_name2job(DnfSack *sack, const struct _Filter *f, Queue *job) + return 0; + } + +-/** +- * add_preferred_provide: +- * when searching by provides the packages that contain the same +- * name as provide or contain obsoletes with the same name as their +- * provide will be picked first +- */ +-static void +-add_preferred_provide(DnfSack *sack, Queue *job, Id id) +-{ +- g_autoptr(GPtrArray) plist = g_ptr_array_new_with_free_func( +- (GDestroyNotify) g_object_unref); +- Pool *pool = dnf_sack_get_pool(sack); +- const char *name = pool_dep2str(pool, id); +- HyQuery q = hy_query_create(sack); +- hy_query_filter(q, HY_PKG_NAME, HY_NEQ, name); +- DnfPackageSet *pset = hy_query_run_set(q); +- hy_query_filter(q, HY_PKG_PROVIDES, HY_EQ, name); +- hy_query_filter_package_in(q, HY_PKG_OBSOLETES, HY_NEQ, pset); +- DnfPackage *pkg; +- plist = hy_query_run(q); +- for (guint i = 0; i < plist->len; i++) { +- pkg = g_ptr_array_index(plist, i); +- queue_push2(job, SOLVER_DISFAVOR|SOLVER_SOLVABLE, +- dnf_package_get_id(pkg)); +- } +- queue_push2(job, SOLVER_SOLVABLE_PROVIDES, id); +- hy_query_free(q); +- g_object_unref(pset); +-} +- + static int + filter_provides2job(DnfSack *sack, const struct _Filter *f, Queue *job) + { +@@ -568,7 +538,7 @@ filter_provides2job(DnfSack *sack, const struct _Filter *f, Queue *job) + switch (f->cmp_type) { + case HY_EQ: + id = dnf_reldep_get_id (f->matches[0].reldep); +- add_preferred_provide(sack, job, id); ++ queue_push2(job, SOLVER_SOLVABLE_PROVIDES, id); + break; + case HY_GLOB: + dataiterator_init(&di, pool, 0, 0, SOLVABLE_PROVIDES, name, SEARCH_GLOB); +@@ -579,7 +549,7 @@ filter_provides2job(DnfSack *sack, const struct _Filter *f, Queue *job) + assert(di.idp); + id = *di.idp; + if (!job_has(job, SOLVABLE_PROVIDES, id)) +- add_preferred_provide(sack, job, id); ++ queue_push2(job, SOLVER_SOLVABLE_PROVIDES, id); + dataiterator_free(&di); + break; + default: +diff --git a/tests/hawkey/test_goal.c b/tests/hawkey/test_goal.c +index 6217c38..ce2c8bd 100644 +--- a/libdnf/tests/hawkey/test_goal.c ++++ b/libdnf/tests/hawkey/test_goal.c +@@ -230,28 +230,6 @@ START_TEST(test_goal_install_selector) + } + END_TEST + +-START_TEST(test_goal_install_selector_obsoletes_first) +-{ +- HySelector sltr; +- HyGoal goal = hy_goal_create(test_globals.sack); +- +- sltr = hy_selector_create(test_globals.sack); +- hy_selector_set(sltr, HY_PKG_PROVIDES, HY_EQ, "somereq"); +- fail_if(!hy_goal_install_selector(goal, sltr, NULL)); +- hy_selector_free(sltr); +- +- fail_if(hy_goal_run(goal)); +- assert_iueo(goal, 1, 0, 0, 0); +- +- GPtrArray *plist = hy_goal_list_installs(goal, NULL); +- char *nvra = dnf_package_get_nevra(g_ptr_array_index(plist, 0)); +- ck_assert_str_eq(nvra, "B-1-0.noarch"); +- g_free(nvra); +- g_ptr_array_unref(plist); +- hy_goal_free(goal); +-} +-END_TEST +- + START_TEST(test_goal_install_selector_err) + { + int rc; +@@ -1459,7 +1437,6 @@ goal_suite(void) + tc = tcase_create("Greedy"); + tcase_add_unchecked_fixture(tc, fixture_greedy_only, teardown); + tcase_add_test(tc, test_goal_run_all); +- tcase_add_test(tc, test_goal_install_selector_obsoletes_first); + tcase_add_test(tc, test_goal_install_weak_deps); + suite_add_tcase(s, tc); + +-- +2.7.4 + diff --git a/SOURCES/0001-daemon-use-refspec-after-pulling-ancestry.patch b/SOURCES/0001-daemon-use-refspec-after-pulling-ancestry.patch new file mode 100644 index 0000000..ca4af71 --- /dev/null +++ b/SOURCES/0001-daemon-use-refspec-after-pulling-ancestry.patch @@ -0,0 +1,37 @@ +From 47ba21aca15be084deda0f9d80336ce0cb2717cc Mon Sep 17 00:00:00 2001 +From: Jonathan Lebon +Date: Mon, 31 Oct 2016 12:19:08 -0400 +Subject: [PATCH] daemon: use refspec after pulling ancestry + +Previously, in preparation for validating e.g. versions during 'deploy' +operations, we would pull the latest commit metadata. However, we would +then do resolve on the branch name only rather than the full refspec. +But this can sometimes give the wrong checksum. For example, if we have +multiple remotes holding the same branch name, ostree_repo_resolve_rev +will just start looking in each remote for the specified ref, and we may +thus end up with the checksum from the wrong remote. + +Related: RHBZ#1390259 + +Closes: #507 +Approved by: cgwalters +--- + src/daemon/rpmostreed-utils.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/rpmostreed-utils.c b/src/daemon/rpmostreed-utils.c +index d0f0abb..2f3aa5c 100644 +--- a/src/daemon/rpmostreed-utils.c ++++ b/src/daemon/rpmostreed-utils.c +@@ -301,7 +301,7 @@ rpmostreed_repo_pull_ancestry (OstreeRepo *repo, + /* First pass only. Now we can resolve the ref to a checksum. */ + if (checksum == NULL) + { +- if (!ostree_repo_resolve_rev (repo, ref, FALSE, &checksum, error)) ++ if (!ostree_repo_resolve_rev (repo, refspec, FALSE, &checksum, error)) + goto out; + } + +-- +2.7.4 + diff --git a/SPECS/rpm-ostree.spec b/SPECS/rpm-ostree.spec index 6c9acf2..de92ead 100644 --- a/SPECS/rpm-ostree.spec +++ b/SPECS/rpm-ostree.spec @@ -1,17 +1,20 @@ %global bubblewrap_version 0.1.1 Summary: Client side upgrade program and server side compose tool Name: rpm-ostree -Version: 2016.9 -Release: 1.atomic%{?dist} +Version: 2016.11 +Release: 2.atomic%{?dist} #VCS: https://github.com/cgwalters/rpm-ostree # This tarball is generated via "make -f Makefile.dist-packaging dist-snapshot" # because github doesn't support placing submodules in tarballs and RPM # doesn't understand git. Source0: rpm-ostree-%{version}.tar.xz +Patch0: 0001-daemon-use-refspec-after-pulling-ancestry.patch License: LGPLv2+ URL: https://github.com/projectatomic/rpm-ostree Source1: bubblewrap-%{bubblewrap_version}.tar.gz +Patch1: 0001-Revert-selector-prefer-obsoletes-Related-RhBug-10965.patch + Requires: ostree-fuse # We always run autogen.sh @@ -130,6 +133,9 @@ python autofiles.py > files.devel \ %files devel -f files.devel %changelog +* Mon Oct 24 2016 Colin Walters +- New upstream version + * Thu Sep 08 2016 walters@redhat.com - 2016.10-1 - New upstream version