diff --git a/pinfo-0.6.9-infosuff.patch b/pinfo-0.6.9-infosuff.patch new file mode 100644 index 0000000..7ab326f --- /dev/null +++ b/pinfo-0.6.9-infosuff.patch @@ -0,0 +1,30 @@ +--- pinfo-0.6.9/src/filehandling_functions.c.infosuff 2006-03-16 16:15:02.000000000 +0100 ++++ pinfo-0.6.9/src/filehandling_functions.c 2006-09-18 14:32:32.000000000 +0200 +@@ -94,6 +94,7 @@ + /* iterate over all files in the directory */ + while ((dp = readdir(dir)) != NULL) + { ++ int info_suffix; + /* use strcat rather than strdup, because xmalloc handles all + * malloc errors */ + char *thisfile = xmalloc(strlen(dp->d_name)+1); +@@ -101,7 +102,9 @@ + + /* strip suffixes (so "gcc.info.gz" -> "gcc") */ + strip_compression_suffix(thisfile); ++ info_suffix = strlen(thisfile); + strip_info_suffix(thisfile); ++ info_suffix -= strlen(thisfile); + + /* compare this file with the file we're looking for */ + if (strcmp(thisfile,bname) == 0) +@@ -110,7 +113,8 @@ + matched++; + /* put it in the buffer */ + strncat(Buf, thisfile, 1023-strlen(Buf)); +- strncat(Buf, ".info", 1023-strlen(Buf)); ++ if (info_suffix) ++ strncat(Buf, ".info", 1023-strlen(Buf)); + + /* clean up, and exit the loop */ + xfree(thisfile); diff --git a/pinfo-0.6.9-nogroup.patch b/pinfo-0.6.9-nogroup.patch new file mode 100644 index 0000000..b8f351b --- /dev/null +++ b/pinfo-0.6.9-nogroup.patch @@ -0,0 +1,22 @@ +--- pinfo-0.6.9/src/utils.c.nogroup 2006-03-16 15:14:30.000000000 +0100 ++++ pinfo-0.6.9/src/utils.c 2007-01-19 13:45:53.000000000 +0100 +@@ -32,7 +32,7 @@ + #endif + + char *safe_user = "nobody"; +-char *safe_group = "nogroup"; ++char *safe_group = "nobody"; + + #ifndef HAVE_CURS_SET + void +--- pinfo-0.6.9/src/pinforc.in.nogroup 2007-01-19 13:42:14.000000000 +0100 ++++ pinfo-0.6.9/src/pinforc.in 2007-01-19 13:45:35.000000000 +0100 +@@ -91,7 +91,7 @@ + PRINTUTILITY=lpr + MANLINKS=1:8:2:3:4:5:6:7:9:n:p:o:3X11:3Xt:3x:3X + SAFE-USER=nobody +-SAFE-GROUP=nogroup ++SAFE-GROUP=nobody + # + # Remember, HIGHLIGHTREGEXP may be slow (thus it's commented by default) + # diff --git a/pinfo.spec b/pinfo.spec index b5fc43a..1f10f98 100644 --- a/pinfo.spec +++ b/pinfo.spec @@ -1,12 +1,14 @@ Summary: An info file viewer. Name: pinfo Version: 0.6.9 -Release: 1%{?dist} +Release: 2%{?dist} Group: System Environment/Base License: GPL URL: http://pinfo.alioth.debian.org Source: pinfo-%{version}.tar.bz2 Patch1: pinfo-0.6.8-htmlview.patch +Patch2: pinfo-0.6.9-infosuff.patch +Patch3: pinfo-0.6.9-nogroup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ncurses-devel @@ -22,9 +24,11 @@ using regular expressions, and is based on the ncurses library. %prep %setup -q %patch1 -p1 -b .links +%patch2 -p1 -b .infosuff +%patch3 -p1 -b .nogroup %build -%configure +%configure --without-readline make %install @@ -52,16 +56,24 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %post /sbin/install-info %{_infodir}/pinfo.info.gz %{_infodir}/dir +: %preun if [ $1 = 0 ]; then /sbin/install-info --delete %{_infodir}/pinfo.info.gz %{_infodir}/dir fi +: %clean rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 19 2007 Miroslav Lichvar 0.6.9-2 +- use correct group when dropping group privileges (#221107) +- open also files without .info suffix +- make scriptlets safer +- make sure readline support isn't compiled in + * Tue Sep 12 2006 Miroslav Lichvar 0.6.9-1.fc6 - update to 0.6.9 - package locale files