From 734f76db6112092eb8669d737d3b8dd8e7ff53cd Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 22 Apr 2014 15:38:11 +0200 Subject: [PATCH] update to 0.2.0 --- .gitignore | 2 +- rpmreaper-0.1.6-f2help.patch | 19 ------------ rpmreaper-0.1.6-format.patch | 29 ----------------- rpmreaper-0.1.6-librpm.patch | 12 -------- rpmreaper-0.1.6-rpmclifini.patch | 53 -------------------------------- rpmreaper-0.1.6-rpmdbiter.patch | 38 ----------------------- rpmreaper.spec | 14 ++------- sources | 2 +- 8 files changed, 4 insertions(+), 165 deletions(-) delete mode 100644 rpmreaper-0.1.6-f2help.patch delete mode 100644 rpmreaper-0.1.6-format.patch delete mode 100644 rpmreaper-0.1.6-librpm.patch delete mode 100644 rpmreaper-0.1.6-rpmclifini.patch delete mode 100644 rpmreaper-0.1.6-rpmdbiter.patch diff --git a/.gitignore b/.gitignore index 08f6e02..8642111 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -rpmreaper-0.1.6.tar.gz +/rpmreaper-0.2.0.tar.gz diff --git a/rpmreaper-0.1.6-f2help.patch b/rpmreaper-0.1.6-f2help.patch deleted file mode 100644 index c914d2b..0000000 --- a/rpmreaper-0.1.6-f2help.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit ffa13f4493d75a1b32a3ff2c6e0e2206b15c3969 -Author: Miroslav Lichvar -Date: Tue Aug 24 15:43:27 2010 +0200 - - print F2 as help key in help line - -diff --git a/tui.c b/tui.c -index 19fba8e..ca0c064 100644 ---- a/tui.c -+++ b/tui.c -@@ -106,7 +106,7 @@ void display_help() { - attron(COLOR_PAIR(1)); - move(0, 0); - hline(' ', COLS); -- addnstr("q:Quit d,D,E:Del u,U,I:Undel r,R:Req b,B:ReqBy i:Info c,C:Commit F1:Help", COLS); -+ addnstr("q:Quit d,D,E:Del u,U,I:Undel r,R:Req b,B:ReqBy i:Info c,C:Commit F2:Help", COLS); - } - - void display_status(const struct pkgs *p, const struct pkglist *l) { diff --git a/rpmreaper-0.1.6-format.patch b/rpmreaper-0.1.6-format.patch deleted file mode 100644 index 380040a..0000000 --- a/rpmreaper-0.1.6-format.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 4a7d3d7c5de95f4a24bd760af3dd5df7c26bc6e4 -Author: Miroslav Lichvar -Date: Wed Dec 4 16:05:38 2013 +0100 - - fix building with -Werror=format-security (rhbz#1037309) - -diff --git a/rpm.c b/rpm.c -index 374ebcd..28069e1 100644 ---- a/rpm.c -+++ b/rpm.c -@@ -337,15 +337,15 @@ static int rpm_pkg_info(const struct repo *repo, const struct pkgs *p, uint pid) - r = rpmcname(cmd + j, len, p, pid); - break; - case -2: -- r = snprintf(cmd + j, len, ((struct rpmrepodata *)repo->data)->root); -+ r = snprintf(cmd + j, len, "%s", ((struct rpmrepodata *)repo->data)->root); - break; - case -3: -- r = snprintf(cmd + j, len, pager); -+ r = snprintf(cmd + j, len, "%s", pager); - break; - default: - if (idx[i] < 0 || idx[i] >= sizeof (strs) / sizeof (char *)) - return 1; -- r = snprintf(cmd + j, len, strs[(int)idx[i]]); -+ r = snprintf(cmd + j, len, "%s", strs[(int)idx[i]]); - break; - } - if (r < 0 || r >= len) diff --git a/rpmreaper-0.1.6-librpm.patch b/rpmreaper-0.1.6-librpm.patch deleted file mode 100644 index c65ce34..0000000 --- a/rpmreaper-0.1.6-librpm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up rpmreaper-0.1.6/Makefile.librpm rpmreaper-0.1.6/Makefile ---- rpmreaper-0.1.6/Makefile.librpm 2009-04-02 10:18:29.000000000 +0200 -+++ rpmreaper-0.1.6/Makefile 2010-02-15 13:26:29.000000000 +0100 -@@ -2,7 +2,7 @@ NAME = rpmreaper - VERSION = 0.1.6 - - CFLAGS = -O -g -Wall --LDFLAGS = -lrpmbuild -lncurses -+LDFLAGS = -lrpm -lncurses - - prefix = /usr/local - bindir = $(prefix)/bin diff --git a/rpmreaper-0.1.6-rpmclifini.patch b/rpmreaper-0.1.6-rpmclifini.patch deleted file mode 100644 index a834298..0000000 --- a/rpmreaper-0.1.6-rpmclifini.patch +++ /dev/null @@ -1,53 +0,0 @@ -commit 0ae72914bec9f385555e4a0827c37f7a6c927506 -Author: Miroslav Lichvar -Date: Wed Jun 1 12:10:26 2011 +0200 - - call rpmcliFini() only on exit (rhbz#709421) - -diff --git a/rpm.c b/rpm.c -index 230818b..374ebcd 100644 ---- a/rpm.c -+++ b/rpm.c -@@ -86,13 +86,11 @@ static int rpm_read(const struct repo *repo, struct pkgs *p, uint firstpid) { - rpmdbMatchIterator iter; - Header header; - uint pid; -- char *argv[] = {""}; - #ifndef _RPM_4_4_COMPAT - rpmtd sizetd; - - sizetd = rpmtdNew(); - #endif -- rd->context = rpmcliInit(1, argv, NULL); - rd->ts = rpmtsCreate(); - rpmtsSetRootDir(rd->ts, ((struct rpmrepodata *)repo->data)->root); - rpmtsSetVSFlags(rd->ts, _RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS); -@@ -299,7 +297,6 @@ static int rpm_read_provs(const struct repo *repo, struct pkgs *p, uint firstpid - iter = rpmdbFreeIterator(iter); - - rd->ts = rpmtsFree(ts); -- rd->context = rpmcliFini(rd->context); - - return 0; - } -@@ -406,11 +403,14 @@ static int rpm_remove_pkgs(const struct repo *repo, const struct pkgs *p, int fo - } - - static void rpm_repo_clean(struct repo *r) { -+ rpmcliFini(((struct rpmrepodata *)r->data)->context); - free(r->data); - r->data = NULL; - } - - void rpm_fillrepo(struct repo *r, const char *root) { -+ char *argv[] = {""}; -+ - r->repo_read = rpm_read; - r->repo_read_provs = rpm_read_provs; - r->repo_pkg_info = rpm_pkg_info; -@@ -419,4 +419,5 @@ void rpm_fillrepo(struct repo *r, const char *root) { - - r->data = malloc(sizeof (struct rpmrepodata)); - ((struct rpmrepodata *)r->data)->root = root; -+ ((struct rpmrepodata *)r->data)->context = rpmcliInit(1, argv, NULL); - } diff --git a/rpmreaper-0.1.6-rpmdbiter.patch b/rpmreaper-0.1.6-rpmdbiter.patch deleted file mode 100644 index a2d55ce..0000000 --- a/rpmreaper-0.1.6-rpmdbiter.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit 97481d9548fff559b8f19d2f134a003c4fe3d526 -Author: Miroslav Lichvar -Date: Fri Jan 21 12:37:44 2011 +0100 - - use RPMDBI_PACKAGES tag when creating rpmdb iterator - -diff --git a/rpm.c b/rpm.c -index 405974f..8f20cde 100644 ---- a/rpm.c -+++ b/rpm.c -@@ -97,7 +97,7 @@ static int rpm_read(const struct repo *repo, struct pkgs *p, uint firstpid) { - rpmtsSetRootDir(rd->ts, ((struct rpmrepodata *)repo->data)->root); - rpmtsSetVSFlags(rd->ts, _RPMVSF_NOSIGNATURES | _RPMVSF_NODIGESTS); - -- iter = rpmtsInitIterator(rd->ts, RPMTAG_NAME, NULL, 0); -+ iter = rpmtsInitIterator(rd->ts, RPMDBI_PACKAGES, NULL, 0); - for (pid = firstpid; (header = rpmdbNextIterator(iter)) != NULL; pid++) { - #ifdef _RPM_4_4_COMPAT - int i, ds1, ds2, ds3; -commit 99455fd99fe541a15e6c7dcaab357fa89db038fb -Author: Miroslav Lichvar -Date: Mon Jan 31 17:31:48 2011 +0100 - - use RPMDBI_PACKAGES index also when reading provides - -diff --git a/rpm.c b/rpm.c -index 8f20cde..230818b 100644 ---- a/rpm.c -+++ b/rpm.c -@@ -192,7 +192,7 @@ static int rpm_read_provs(const struct repo *repo, struct pkgs *p, uint firstpid - dirs = rpmtdNew(); - dirindexes = rpmtdNew(); - #endif -- iter = rpmtsInitIterator(ts, RPMTAG_NAME, NULL, 0); -+ iter = rpmtsInitIterator(ts, RPMDBI_PACKAGES, NULL, 0); - - for (pid = firstpid; (header = rpmdbNextIterator(iter)) != NULL; pid++) { - #ifdef _RPM_4_4_COMPAT diff --git a/rpmreaper.spec b/rpmreaper.spec index ff80d46..d30d22b 100644 --- a/rpmreaper.spec +++ b/rpmreaper.spec @@ -1,5 +1,5 @@ Name: rpmreaper -Version: 0.1.6 +Version: 0.2.0 Release: 14%{?dist} Summary: A tool for removing packages from system @@ -7,11 +7,6 @@ Group: Applications/System License: GPLv2+ URL: https://fedorahosted.org/rpmreaper/ Source0: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz -Patch0: rpmreaper-0.1.6-librpm.patch -Patch1: rpmreaper-0.1.6-f2help.patch -Patch2: rpmreaper-0.1.6-rpmdbiter.patch -Patch3: rpmreaper-0.1.6-rpmclifini.patch -Patch4: rpmreaper-0.1.6-format.patch BuildRequires: ncurses-devel rpm-devel Requires: less rpm @@ -22,14 +17,9 @@ allows removing unnecessary packages and their dependencies from the system. %prep %setup -q -%patch0 -p1 -b .librpm -%patch1 -p1 -b .f2help -%patch2 -p1 -b .rpmdbiter -%patch3 -p1 -b .rpmclifini -%patch4 -p1 -b .format %build -make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} EXTRA_CFLAGS="$RPM_OPT_FLAGS" %install %makeinstall diff --git a/sources b/sources index c589b21..99f25c2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -655184ddcb5cdd3a255d89341284fe6e rpmreaper-0.1.6.tar.gz +9d0c82b235ed6acf0d604f40fb187856 rpmreaper-0.2.0.tar.gz