+++ /dev/null
-commit c6c6020ba55a3a14fc2ca190c5623bf51ac0d8b6
-Author: Kacper Kornet <draenog@pld-linux.org>
-Date: Mon Mar 24 06:58:32 2014 +0000
-
- Don't use internal glibc function
-
-diff --git a/cli/shell.c b/cli/shell.c
-index bcd334a..58067e8 100644
---- a/cli/shell.c
-+++ b/cli/shell.c
-@@ -73,6 +73,11 @@ struct sh_ctx {
-
- static struct sh_ctx sh_ctx = { COMPLETITION_CTX_NONE, NULL };
-
-+inline static int option_is_end (const struct argp_option *__opt)
-+{
-+ return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
-+}
-+
- static
- int is_upgradeable(struct poclidek_ctx *cctx, struct pkg *pkg, int reverse)
- {
-@@ -191,7 +196,7 @@ static char *command_options_generator(const char *text, int state)
-
- len = strlen(&text[2]);
-
-- for (i = 0; !_option_is_end(&command->argp_opts[i]); i++) {
-+ for (i = 0; !option_is_end(&command->argp_opts[i]); i++) {
- const struct argp_option *argp_opt = &command->argp_opts[i];
-
- /* skip hidden options */
+++ /dev/null
-commit 31658355f3937b67f265e45f70eccfe7af668a70
-Author: Marcin Banasiak <marcin.banasiak@gmail.com>
-Date: Sun Mar 9 22:16:00 2014 +0100
-
- Ignore paths longer than 255 characters (lp#1288989)
-
- Index format used by poldek prevents us from storing paths longer than
- 255 characters. Changing this behaviour would break backward
- compatibility, so simply ignore them.
-
-diff --git a/pkgdir/pkgdir_dirindex.c b/pkgdir/pkgdir_dirindex.c
-index abfd05c..3437ee7 100644
---- a/pkgdir/pkgdir_dirindex.c
-+++ b/pkgdir/pkgdir_dirindex.c
-@@ -136,6 +136,9 @@ void add_to_path_index(tn_hash *path_index, const char *path, uint32_t package_n
- unsigned khash = 0;
- tn_array *keys;
-
-+ if (strlen(path) > 255)
-+ return;
-+
- if ((keys = n_hash_get_ex(path_index, path, &klen, &khash)) == NULL) {
- keys = n_array_new(16, free, (tn_fn_cmp)strcmp);
- n_hash_insert_ex(path_index, path, klen, khash, keys);
-diff --git a/pm/rpm/rpm_pkg_ld.c b/pm/rpm/rpm_pkg_ld.c
-index 5ae167a..3983693 100644
---- a/pm/rpm/rpm_pkg_ld.c
-+++ b/pm/rpm/rpm_pkg_ld.c
-@@ -259,8 +259,9 @@ static int valid_fname(const char *fname, mode_t mode, const char *pkgname)
- #endif
-
- if (strlen(fname) > 255) {
-- logn(LOGERR, _("%s: %s \"%s\" longer than 255 bytes"),
-- pkgname, S_ISDIR(mode) ? _("dirname") : _("filename"), fname);
-+ if (poldek_VERBOSE > 1)
-+ logn(LOGWARN, _("%s: skipped %s \"%s\" longer than 255 bytes"),
-+ pkgname, S_ISDIR(mode) ? _("dirname") : _("filename"), fname);
- return 0;
- }
-
-@@ -335,8 +336,11 @@ int pm_rpm_ldhdr_fl(tn_alloc *na, tn_tuple **fl,
- struct pkgfl_ent *flent;
-
- fentdirs_items[i] = 0;
-- if (!valid_fname(dirs[i], 0, pkgname))
-- nerr++;
-+ if (!valid_fname(dirs[i], 0, pkgname)) {
-+ skipdirs[i] = NULL;
-+ fentdirs[i] = NULL;
-+ continue;
-+ }
-
- if (which != PKGFL_ALL) {
- int is_depdir;
-@@ -374,7 +378,7 @@ int pm_rpm_ldhdr_fl(tn_alloc *na, tn_tuple **fl,
- int len;
-
- if (!valid_fname(names[i], modes ? modes[i] : 0, pkgname))
-- nerr++;
-+ continue;
-
- msg(5, " %d: %s %s/%s \n", i, skipdirs[j] ? "add " : "skip",
- dirs[j], names[i]);
-
-diff --git a/pm/rpm/rpm_pkg_ld.c b/pm/rpm/rpm_pkg_ld.c
-index 3983693..51e339f 100644
---- a/pm/rpm/rpm_pkg_ld.c
-+++ b/pm/rpm/rpm_pkg_ld.c
-@@ -277,6 +277,7 @@ int pm_rpm_ldhdr_fl(tn_alloc *na, tn_tuple **fl,
- int32_t *diridxs;
- uint32_t *sizes;
- uint16_t *modes;
-+ size_t *dirslen = NULL;
- struct flfile *flfile;
- struct pkgfl_ent **fentdirs = NULL;
- int *fentdirs_items;
-@@ -329,11 +330,14 @@ int pm_rpm_ldhdr_fl(tn_alloc *na, tn_tuple **fl,
-
- skipdirs = alloca(sizeof(*skipdirs) * c2);
- fentdirs = alloca(sizeof(*fentdirs) * c2);
-+ dirslen = alloca(sizeof(size_t) * c2);
- fentdirs_items = alloca(sizeof(*fentdirs_items) * c2);
-
- /* skip unneded dirnames */
- for (i=0; i<c2; i++) {
- struct pkgfl_ent *flent;
-+
-+ dirslen[i] = strlen(dirs[i]);
-
- fentdirs_items[i] = 0;
- if (!valid_fname(dirs[i], 0, pkgname)) {
-@@ -366,7 +370,7 @@ int pm_rpm_ldhdr_fl(tn_alloc *na, tn_tuple **fl,
- if (diridxs[j] == i)
- fentdirs_items[i]++;
-
-- flent = pkgfl_ent_new(na, dirs[i], strlen(dirs[i]), fentdirs_items[i]);
-+ flent = pkgfl_ent_new(na, dirs[i], dirslen[i], fentdirs_items[i]);
- fentdirs[i] = flent;
- ndirs++;
- }
-@@ -388,6 +392,15 @@ int pm_rpm_ldhdr_fl(tn_alloc *na, tn_tuple **fl,
-
- flent = fentdirs[j];
- len = strlen(names[i]);
-+
-+ /* FIXME: ignore dirpaths longer then 255 characters lp#1288989 */
-+ if (S_ISDIR(modes ? modes[i] : 0) && dirslen[j] + len > 254) {
-+ if (poldek_VERBOSE > 1)
-+ logn(LOGWARN, _("%s: skipped dirname \"%s/%s\": longer than 255 bytes"),
-+ pkgname, flent->dirname, names[i]);
-+ continue;
-+ }
-+
- if (symlinks) {
- flfile = flfile_new(na, sizes ? sizes[i] : 0,
- modes ? modes[i] : 0,
%endif
%define ver_rpm 5.4.10
-%define rel 8
+%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.0
+Version: 0.30.1
Release: %{rel}%{?with_snap:.%{SNAP}}
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/releases/poldek/%{name}-%{version}.tar.xz
-# Source0-md5: 392cfa125912fbedb6cc6d54dfbb80e3
+# Source0-md5: e569c8454df0932df53b09cee9998927
Source1: %{name}.conf
Source2: %{name}-multilib.conf
Source5: %{name}-aliases.conf
Source101: %{name}-multilib-snap.conf
Source102: %{name}-debuginfo-snap.conf
Patch0: %{name}-size-type.patch
-Patch1: %{name}-glibc-internal.patch
-Patch2: %{name}-config.patch
-Patch3: at-char-completion.patch
-Patch4: %{name}-ignore-too-long-paths.patch
-Patch5: %{name}-noorder.patch
+Patch1: %{name}-config.patch
URL: http://poldek.pld-linux.org/
BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel}
BuildRequires: autoconf
%setup -q
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
%{__rm} m4/libtool.m4 m4/lt*.m4