From c2bf29ffb1ef64426596f2c30b2cc6931361ec4e Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Sep 20 2017 15:59:19 +0000 Subject: Merge branch 'epel7' into f25 --- diff --git a/0001-fixed-bug-6.patch b/0001-fixed-bug-6.patch new file mode 100644 index 0000000..d0b582f --- /dev/null +++ b/0001-fixed-bug-6.patch @@ -0,0 +1,28 @@ +From 0618ad68a289b10bcc0c5fdbc8a0c8fa71542e4d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= +Date: Sun, 27 Mar 2016 17:05:44 -0300 +Subject: [PATCH 1/3] fixed bug #6 + +--- + filter.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/filter.c b/filter.c +index 2cb145c..5ae7bd6 100644 +--- a/filter.c ++++ b/filter.c +@@ -435,8 +435,10 @@ e_write_file(char *filename, int (*func) (FILE *in, struct db_enumerator e), + if((out = fopen(filename, "a")) == NULL) + return 1; + +- if(ftell(out)) ++ if(ftell(out)) { ++ fclose(out); + return 1; ++ } + + ret = (*func) (out, enumerator); + +-- +2.13.5 + diff --git a/0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch b/0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch new file mode 100644 index 0000000..04a921e --- /dev/null +++ b/0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch @@ -0,0 +1,54 @@ +From 02ac0ce311deed36679937a4d7ad882bfce29dfc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= +Date: Sun, 12 Jun 2016 21:33:00 -0300 +Subject: [PATCH 2/3] doc: manpage mention of the -f option (+ fix for bug #8) + +--- + abook.1 | 8 +------- + abookrc.5 | 4 ---- + 2 files changed, 1 insertion(+), 11 deletions(-) + +diff --git a/abook.1 b/abook.1 +index 2628200..96d665d 100644 +--- a/abook.1 ++++ b/abook.1 +@@ -6,12 +6,6 @@ abook \- text\-based address book program + .B abook + [ \fIOPTION\fR ] + .SH DESCRIPTION +-This manual page documents briefly the +-.B abook +-program. +-This manual page was written for the Debian GNU/Linux distribution +-because the original program does not have a manual page. +-.PP + .B abook + is a text-based address book program. It contains Name, Email, Address + and various Phone fields. It is designed for use with mutt, but can be +@@ -24,7 +18,7 @@ Show usage. + \fB\-C \-\-config\fP \fI\fR + Use an alternative configuration file (default is \fI$HOME/.abook/abookrc\fR). + .TP +-\fB\-\-datafile\fP \fI\fR ++\fB\-f \-\-datafile\fP \fI\fR + Use an alternative addressbook file (default is \fI$HOME/.abook/addressbook\fR). + .TP + \fB\-\-mutt\-query\fP \fI\fR [ \fB\-\-outformat\fP \fI\fR ] +diff --git a/abookrc.5 b/abookrc.5 +index 88e05f6..8fbb10b 100644 +--- a/abookrc.5 ++++ b/abookrc.5 +@@ -3,10 +3,6 @@ + .SH NAME + \fB$HOME/.abook/abookrc\fP \- configuration file for abook address book program + .SH DESCRIPTION +-This manual page documents briefly the +-.B abookrc +-file. +-.br + .B abookrc + is the (optional) configuration file for use with the + .B abook(1) +-- +2.13.5 + diff --git a/0003-build-fix-compilation-when-used-with-GCC-std-gnu99-o.patch b/0003-build-fix-compilation-when-used-with-GCC-std-gnu99-o.patch new file mode 100644 index 0000000..9562860 --- /dev/null +++ b/0003-build-fix-compilation-when-used-with-GCC-std-gnu99-o.patch @@ -0,0 +1,41 @@ +From 54f8e4ac4e0bdf7622909c4cdf5768bebe72460c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= +Date: Sun, 12 Jun 2016 23:14:12 -0300 +Subject: [PATCH 3/3] build: fix compilation when used with GCC -std=gnu99 or + -std=gnu11 (default in GCC 5.0) * derived from patch #6 * fix Debian bug + #777764 + +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index b09897b..86016ed 100755 +--- a/configure ++++ b/configure +@@ -8431,7 +8431,7 @@ if test x$debug = xtrue; then + fi + + if test x$GCC = xyes; then +- CFLAGS="-Wall $CFLAGS" ++ CFLAGS="-Wall -fgnu89-inline $CFLAGS" + fi + + ac_config_files="$ac_config_files Makefile abook.spec po/Makefile.in" +diff --git a/configure.ac b/configure.ac +index 5a9ae3b..bcb0a58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -175,7 +175,7 @@ if test x$debug = xtrue; then + fi + + if test x$GCC = xyes; then +- CFLAGS="-Wall $CFLAGS" ++ CFLAGS="-Wall -fgnu89-inline $CFLAGS" + fi + + AC_CONFIG_FILES([Makefile abook.spec po/Makefile.in]) +-- +2.13.5 + diff --git a/abook-gcc5.patch b/abook-gcc5.patch deleted file mode 100644 index e742218..0000000 --- a/abook-gcc5.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c.gcc5 abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c ---- abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c.gcc5 2014-11-28 16:29:52.000000000 +0100 -+++ abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c 2015-02-11 16:02:15.837789303 +0100 -@@ -859,7 +859,7 @@ item_merge(list_item dest, list_item src - */ - - /* quick lookup by "standard" field number */ --inline int -+extern inline int - field_id(int i) - { - assert((i >= 0) && (i < ITEM_FIELDS)); -diff -up abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h.gcc5 abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h ---- abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h.gcc5 2014-11-28 16:29:52.000000000 +0100 -+++ abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h 2015-02-11 16:02:23.465818915 +0100 -@@ -61,7 +61,7 @@ struct db_enumerator { - /* - * Field operations - */ --inline int field_id(int i); -+extern inline int field_id(int i); - abook_field *find_standard_field(char *key, int do_declare); - abook_field *real_find_field(char *key, abook_field_list *list, int *nb); - #define find_field(key, list) real_find_field(key, list, NULL) diff --git a/abook.spec b/abook.spec index 29f8267..71e9a20 100644 --- a/abook.spec +++ b/abook.spec @@ -3,15 +3,19 @@ Name: abook Version: 0.6.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: http://abook.sourceforge.net/ Summary: Text-based addressbook program for mutt Source0: http://abook.sourceforge.net/devel/abook-%{version}.tar.gz # preserve all fields by default Patch0: %{name}-preserve.patch -# fix build with gcc-5.0 -Patch1: %{name}-gcc5.patch +# 0618ad6 fixed bug #6 (https://sourceforge.net/p/abook/bugs/6/) +Patch1: 0001-fixed-bug-6.patch +# 02ac0ce doc: manpage mention of the -f option + fix for bug #8 (https://sourceforge.net/p/abook/bugs/8/) +Patch2: 0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch +# 54f8e4a build: fix compilation when used with GCC -std=gnu99 or -std=gnu11 +Patch3: 0003-build-fix-compilation-when-used-with-GCC-std-gnu99-o.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext-devel @@ -26,7 +30,9 @@ designed for use with the mutt mail client. %prep %setup -q %patch0 -p1 -b .p -%patch1 -p1 -b .gcc5 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 autoreconf -vif %build @@ -46,6 +52,9 @@ autoreconf -vif %{_mandir}/man5/abookrc.* %changelog +* Tue Sep 19 2017 Dominik Mierzejewski 0.6.1-3 +- backport fixes from upstream git repo + * Wed Feb 03 2016 Fedora Release Engineering - 0.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild