Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
79d1910792
!11 sync codebase from master
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-12-10 12:25:19 +00:00
openeuler-ci-bot
90556da322
!4 add buildrequires on makeinfo
From: @fundawang 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2024-10-11 09:55:48 +00:00
Funda Wang
80ca7d3292 add buildrequires on makeinfo 2024-10-11 13:11:53 +08:00
openeuler-ci-bot
579153e4de !3 修复gcc升级到10.3.0之后的构建失败问题
From: @tong_1001
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-07-31 09:03:21 +00:00
shixuantong
82ce75b68c Fix building with GCC 10 2021-07-31 16:50:22 +08:00
openeuler-ci-bot
162e44f625 !2 add yaml file in package
Merge pull request !2 from Markeryang/master
2020-07-06 09:13:55 +08:00
Markeryang
e3005359f2 add sharutils.yaml. 2020-07-02 18:49:35 +08:00
openeuler-ci-bot
3d9e17fc20 !1 backport patch from community
Merge pull request !1 from chengquan/dev
2020-01-12 09:56:39 +08:00
梳碧湖的砍柴人
34785a1e84 backport patch from community 2020-01-11 17:35:55 +08:00
zhuchunyi
1f25d7f957 update code 2019-11-06 19:52:40 +08:00
4 changed files with 169 additions and 11 deletions

View File

@ -0,0 +1,39 @@
From 4c47a36fb6e2e4349995376cee063bb37d4e68e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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
<https://lists.gnu.org/archive/html/bug-gnu-utils/2020-01/msg00001.html>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
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

View File

@ -0,0 +1,97 @@
From ec4ceb632abc0d54061269bc779459e13172f264 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Thu, 23 Jan 2020 15:42:41 +0100
Subject: [PATCH 1/2] Fix building with GCC 10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 10 defaults to -fno-common that results into errors on multiple
global variable definitions:
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld:
shar-opts.o:(.data.rel.ro.local+0x0): multiple definition of
`program_name'; shar.o:(.rodata+0x10): first defined here
This patch fixes it by changing the definitions in header files into extern
declarations.
<https://lists.gnu.org/archive/html/bug-gnu-utils/2020-01/msg00001.html>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/shar-opts.h | 2 +-
src/shar-std.def | 2 +-
src/unshar-opts.h | 2 +-
src/uudecode-opts.h | 2 +-
src/uuencode-opts.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/shar-opts.h b/src/shar-opts.h
index 75dcae2..5055d1c 100644
--- a/src/shar-opts.h
+++ b/src/shar-opts.h
@@ -352,7 +352,7 @@ extern "C" {
* global exported definitions
*/
#include "local.h"
-char const * const program_name;
+extern char const * const program_name;
extern bool initialization_done;
extern int optidx;
diff --git a/src/shar-std.def b/src/shar-std.def
index ed06b77..a28f61c 100644
--- a/src/shar-std.def
+++ b/src/shar-std.def
@@ -41,7 +41,7 @@ no-misuse-usage;
usage-message;
die-code;
-export = '#include "local.h"'"\nchar const * const program_name;";
+export = '#include "local.h"'"\nextern char const * const program_name;";
#shell
echo "include = 'char const * const program_name = \"${progname}\";';"
diff --git a/src/unshar-opts.h b/src/unshar-opts.h
index 2c3febe..9ebe2fc 100644
--- a/src/unshar-opts.h
+++ b/src/unshar-opts.h
@@ -192,7 +192,7 @@ extern "C" {
extern size_t separator_str_len;
#include "local.h"
-char const * const program_name;
+extern char const * const program_name;
/* * * * * *
diff --git a/src/uudecode-opts.h b/src/uudecode-opts.h
index 29b3b5c..5494289 100644
--- a/src/uudecode-opts.h
+++ b/src/uudecode-opts.h
@@ -170,7 +170,7 @@ extern "C" {
* global exported definitions
*/
#include "local.h"
-char const * const program_name;
+extern char const * const program_name;
/* * * * * *
diff --git a/src/uuencode-opts.h b/src/uuencode-opts.h
index e71c9b8..d6ec03e 100644
--- a/src/uuencode-opts.h
+++ b/src/uuencode-opts.h
@@ -166,7 +166,7 @@ extern "C" {
* global exported definitions
*/
#include "local.h"
-char const * const program_name;
+extern char const * const program_name;
/* * * * * *
--
2.21.1

View File

@ -1,17 +1,23 @@
Name: sharutils
Version: 4.15.2
Release: 14
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
@ -41,28 +47,39 @@ 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
%license COPYING AUTHORS
%doc README
%{_bindir}/*
%{_infodir}/*info*
%exclude %{_infodir}/dir
%files help
%doc AUTHORS ChangeLog NEWS README THANKS TODO
%{_mandir}/man*
%doc ChangeLog NEWS THANKS TODO
%{_mandir}/man?/*
%changelog
* Fri Oct 11 2024 Funda Wang <fundawang@yeah.net> - 4.15.2-17
- add buildrequires on makeinfo
- do not link md5.o twice into shar executable
* Sat Jul 31 2021 shixuantong <shixuantong@huawei.com> - 4.15.2-16
- Fix building with GCC 10
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.15.2-15
- Package init
* Thu Aug 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.15.2-14
- Package init

5
sharutils.yaml Normal file
View File

@ -0,0 +1,5 @@
version_control: NA
src_repo:
tag_prefix:
separator:
url: https://www.gnu.org/software/sharutils/