[packages/sharutils] Rel 3

arekm arekm at pld-linux.org
Mon Mar 9 20:54:36 CET 2026


commit 56641069c664d72be62656d4f504f14ec629ceb3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Mar 9 20:54:23 2026 +0100

    Rel 3

 ...ix-a-heap-buffer-overflow-in-find_archive.patch |  58 ++++++
 ...kport-stdbool.m4-from-gnulib-devel-0-52.2.patch | 210 +++++++++++++++++++++
 ...-4.15.2-ISO-C23-Port-getcwd.m4-to-ISO-C23.patch |  44 +++++
 ...s-4.15.2-ISO-C23-Port-the-code-to-ISO-C23.patch | 132 +++++++++++++
 ...tils-4.15.2-fix-automake-1.18-am-depfiles.patch |  25 +++
 sharutils-system-libopts.patch                     |  29 +++
 sharutils.spec                                     |  27 ++-
 7 files changed, 524 insertions(+), 1 deletion(-)
---
diff --git a/sharutils.spec b/sharutils.spec
index f02106e..e4a853e 100644
--- a/sharutils.spec
+++ b/sharutils.spec
@@ -9,7 +9,7 @@ Summary(tr.UTF-8):	Arşivleme ve kabuk araçları
 Summary(uk.UTF-8):	Утиліти GNU shar для створення та розпаковки shell-архівів
 Name:		sharutils
 Version:	4.15.2
-Release:	2
+Release:	3
 License:	GPL v3+
 Group:		Applications/File
 Source0:	https://ftp.gnu.org/gnu/sharutils/%{name}-%{version}.tar.xz
@@ -21,7 +21,22 @@ Patch1:		%{name}-pl.po-update.patch
 Patch2:		%{name}-format.patch
 Patch3:		glibc-2.28.patch
 Patch4:		%{name}-4.15.2-Fix-building-with-GCC-10.patch
+# Fedora: CVE-2018-1000097 heap buffer overflow in find_archive()
+Patch5:		%{name}-4.15.2-Fix-a-heap-buffer-overflow-in-find_archive.patch
+# Fedora: ISO C23 build fixes for GCC 15+ (m4 macros)
+Patch6:		%{name}-4.15.2-ISO-C23-Backport-stdbool.m4-from-gnulib-devel-0-52.2.patch
+Patch7:		%{name}-4.15.2-ISO-C23-Port-getcwd.m4-to-ISO-C23.patch
+# Fedora: ISO C23 code fixes (K&R prototypes)
+Patch8:		%{name}-4.15.2-ISO-C23-Port-the-code-to-ISO-C23.patch
+Patch9:		%{name}-4.15.2-fix-automake-1.18-am-depfiles.patch
+# Use system libopts (autogen package) to fix build with modern autogen templates
+# (AO_TEMPLATE_VERSION vs OPTIONS_STRUCT_VERSION)
+Patch10:	%{name}-system-libopts.patch
 URL:		http://www.gnu.org/software/sharutils/
+BuildRequires:	autoconf >= 2.50
+BuildRequires:	autogen
+BuildRequires:	autogen-devel
+BuildRequires:	automake
 BuildRequires:	gettext-tools >= 0.19.3
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	texinfo
@@ -97,10 +112,20 @@ programlar üzerinden güvenli bir şekilde gönderilebilir.
 %patch -P2 -p1
 %patch -P3 -p1
 %patch -P4 -p1
+%patch -P5 -p1
+%patch -P6 -p1
+%patch -P7 -p1
+%patch -P8 -p1
+%patch -P9 -p1
+%patch -P10 -p1
 
 %{__rm} po/stamp-po
 
 %build
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure
 
 %{__make}
diff --git a/sharutils-4.15.2-Fix-a-heap-buffer-overflow-in-find_archive.patch b/sharutils-4.15.2-Fix-a-heap-buffer-overflow-in-find_archive.patch
new file mode 100644
index 0000000..bf9d583
--- /dev/null
+++ b/sharutils-4.15.2-Fix-a-heap-buffer-overflow-in-find_archive.patch
@@ -0,0 +1,58 @@
+From 1067cdba6d08f2a765cb0ea371189a5b703eb4db Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Thu, 22 Feb 2018 16:39:43 +0100
+Subject: [PATCH] Fix a heap-buffer-overflow in find_archive()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+rw_buffer has allocated rw_base_size bytes. But subsequend fgets() in
+find_archive() reads up-to BUFSIZ bytes.
+
+On my system, BUFSIZ is 8192. rw_base_size is usually equaled to
+a memory page size, 4096 on my system. Thus find_archive() can write
+beyonded allocated memmory for rw_buffer array:
+
+$ valgrind -- ./unshar /tmp/id\:000000\,sig\:06\,src\:000005+000030\,op\:splice\,rep\:4
+==30582== Memcheck, a memory error detector
+==30582== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
+==30582== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
+==30582== Command: ./unshar /tmp/id:000000,sig:06,src:000005+000030,op:splice,rep:4
+==30582==
+==30582== Invalid write of size 1
+==30582==    at 0x4EAB480: _IO_getline_info (in /usr/lib64/libc-2.27.so)
+==30582==    by 0x4EB47C2: fgets_unlocked (in /usr/lib64/libc-2.27.so)
+==30582==    by 0x10BF60: fgets_unlocked (stdio2.h:320)
+==30582==    by 0x10BF60: find_archive (unshar.c:243)
+==30582==    by 0x10BF60: unshar_file (unshar.c:379)
+==30582==    by 0x10BCCC: validate_fname (unshar-opts.c:604)
+==30582==    by 0x10BCCC: main (unshar-opts.c:639)
+==30582==  Address 0x523a790 is 0 bytes after a block of size 4,096 alloc'd
+==30582==    at 0x4C2DBBB: malloc (vg_replace_malloc.c:299)
+==30582==    by 0x10C670: init_unshar (unshar.c:450)
+==30582==    by 0x10BC55: main (unshar-opts.c:630)
+
+This was reported in
+<http://lists.gnu.org/archive/html/bug-gnu-utils/2018-02/msg00004.html>.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ src/unshar.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/unshar.c b/src/unshar.c
+index 80bc3a9..0fc3773 100644
+--- a/src/unshar.c
++++ b/src/unshar.c
+@@ -240,7 +240,7 @@ find_archive (char const * name, FILE * file, off_t start)
+       off_t position = ftello (file);
+ 
+       /* Read next line, fail if no more and no previous process.  */
+-      if (!fgets (rw_buffer, BUFSIZ, file))
++      if (!fgets (rw_buffer, rw_base_size, file))
+ 	{
+ 	  if (!start)
+ 	    error (0, 0, _("Found no shell commands in %s"), name);
+-- 
+2.13.6
+
diff --git a/sharutils-4.15.2-ISO-C23-Backport-stdbool.m4-from-gnulib-devel-0-52.2.patch b/sharutils-4.15.2-ISO-C23-Backport-stdbool.m4-from-gnulib-devel-0-52.2.patch
new file mode 100644
index 0000000..394e229
--- /dev/null
+++ b/sharutils-4.15.2-ISO-C23-Backport-stdbool.m4-from-gnulib-devel-0-52.2.patch
@@ -0,0 +1,210 @@
+From 17788304f96fca8b1b83e04ce6d99980027062b9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Mon, 3 Mar 2025 17:58:11 +0100
+Subject: [PATCH 1/3] ISO C23: Backport stdbool.m4 from
+ gnulib-devel-0-52.20230709git.fc42.noarch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The bundled gnulib check for stdbool.h did not account for ISO C23
+which provides its own false and true keywords. As a result stdbool.h
+presence was not correctly detected and libopts/compat/compat.h,
+bundled from AutoGen, failed to compile with GCC 15 which defaults to
+ISO C23:
+
+    In file included from autoopts/project.h:30,
+		     from libopts.c:2:
+    ./compat/compat.h:188:19: error: cannot use keyword ‘false’ as enumeration constant
+      188 |    typedef enum { false = 0, true = 1 } _Bool;
+	  |                   ^~~~~
+    ./compat/compat.h:188:19: note: ‘false’ is a keyword with ‘-std=c23’ onwards
+    ./compat/compat.h:188:41: error: expected ‘;’, identifier or ‘(’ before ‘_Bool’
+      188 |    typedef enum { false = 0, true = 1 } _Bool;
+	  |                                         ^~~~~
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ m4/stdbool.m4 | 129 +++++++++++++++++++++++++++++---------------------
+ 1 file changed, 74 insertions(+), 55 deletions(-)
+
+diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
+index 7273b82..8e00e4a 100644
+--- a/m4/stdbool.m4
++++ b/m4/stdbool.m4
+@@ -1,27 +1,40 @@
+ # Check for stdbool.h that conforms to C99.
+ 
+-dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
++dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+ dnl with or without modifications, as long as this notice is preserved.
+ 
+-#serial 5
++#serial 10
+ 
+ # Prepare for substituting <stdbool.h> if it is not supported.
+ 
+ AC_DEFUN([AM_STDBOOL_H],
+ [
+   AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
++  AC_REQUIRE([AC_CANONICAL_HOST])
+ 
+-  # Define two additional variables used in the Makefile substitution.
+-
++  dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
++  dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
++  dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
++  dnl replacement, also in C mode (for binary compatibility between C and C++).
+   if test "$ac_cv_header_stdbool_h" = yes; then
+-    STDBOOL_H=''
++    case "$host_os" in
++      solaris*)
++        if test -z "$GCC"; then
++          GL_GENERATE_STDBOOL_H=true
++        else
++          GL_GENERATE_STDBOOL_H=false
++        fi
++        ;;
++      *)
++        GL_GENERATE_STDBOOL_H=false
++        ;;
++    esac
+   else
+-    STDBOOL_H='stdbool.h'
++    GL_GENERATE_STDBOOL_H=true
+   fi
+-  AC_SUBST([STDBOOL_H])
+-  AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"])
++  AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test "$GL_GENERATE_STDBOOL_H" = "true"])
+ 
+   if test "$ac_cv_type__Bool" = yes; then
+     HAVE__BOOL=1
+@@ -31,70 +44,76 @@ AC_DEFUN([AM_STDBOOL_H],
+   AC_SUBST([HAVE__BOOL])
+ ])
+ 
+-# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
+-AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
+-
+-# This version of the macro is needed in autoconf <= 2.68.
++m4_version_prereq([2.72], [], [
+ 
+ AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
+-  [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
++  [AC_CHECK_TYPES([_Bool])
++   AC_CACHE_CHECK([for stdbool.h that conforms to C99 or later],
+      [ac_cv_header_stdbool_h],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+-           [[
+-             #include <stdbool.h>
+-             #ifndef bool
+-              "error: bool is not defined"
++           [[#include <stdbool.h>
++
++             /* "true" and "false" should be usable in #if expressions and
++                integer constant expressions, and "bool" should be a valid
++                type name.
++
++                Although C99 requires bool, true, and false to be macros,
++                C23 and C++11 overrule that, so do not test for that.
++                Although C99 requires __bool_true_false_are_defined and
++                _Bool, C23 says they are obsolescent, so do not require
++                them.  */
++
++             #if !true
++               #error "'true' is not true"
+              #endif
+-             #ifndef false
+-              "error: false is not defined"
++             #if true != 1
++               #error "'true' is not equal to 1"
+              #endif
++             char b[true == 1 ? 1 : -1];
++             char c[true];
++
+              #if false
+-              "error: false is not 0"
++               #error "'false' is not false"
+              #endif
+-             #ifndef true
+-              "error: true is not defined"
+-             #endif
+-             #if true != 1
+-              "error: true is not 1"
+-             #endif
+-             #ifndef __bool_true_false_are_defined
+-              "error: __bool_true_false_are_defined is not defined"
++             #if false != 0
++               #error "'false' is not equal to 0"
+              #endif
++             char d[false == 0 ? 1 : -1];
++
++             enum { e = false, f = true, g = false * true, h = true * 256 };
++
++             char i[(bool) 0.5 == true ? 1 : -1];
++             char j[(bool) 0.0 == false ? 1 : -1];
++             char k[sizeof (bool) > 0 ? 1 : -1];
++
++             struct sb { bool s: 1; bool t; } s;
++             char l[sizeof s.t > 0 ? 1 : -1];
+ 
+-             struct s { _Bool s: 1; _Bool t; } s;
+-
+-             char a[true == 1 ? 1 : -1];
+-             char b[false == 0 ? 1 : -1];
+-             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+-             char d[(bool) 0.5 == true ? 1 : -1];
+-             /* See body of main program for 'e'.  */
+-             char f[(_Bool) 0.0 == false ? 1 : -1];
+-             char g[true];
+-             char h[sizeof (_Bool)];
+-             char i[sizeof s.t];
+-             enum { j = false, k = true, l = false * true, m = true * 256 };
+              /* The following fails for
+                 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+-             _Bool n[m];
+-             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+-             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
++             bool m[h];
++             char n[sizeof m == h * sizeof m[0] ? 1 : -1];
++             char o[-1 - (bool) 0 < 0 ? 1 : -1];
+              /* Catch a bug in an HP-UX C compiler.  See
+-                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+-                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
++                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
++                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
+               */
+-             _Bool q = true;
+-             _Bool *pq = &q;
++             bool p = true;
++             bool *pp = &p;
+            ]],
+            [[
+-             bool e = &s;
+-             *pq |= q;
+-             *pq |= ! q;
+-             /* Refer to every declared value, to avoid compiler optimizations.  */
+-             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+-                     + !m + !n + !o + !p + !q + !pq);
++             bool ps = &s;
++             *pp |= p;
++             *pp |= ! p;
++
++             /* Refer to every declared value, so they cannot be
++                discarded as unused.  */
++             return (!b + !c + !d + !e + !f + !g + !h + !i + !j + !k
++                     + !l + !m + !n + !o + !p + !pp + !ps);
+            ]])],
+         [ac_cv_header_stdbool_h=yes],
+         [ac_cv_header_stdbool_h=no])])
+-   AC_CHECK_TYPES([_Bool])
+-])
++])# AC_CHECK_HEADER_STDBOOL
++
++]) # m4_version_prereq 2.72
+-- 
+2.48.1
+
diff --git a/sharutils-4.15.2-ISO-C23-Port-getcwd.m4-to-ISO-C23.patch b/sharutils-4.15.2-ISO-C23-Port-getcwd.m4-to-ISO-C23.patch
new file mode 100644
index 0000000..0f94e5c
--- /dev/null
+++ b/sharutils-4.15.2-ISO-C23-Port-getcwd.m4-to-ISO-C23.patch
@@ -0,0 +1,44 @@
+From c6b3af7a1e9119e08a640d9cd93dcb0c984149ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 5 Mar 2025 10:13:08 +0100
+Subject: [PATCH 2/3] ISO C23: Port getcwd.m4 to ISO C23
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some confgure tests failed because of function arguments missing from
+the prototypes:
+
+    configure:16105: checking whether getcwd (NULL, 0) allocates memory for result
+    configure:16162: gcc -o conftest -g -O2   conftest.c  >&5
+    conftest.c:186:16: error: conflicting types for 'getcwd'; have 'char *(void)'
+      186 |          char *getcwd ();
+	  |                ^~~~~~
+    In file included from conftest.c:181:
+    /usr/include/unistd.h:531:14: note: previous declaration of 'getcwd' with type 'char *(char *, size_t)'
+
+This patch fixes it.
+
+Maintainer is encouraged to rebase the m4 files to the latest gnulib.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ m4/getcwd.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
+index b9fbcec..6f24b14 100644
+--- a/m4/getcwd.m4
++++ b/m4/getcwd.m4
+@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
+ #         include <direct.h>
+ #        endif
+ #        ifndef getcwd
+-         char *getcwd ();
++         char *getcwd (char *buf, size_t size);
+ #        endif
+ ]], [[
+ #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+-- 
+2.48.1
+
diff --git a/sharutils-4.15.2-ISO-C23-Port-the-code-to-ISO-C23.patch b/sharutils-4.15.2-ISO-C23-Port-the-code-to-ISO-C23.patch
new file mode 100644
index 0000000..8c7f1ba
--- /dev/null
+++ b/sharutils-4.15.2-ISO-C23-Port-the-code-to-ISO-C23.patch
@@ -0,0 +1,132 @@
+From bd072f85a75568eee2ddd7466a041ad91f38f0ce Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Mon, 3 Mar 2025 18:06:08 +0100
+Subject: [PATCH 3/3] ISO C23: Port the code to ISO C23
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With GCC 15, which defaults to ISO 23, a build failed, for example like
+this:
+
+    gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I..  -I../libopts -I. -I.. -I../lib -I
+    ../lib -I../intl  -Wno-format-contains-nul -g -O2 -Wno-format-contains-nul -c -o shar.o shar.c
+    In file included from local.h:23,
+		     from shar-opts.h:354,
+		     from shar.c:46:
+    ../lib/system.h:78:7: error: conflicting types for ‘fdopen’; have ‘FILE *(void)’
+       78 | FILE *fdopen ();
+	  |       ^~~~~~
+
+The cause is that ISO C23 changed a meaning of an empty argument list
+from an unspecified list to no arguments.
+
+Also K&R syntax is now deprecated and the compiler warned:
+
+    encode.c: In function ‘write_encoded_bytes’:
+    encode.c:33:1: warning: old-style function definition [-Wold-style-definition]
+       33 | write_encoded_bytes (group, file)
+	  | ^~~~~~~~~~~~~~~~~~~
+
+This patch fixes both the erros and the warnigs by specifying all the
+arguments in the modern syntax.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/system.h   |  6 +++---
+ src/encode.c   | 13 +++----------
+ src/shar.c     |  2 +-
+ src/uudecode.c |  2 +-
+ 4 files changed, 8 insertions(+), 15 deletions(-)
+
+diff --git a/lib/system.h b/lib/system.h
+index 2b9846b..811e8cf 100644
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -52,7 +52,7 @@ typedef enum {false = 0, true = 1} bool;
+ #endif
+ 
+ #if !HAVE_DECL_STRTOIMAX && !defined strtoimax
+-intmax_t strtoimax ();
++intmax_t strtoimax (const char *nptr, char **endptr, int base);
+ #endif
+ 
+ #if HAVE_STRING_H
+@@ -75,8 +75,8 @@ intmax_t strtoimax ();
+ # include <unistd.h>
+ #endif
+ 
+-FILE *fdopen ();
+-FILE *popen ();
++FILE *fdopen (int fd, const char *mode);
++FILE *popen (const char *command, const char *type);
+ 
+ /* Global functions of the shar package.  */
+ 
+diff --git a/src/encode.c b/src/encode.c
+index 09e0c69..b1de8bd 100644
+--- a/src/encode.c
++++ b/src/encode.c
+@@ -30,9 +30,7 @@
+ `------------------------------------------*/
+ 
+ static void
+-write_encoded_bytes (group, file)
+-     char *group;
+-     FILE *file;
++write_encoded_bytes (char *group, FILE *file)
+ {
+   int c1, c2, c3, c4;
+ 
+@@ -52,10 +50,7 @@ write_encoded_bytes (group, file)
+ `--------------------------------------------------------------------*/
+ 
+ static int
+-read_raw_bytes (file, buffer, buffer_size)
+-     FILE *file;
+-     char *buffer;
+-     int buffer_size;
++read_raw_bytes (FILE *file, char *buffer, int buffer_size)
+ {
+   int character;
+   int counter;
+@@ -75,9 +70,7 @@ read_raw_bytes (file, buffer, buffer_size)
+ `----------------------------------------------------*/
+ 
+ void
+-copy_file_encoded (input, output)
+-     FILE *input;
+-     FILE *output;
++copy_file_encoded (FILE *input, FILE *output)
+ {
+   char buffer[LINE_BUFFER_SIZE];
+   int counter;
+diff --git a/src/shar.c b/src/shar.c
+index 6d7ed1d..2c6e2e1 100644
+--- a/src/shar.c
++++ b/src/shar.c
+@@ -109,7 +109,7 @@ static inline unsigned char to_uchar (char ch) { return ch; }
+ #define IS_GRAPH(_c) (isprint (to_uchar (_c)) && !isspace (to_uchar (_c)))
+ #endif
+ 
+-struct tm *localtime ();
++struct tm *localtime (const time_t *timep);
+ 
+ #if MSDOS
+           /* 1 extra for CR.  */
+diff --git a/src/uudecode.c b/src/uudecode.c
+index 0621c99..b8a316e 100644
+--- a/src/uudecode.c
++++ b/src/uudecode.c
+@@ -82,7 +82,7 @@ static char const cright_years_z[] =
+ #define UU_CHMOD(_n, _fd, _m)   chmod ((_n), UU_MODE_BITS(_m))
+ #endif
+ 
+-struct passwd *getpwnam ();
++struct passwd *getpwnam (const char *name);
+ 
+ static uudecode_exit_code_t read_stduu(
+         const char *inname, const char *outname);
+-- 
+2.48.1
+
diff --git a/sharutils-4.15.2-fix-automake-1.18-am-depfiles.patch b/sharutils-4.15.2-fix-automake-1.18-am-depfiles.patch
new file mode 100644
index 0000000..0117e23
--- /dev/null
+++ b/sharutils-4.15.2-fix-automake-1.18-am-depfiles.patch
@@ -0,0 +1,25 @@
+--- sharutils-4.15.2.orig/src/Makefile.am	2014-12-06 17:42:20.000000000 +0100
++++ sharutils-4.15.2/src/Makefile.am	2026-03-09 17:32:34.430414773 +0100
+@@ -53,18 +53,18 @@
+ if AMDEP
+ if UUCODE
+ ENCODE_DEP_ARG  = -MF$(DEPDIR)/uuencode-opts.dep -MP -MT$@
+- at am__include@ @am__quote at ./$(DEPDIR)/uuencode-opts.dep at am__quote@
++-include ./$(DEPDIR)/uuencode-opts.dep
+ 
+ DECODE_DEP_ARG  = -MF$(DEPDIR)/uudecode-opts.dep -MP -MT$@
+- at am__include@ @am__quote at ./$(DEPDIR)/uudecode-opts.dep at am__quote@
++-include ./$(DEPDIR)/uudecode-opts.dep
+ endif
+ # UUCODE
+ 
+ SHAR_DEP_ARG  = -MF$(DEPDIR)/shar-opts.dep -MP
+- at am__include@ @am__quote at ./$(DEPDIR)/shar-opts.dep at am__quote@
++-include ./$(DEPDIR)/shar-opts.dep
+ 
+ UNSHAR_DEP_ARG  = -MF$(DEPDIR)/unshar-opts.dep -MP
+- at am__include@ @am__quote at ./$(DEPDIR)/unshar-opts.dep at am__quote@
++-include ./$(DEPDIR)/unshar-opts.dep
+ 
+ else
+ # AMDEP
diff --git a/sharutils-system-libopts.patch b/sharutils-system-libopts.patch
new file mode 100644
index 0000000..625bc16
--- /dev/null
+++ b/sharutils-system-libopts.patch
@@ -0,0 +1,29 @@
+--- sharutils-4.15.2/Makefile.am.orig	2014-02-02 20:25:31.000000000 +0100
++++ sharutils-4.15.2/Makefile.am	2026-03-09 20:46:46.139689035 +0100
+@@ -17,5 +17,5 @@
+ ## Process this file with automake to produce Makefile.in.
+ 
+ EXTRA_DIST      = config.rpath m4 $(DIST_ALPHA)
+-SUBDIRS         = intl lib libopts src doc po tests
++SUBDIRS         = intl lib src doc po tests
+ ACLOCAL_AMFLAGS = -I m4
+--- sharutils-4.15.2/src/Makefile.am.orig	2026-03-09 20:43:07.391963037 +0100
++++ sharutils-4.15.2/src/Makefile.am	2026-03-09 20:46:46.145284393 +0100
+@@ -24,7 +24,7 @@
+ # But libgnu.a must also follow $(LIBINTL), since libintl uses
+ # replacement functions defined in libgnu.a.
+ 
+-LDADD = $(top_builddir)/libopts/libopts.a $(top_builddir)/lib/libgnu.a \
++LDADD = -lopts $(top_builddir)/lib/libgnu.a \
+ 	$(top_builddir)/lib/libgnu.a \
+ 	$(GETHOSTNAME_LIB) $(LIBSOCKET) $(LIB_CRYPTO) $(LIBINTL)
+ 
+@@ -90,7 +90,7 @@
+ 
+ localedir   = $(datadir)/locale
+ 
+-AOINC       = -I$(top_srcdir)/libopts
++AOINC       = 
+ 
+ # `autoopts-config cflags`
+ AM_CPPFLAGS = $(AOINC) -I$(srcdir) -I$(top_builddir) \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sharutils.git/commitdiff/56641069c664d72be62656d4f504f14ec629ceb3



More information about the pld-cvs-commit mailing list