From 0e32298132d254851f69dfa00337846daaf52a8f Mon Sep 17 00:00:00 2001 From: Marcin Krol <hawk@tld-linux.org> Date: Thu, 18 Apr 2013 08:11:19 +0000 Subject: [PATCH] - merged update to 0.30.0rc7 from PLD --- poldek-config.patch | 38 +++++++- poldek-git.patch | 194 +++++++--------------------------------- poldek-link-rpmio.patch | 14 --- poldek-vrpmlog.patch | 74 --------------- poldek.spec | 16 ++-- 5 files changed, 75 insertions(+), 261 deletions(-) delete mode 100644 poldek-link-rpmio.patch delete mode 100644 poldek-vrpmlog.patch diff --git a/poldek-config.patch b/poldek-config.patch index 311a88b..5f1f5a3 100644 --- a/poldek-config.patch +++ b/poldek-config.patch @@ -1,6 +1,26 @@ ---- poldek-0.30-cvs20080519.22/conf/poldek.conf 2008-05-19 22:09:20.000000000 +0200 -+++ poldek-0.30-cvs20080519.22.new/conf/poldek.conf 2008-05-19 22:34:49.000000000 +0200 -@@ -127,11 +127,10 @@ +--- poldek-0.30/doc/poldek.conf.xml 2012-04-04 11:37:12.737381529 +0300 ++++ poldek-0.30/doc/poldek.conf.xml 2012-04-04 11:38:47.231352866 +0300 +@@ -369,7 +369,7 @@ + </description> + </option> + +- <option name="choose equivalents manually" type="boolean" default="no" op="EQPKG_ASKUSER"> ++ <option name="choose equivalents manually" type="boolean" default="yes" op="EQPKG_ASKUSER"> + <description> + Let the user select package among equivalents. + </description> +@@ -598,7 +598,7 @@ + </description> + </option> + +- <option name="hold" type="string" list="yes" default="" multiple="yes"> ++ <option name="hold" type="string" list="yes" default="kernel*" multiple="yes"> + <description> + Have the same meaning as [ global ] parameter. Example: + [screen] +--- poldek-0.30/conf/poldek.conf~ 2010-08-22 14:19:51.000000000 +0300 ++++ poldek-0.30/conf/poldek.conf 2010-08-22 14:20:28.524878981 +0300 +@@ -128,11 +128,11 @@ #confirm removal = yes # Let the user select package among equivalents. @@ -10,7 +30,19 @@ # Prevent package listed from being upgraded if they are already installed. -# hold = kernel* foo*.i686 th-test:* *-smp-* th-ready:bar*.x86_64 -#hold = ++# hold = kernel* foo*.i686 ti-ready:bar*.x86_64 +hold = kernel* # Ignore package list - packages fits given mask will be invisible. # ignore = *-smp-* foo* +--- poldek-0.30/conf_sections.c~ 2012-04-04 12:01:04.000000000 +0300 ++++ poldek-0.30/conf_sections.c 2012-04-04 12:04:46.080171888 +0300 +@@ -173,7 +173,7 @@ + + { "choose equivalents manually", + CONF_TYPE_BOOLEAN, +- "no", ++ "yes", + POLDEK_OP_EQPKG_ASKUSER, { 0 } }, + + { "hold", diff --git a/poldek-git.patch b/poldek-git.patch index 81d7b7a..44c4125 100644 --- a/poldek-git.patch +++ b/poldek-git.patch @@ -1,167 +1,41 @@ -commit 2f6b86835cbbad530f838bcf5d3e183f92eb3396 +commit 9ecd484cd077adba94649b83b3f3bfd639644056 Author: Marcin Banasiak <marcin.banasiak@gmail.com> -Date: Thu Sep 27 17:44:19 2012 +0200 +Date: Wed Mar 20 00:09:57 2013 +0100 - Change the way how / is stored in dirindex - - Previously, / was stored in dirindex with leading slash (i.e. as //) - what caused various side effects as: - - filesystem-4.0-12.x86_64 obsoleted by filesystem-4.0-13.x86_64 - filesystem-4.0-13.x86_64 marks FHS-2.3-35.x86_64 (cap //) - error: FHS-2.3-35.x86_64: equal version installed, give up + rpmvercmp: read macro configuration files before using rpmEVRparse() -diff --git a/pkgdir/pkgdir_dirindex.c b/pkgdir/pkgdir_dirindex.c -index a6f422f..abfd05c 100644 ---- a/pkgdir/pkgdir_dirindex.c -+++ b/pkgdir/pkgdir_dirindex.c -@@ -103,10 +103,14 @@ static int package_key(char *key, int size, const struct pkg *pkg, int prefix) - static tn_buf *dirarray_join(tn_buf *nbuf, tn_array *arr, char *sep) - { - int i, size = n_array_size(arr); -+ - for (i=0; i < size; i++) { -- n_buf_printf(nbuf, "%s%s", (char*)n_array_nth(arr, i), -- i < size - 1 ? sep : ""); -+ const char *dirname = n_array_nth(arr, i); -+ -+ n_buf_printf(nbuf, "%s%s%s", *dirname != '/' ? "/" : "", -+ dirname, i < size - 1 ? sep : ""); - } -+ - return nbuf; - } - -@@ -179,7 +183,8 @@ static int store_from_previous(uint32_t package_no, struct pkg *pkg, struct tndb - - while (*tl) { - const char *dir = *tl; -- dir = dir + 1; /* skip '/' */ -+ if (dir[1] != '\0') -+ dir = dir + 1; /* skip '/' only when strlen(dir) > 1 */ - add_to_path_index(path_index, dir, package_no); - tl++; +diff --git a/pm/rpm/rpmvercmp.c b/pm/rpm/rpmvercmp.c +index 968489a..d83f26b 100644 +--- a/pm/rpm/rpmvercmp.c ++++ b/pm/rpm/rpmvercmp.c +@@ -1,6 +1,6 @@ + /* + Copyright (C) 2000 - 2008 Pawel A. Gajda <mis@pld-linux.org> +- Copyright (C) 2010 - 2012 Marcin Banasiak <marcin.banasiak@gmail.com> ++ Copyright (C) 2010 - 2013 Marcin Banasiak <marcin.banasiak@gmail.com> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License, version 2 as +@@ -20,7 +20,10 @@ + #include <stdlib.h> + + #ifdef HAVE_RPM_5 ++# include <rpm/rpmrc.h> + # include <rpm/rpmtag.h> ++#else ++# include <rpm/rpmlib.h> + #endif + + #define _RPMEVR_INTERNAL +@@ -61,6 +64,11 @@ int main(int argc, char *argv[]) + exit(1); } -@@ -238,15 +243,13 @@ void store_package(uint32_t package_no, struct pkg *pkg, struct tndb *db, - - if (required) { - n_buf_clean(nbuf); -- n_buf_printf(nbuf, "/"); /* prefix all by '/' */ -- nbuf = dirarray_join(nbuf, required, ":/"); -+ nbuf = dirarray_join(nbuf, required, ":"); - tndb_put(db, key, klen, n_buf_ptr(nbuf), n_buf_size(nbuf)); - } - - if (owned) { - n_buf_clean(nbuf); -- n_buf_printf(nbuf, "/"); /* prefix all by '/' */ -- nbuf = dirarray_join(nbuf, owned, ":/"); -+ nbuf = dirarray_join(nbuf, owned, ":"); - - /* ugly, but what for another package_key() call */ - key[1] = PREFIX_PKGKEY_OWNDIR; -@@ -323,9 +326,13 @@ static int dirindex_create(const struct pkgdir *pkgdir, const char *path, - for (i=0; i < n_array_size(directories); i++) { - const char *path = n_array_nth(directories, i); - tn_array *ids = n_hash_get(path_index, path); -+ int j; - - n_buf_clean(nbuf); -- nbuf = dirarray_join(nbuf, ids, ":"); -+ for (j = 0; j < n_array_size(ids); j++) { -+ n_buf_printf(nbuf, "%s%s", (char *)n_array_nth(ids, j), -+ j < n_array_size(ids) - 1 ? ":" : ""); -+ } - - DBGF(" dir %s %s\n", path, (char*)n_buf_ptr(nbuf)); - -@@ -774,11 +781,11 @@ tn_array *get_package_directories_as_array(const struct pkgdir *pkgdir, - - dirs = n_array_new(n, free, (tn_fn_cmp)strcmp); - while (*tl) { -- if (**tl) -+ if (**tl) - n_array_push(dirs, n_strdup(*tl)); - tl++; - } -- -+ - n_str_tokl_free(tl_save); - n_free(val); - -@@ -809,7 +816,7 @@ static tn_array *do_dirindex_get(const struct pkgdir_dirindex *dirindex, - unsigned char val[8192]; - int n, found, pkgs_passsed = 1; -- if (*path == '/') -+ if (*path == '/' && path[1] != '\0') - path++; - - if (!tndb_get_str(dirindex->db, path, val, sizeof(val))) -@@ -877,7 +884,7 @@ int pkgdir_dirindex_pkg_has_path(const struct pkgdir *pkgdir, - - DBGF("%s %s\n", pkg_id(pkg), path); - -- if (*path == '/') -+ if (*path == '/' && path[1] != '\0') - path++; - - if (!tndb_get_str(dirindex->db, path, val, sizeof(val))) -commit f575c9bbe3cdd8f2d6ef27eb73dcc270c1a8a3f2 -Author: Marcin Banasiak <marcin.banasiak@gmail.com> -Date: Sun Oct 7 12:41:42 2012 +0200 - - Provide function body for inlined pkg_id - -diff --git a/pkg.c b/pkg.c -index 6e83694..227fe14 100644 ---- a/pkg.c -+++ b/pkg.c -@@ -1463,11 +1463,6 @@ struct pkg *pkg_link(struct pkg *pkg) - return pkg; - } - --const char *pkg_id(const struct pkg *p) --{ -- return p->_nvr; --} -- - int pkg_id_snprintf(char *str, size_t size, const struct pkg *pkg) - { - return n_snprintf(str, size, "%s", pkg_id(pkg)); -diff --git a/pkg.h b/pkg.h -index f0d71ac..ec6cc6d 100644 ---- a/pkg.h -+++ b/pkg.h -@@ -231,7 +231,11 @@ EXPORT const char *pkg_pkgdirpath(const struct pkg *pkg); - EXPORT unsigned pkg_file_url_type(const struct pkg *pkg); - - --EXPORT extern__inline const char *pkg_id(const struct pkg *p); -+static inline const char *pkg_id(const struct pkg *p) -+{ -+ return p->_nvr; -+} ++ if (rpmReadConfigFiles(NULL, NULL) < 0) { ++ fprintf(stderr, "Failed to read configuration files\n"); ++ exit(2); ++ } + - EXPORT int pkg_id_snprintf(char *str, size_t size, const struct pkg *pkg); - EXPORT int pkg_idevr_snprintf(char *str, size_t size, const struct pkg *pkg); - -commit ce00c5a5311fb6d77fcf96b04bca5cf2904d90ae -Author: Marcin Banasiak <marcin.banasiak@gmail.com> -Date: Sun Oct 7 12:46:36 2012 +0200 - - Kill redundant EXPORT in pm.h - -diff --git a/pm/pm.h b/pm/pm.h -index 9913168..a20c305 100644 ---- a/pm/pm.h -+++ b/pm/pm.h -@@ -204,7 +204,7 @@ EXPORT int pm_get_dbdepdirs(struct pm_ctx *ctx, + evr1 = malloc(sizeof(struct EVR_s)); + evr2 = malloc(sizeof(struct EVR_s)); - EXPORT struct pkg *pm_load_package(struct pm_ctx *ctx, - tn_alloc *na, const char *path, unsigned ldflags); --EXPORT struct pkgdir; -+struct pkgdir; - EXPORT struct pkgdir *pkgdb_to_pkgdir(struct pm_ctx *ctx, const char *rootdir, - const char *path, unsigned pkgdir_ldflags, - const char *key, ...); diff --git a/poldek-link-rpmio.patch b/poldek-link-rpmio.patch deleted file mode 100644 index 9b6d993..0000000 --- a/poldek-link-rpmio.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- poldek-0.30/configure.ac~ 2012-09-13 15:34:00.000000000 +0200 -+++ poldek-0.30/configure.ac 2012-09-14 23:02:24.729923159 +0200 -@@ -329,10 +329,7 @@ - have_beecrypt=yes, have_beecrypt=no) - fi - --if test "${is_rpm4}." = "yes." ; then -- AC_CHECK_LIB(rpmio, rpmCleanPath,,AC_MSG_ERROR(["rpmio not found"])) --fi -- -+AC_CHECK_LIB(rpmio, rpmCleanPath,,AC_MSG_ERROR(["rpmio not found"])) - - AC_CHECK_LIB(rpm, rpmReadPackageInfo,[LIBS="-lrpm $DBLIB $LIBS"], - AC_CHECK_LIB(rpm, rpmReadPackageHeader, diff --git a/poldek-vrpmlog.patch b/poldek-vrpmlog.patch deleted file mode 100644 index ae07f82..0000000 --- a/poldek-vrpmlog.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -ur poldek-0.30/config.h.in poldek-0.30-vrpmlog/config.h.in ---- poldek-0.30/config.h.in 2012-09-13 15:34:44.000000000 +0200 -+++ poldek-0.30-vrpmlog/config.h.in 2012-09-17 21:07:20.000000000 +0200 -@@ -359,6 +359,9 @@ - /* Define to 1 if you have the `vprintf' function. */ - #undef HAVE_VPRINTF - -+/* Define to 1 if you have the `vrpmlog' function. */ -+#undef HAVE_VRPMLOG -+ - /* Define to 1 if you have the `_rpmvercmp' function. */ - #undef HAVE__RPMVERCMP - -diff -ur poldek-0.30/configure.ac poldek-0.30-vrpmlog/configure.ac ---- poldek-0.30/configure.ac 2012-09-17 21:11:07.933745548 +0200 -+++ poldek-0.30-vrpmlog/configure.ac 2012-09-17 21:06:52.533754558 +0200 -@@ -343,7 +343,7 @@ - [$DBLIB -lrpmdb]), - [$DBLIB]) - --AC_CHECK_FUNCS(rpmlog rpmCheckSig rpmVerifySignature) -+AC_CHECK_FUNCS(rpmlog vrpmlog rpmCheckSig rpmVerifySignature) - - dnl rpm 4.2? - AC_CHECK_FUNCS(rpmtsColor, [LIBS="$LIBS -lpthread" -diff -ur poldek-0.30/pm/rpm/rpm.c poldek-0.30-vrpmlog/pm/rpm/rpm.c ---- poldek-0.30/pm/rpm/rpm.c 2012-09-13 15:26:29.000000000 +0200 -+++ poldek-0.30-vrpmlog/pm/rpm/rpm.c 2012-09-17 21:08:55.423750223 +0200 -@@ -317,14 +317,20 @@ - return dir; - } - -- --#if defined HAVE_RPMLOG && !defined ENABLE_STATIC -+#if !defined ENABLE_STATIC && (defined HAVE_RPMLOG || defined HAVE_VRPMLOG) - /* XXX hack: rpmlib dumps messges to stdout only... (AFAIK) */ -+#if defined HAVE_RPMLOG - void rpmlog(int prii, const char *fmt, ...) __attribute__ ((visibility("default"))); - --void rpmlog(int prii, const char *fmt, ...) -+void rpmlog(int prii, const char *fmt, ...) - { - va_list args; -+#elif defined HAVE_VRPMLOG -+void vrpmlog(unsigned prii, const char *fmt, va_list args) __attribute__ ((visibility("default"))); -+ -+void vrpmlog(unsigned prii, const char *fmt, va_list args) -+{ -+#endif - int pri, mask; - int rpmlogMask, logpri = LOGERR, verbose_level = -1; - -@@ -350,7 +356,9 @@ - verbose_level = 2; - } - -+#if defined HAVE_RPMLOG - va_start(args, fmt); -+#endif - - #if 0 - printf("%d, v = %d, verbose = %d, pm_rpm_verbose = %d\n", pri, -@@ -389,9 +397,10 @@ - log(logpri | LOGWARN, "%s\n", p); - } - -+#if defined HAVE_RPMLOG - va_end(args); -+#endif - } -- - #endif /* HAVE_RPMLOG */ - - int pm_rpm_vercmp(const char *one, const char *two) diff --git a/poldek.spec b/poldek.spec index 21c9d72..8c9470f 100644 --- a/poldek.spec +++ b/poldek.spec @@ -8,19 +8,18 @@ %define ver_db_rel 8 %define ver_rpm 4.5-49 -%define snap rc6 -%define rel 4 +%define snap rc7 +%define rel 1 Summary: RPM packages management helper tool Summary(hu.UTF-8): RPM csomagkezelést segÃtÅ eszköz Summary(pl.UTF-8): Pomocnicze narzÄdzie do zarzÄ dzania pakietami RPM Name: poldek -Version: 0.30 +Version: 0.30.0 Release: 1.%{snap}.%{rel} License: GPL v2 Group: Applications/System -#Source0: http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2 Source0: http://carme.pld-linux.org/~megabajt/snaps/poldek/%{name}-%{version}%{snap}.tar.xz -# Source0-md5: 4b528ad356b02efdd72b81f1ecaceb83 +# Source0-md5: 56ba9e7b709a99965f42e24e65eb2d7f Source1: %{name}.conf Source2: %{name}-multilib.conf Source5: %{name}-aliases.conf @@ -30,9 +29,7 @@ Patch0: %{name}-vserver-packages.patch Patch1: %{name}-config.patch Patch2: %{name}-size-type.patch Patch3: %{name}-Os-fail-workaround.patch -Patch4: %{name}-link-rpmio.patch -Patch5: %{name}-vrpmlog.patch -Patch6: %{name}-git.patch +Patch4: %{name}-git.patch URL: http://poldek.pld-linux.org/ BuildRequires: autoconf BuildRequires: automake @@ -195,8 +192,6 @@ ModuÅy jÄzyka Python dla poldka. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 %{__rm} m4/libtool.m4 m4/lt*.m4 @@ -448,6 +443,7 @@ fi %{_includedir}/trurl %{_includedir}/vfile %{_pkgconfigdir}/tndb.pc +%{_pkgconfigdir}/trurlib.pc %files static %defattr(644,root,root,755) -- 2.49.0