Source: openrc Source-Version: 0.13.1-4 Tags: patch User: debian-powe...@lists.debian.org Usertags: ppc64el
-- Hi, here is a fix as a debdiff. It comes from https://github.com/xaionaro/openrc/commit/29d7b8e375a02d39e1c745e4dc048e71c3c90a1c where the author of 0020-dependency-loop-resolver.patch (Okunev Yu Dmitry) did this after the debian FTBFS #763681, #770459 popped out. I had to change hunk #4 because several other commits were done between those 2 patches and I didn't want to drag to many things. Also, this patch fixes #763681 that was fixed by a change in 0.13.1-4. So I guess #770459 could also be solved with the same kind of fix, ignoring rc_deptree_unapm_getdependencies in runtest.sh. Maybe this patch I add (0025-rename-static-rc-deptree.patch) could be merged in 0020-dependency-loop-resolver.patch, I wasn't sure. Let me know which way you want to go and I'll rework the debdiff. Fred
diff -Nru openrc-0.13.1/debian/changelog openrc-0.13.1/debian/changelog --- openrc-0.13.1/debian/changelog 2014-10-26 17:34:13.000000000 +0100 +++ openrc-0.13.1/debian/changelog 2015-10-19 18:55:03.000000000 +0200 @@ -1,3 +1,10 @@ +openrc (0.13.1-5) unstable; urgency=medium + + * Patch from author of 0020-dependency-loop-resolver.patch : Renamed static + functions "rc_deptree_*" to be not "rc_*". (Closes: #770459) + + -- Frederic Bonnard <fre...@linux.vnet.ibm.com> Mon, 19 Oct 2015 18:47:08 +0200 + openrc (0.13.1-4) unstable; urgency=high * runtest.sh: expect nested function rc_deptree_remove_loopdependency diff -Nru openrc-0.13.1/debian/patches/0025-rename-static-rc-deptree.patch openrc-0.13.1/debian/patches/0025-rename-static-rc-deptree.patch --- openrc-0.13.1/debian/patches/0025-rename-static-rc-deptree.patch 1970-01-01 01:00:00.000000000 +0100 +++ openrc-0.13.1/debian/patches/0025-rename-static-rc-deptree.patch 2015-10-19 18:00:58.000000000 +0200 @@ -0,0 +1,165 @@ +From 29d7b8e375a02d39e1c745e4dc048e71c3c90a1c Mon Sep 17 00:00:00 2001 +From: Dmitry Yu Okunev <dyoku...@ut.mephi.ru> +Date: Sat, 29 Nov 2014 15:22:41 +0300 +Subject: [PATCH] Renamed static functions "rc_deptree_*" to be not "rc_*" + +Closes Debian-bugs #763681, #770459. +--- + src/librc/librc-depend.c | 32 ++++++++++++++++---------------- + src/test/units/early_loop_detector | 10 +++++----- + 2 files changed, 21 insertions(+), 21 deletions(-) + +--- a/src/librc/librc-depend.c ++++ b/src/librc/librc-depend.c +@@ -44,7 +44,7 @@ + /*! Type definition of service ID */ + typedef uint32_t service_id_t; + +-/*! Enumeration of rc_deptree_solve_loop()'s return cases */ ++/*! Enumeration of solve_loop()'s return cases */ + typedef enum loopfound { + LOOP_SOLVABLE = 0x01, + LOOP_UNSOLVABLE = 0x02, +@@ -757,7 +757,7 @@ + librc_hidden_def(rc_deptree_update_needed) + + static inline int +-rc_deptree_unapm_expandsdeps(service_id_t **unap, service_id_t service_id) ++unapm_expandsdeps(service_id_t **unap, service_id_t service_id) + { + int dep_num, dep_count; + int ismodified; +@@ -812,7 +812,7 @@ + * @param type dependencies type + * @param depinfo dependencies information */ + static void +-rc_deptree_unapm_getdependencies(service_id_t **unap_matrix, ++unapm_getdependencies(service_id_t **unap_matrix, + int useneedafter_count, service_id_t service_id, + const char *type, RC_DEPINFO *depinfo) + { +@@ -892,7 +892,7 @@ + * @param svc_id2depinfo_bt ptr to binary tree root to get depinfo by svc id + * @param end_dep_num looping dependency id in use/need/after/provide matrix line */ + static loopfound_t +-rc_deptree_solve_loop(service_id_t **unap_matrix[UNAPM_MAX], service_id_t service_id, void *svc_id2depinfo_bt, int end_dep_num, RC_DT_FLAGS flags) { ++solve_loop(service_id_t **unap_matrix[UNAPM_MAX], service_id_t service_id, void *svc_id2depinfo_bt, int end_dep_num, RC_DT_FLAGS flags) { + char **chain_strs = NULL; + service_id_t **chains; + unapm_type_t **deptypes; +@@ -1299,7 +1299,7 @@ + RC_DEPINFO *depinfo_from = NULL, *depinfo_to = NULL; + + void +- rc_deptree_remove_loopdependency(service_id_t **unap[UNAPM_MAX], service_id_t dep_remove_from_service_id, service_id_t dep_remove_to_service_id, RC_DEPINFO *di_from, RC_DEPINFO *di_to, const char *const type, unapm_type_t unapm_type) ++ remove_loopdependency(service_id_t **unap[UNAPM_MAX], service_id_t dep_remove_from_service_id, service_id_t dep_remove_to_service_id, RC_DEPINFO *di_from, RC_DEPINFO *di_to, const char *const type, unapm_type_t unapm_type) + { + RC_DEPTYPE *deptype_from = NULL, *deptype_to = NULL; + int dep_num, dep_count; +@@ -1363,8 +1363,8 @@ + + /* Remove weak dependency */ + +- rc_deptree_remove_loopdependency(unap_matrix, service_id_from, service_id_to, depinfo_from, depinfo_to, "iuse", UNAPM_USE); +- rc_deptree_remove_loopdependency(unap_matrix, service_id_from, service_id_to, depinfo_from, depinfo_to, "iafter", UNAPM_AFTER); ++ remove_loopdependency(unap_matrix, service_id_from, service_id_to, depinfo_from, depinfo_to, "iuse", UNAPM_USE); ++ remove_loopdependency(unap_matrix, service_id_from, service_id_to, depinfo_from, depinfo_to, "iafter", UNAPM_AFTER); + + } + } +@@ -1401,7 +1401,7 @@ + * @param unap_matrix matrixes to scan ways to solve the loop + * @param useneedafter_count total count of use/need/before/provide relations */ + static void +-rc_deptree_unapm_prepare_mixed(service_id_t **unap_matrix[UNAPM_MAX], unsigned int useneedafter_count) { ++unapm_prepare_mixed(service_id_t **unap_matrix[UNAPM_MAX], unsigned int useneedafter_count) { + service_id_t service_id; + int onemorecycle; + +@@ -1444,11 +1444,11 @@ + /* direct way: service_id = 1 -> end */ + service_id = 1; + while (service_id < (useneedafter_count+1)) +- onemorecycle += rc_deptree_unapm_expandsdeps(unap_matrix[UNAPM_MIXED_EXPANDED], service_id++); ++ onemorecycle += unapm_expandsdeps(unap_matrix[UNAPM_MIXED_EXPANDED], service_id++); + + /* reverse way: service_id = end -> 1 */ + while (--service_id) +- onemorecycle += rc_deptree_unapm_expandsdeps(unap_matrix[UNAPM_MIXED_EXPANDED], service_id); ++ onemorecycle += unapm_expandsdeps(unap_matrix[UNAPM_MIXED_EXPANDED], service_id); + + } while (onemorecycle); + +@@ -1775,10 +1775,10 @@ + /* getting dependencies pre-matrixes */ + service_id = 1; + TAILQ_FOREACH(depinfo, deptree, entries) { +- rc_deptree_unapm_getdependencies(unap_matrix[UNAPM_USE], useneedafter_count, service_id, "iuse", depinfo); +- rc_deptree_unapm_getdependencies(unap_matrix[UNAPM_NEED], useneedafter_count, service_id, "ineed", depinfo); +- rc_deptree_unapm_getdependencies(unap_matrix[UNAPM_PROVIDEDBY], useneedafter_count, service_id, "providedby", depinfo); +- rc_deptree_unapm_getdependencies(unap_matrix[UNAPM_AFTER], useneedafter_count, service_id, "iafter", depinfo); ++ unapm_getdependencies(unap_matrix[UNAPM_USE], useneedafter_count, service_id, "iuse", depinfo); ++ unapm_getdependencies(unap_matrix[UNAPM_NEED], useneedafter_count, service_id, "ineed", depinfo); ++ unapm_getdependencies(unap_matrix[UNAPM_PROVIDEDBY], useneedafter_count, service_id, "providedby", depinfo); ++ unapm_getdependencies(unap_matrix[UNAPM_AFTER], useneedafter_count, service_id, "iafter", depinfo); + service_id++; + } + +@@ -1798,7 +1798,7 @@ + + /* updating UNAPM_MIXED and UNAPM_MIXED_EXPANDED in UNAP matrix */ + +- rc_deptree_unapm_prepare_mixed(unap_matrix, useneedafter_count); ++ unapm_prepare_mixed(unap_matrix, useneedafter_count); + + /* detecting and solving loop (non-recursive method) */ + /* the loop is a situation where service is depended on itself */ +@@ -1811,7 +1811,7 @@ + while (dep_num < dep_count) { + dep_num++; + if (unap_matrix[UNAPM_MIXED_EXPANDED][service_id][dep_num] == service_id) { +- loopfound = rc_deptree_solve_loop(unap_matrix, service_id, svc_id2depinfo_bt, dep_num, flags); ++ loopfound = solve_loop(unap_matrix, service_id, svc_id2depinfo_bt, dep_num, flags); + loopsolver_counter++; + break; + } +--- a/src/test/units/early_loop_detector ++++ b/src/test/units/early_loop_detector +@@ -9,7 +9,7 @@ + } + + run_test() { +- cat > "${TMPDIR}"/rc_deptree_solve_loop.c <<EOF ++ cat > "${TMPDIR}"/solve_loop.c <<EOF + + #include "../../librc/librc-depend.c" + +@@ -82,7 +82,7 @@ + do { + loopfound = 0; + +- rc_deptree_unapm_prepare_mixed(unap_matrix, useneedafter_count); ++ unapm_prepare_mixed(unap_matrix, useneedafter_count); + + service_id=1; + while ((service_id < (useneedafter_count+1)) && !loopfound) { +@@ -93,7 +93,7 @@ + while (dep_num < dep_count) { + dep_num++; + if (unap_matrix[UNAPM_MIXED_EXPANDED][service_id][dep_num] == service_id) { +- loopfound = rc_deptree_solve_loop(unap_matrix, service_id, NULL, dep_num, RCDTFLAGS_LOOPSOLVER); ++ loopfound = solve_loop(unap_matrix, service_id, NULL, dep_num, RCDTFLAGS_LOOPSOLVER); + loopsolver_counter++; + break; + } +@@ -183,8 +183,8 @@ + } + + EOF +- gcc -ggdb3 -O0 -I../includes/ "${TMPDIR}"/rc_deptree_solve_loop.c ../libeinfo/libeinfo.o ../librc/librc.o ../librc/librc-stringlist.o ../librc/librc-misc.o -o "${TMPDIR}"/rc_deptree_solve_loop +- ./"${TMPDIR}"/rc_deptree_solve_loop ++ gcc -ggdb3 -O0 -I../includes/ "${TMPDIR}"/solve_loop.c ../libeinfo/libeinfo.o ../librc/librc.o ../librc/librc-stringlist.o ../librc/librc-misc.o -o "${TMPDIR}"/solve_loop ++ ./"${TMPDIR}"/solve_loop + } + + diff -Nru openrc-0.13.1/debian/patches/series openrc-0.13.1/debian/patches/series --- openrc-0.13.1/debian/patches/series 2014-10-26 17:34:13.000000000 +0100 +++ openrc-0.13.1/debian/patches/series 2015-10-19 18:27:51.000000000 +0200 @@ -1,5 +1,6 @@ 0010-no-rpath.patch 0020-dependency-loop-resolver.patch +0025-rename-static-rc-deptree.patch 0030-lsb-header-support.patch 0035-consider-initd-shebangs.patch 0100-GNU-Hurd_PATH_MAX_and_defined.patch