!12 Upgrade to 0.6.13
From: @starlet-dx Reviewed-by: @wu-leilei Signed-off-by: @wu-leilei
This commit is contained in:
commit
cd06d11027
@ -1,9 +1,19 @@
|
|||||||
diff -Nur pinfo-0.6.10/src/parse_config.h pinfo-0.6.10-new/src/parse_config.h
|
From 16dba5978146b6d3a540ac7c8f415eda49280847 Mon Sep 17 00:00:00 2001
|
||||||
--- pinfo-0.6.10/src/parse_config.h 2006-03-10 03:44:48.000000000 +0800
|
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
|
||||||
+++ pinfo-0.6.10-new/src/parse_config.h 2021-08-03 15:53:00.000000000 +0800
|
Date: Thu, 23 Jul 2020 20:11:24 +0200
|
||||||
@@ -85,7 +85,7 @@
|
Subject: [PATCH] fix use of global variabel
|
||||||
|
|
||||||
|
---
|
||||||
|
src/parse_config.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/parse_config.h b/src/parse_config.h
|
||||||
|
index 2dffa4f..4e68bb4 100644
|
||||||
|
--- a/src/parse_config.h
|
||||||
|
+++ b/src/parse_config.h
|
||||||
|
@@ -85,7 +85,7 @@ typedef struct colours
|
||||||
colours;
|
colours;
|
||||||
#endif /* NO_COLOR_CURSES */
|
#endif /* HAVE_CURSES_COLOR */
|
||||||
|
|
||||||
-int use_manual;
|
-int use_manual;
|
||||||
+extern int use_manual;
|
+extern int use_manual;
|
||||||
|
|||||||
Binary file not shown.
63
pinfo-0.6.13-gccwarn.patch
Normal file
63
pinfo-0.6.13-gccwarn.patch
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
From fc67ceacd81f0c74fcab85447c23a532ae482827 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergei Trofimovich <slyich@gmail.com>
|
||||||
|
Date: Thu, 11 Nov 2021 18:59:57 +0000
|
||||||
|
Subject: [PATCH 1/2] src/utils.c: suppres unused parameter warning
|
||||||
|
|
||||||
|
utils.c:372:62: error: unused parameter 'completions' [-Werror=unused-parameter]
|
||||||
|
372 | getstring_with_completion(char *prompt, const char * const * completions)
|
||||||
|
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
|
||||||
|
---
|
||||||
|
src/utils.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/utils.c b/src/utils.c
|
||||||
|
index 2e4139c..34c9b88 100644
|
||||||
|
--- a/src/utils.c
|
||||||
|
+++ b/src/utils.c
|
||||||
|
@@ -394,7 +394,7 @@ getstring_with_completion(char *prompt, const char * const * completions)
|
||||||
|
curs_set(0);
|
||||||
|
|
||||||
|
#else
|
||||||
|
-
|
||||||
|
+ (void)completions; /* unused */
|
||||||
|
move(maxy - 1, 0);
|
||||||
|
buf = readlinewrapper(prompt);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
|
From ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergei Trofimovich <slyich@gmail.com>
|
||||||
|
Date: Thu, 11 Nov 2021 19:02:24 +0000
|
||||||
|
Subject: [PATCH 2/2] src/video.c: use %ld to print longs
|
||||||
|
|
||||||
|
ncurses-6.3 added printf()-stype attribute annotations for gcc-like
|
||||||
|
compilers that can now detect argument mismatches:
|
||||||
|
|
||||||
|
video.c:114:26: error: format '%d' expects argument of type 'int',
|
||||||
|
but argument 3 has type 'long unsigned int' [-Werror=format=]
|
||||||
|
114 | printw(_("Viewing line %d/%d, 100%%"), lines, lines);
|
||||||
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
---
|
||||||
|
src/video.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/video.c b/src/video.c
|
||||||
|
index f6b444a..195d781 100644
|
||||||
|
--- a/src/video.c
|
||||||
|
+++ b/src/video.c
|
||||||
|
@@ -109,9 +109,9 @@ showscreen(char **message, unsigned long lines, unsigned long pos, long cursor,
|
||||||
|
mymvhline(maxy - 1, 0, ' ', maxx);
|
||||||
|
move(maxy - 1, 0);
|
||||||
|
if ((pos < lines - 1) &&(lines > pos + maxy - 2))
|
||||||
|
- printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
|
||||||
|
+ printw(_("Viewing line %ld/%ld, %ld%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines);
|
||||||
|
else
|
||||||
|
- printw(_("Viewing line %d/%d, 100%%"), lines, lines);
|
||||||
|
+ printw(_("Viewing line %ld/%ld, 100%%"), lines, lines);
|
||||||
|
info_add_highlights(pos, cursor, lines, column, message);
|
||||||
|
attrset(normal);
|
||||||
|
move(0, 0);
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
40
pinfo-0.6.13-stringop-overflow.patch
Normal file
40
pinfo-0.6.13-stringop-overflow.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 23c169877fda839f0634b2d193eaf26de290f141 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
|
||||||
|
Date: Thu, 23 Jul 2020 20:39:04 +0200
|
||||||
|
Subject: [PATCH] workaround false positie in gcc-10 stringop-overflow checks
|
||||||
|
|
||||||
|
---
|
||||||
|
src/utils.c | 8 +++-----
|
||||||
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/utils.c b/src/utils.c
|
||||||
|
index cb2fe76..2e4139c 100644
|
||||||
|
--- a/src/utils.c
|
||||||
|
+++ b/src/utils.c
|
||||||
|
@@ -848,10 +848,9 @@ char *
|
||||||
|
make_tempfile()
|
||||||
|
{
|
||||||
|
char *filename;
|
||||||
|
- size_t len;
|
||||||
|
|
||||||
|
/* TODO: fix hardcoded /tmp */
|
||||||
|
- char tmpfile_template[] = "/tmp/pinfo.XXXXXX";
|
||||||
|
+ char tmpfile_template[32] = "/tmp/pinfo.XXXXXX";
|
||||||
|
|
||||||
|
/* create a tmpfile */
|
||||||
|
int fd = mkstemp(tmpfile_template);
|
||||||
|
@@ -864,9 +863,8 @@ make_tempfile()
|
||||||
|
}
|
||||||
|
|
||||||
|
/* allocate a new string and copy the filename there */
|
||||||
|
- len = strlen(tmpfile_template)+1;
|
||||||
|
- filename = xmalloc(len+1); /* guarenteerd to be set to \0's */
|
||||||
|
- strncpy(filename, tmpfile_template, len);
|
||||||
|
+ filename = xmalloc(33); /* guarenteerd to be set to \0's */
|
||||||
|
+ strncpy(filename, tmpfile_template, 32);
|
||||||
|
|
||||||
|
/* close the file */
|
||||||
|
close(fd);
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
||||||
BIN
pinfo-0.6.13.tar.gz
Normal file
BIN
pinfo-0.6.13.tar.gz
Normal file
Binary file not shown.
@ -1,30 +0,0 @@
|
|||||||
--- 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);
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
--- pinfo-0.6.9/src/manual.c.mansection 2006-03-16 15:14:30.000000000 +0100
|
|
||||||
+++ pinfo-0.6.9/src/manual.c 2007-02-23 14:52:30.000000000 +0100
|
|
||||||
@@ -167,16 +167,29 @@
|
|
||||||
}
|
|
||||||
i = len;
|
|
||||||
/* find the beginning of the last token */
|
|
||||||
- for (i = len - 1;(i > 0) &&(!isspace(name1[i])); i--);
|
|
||||||
-
|
|
||||||
- /* if we've found space, then we move to the first nonspace character */
|
|
||||||
- if (i > 0)
|
|
||||||
- i++;
|
|
||||||
+ for (i = len - 1;(i >= 0) &&(!isspace(name1[i])); i--)
|
|
||||||
+ ;
|
|
||||||
+ i++;
|
|
||||||
|
|
||||||
/* filename->name */
|
|
||||||
- strcpy(manualhistory[0].name, &name1[i]);
|
|
||||||
+ snprintf(manualhistory[0].name, 256, "%s", &name1[i]);
|
|
||||||
+
|
|
||||||
/* section unknown */
|
|
||||||
- strcpy(manualhistory[0].sect, "");
|
|
||||||
+ manualhistory[0].sect[0] = 0;
|
|
||||||
+
|
|
||||||
+ /* try to find section */
|
|
||||||
+ if (i > 1) {
|
|
||||||
+ for (i--; (i >= 0) && isspace(name1[i]); i--)
|
|
||||||
+ ;
|
|
||||||
+ if (i >= 0) {
|
|
||||||
+ name1[i + 1] = 0;
|
|
||||||
+ for (; (i >= 0) && !isspace(name1[i]); i--)
|
|
||||||
+ ;
|
|
||||||
+ i++;
|
|
||||||
+ snprintf(manualhistory[0].sect, 32, "%s", &name1[i]);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* selected unknown */
|
|
||||||
manualhistory[0].selected = -1;
|
|
||||||
/* pos=0 */
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
-char *safe_group = "nogroup";
|
-char *safe_group = "nogroup";
|
||||||
+char *safe_group = "nobody";
|
+char *safe_group = "nobody";
|
||||||
|
|
||||||
#ifndef HAVE_CURS_SET
|
#ifndef HAVE_DECL_CURS_SET
|
||||||
void
|
void
|
||||||
--- pinfo-0.6.9/src/pinforc.in.nogroup 2007-01-19 13:42:14.000000000 +0100
|
--- 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
|
+++ pinfo-0.6.9/src/pinforc.in 2007-01-19 13:45:35.000000000 +0100
|
||||||
|
|||||||
27
pinfo.spec
27
pinfo.spec
@ -1,14 +1,17 @@
|
|||||||
Name: pinfo
|
Name: pinfo
|
||||||
Version: 0.6.10
|
Version: 0.6.13
|
||||||
Release: 24
|
Release: 1
|
||||||
Summary: An user-friendly, console-based viewer for Info documents
|
Summary: An user-friendly, console-based viewer for Info documents
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://pinfo.alioth.debian.org
|
URL: https://github.com/baszoetekouw/pinfo
|
||||||
Source: http://ftp.corbina.net/pub/Linux/gentoo/distfiles/d9/pinfo-0.6.10.tar.bz2
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Patch0001: pinfo-0.6.9-xdg.patch
|
Patch0001: pinfo-0.6.9-xdg.patch
|
||||||
Patch0002: pinfo-0.6.9-infosuff.patch
|
# https://github.com/baszoetekouw/pinfo/commit/fc67ceacd81f0c74fcab85447c23a532ae482827
|
||||||
|
# https://github.com/baszoetekouw/pinfo/commit/ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa
|
||||||
|
Patch0002: pinfo-0.6.13-gccwarn.patch
|
||||||
Patch0003: pinfo-0.6.9-nogroup.patch
|
Patch0003: pinfo-0.6.9-nogroup.patch
|
||||||
Patch0004: pinfo-0.6.9-mansection.patch
|
# https://github.com/baszoetekouw/pinfo/commit/23c169877fda839f0634b2d193eaf26de290f141
|
||||||
|
Patch0004: pinfo-0.6.13-stringop-overflow.patch
|
||||||
Patch0005: pinfo-0.6.9-infopath.patch
|
Patch0005: pinfo-0.6.9-infopath.patch
|
||||||
Patch0006: pinfo-0.6.10-man.patch
|
Patch0006: pinfo-0.6.10-man.patch
|
||||||
Patch0007: bugfix-of-gcc-10.patch
|
Patch0007: bugfix-of-gcc-10.patch
|
||||||
@ -34,24 +37,30 @@ Pinfo-help provides man pages and other related help documents for pinfo.
|
|||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
%configure --without-readline
|
%configure --without-readline
|
||||||
|
%make_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%doc AUTHORS COPYING
|
%license COPYING
|
||||||
|
%doc AUTHORS
|
||||||
%{_bindir}/pinfo
|
%{_bindir}/pinfo
|
||||||
%{_infodir}/pinfo.info*
|
%{_infodir}/pinfo.info*
|
||||||
%config(noreplace) %{_sysconfdir}/pinforc
|
%config(noreplace) %{_sysconfdir}/pinforc
|
||||||
%exclude %{_infodir}/dir
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
%doc ChangeLog* NEWS README TECHSTUFF
|
%doc Changelog* NEWS README.md TECHSTUFF
|
||||||
%{_mandir}/man1/pinfo.1*
|
%{_mandir}/man1/pinfo.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 08 2023 yaoxin <yao_xin001@hoperun.com> - 0.6.13-1
|
||||||
|
- Upgrade to 0.6.13
|
||||||
|
|
||||||
* Tue Aug 3 2021 Shenmei Tu <tushenmei@huawei.com> - 0.6.10-24
|
* Tue Aug 3 2021 Shenmei Tu <tushenmei@huawei.com> - 0.6.10-24
|
||||||
- bugfix-of-gcc-10.patch
|
- bugfix-of-gcc-10.patch
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
version_control: NA
|
version_control: github
|
||||||
src_repo: NA
|
src_repo: baszoetekouw/pinfo
|
||||||
tag_prefix: NA
|
tag_prefix: '^v'
|
||||||
seperator: NA
|
seperator: '.'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user