[packages/unarj] Up to 2.65
arekm
arekm at pld-linux.org
Sun Aug 9 13:50:36 CEST 2026
commit ad1af9862f29134c02b6d08577f5c198b2bd9a9c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Aug 9 13:50:20 2026 +0200
Up to 2.65
format-security.patch | 4 ++--
types.patch | 4 ++--
unarj-opt.patch | 11 -----------
unarj-path.patch | 20 --------------------
unarj-subdir.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
unarj.spec | 18 +++++++++---------
6 files changed, 57 insertions(+), 44 deletions(-)
---
diff --git a/unarj.spec b/unarj.spec
index d14af8c..c1679a2 100644
--- a/unarj.spec
+++ b/unarj.spec
@@ -8,13 +8,13 @@ Summary(ru.UTF-8): Декомпрессор для архивных файлов
Summary(tr.UTF-8): ARJ biçimindeki arşivleri açan araç
Summary(uk.UTF-8): Декомпресор для архівних файлів формату .arj
Name: unarj
-Version: 2.63a
-Release: 5
+Version: 2.65
+Release: 1
License: distributable
Group: Applications/Archiving
-Source0: ftp://sunsite.unc.edu/pub/Linux/utils/compress/%{name}-%{version}.tar.gz
-# Source0-md5: a83d139c245f911f22cb1b611ec9768f
-Patch0: %{name}-opt.patch
+Source0: https://ftp.netbsd.org/pub/pkgsrc/distfiles/%{name}-%{version}.tar.gz
+# Source0-md5: c8fca20809286881c27020046b559a62
+Patch0: %{name}-subdir.patch
Patch1: %{name}-overflow.patch
Patch2: %{name}-path.patch
Patch3: format-security.patch
@@ -66,10 +66,10 @@ tabanlı makinelerde sıkça kullanılan bir sıkıştırma biçimidir.
%patch -P4 -p1
%build
-%{__make} \
- CC="%{__cc}" \
- CFLAGS="-Wall -ansi -pedantic -DUNIX %{rpmcflags}" \
- LDFLAGS="%{rpmldflags}"
+# upstream ships no Unix makefile; -ansi because the sources are K&R style,
+# which C23 (gcc default) no longer accepts
+%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags} -ansi -DUNIX \
+ -o unarj unarj.c decode.c environ.c sanitize.c
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/format-security.patch b/format-security.patch
index 851d9fb..9522523 100644
--- a/format-security.patch
+++ b/format-security.patch
@@ -1,5 +1,5 @@
---- unarj-2.63a/unarj.c.orig 2015-01-01 11:59:19.488304823 +0000
-+++ unarj-2.63a/unarj.c 2015-01-01 12:00:52.224968219 +0000
+--- unarj-2.65/unarj.c.orig
++++ unarj-2.65/unarj.c
@@ -703,7 +703,7 @@
}
if ((arj_flags & GARBLE_FLAG) != 0)
diff --git a/types.patch b/types.patch
index d05a80c..13f8b32 100644
--- a/types.patch
+++ b/types.patch
@@ -1,5 +1,5 @@
---- unarj-2.63a/environ.c.orig 2000-10-02 12:33:08.000000000 +0000
-+++ unarj-2.63a/environ.c 2015-01-01 12:08:50.374951350 +0000
+--- unarj-2.65/environ.c.orig
++++ unarj-2.65/environ.c
@@ -430,16 +430,11 @@
#define SUBS_DEFINED
diff --git a/unarj-opt.patch b/unarj-opt.patch
deleted file mode 100644
index 23fa908..0000000
--- a/unarj-opt.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- unarj241a/Makefile~ Sun Apr 10 11:03:43 1994
-+++ unarj241a/Makefile Tue Oct 13 21:55:45 1998
-@@ -4,7 +4,7 @@
- #
-
- CC = gcc
--CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX
-+CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX $(OPT_FLAGS)
- INSTALLDIR=/usr/local/bin
-
- unarj: unarj.o decode.o environ.o
diff --git a/unarj-path.patch b/unarj-path.patch
index e8b36f0..148befe 100644
--- a/unarj-path.patch
+++ b/unarj-path.patch
@@ -111,23 +111,3 @@ Index: unarj-2.65/unarj.c
}
if (host_os != OS)
-Index: unarj-2.65/Makefile
-===================================================================
---- unarj-2.65.orig/Makefile
-+++ unarj-2.65/Makefile
-@@ -6,8 +6,8 @@ CC = gcc
- CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX
- INSTALLDIR=/usr/local/bin
-
--unarj: unarj.o decode.o environ.o
-- $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o
-+unarj: unarj.o decode.o environ.o sanitize.o
-+ $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o sanitize.o
- strip unarj
-
- clean:
-@@ -19,3 +19,4 @@ install:
- unarj.o: unarj.c unarj.h Makefile
- environ.o: environ.c unarj.h Makefile
- decode.o: decode.c unarj.h Makefile
-+sanitize.o: sanitize.c unarj.h Makefile
diff --git a/unarj-subdir.patch b/unarj-subdir.patch
new file mode 100644
index 0000000..a4bff7d
--- /dev/null
+++ b/unarj-subdir.patch
@@ -0,0 +1,44 @@
+--- unarj-2.65/unarj.c.orig
++++ unarj-2.65/unarj.c
+@@ -54,6 +54,10 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
++#include <sys/stat.h>
++#include <sys/types.h>
++#include <fcntl.h>
++#include <unistd.h>
+ #else /* !MODERN */
+ extern void free();
+ extern void exit();
+@@ -718,6 +722,8 @@
+ extract()
+ {
+ char name[FNAME_MAX];
++ char dir[FNAME_MAX];
++ char *pos;
+
+ if (check_flags())
+ {
+@@ -737,6 +743,21 @@
+ if (host_os != OS)
+ default_case_path(name);
+
++
++ /*
++ 8/8/2000 Phil Knirsch: Bugfix to create subdirectories. Unarj didn't
++ do this for a long time, so it's finally fixed.
++ */
++ pos = strchr(name, PATH_CHAR);
++
++ while (pos != NULL)
++ {
++ strncpy(dir, name, pos-name);
++ dir[pos-name] = '\0';
++ mkdir(dir, 0777);
++ pos = strchr(pos+1, PATH_CHAR);
++ }
++
+ if (file_exists(name))
+ {
+ printf(M_FEXISTS, name);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/unarj.git/commitdiff/ad1af9862f29134c02b6d08577f5c198b2bd9a9c
More information about the pld-cvs-commit
mailing list