diff --git a/backport-Do-not-include-lib-md5.c-into-src-shar.c.patch b/backport-Do-not-include-lib-md5.c-into-src-shar.c.patch new file mode 100644 index 0000000000000000000000000000000000000000..19f77ccce921839f1d8a3a7ca2b1b7001a0e5230 --- /dev/null +++ b/backport-Do-not-include-lib-md5.c-into-src-shar.c.patch @@ -0,0 +1,39 @@ +From 4c47a36fb6e2e4349995376cee063bb37d4e68e3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 23 Jan 2020 15:57:05 +0100 +Subject: [PATCH 2/2] Do not include lib/md5.c into src/shar.c +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +lib/md5.o is part of libgnu.a that is linked to shar. There is no +point in linking md5.o twice into shar executable. Moreover SuSE +reports that this triggers a linking error with GCC 10: + +/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: +../lib/libgnu.a(md5.o): in function `md5_stream': +[ 30s] md5.c:(.text+0x15d): multiple definition of `md5_stream'; +shar.o:shar.c:(.text+0x28): first defined here + + + +Signed-off-by: Petr Písař +--- + src/shar.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/shar.c b/src/shar.c +index 11cbada..6d7ed1d 100644 +--- a/src/shar.c ++++ b/src/shar.c +@@ -53,7 +53,6 @@ static const char cright_years_z[] = + + #include "inttostr.h" + #include "liballoca.h" +-#include "md5.c" + #include "md5.h" + #include "quotearg.h" + #include "xalloc.h" +-- +2.21.1 + diff --git a/backport-Fix-building-with-GCC-10.patch b/backport-Fix-building-with-GCC-10.patch index 5119fe3cbe86dfa73ae61cc5f411233001e962ae..c423fe1a843ff10e230542d14088d91b783c3486 100644 --- a/backport-Fix-building-with-GCC-10.patch +++ b/backport-Fix-building-with-GCC-10.patch @@ -1,4 +1,5 @@ -From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +From ec4ceb632abc0d54061269bc779459e13172f264 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 23 Jan 2020 15:42:41 +0100 Subject: [PATCH 1/2] Fix building with GCC 10 MIME-Version: 1.0 @@ -17,7 +18,7 @@ declarations. -Signed-off-by: Petr Písař +Signed-off-by: Petr Písař --- src/shar-opts.h | 2 +- src/shar-std.def | 2 +- diff --git a/sharutils-4.15.2-fflush-adjust-to-glibc-2.28-libio.h-removal.patch b/sharutils-4.15.2-fflush-adjust-to-glibc-2.28-libio.h-removal.patch index 4b6dbe85a3ee849432fce2642938709d7e49c14b..78e6564c645f3a27604b0f2ddcc33b299517d308 100644 --- a/sharutils-4.15.2-fflush-adjust-to-glibc-2.28-libio.h-removal.patch +++ b/sharutils-4.15.2-fflush-adjust-to-glibc-2.28-libio.h-removal.patch @@ -6,6 +6,62 @@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +Petr Písař: Ported to sharutils-4.15.2 from: + +commit 4af4a4a71827c0bc5e0ec67af23edef4f15cee8e +Author: Paul Eggert +Date: Mon Mar 5 10:56:29 2018 -0800 + + fflush: adjust to glibc 2.28 libio.h removal + +Problem reported by Daniel P. Berrangé in: +https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html +* lib/fbufmode.c (fbufmode): +* lib/fflush.c (clear_ungetc_buffer_preserving_position) +(disable_seek_optimization, rpl_fflush): +* lib/fpending.c (__fpending): +* lib/fpurge.c (fpurge): +* lib/freadable.c (freadable): +* lib/freadahead.c (freadahead): +* lib/freading.c (freading): +* lib/freadptr.c (freadptr): +* lib/freadseek.c (freadptrinc): +* lib/fseeko.c (fseeko): +* lib/fseterr.c (fseterr): +* lib/fwritable.c (fwritable): +* lib/fwriting.c (fwriting): +Check _IO_EOF_SEEN instead of _IO_ftrylockfile. +* lib/stdio-impl.h (_IO_IN_BACKUP) [_IO_EOF_SEEN]: +Define if not already defined. + +commit 74d9d6a293d7462dea8f83e7fc5ac792e956a0ad +Author: Paul Eggert +Date: Thu Mar 8 16:42:45 2018 -0800 + + fflush: be more paranoid about libio.h change + +Suggested by Eli Zaretskii in: +https://lists.gnu.org/r/emacs-devel/2018-03/msg00270.html +* lib/fbufmode.c (fbufmode): +* lib/fflush.c (clear_ungetc_buffer_preserving_position) +(disable_seek_optimization, rpl_fflush): +* lib/fpending.c (__fpending): +* lib/fpurge.c (fpurge): +* lib/freadable.c (freadable): +* lib/freadahead.c (freadahead): +* lib/freading.c (freading): +* lib/freadptr.c (freadptr): +* lib/freadseek.c (freadptrinc): +* lib/fseeko.c (fseeko): +* lib/fseterr.c (fseterr): +* lib/fwritable.c (fwritable): +* lib/fwriting.c (fwriting): +Look at _IO_ftrylockfile as well as at _IO_EOF_SEEN. + +This is needed for glibc-2.28 (First spotted with +glibc-2.27.9000-13.fc29 on Fedora). + +Signed-off-by: Petr Písař --- lib/fflush.c | 9 ++++++--- lib/fpurge.c | 3 ++- diff --git a/sharutils.spec b/sharutils.spec index 629ad968ed17ca0b30e1176132c6c15ce7d2544b..593aee78d399a5190200a22db80ddca999002296 100644 --- a/sharutils.spec +++ b/sharutils.spec @@ -1,18 +1,23 @@ Name: sharutils Version: 4.15.2 -Release: 16 +Release: 17 Summary: The set of GNU shar utilities -License: GPLv3+ and (GPLv3+ and BSD) and (LGPLv3+ or BSD) and LGPLv2+ and Public Domain and GFDL -URL: http://www.gnu.org/software/%{name}/ -Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz +License: GPL-3.0-or-later AND (GPL-3.0-or-later AND BSD-4-Clause) AND (LGPL-3.0-or-later OR BSD-3-Clause) AND LGPL-2.0-or-later AND LGPL-3.0-or-later AND Public Domain AND GFDL-1.3-or-later +URL: https://www.gnu.org/software/sharutils/ +Source0: https://ftp.gnu.org/gnu/sharutils/%{name}-%{version}.tar.xz Source1: LicenseList Patch0: %{name}-4.14.2-Pass-compilation-with-Werror-format-security.patch Patch1: %{name}-4.15.2-Fix-a-heap-buffer-overflow-in-find_archive.patch Patch2: %{name}-4.15.2-fflush-adjust-to-glibc-2.28-libio.h-removal.patch Patch6000: backport-Fix-building-with-GCC-10.patch +Patch6001: backport-Do-not-include-lib-md5.c-into-src-shar.c.patch -BuildRequires: binutils coreutils gcc gettext glibc-common make sed diffutils +BuildRequires: gcc make +BuildRequires: gettext +BuildRequires: sed +BuildRequires: diffutils +BuildRequires: /usr/bin/makeinfo Provides: bundled(gnulib) Provides: bundled(libopts) = 41.1 @@ -42,30 +47,34 @@ done %build %configure -make %{?_smp_mflags} +%make_build %install %make_install +rm -f %{buildroot}%{_infodir}/dir chmod 644 AUTHORS ChangeLog COPYING NEWS README THANKS TODO %find_lang %{name} %check -make check +%make_build check %files -f %{name}.lang %license COPYING AUTHORS %doc README %{_bindir}/* %{_infodir}/*info* -%exclude %{_infodir}/dir %files help %doc ChangeLog NEWS THANKS TODO -%{_mandir}/man* +%{_mandir}/man?/* %changelog +* Fri Oct 11 2024 Funda Wang - 4.15.2-17 +- add buildrequires on makeinfo +- do not link md5.o twice into shar executable + * Sat Jul 31 2021 shixuantong - 4.15.2-16 - Fix building with GCC 10 diff --git a/sharutils.yaml b/sharutils.yaml index 6393a65e8580e1296ab13d2779d6d9d3191b664d..2fcd8da2cf68688de07e886b442923fa038b1378 100644 --- a/sharutils.yaml +++ b/sharutils.yaml @@ -1,5 +1,5 @@ -version_control: NA -src_repo: -tag_prefix: -seperator: -url: https://www.gnu.org/software/sharutils/ \ No newline at end of file +version_control: NA +src_repo: +tag_prefix: +separator: +url: https://www.gnu.org/software/sharutils/