Wednesday, November 03, 2021

Re: [update] archivers/lha to 1.14i-ac20210926

On 13:04 Wed 03 Nov , Stuart Henderson wrote:
> this is invalid, the ac20210926 is in the part of the name that is reserved for flavours

something like this then?

Index: Makefile
===================================================================
RCS file: /cvs/ports/archivers/lha/Makefile,v
retrieving revision 1.39
diff -u -p -u -r1.39 Makefile
--- Makefile 14 Jul 2019 00:39:34 -0000 1.39
+++ Makefile 3 Nov 2021 13:24:58 -0000
@@ -2,9 +2,9 @@

COMMENT= archive files using LZW compression (.lzh files)

-DISTNAME= lha-1.14i-ac20050924p1
-PKGNAME= lha-1.14i.ac20050924.1
-REVISION= 3
+VERSION= 1.14i-ac20210926
+DISTNAME= lha-${VERSION}
+PKGNAME= lha-${VERSION:C/-/./}
CATEGORIES= archivers

HOMEPAGE= https://lha.osdn.jp/
@@ -15,12 +15,12 @@ MAINTAINER= Yozo Toda <yozo@v007.vaio.ne
PERMIT_PACKAGE= Yes
WANTLIB= c

-MASTER_SITES= ${MASTER_SITE_OSDN_JP:=lha/22231/}
-
-CONFIGURE_STYLE=gnu
-
-post-install:
- ${INSTALL_MAN_DIR} ${PREFIX}/man/ja_JP.EUC/man1
- ${INSTALL_MAN} ${WRKSRC}/man/lha.n ${PREFIX}/man/ja_JP.EUC/man1/lha.1
+GH_ACCOUNT = jca02266
+GH_PROJECT = lha
+GH_TAGNAME = release-20210926
+
+CONFIGURE_STYLE=gnu autoreconf
+AUTOCONF_VERSION = 2.71
+AUTOMAKE_VERSION = 1.16

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/archivers/lha/distinfo,v
retrieving revision 1.6
diff -u -p -u -r1.6 distinfo
--- distinfo 4 Apr 2013 16:03:55 -0000 1.6
+++ distinfo 3 Nov 2021 13:24:58 -0000
@@ -1,2 +1,2 @@
-SHA256 (lha-1.14i-ac20050924p1.tar.gz) = tSYen5hTiBaqnmR5HyPLg/FjLs2mHwLlS2dJ6cpenuQ=
-SIZE (lha-1.14i-ac20050924p1.tar.gz) = 285518
+SHA256 (lha-1.14i-ac20210926.tar.gz) = t6WO6kRk3BGo0v+MYAKCoduAK7Vb5PjyP4/b/DOvUfs=
+SIZE (lha-1.14i-ac20210926.tar.gz) = 228249
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 18 Apr 2014 22:59:32 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.2 2014/04/18 22:59:32 jasper Exp $
---- tests/Makefile.in.orig Mon Oct 16 16:50:10 2006
-+++ tests/Makefile.in Sat Apr 19 00:52:34 2014
-@@ -311,7 +311,7 @@ uninstall-am: uninstall-info-am
-
-
- check-local:
-- bash ./lha-test
-+ sh ./lha-test
-
- lha-test: $(top_builddir)/config.status $(srcdir)/lha-test.in
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Index: patches/patch-src_getopt_long_c
===================================================================
RCS file: patches/patch-src_getopt_long_c
diff -N patches/patch-src_getopt_long_c
--- patches/patch-src_getopt_long_c 17 Apr 2017 14:32:55 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-$OpenBSD: patch-src_getopt_long_c,v 1.1 2017/04/17 14:32:55 espie Exp $
---- src/getopt_long.c.orig Mon Apr 17 00:45:00 2017
-+++ src/getopt_long.c Mon Apr 17 00:45:17 2017
-@@ -66,11 +66,11 @@ puts_argv(char **argv)
- #include <stdio.h>
- #include <getopt_long.h>
-
--char *optarg;
--int optind;
-+extern char *optarg;
-+extern int optind;
-
--int opterr;
--int optopt;
-+extern int opterr;
-+extern int optopt;
-
- /*
- return value 0: no option (include '-')
Index: patches/patch-src_header_c
===================================================================
RCS file: patches/patch-src_header_c
diff -N patches/patch-src_header_c
--- patches/patch-src_header_c 27 Jan 2016 13:36:35 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,62 +0,0 @@
-$OpenBSD: patch-src_header_c,v 1.3 2016/01/27 13:36:35 jasper Exp $
-
-Security fix for CVE-2016-1925
-http://seclists.org/oss-sec/2016/q1/132
-https://osdn.jp/projects/lha/scm/git/lha/commits/bf2471f

-
---- src/header.c.orig Wed Jan 27 14:31:45 2016
-+++ src/header.c Wed Jan 27 14:34:05 2016
-@@ -688,6 +688,7 @@ get_header_level0(fp, hdr, data)
- char *data;
- {
- size_t header_size;
-+ ssize_t remain_size;
- ssize_t extend_size;
- int checksum;
- int name_length;
-@@ -697,9 +698,15 @@ get_header_level0(fp, hdr, data)
- hdr->header_size = header_size = get_byte();
- checksum = get_byte();
-
-- if (fread(data + COMMON_HEADER_SIZE,
-- header_size + 2 - COMMON_HEADER_SIZE, 1, fp) == 0) {
-- error("Invalid header (LHarc file ?)");
-+ /* The data variable has been already read as COMMON_HEADER_SIZE bytes.
-+ So we must read the remaining header size by the header_size. */
-+ remain_size = header_size + 2 - COMMON_HEADER_SIZE;
-+ if (remain_size <= 0) {
-+ error("Invalid header size (LHarc file ?)");
-+ return FALSE;
-+ }
-+ if (fread(data + COMMON_HEADER_SIZE, remain_size, 1, fp) == 0) {
-+ error("Invalid header (LHarc file ?)");
- return FALSE; /* finish */
- }
-
-@@ -804,6 +811,7 @@ get_header_level1(fp, hdr, data)
- char *data;
- {
- size_t header_size;
-+ ssize_t remain_size;
- ssize_t extend_size;
- int checksum;
- int name_length;
-@@ -813,9 +821,15 @@ get_header_level1(fp, hdr, data)
- hdr->header_size = header_size = get_byte();
- checksum = get_byte();
-
-- if (fread(data + COMMON_HEADER_SIZE,
-- header_size + 2 - COMMON_HEADER_SIZE, 1, fp) == 0) {
-- error("Invalid header (LHarc file ?)");
-+ /* The data variable has been already read as COMMON_HEADER_SIZE bytes.
-+ So we must read the remaining header size by the header_size. */
-+ remain_size = header_size + 2 - COMMON_HEADER_SIZE;
-+ if (remain_size <= 0) {
-+ error("Invalid header size (LHarc file ?)");
-+ return FALSE;
-+ }
-+ if (fread(data + COMMON_HEADER_SIZE, remain_size, 1, fp) == 0) {
-+ error("Invalid header (LHarc file ?)");
- return FALSE; /* finish */
- }
-
Index: patches/patch-tests-lha-test1
===================================================================
RCS file: patches/patch-tests-lha-test1
diff -N patches/patch-tests-lha-test1
--- patches/patch-tests-lha-test1 18 Apr 2014 22:59:32 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-tests-lha-test1,v 1.2 2014/04/18 22:59:32 jasper Exp $
---- tests/lha-test1.orig Sun Jul 27 18:13:34 2003
-+++ tests/lha-test1 Sun May 9 10:03:28 2004
-@@ -2,10 +2,10 @@
- message testing to create/list/extract lha archive.
-
- i=0
--while (( i < 100 ))
-+while [ $i -lt 100 ]
- do
- echo foo
-- ((i = i + 1))
-+ i=`expr $i + 1`
- done > test-a
- sed 's/foo/bar/g' < test-a > test-b
- sed 's/foo/baz/g' < test-a > test-c
Index: patches/patch-tests-lha-test13
===================================================================
RCS file: patches/patch-tests-lha-test13
diff -N patches/patch-tests-lha-test13
--- patches/patch-tests-lha-test13 18 Apr 2014 22:59:32 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-tests-lha-test13,v 1.2 2014/04/18 22:59:32 jasper Exp $
---- tests/lha-test13.orig Tue Jul 29 14:15:43 2003
-+++ tests/lha-test13 Sat Apr 19 00:52:34 2014
-@@ -46,17 +46,17 @@ diff test-tmp-euc test-tmp-euc-d2/test-tmp-euc
- check $? $LINENO
-
- i=0
--while ((i < 10))
-+while [ $i -lt 10 ]
- do
- cat test-tmp-euc
-- ((i = i + 1))
-+ i=`expr $i + 1`
- done > test-tmp-euc2
-
- i=0
--while ((i < 10))
-+while [ $i -lt 10 ]
- do
- cat test-tmp-sjis
-- ((i = i + 1))
-+ i=`expr $i + 1`
- done > test-tmp-sjis2
-
- # no convert
Index: patches/patch-tests-lha-test_in
===================================================================
RCS file: patches/patch-tests-lha-test_in
diff -N patches/patch-tests-lha-test_in
--- patches/patch-tests-lha-test_in 18 Apr 2014 22:59:32 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,59 +0,0 @@
-$OpenBSD: patch-tests-lha-test_in,v 1.2 2014/04/18 22:59:32 jasper Exp $
---- tests/lha-test.in.orig Sun Jul 27 19:37:51 2003
-+++ tests/lha-test.in Sun Dec 4 17:40:11 2005
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
-
- : ${lha_dir=@top_builddir@/src}
- : ${lha_cmd=$(cd $lha_dir && pwd)/lha}
-@@ -6,8 +6,8 @@
-
- trap '_stat=$?; rm -rf test-*; exit $_stat' 0 1 2 3 15
-
--typeset -i i # for loop
--typeset -i test_number=0 error_num=0
-+## typeset -i i # for loop
-+test_number=0 error_num=0
- error_tests=""
-
- # fd 1: for logging
-@@ -30,15 +30,15 @@ message()
-
- check()
- {
-- ((test_number = test_number + 1))
-- typeset status=$1
-- typeset lineno=$2
-- if [[ $status -eq 0 ]]; then
-+ test_number=`expr ${test_number} + 1`
-+ status=$1
-+ lineno=$2
-+ if [ $status -eq 0 ]; then
- echo "$FILENAME #$test_number ... ok" >&2
- echo "$FILENAME #$test_number ... ok at line $lineno"
- else
- message "$FILENAME #$test_number ... failed at line $lineno"
-- ((error_num = error_num + 1))
-+ error_num=`expr ${error_num} + 1`
- error_tests="$error_tests $FILENAME #$test_number"
- result=1
- fi
-@@ -63,7 +63,7 @@ testsuite()
-
- change_timestamp()
- {
-- typeset time=$1; shift
-+ time=$1; shift
-
- # assume that `touch' command supports POSIX's -t switch.
-
-@@ -101,7 +101,7 @@ case `$lha --version 2>&1` in
- esac
- testsuite lha-test15
-
--if (( $error_num != 0 )); then
-+if [ $error_num != 0 ]; then
- message $error_num tests failed!
- message test number: $error_tests
- fi
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/archivers/lha/pkg/PLIST,v
retrieving revision 1.7
diff -u -p -u -r1.7 PLIST
--- pkg/PLIST 12 May 2018 09:22:27 -0000 1.7
+++ pkg/PLIST 3 Nov 2021 13:24:58 -0000
@@ -1,4 +1,3 @@
-@comment $OpenBSD: PLIST,v 1.7 2018/05/12 09:22:27 espie Exp $
+@comment $OpenBSD: PLIST,v$
@bin bin/lha
-@man man/ja_JP.EUC/man1/lha.1
-@comment @man man/mann/lha.n
+@man man/man1/lha.1

No comments:

Post a Comment