diff --git a/.gitignore b/.gitignore index a5ece85..f4934ef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ minicom-2.4.tar.gz /minicom-2.6.2.tar.gz /minicom-2.7.tar.gz /minicom-2.7.1.tar.gz +/minicom-2.8.tar.gz diff --git a/0001-Add-a-missing-va_end-call.patch b/0001-Add-a-missing-va_end-call.patch deleted file mode 100644 index 08f09d2..0000000 --- a/0001-Add-a-missing-va_end-call.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6b93b699cc57c433ddd0f8a055c73a4b05b575fa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 13 Aug 2018 14:39:42 +0200 -Subject: [PATCH 1/7] Add a missing va_end() call -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ondřej Lysoněk ---- - src/common.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/common.c b/src/common.c -index 86d806c..48f68f9 100644 ---- a/src/common.c -+++ b/src/common.c -@@ -74,6 +74,7 @@ void do_log(const char *line, ...) - (ptr->tm_year)+1900, (ptr->tm_mon)+1, ptr->tm_mday, - ptr->tm_hour, ptr->tm_min, ptr->tm_sec); - vfprintf(logfile, line, ap); -+ va_end(ap); - fprintf(logfile, "\n"); - fclose(logfile); - #else --- -2.14.4 - diff --git a/0001-Drop-superfluous-global-variable-definitions.patch b/0001-Drop-superfluous-global-variable-definitions.patch deleted file mode 100644 index c96323e..0000000 --- a/0001-Drop-superfluous-global-variable-definitions.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b65152ebc03832972115e6d98e50cb6190d01793 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 3 Feb 2020 13:18:13 +0100 -Subject: [PATCH 1/3] Drop superfluous global variable definitions - -The file minicom.c, by including the minicom.h header, already defines -the global variables 'dial_user' and 'dial_pass'. The object file -minicom.o is always linked to dial.o. Thus the definitions in dial.c -can be dropped. - -This fixes linking with gcc 10 which uses -fno-common by default, -disallowing multiple global variable definitions. ---- - src/dial.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/dial.c b/src/dial.c -index eada5ee..d9d481f 100644 ---- a/src/dial.c -+++ b/src/dial.c -@@ -146,8 +146,6 @@ static int newtype; - /* Access to ".dialdir" denied? */ - static int dendd = 0; - static char *tagged; --char *dial_user; --char *dial_pass; - - /* Change the baud rate. Treat all characters in the given array as if - * they were key presses within the comm parameters dialog (C-A P) and --- -2.24.1 - diff --git a/0002-Drop-superfluous-global-variable-definitions.patch b/0002-Drop-superfluous-global-variable-definitions.patch deleted file mode 100644 index 236049a..0000000 --- a/0002-Drop-superfluous-global-variable-definitions.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 924bd2da3a00e030e29d82b74ef82900bd50b475 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 3 Feb 2020 13:18:33 +0100 -Subject: [PATCH 2/3] Drop superfluous global variable definitions - -The only place where the EXTERN macro mechanism is used to define the -global variables 'vt_outmap' and 'vt_inmap' is minicom.c (by defining -an empty EXTERN macro and including the minicom.h header). The file -vt100.c already defines these variables. The vt100.o object file is -always linked to minicom.o. Thus it is safe not to define the -variables in minicom.c and only declare them in the minicom.h header. - -This fixes linking with gcc 10 which uses -fno-common by default, -disallowing multiple global variable definitions. ---- - src/minicom.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/minicom.h b/src/minicom.h -index 061c013..0f9693b 100644 ---- a/src/minicom.h -+++ b/src/minicom.h -@@ -141,7 +141,7 @@ EXTERN int sbcolor; /* Status Bar Background Color */ - EXTERN int st_attr; /* Status Bar attributes. */ - - /* jl 04.09.97 conversion tables */ --EXTERN unsigned char vt_outmap[256], vt_inmap[256]; -+extern unsigned char vt_outmap[256], vt_inmap[256]; - - /* MARK updated 02/17/95 - history buffer */ - EXTERN int num_hist_lines; /* History buffer size */ --- -2.24.1 - diff --git a/0002-Make-sure-strings-copied-by-strncpy-are-null-termina.patch b/0002-Make-sure-strings-copied-by-strncpy-are-null-termina.patch deleted file mode 100644 index dde0cf2..0000000 --- a/0002-Make-sure-strings-copied-by-strncpy-are-null-termina.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 695564da74fe7c95802f5bf59e442e23a2d7cbbf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 13 Aug 2018 14:39:43 +0200 -Subject: [PATCH 2/7] Make sure strings copied by strncpy are null-terminated -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ondřej Lysoněk ---- - src/config.c | 1 + - src/dial.c | 3 +++ - src/minicom.c | 3 +++ - src/script.c | 2 ++ - src/updown.c | 4 ++++ - 5 files changed, 13 insertions(+) - -diff --git a/src/config.c b/src/config.c -index 78b25aa..ea939c8 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -88,6 +88,7 @@ void read_parms(void) - for (f = PROTO_BASE; f < MAXPROTO; f++) { - if (P_PNAME(f)[0] && P_PIORED(f) != 'Y' && P_PIORED(f) != 'N') { - strncpy(buf, P_PNAME(f) - 2, sizeof(buf)); -+ buf[sizeof(buf) - 1] = '\0'; - strcpy(P_PNAME(f), buf); - P_PIORED(f) = 'Y'; - P_PFULL(f) = 'N'; -diff --git a/src/dial.c b/src/dial.c -index a90c1d2..a3337e5 100644 ---- a/src/dial.c -+++ b/src/dial.c -@@ -829,8 +829,11 @@ static int v1_read(FILE *fp, struct dialent *d) - - memcpy(d->username, v1.username, sizeof(v1) - offsetof(struct v1_dialent, username)); - strncpy(d->name, v1.name, sizeof(d->name)); -+ d->name[sizeof(d->name) - 1] = '\0'; - strncpy(d->number, v1.number, sizeof(d->number)); -+ d->number[sizeof(d->number) - 1] = '\0'; - strncpy(d->script, v1.script, sizeof(d->script)); -+ d->script[sizeof(d->script) - 1] = '\0'; - d->lastdate[0]=0; - d->lasttime[0]=0; - d->count=0; -diff --git a/src/minicom.c b/src/minicom.c -index 4eb47d4..876805a 100644 ---- a/src/minicom.c -+++ b/src/minicom.c -@@ -1208,6 +1208,7 @@ int main(int argc, char **argv) - break; - case 't': /* Terminal type */ - strncpy(termtype, optarg, sizeof(termtype)); -+ termtype[sizeof(termtype) - 1] = '\0'; - #ifdef __GLIBC__ - /* Bug in older libc's (< 4.5.26 I think) */ - if ((s = getenv("TERMCAP")) != NULL && *s != '/') -@@ -1322,7 +1323,9 @@ int main(int argc, char **argv) - strncpy(homedir, pwd->pw_dir, sizeof(homedir)); - else - strncpy(homedir, s, sizeof(homedir)); -+ homedir[sizeof(homedir) - 1] = '\0'; - strncpy(username, pwd->pw_name, sizeof(username)); -+ username[sizeof(username) - 1] = '\0'; - - /* Get personal parameter file */ - snprintf(pparfile, sizeof(pparfile), "%s/.minirc.%s", homedir, use_port); -diff --git a/src/script.c b/src/script.c -index ee1284f..f7c4e3f 100644 ---- a/src/script.c -+++ b/src/script.c -@@ -1099,12 +1099,14 @@ int main(int argc, char **argv) - - if (argc > 2) { - strncpy(logfname, argv[2], sizeof(logfname)); -+ logfname[sizeof(logfname) - 1] = '\0'; - if (argc > 3) - strncpy(homedir, argv[3], sizeof(homedir)); - else if ((s = getenv("HOME")) != NULL) - strncpy(homedir, s, sizeof(homedir)); - else - homedir[0] = 0; -+ homedir[sizeof(homedir) - 1] = '\0'; - } - else - logfname[0] = 0; -diff --git a/src/updown.c b/src/updown.c -index 726328e..54442bb 100644 ---- a/src/updown.c -+++ b/src/updown.c -@@ -386,6 +386,7 @@ void updown(int what, int nr) - do_log("%s", trimbuf); - } else if (!strncmp (buffirst, "Bytes", 5)) { - strncpy (xfrstr, buf, sizeof(xfrstr)); -+ xfrstr[sizeof(xfrstr) - 1] = '\0'; - } - buffirst[0] = 0; - trimbuf[0] = 0; -@@ -698,8 +699,11 @@ void runscript(int ask, const char *s, const char *l, const char *p) - } - } else { - strncpy(scr_user, l, sizeof(scr_user)); -+ scr_user[sizeof(scr_user) - 1] = '\0'; - strncpy(scr_name, s, sizeof(scr_name)); -+ scr_name[sizeof(scr_name) - 1] = '\0'; - strncpy(scr_passwd, p, sizeof(scr_passwd)); -+ scr_passwd[sizeof(scr_passwd) - 1] = '\0'; - } - sprintf(scr_lines, "%d", (int) lines); /* jl 13.09.97 */ - --- -2.14.4 - diff --git a/0003-Drop-superfluous-global-variable-definitions.patch b/0003-Drop-superfluous-global-variable-definitions.patch deleted file mode 100644 index af8a5d7..0000000 --- a/0003-Drop-superfluous-global-variable-definitions.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a4fc603b3641d2efe31479116eb7ba66932901c7 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 3 Feb 2020 13:21:41 +0100 -Subject: [PATCH 3/3] Drop superfluous global variable definitions - -The only place where the EXTERN macro mechanism is used to define the -global variables 'portfd_is_socket', 'portfd_is_connected' and -'portfd_sock_addr' is minicom.c (by defining an empty EXTERN macro and -including the minicom.h header). The source file sysdep1_s.c already -defines these variables. The sysdep1_s.o object file is always linked -to minicom.o. Thus it is safe to drop the definitions from minicom.c -and only declare the variables in the minicom.h header. - -This fixes linking with gcc 10 which uses -fno-common by default, -disallowing multiple global variable definitions. ---- - src/minicom.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/minicom.h b/src/minicom.h -index 0f9693b..1e7cb8c 100644 ---- a/src/minicom.h -+++ b/src/minicom.h -@@ -113,9 +113,9 @@ EXTERN char *dial_user; /* Our username there */ - EXTERN char *dial_pass; /* Our password */ - - #ifdef USE_SOCKET --EXTERN int portfd_is_socket; /* File descriptor is a unix socket */ --EXTERN int portfd_is_connected; /* 1 if the socket is connected */ --EXTERN struct sockaddr_un portfd_sock_addr; /* the unix socket address */ -+extern int portfd_is_socket; /* File descriptor is a unix socket */ -+extern int portfd_is_connected; /* 1 if the socket is connected */ -+extern struct sockaddr_un portfd_sock_addr; /* the unix socket address */ - #define portfd_connected ((portfd_is_socket && !portfd_is_connected) \ - ? -1 : portfd) - #else --- -2.24.1 - diff --git a/0003-Fix-file-descriptor-leaks.patch b/0003-Fix-file-descriptor-leaks.patch deleted file mode 100644 index be39ecc..0000000 --- a/0003-Fix-file-descriptor-leaks.patch +++ /dev/null @@ -1,59 +0,0 @@ -From abc0836d587862ba512acf4d4fafcf8cb121bf0a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 13 Aug 2018 14:39:44 +0200 -Subject: [PATCH 3/7] Fix file descriptor leaks -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ondřej Lysoněk ---- - src/dial.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/dial.c b/src/dial.c -index a3337e5..eada5ee 100644 ---- a/src/dial.c -+++ b/src/dial.c -@@ -912,6 +912,7 @@ int readdialdir(void) - if (fread(&dial_ver, sizeof(dial_ver), 1, fp) != 1) - { - werror(_("Failed to read dialing directory\n")); -+ fclose(fp); - return -1; - } - if (dial_ver.magic != DIALMAGIC) { -@@ -947,12 +948,14 @@ int readdialdir(void) - dial_ver.size > sizeof(struct v4_dialent)) { - werror(_("Phonelist garbled (unknown version?)")); - dialents = mkstdent(); -+ fclose(fp); - return -1; - } - break; - case 5: - if (dial_ver.size != sizeof(struct dialent)) { - werror(_("Phonelist corrupted")); -+ fclose(fp); - return -1; - } - break; -@@ -961,6 +964,7 @@ int readdialdir(void) - // have different size on 32 and 64bit systems - if (dial_ver.size != sizeof(struct dialent) - sizeof(void *)) { - werror(_("Phonelist corrupted")); -+ fclose(fp); - return -1; - } - break; -@@ -968,6 +972,7 @@ int readdialdir(void) - werror(_("Unknown dialing directory version")); - dendd = 1; - dialents = mkstdent(); -+ fclose(fp); - return -1; - } - --- -2.14.4 - diff --git a/0004-Fix-a-directory-handle-leak.patch b/0004-Fix-a-directory-handle-leak.patch deleted file mode 100644 index c63d780..0000000 --- a/0004-Fix-a-directory-handle-leak.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 97359edba99f9bc6f3f87590da2139c51fb409d4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 13 Aug 2018 14:39:45 +0200 -Subject: [PATCH 4/7] Fix a directory handle leak -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ondřej Lysoněk ---- - src/getsdir.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/getsdir.c b/src/getsdir.c -index 2195b27..bd6b763 100644 ---- a/src/getsdir.c -+++ b/src/getsdir.c -@@ -228,6 +228,7 @@ int getsdir(const char *dirpath, const char *pattern, int sortflags, - if (!*datptr) - { - free(*datptr); -+ closedir(dirp); - return -1; - } - --- -2.14.4 - diff --git a/0005-Fix-a-read-past-end-of-buffer.patch b/0005-Fix-a-read-past-end-of-buffer.patch deleted file mode 100644 index 5781a8c..0000000 --- a/0005-Fix-a-read-past-end-of-buffer.patch +++ /dev/null @@ -1,38 +0,0 @@ -From fa8feee1fce1c6e728512d9e6c0bfffa89f0ce62 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 13 Aug 2018 14:39:46 +0200 -Subject: [PATCH 5/7] Fix a read past end of buffer -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ondřej Lysoněk ---- - src/ascii-xfr.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/ascii-xfr.c b/src/ascii-xfr.c -index ca27ebf..79af763 100644 ---- a/src/ascii-xfr.c -+++ b/src/ascii-xfr.c -@@ -207,7 +207,7 @@ int arecv(char *file) - } - - while ((n = read(STDIN_FILENO, line, sizeof(line))) > 0) { -- for (s = line; n-- >0; s++) { -+ for (s = line; s - line < n; s++) { - if (*s == eofchar) - break; - if (dotrans && *s == '\r') -@@ -217,7 +217,7 @@ int arecv(char *file) - } - stats(first); - first = 0; -- if (*s == eofchar) -+ if (s - line < n && *s == eofchar) - break; - } - fclose(fp); --- -2.14.4 - diff --git a/0006-Fix-a-warning-about-an-unused-variable.patch b/0006-Fix-a-warning-about-an-unused-variable.patch deleted file mode 100644 index c3fc188..0000000 --- a/0006-Fix-a-warning-about-an-unused-variable.patch +++ /dev/null @@ -1,30 +0,0 @@ -From a4e1679b67db6ecd7ce2891ed0bf5586125a9a08 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Mon, 13 Aug 2018 14:39:47 +0200 -Subject: [PATCH 6/7] Fix a warning about an unused variable -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ondřej Lysoněk ---- - src/config.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/config.c b/src/config.c -index ea939c8..36b6e37 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -536,7 +536,9 @@ static void doserial(void) - { - WIN *w; - char *serial_device = _(" A - Serial Device :"); -+#if !HAVE_LOCKDEV - char *lockfile_location = _(" B - Lockfile Location :"); -+#endif - char *callin_program = _(" C - Callin Program :"); - char *callout_program = _(" D - Callout Program :"); - char *bps_par_bits = _(" E - Bps/Par/Bits :"); --- -2.14.4 - diff --git a/0007-loadconv-Add-missing-fclose.patch b/0007-loadconv-Add-missing-fclose.patch deleted file mode 100644 index f37661e..0000000 --- a/0007-loadconv-Add-missing-fclose.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1c97e4df9e01c5f22a12fb6ecce25b4d80fd8f7c Mon Sep 17 00:00:00 2001 -From: Adam Lackorzynski -Date: Mon, 13 Aug 2018 14:39:48 +0200 -Subject: [PATCH 7/7] loadconv: Add missing fclose() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Issue found and reported by David Binderman. - -This is a backport of commit f66b5c78. - -Signed-off-by: Ondřej Lysoněk ---- - src/config.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/config.c b/src/config.c -index 36b6e37..0da4989 100644 ---- a/src/config.c -+++ b/src/config.c -@@ -1865,6 +1865,7 @@ void doconv(void) - int loadconv(char *buf) - { - FILE *fp; -+ int err = 0; - - if ((fp = fopen(pfix_home(buf), "rb")) == (FILE *)NULL) { - werror(_("Cannot open conversion table %s"), pfix_home(buf)); -@@ -1874,10 +1875,11 @@ int loadconv(char *buf) - || fread(vt_outmap, sizeof(vt_outmap), (size_t)1, fp) != 1) - { - werror(_("Cannot read conversion table %s"), pfix_home(buf)); -- return 1; -+ err = 1; - } -+ - fclose(fp); -- return 0; -+ return err; - } - - int saveconv(char *buf) --- -2.14.4 - diff --git a/minicom.spec b/minicom.spec index 761b6b0..07ad215 100644 --- a/minicom.spec +++ b/minicom.spec @@ -1,7 +1,7 @@ Summary: A text-based modem control and terminal emulation program Name: minicom -Version: 2.7.1 -Release: 17%{?dist} +Version: 2.8 +Release: 1%{?dist} URL: https://salsa.debian.org/minicom-team/minicom # Some files are built from Public Domain files in addition to GPLv2+ files # (/usr/bin/minicom). Some LGPLv2+ files *may* be used in building of certain @@ -11,28 +11,7 @@ URL: https://salsa.debian.org/minicom-team/minicom License: GPLv2+ and LGPLv2+ and Public Domain #ExcludeArch: s390 s390x -Source0: https://alioth.debian.org/frs/download.php/file/4215/%{name}-%{version}.tar.gz - -# Upstream patch: -Patch1: 0001-Add-a-missing-va_end-call.patch -# Upstream patch: -Patch2: 0002-Make-sure-strings-copied-by-strncpy-are-null-termina.patch -# Upstream patch: -Patch3: 0003-Fix-file-descriptor-leaks.patch -# Upstream patch: -Patch4: 0004-Fix-a-directory-handle-leak.patch -# Upstream patch: -Patch5: 0005-Fix-a-read-past-end-of-buffer.patch -# Upstream patch: -Patch6: 0006-Fix-a-warning-about-an-unused-variable.patch -# Upstream patch: -Patch7: 0007-loadconv-Add-missing-fclose.patch -# Upstream patch: -Patch8: 0001-Drop-superfluous-global-variable-definitions.patch -# Upstream patch: -Patch9: 0002-Drop-superfluous-global-variable-definitions.patch -# Upstream patch: -Patch10: 0003-Drop-superfluous-global-variable-definitions.patch +Source0: https://salsa.debian.org/minicom-team/minicom/-/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: make BuildRequires: lockdev-devel ncurses-devel autoconf automake gettext-devel @@ -87,6 +66,9 @@ mkdir -p %{buildroot}%{_sysconfdir} %changelog +* Thu May 26 2022 Jan Zerdik - 2.8-1 +- Rebuilt to new upstream version 2.8 fixes rhbz#1913187 + * Thu Jan 20 2022 Fedora Release Engineering - 2.7.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index b0afc73..ca21acc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (minicom-2.7.1.tar.gz) = b429b32d187c3ee915c5074a0d0f08b7e3951cb8528ecbdd889837ff301662c16740ad77bd2bf3baf759c0a84e779a8dc8fd888a4260a0ace15ebc4c2f697c82 +SHA512 (minicom-2.8.tar.gz) = 5ced0ff79cec11464154561130ddc6a38865170d4e4d80185ada540ba173fe89e35703b6d7fd0cf86caef6e020fcad1d7b1fdb4d4f55e3ddb906aea6a4b81b36