Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
cd06d11027
!12 Upgrade to 0.6.13
From: @starlet-dx 
Reviewed-by: @wu-leilei 
Signed-off-by: @wu-leilei
2023-10-08 08:51:32 +00:00
starlet-dx
73955b1a5f Upgrade to 0.6.13 2023-10-08 16:23:38 +08:00
openeuler-ci-bot
d43bf03f74
!10 fix date error on 0.6.10-23 and 0.6.10-24
From: @xu_lei_123 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2022-12-24 06:17:27 +00:00
xu_lei_123
0de2b508d3 fix date error on 0.6.10-23 and 0.6.10-24 2022-12-24 13:26:00 +08:00
openeuler-ci-bot
707c3d1637 !4 解决 gcc 10导致pinfo编译失败问题
From: @tushenmei
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-08-03 08:21:05 +00:00
tushenmei
cab1477954 bugfix of gcc10 2021-08-03 16:07:00 +08:00
openeuler-ci-bot
69836b65a7 !3 解决multiple definition 问题
From: @tushenmei
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-07-31 07:03:59 +00:00
tushenmei
4e5d2a747d bugfix of multiple definition 2021-07-30 17:31:57 +08:00
openeuler-ci-bot
8bda4cf684 !2 add yaml
Merge pull request !2 from jackie_wu123/master
2020-07-24 15:31:49 +08:00
jackie_wu
05008d5189 add yaml 2020-05-11 15:40:42 +08:00
10 changed files with 154 additions and 79 deletions

22
bugfix-of-gcc-10.patch Normal file
View File

@ -0,0 +1,22 @@
From 16dba5978146b6d3a540ac7c8f415eda49280847 Mon Sep 17 00:00:00 2001
From: Bas Zoetekouw <bas.zoetekouw@surfnet.nl>
Date: Thu, 23 Jul 2020 20:11:24 +0200
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;
#endif /* HAVE_CURSES_COLOR */
-int use_manual;
+extern int use_manual;
int parse_config (void);
int parse_line (char *line);

Binary file not shown.

View 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

View 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

Binary file not shown.

View File

@ -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);

View File

@ -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 */

View File

@ -7,7 +7,7 @@
-char *safe_group = "nogroup";
+char *safe_group = "nobody";
#ifndef HAVE_CURS_SET
#ifndef HAVE_DECL_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

View File

@ -1,16 +1,20 @@
Name: pinfo
Version: 0.6.10
Release: 22
Version: 0.6.13
Release: 1
Summary: An user-friendly, console-based viewer for Info documents
License: GPLv2
URL: http://pinfo.alioth.debian.org
Source: http://ftp.corbina.net/pub/Linux/gentoo/distfiles/d9/pinfo-0.6.10.tar.bz2
URL: https://github.com/baszoetekouw/pinfo
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
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
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
Patch0006: pinfo-0.6.10-man.patch
Patch0007: bugfix-of-gcc-10.patch
BuildRequires: ncurses-devel automake gettext-devel libtool texinfo
Requires: xdg-utils
@ -38,19 +42,30 @@ Pinfo-help provides man pages and other related help documents for pinfo.
%install
%make_install
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%find_lang %{name}
%files -f %{name}.lang
%doc AUTHORS COPYING
%license COPYING
%doc AUTHORS
%{_bindir}/pinfo
%{_infodir}/pinfo.info*
%config(noreplace) %{_sysconfdir}/pinforc
%exclude %{_infodir}/dir
%files help
%doc ChangeLog* NEWS README TECHSTUFF
%doc Changelog* NEWS README.md TECHSTUFF
%{_mandir}/man1/pinfo.1*
%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
- bugfix-of-gcc-10.patch
* Fri July 30 2021 Shenmei Tu <tushenmei@huawei.com> - 0.6.10-23
- bug fix of multiple definition
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 0.6.10-22
- Package init

4
pinfo.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: baszoetekouw/pinfo
tag_prefix: '^v'
seperator: '.'