[packages/newsx] - added stack,quotes security patches (from Fedora) - added automake patch (fix for am 1.6+, from Fe
qboosh
qboosh at pld-linux.org
Sun Sep 29 20:31:42 CEST 2019
commit 2cfc51644a1c8922d8cc2af6da042ebfff3b4e48
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 29 20:34:53 2019 +0200
- added stack,quotes security patches (from Fedora)
- added automake patch (fix for am 1.6+, from Fedora)
- updated Source0 URL, release 2
newsx-automake.patch | 24 ++++++++++++++++++++++++
newsx-quotes.patch | 24 ++++++++++++++++++++++++
newsx-stack.patch | 18 ++++++++++++++++++
newsx.spec | 31 ++++++++++++++++++++-----------
4 files changed, 86 insertions(+), 11 deletions(-)
---
diff --git a/newsx.spec b/newsx.spec
index b1711e4..e4a84d4 100644
--- a/newsx.spec
+++ b/newsx.spec
@@ -1,17 +1,19 @@
-# TODO
-# - lib64 broken?
Summary: NNTP news exchange utility
Summary(pl.UTF-8): Narzędzie do wymiany newsów po NNTP
Name: newsx
Version: 1.6
-Release: 1
-License: GPL
+Release: 2
+License: GPL v2+
Group: Networking/News
-Source0: ftp://ftp.kvaleberg.com/pub/%{name}-%{version}.tar.gz
+Source0: ftp://ftp.tin.org/pub/news/utils/newsx/%{name}-%{version}.tar.gz
# Source0-md5: ad9c76c53d5c7d21d86bec805fe8cd34
Patch0: %{name}-make.patch
-URL: http://www.kvaleberg.com/newsx.html
-BuildRequires: autoconf
+Patch1: %{name}-stack.patch
+Patch2: %{name}-quotes.patch
+Patch3: %{name}-automake.patch
+# no longer exists
+#URL: http://www.kvaleberg.com/newsx.html
+BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: inn-devel
Requires: inn
@@ -31,6 +33,9 @@ pobiera przychodzące artykuły.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
%{__aclocal}
@@ -51,7 +56,7 @@ pobiera przychodzące artykuły.
--with-inhosts=/var/spool/news/inhosts \
--with-newsconfig=/usr/share/news/innshellvars \
--with-newsinclude=/usr/include/inn \
- --with-newslib=/usr/lib # FIXME lib64!
+ --with-newslib=%{_libdir}
%{__make}
@@ -66,7 +71,11 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog FAQ NEWS README TODO
-%attr(755,root,root) %{_bindir}/*
+%doc AUTHORS FAQ NEWS README TODO
+%attr(755,root,root) %{_bindir}/newsq
+%attr(755,root,root) %{_bindir}/newsx
%attr(770,root,news) %dir /var/spool/news/inhosts
-%{_mandir}/man[158]/*
+%{_mandir}/man1/newsq.1*
+%{_mandir}/man5/in.hosts.5*
+%{_mandir}/man5/newsx.conf.5*
+%{_mandir}/man8/newsx.8*
diff --git a/newsx-automake.patch b/newsx-automake.patch
new file mode 100644
index 0000000..fc06048
--- /dev/null
+++ b/newsx-automake.patch
@@ -0,0 +1,24 @@
+diff -up newsx-1.6/configure.ac.am-1.12 newsx-1.6/configure.ac
+--- newsx-1.6/configure.ac.am-1.12 2013-03-25 10:15:00.715659923 +0100
++++ newsx-1.6/configure.ac 2013-03-25 10:15:00.720659983 +0100
+@@ -646,7 +646,7 @@ dnl Checks for programs.
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+-AM_C_PROTOTYPES
++AC_C_PROTOTYPES
+ AC_PATH_PROG(SENDMAIL_PATH, sendmail, /usr/lib/sendmail)
+ AC_PATH_PROG(RNEWS_PATH, rnews, $RNEWS_PATH)
+ AC_PATH_PROG(INEWS_PATH, inews, $INEWS_PATH)
+diff -up newsx-1.6/Makefile.am.am-1.12 newsx-1.6/Makefile.am
+--- newsx-1.6/Makefile.am.am-1.12 2003-01-22 11:18:24.000000000 +0100
++++ newsx-1.6/Makefile.am 2013-03-25 10:15:57.348303095 +0100
+@@ -34,7 +34,7 @@
+ # Revision 1.24 1998/07/12 09:39:13 src
+ # newsx version 1.0
+ #
+-AUTOMAKE_OPTIONS = gnu ansi2knr
++AUTOMAKE_OPTIONS = gnu
+
+ SUBDIRS = lib dbz src doc more test
+
diff --git a/newsx-quotes.patch b/newsx-quotes.patch
new file mode 100644
index 0000000..228672a
--- /dev/null
+++ b/newsx-quotes.patch
@@ -0,0 +1,24 @@
+diff -up newsx-1.6/src/config.c.~1~ newsx-1.6/src/config.c
+--- newsx-1.6/src/config.c.~1~ 2003-05-18 12:57:24.000000000 +0200
++++ newsx-1.6/src/config.c 2008-07-14 09:19:11.000000000 +0200
+@@ -402,6 +402,9 @@ config_line(char *buf)
+ if (*q == '"') {
+ is_quote = 1;
+ ++q;
++ } else if (*q == '\'') {
++ is_quote = 2;
++ ++q;
+ }
+
+ /* BUG: what about ';'? */
+@@ -428,7 +431,9 @@ config_line(char *buf)
+ is_more = 1;
+ buf = q;
+ break;
+- } else if (is_quote && c=='"') {
++ } else if (is_quote==1 && c=='"') {
++ break;
++ } else if (is_quote==2 && c=='\'') {
+ break;
+ } else {
+ *p++ = c;
diff --git a/newsx-stack.patch b/newsx-stack.patch
new file mode 100644
index 0000000..df6d0b8
--- /dev/null
+++ b/newsx-stack.patch
@@ -0,0 +1,18 @@
+diff -up newsx-1.6/src/getarticle.c.stack newsx-1.6/src/getarticle.c
+--- newsx-1.6/src/getarticle.c.stack 2003-01-21 10:47:25.000000000 +0100
++++ newsx-1.6/src/getarticle.c 2008-07-12 23:02:35.000000000 +0200
+@@ -143,12 +143,12 @@ read_article(long where,char *group)
+ long len;
+ long bytecount = 0L; /* BUG: */
+
+- line=linebuf;
+- line[MAX_HEADER_SIZE] = '\0'; /* better safe than sorry */
++ linebuf[MAX_HEADER_SIZE] = '\0'; /* better safe than sorry */
+ path_line[0] = '\0';
+
+ /* fetch the article, header and body */
+ for (;;) {
++ line=linebuf;
+ if (!get_server_msg(line, MAX_HEADER_SIZE)) {
+ /* timeout: simply give up */
+ return 0;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/newsx.git/commitdiff/2cfc51644a1c8922d8cc2af6da042ebfff3b4e48
More information about the pld-cvs-commit
mailing list