pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/lha archivers/lha: distfile unavailable, so ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fd338261e29d
branches:  trunk
changeset: 443705:fd338261e29d
user:      rhialto <rhialto%pkgsrc.org@localhost>
date:      Sat Dec 19 15:03:14 2020 +0000

description:
archivers/lha: distfile unavailable, so switch to maintained version elsewhere.

Documentation is mostly in Japanese (which I don't read) so no changelog
is available.
- Previous patches have ~all been integrated
- Configuration with autotools
- Is still maintained from time to time

diffstat:

 archivers/lha/DESCR                     |   6 +-
 archivers/lha/Makefile                  |  38 +++++++---------
 archivers/lha/PLIST                     |   4 +-
 archivers/lha/distinfo                  |  23 ++-------
 archivers/lha/patches/patch-aa          |  58 ------------------------
 archivers/lha/patches/patch-ab          |  64 ---------------------------
 archivers/lha/patches/patch-ac          |  14 ------
 archivers/lha/patches/patch-ad          |  77 ---------------------------------
 archivers/lha/patches/patch-ae          |  39 ----------------
 archivers/lha/patches/patch-af          |  13 -----
 archivers/lha/patches/patch-ag          |  10 ----
 archivers/lha/patches/patch-ah          |  15 ------
 archivers/lha/patches/patch-ai          |  14 ------
 archivers/lha/patches/patch-aj          |  15 ------
 archivers/lha/patches/patch-ak          |  26 -----------
 archivers/lha/patches/patch-al          |  21 ---------
 archivers/lha/patches/patch-src_lhext.c |  27 +++++++++++
 17 files changed, 55 insertions(+), 409 deletions(-)

diffs (truncated from 555 to 300 lines):

diff -r f663c925dbe1 -r fd338261e29d archivers/lha/DESCR
--- a/archivers/lha/DESCR       Sat Dec 19 14:56:04 2020 +0000
+++ b/archivers/lha/DESCR       Sat Dec 19 15:03:14 2020 +0000
@@ -1,11 +1,11 @@
-    LHa for UNIX version 1.14c Mar. 7 1996 by Tsugio Okamoto
+    LHa for UNIX version 1.14i-ac20081023 Dec. 13 2020 by Koji Arai
 
      This unofficial version of lha is based on Version 1.00.  This
 version supports extraction & archiving using -lh5- as well as
 extraction using -lh6- algorithm.
 
-     All the bug reports on this version should be directed to Tsuguo
-Okamoto <GBA02146%NIFTYSERVE.OR.JP@localhost>.
+     All the bug reports on this version should be directed to
+https://github.com/jca02266/lha/issues
 
 
      If this software is included in medium that may be obtained by
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/Makefile
--- a/archivers/lha/Makefile    Sat Dec 19 14:56:04 2020 +0000
+++ b/archivers/lha/Makefile    Sat Dec 19 15:03:14 2020 +0000
@@ -1,34 +1,30 @@
-# $NetBSD: Makefile,v 1.41 2019/11/02 22:54:26 rillig Exp $
+# $NetBSD: Makefile,v 1.42 2020/12/19 15:03:14 rhialto Exp $
 
-DISTNAME=      lha-114i
-PKGNAME=       lha-114.9
-PKGREVISION=   4
+DISTNAME=      lha-1.14i-ac20081023
+PKGNAME=       lha-114.9.20081023
+PKGREVISION=   20201213
 CATEGORIES=    archivers
-MASTER_SITES=  http://www2m.biglobe.ne.jp/~dolphin/lha/prog/
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=jca02266/}
+GITHUB_PROJECT=        lha
+GITHUB_TAG=    dc524ca3c90ae701d939f23fdc672a90199e9d22
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      http://www2m.biglobe.ne.jp/~dolphin/lha/lha-unix.htm
-COMMENT=       Archive files using LZW compression (.lzh files)
+HOMEPAGE=      https://github.com/jca02266/lha
+COMMENT=       Archive files using LZW compression (.lzh, .lha files)
 LICENSE=       lha-license
 
-RESTRICTED=            Other than for-free distribution of the unmodified source \
-               over a network, redistribution terms are complex.
+CONFIGURE_ARGS+=       --disable-multibyte-filename
+
+RESTRICTED=            Other than for-free distribution of the unmodified \
+                       source over a network, redistribution terms are complex.
 NO_SRC_ON_CDROM=       ${RESTRICTED}
 NO_BIN_ON_FTP=         ${RESTRICTED}
 NO_BIN_ON_CDROM=       ${RESTRICTED}
 
-MAKE_FLAGS+=   MAKE=${MAKE_PROGRAM:Q}
-
-OPSYSVARS+=            LHA_CPPFLAGS
-LHA_CPPFLAGS=          -DSYSTIME_HAS_NO_TM -DMKTIME -DUSESTRCASECMP -DSYSV_SYSTEM_DIR
-LHA_CPPFLAGS.Darwin+=  -DHAVE_NO_LCHOWN
-MAKE_FLAGS+=           MACHINE=${LHA_CPPFLAGS:Q}
+USE_TOOLS+=    autoconf automake autoreconf gmake
+GNU_CONFIGURE= yes
 
-INSTALLATION_DIRS=     bin ${PKGMANDIR}/ja_JP.EUC/man1
-
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/src/lha ${DESTDIR}${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKSRC}/man/lha.n \
-               ${DESTDIR}${PREFIX}/${PKGMANDIR}/ja_JP.EUC/man1/lha.1
+pre-configure:
+       cd ${WRKSRC} && autoreconf --install --symlink
 
 .include "../../mk/bsd.pkg.mk"
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/PLIST
--- a/archivers/lha/PLIST       Sat Dec 19 14:56:04 2020 +0000
+++ b/archivers/lha/PLIST       Sat Dec 19 15:03:14 2020 +0000
@@ -1,3 +1,3 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 20:24:31 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2020/12/19 15:03:14 rhialto Exp $
 bin/lha
-man/ja_JP.EUC/man1/lha.1
+man/man1/lha.1
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/distinfo
--- a/archivers/lha/distinfo    Sat Dec 19 14:56:04 2020 +0000
+++ b/archivers/lha/distinfo    Sat Dec 19 15:03:14 2020 +0000
@@ -1,18 +1,7 @@
-$NetBSD: distinfo,v 1.11 2015/11/03 00:56:22 agc Exp $
+$NetBSD: distinfo,v 1.12 2020/12/19 15:03:14 rhialto Exp $
 
-SHA1 (lha-114i.tar.gz) = 79e35271f2cf783f946db3f22e304fef72dbac99
-RMD160 (lha-114i.tar.gz) = c561e0758b467a61f45d287582effc53df29f01d
-SHA512 (lha-114i.tar.gz) = fe91184a32800306277c74ce7bf7d3edacb3a93da319bd59fc25023fb5bab9e3169bca63d8b49a05fac68900cc0eb63d0f1b4f0234522a5ef64f90f407488f07
-Size (lha-114i.tar.gz) = 64608 bytes
-SHA1 (patch-aa) = 945856fde42c3e98bb2b00f8633babc2daf0437c
-SHA1 (patch-ab) = 4b5cce4fd83a5a65cb152183d23f430da1e5aa21
-SHA1 (patch-ac) = e7bf4b9b500bca2ccbe376fd560870b29c8c6af9
-SHA1 (patch-ad) = 62ac7c0637d981de6571b838d545fcb872851e05
-SHA1 (patch-ae) = a53647ccf72511ecd2b5306e23da1219fa5e7264
-SHA1 (patch-af) = 0c2f6d5bf23c3c98b102487abe3dd1190470f50c
-SHA1 (patch-ag) = 9ad3bc807a3cda4f71d8fbbbea19306f252f2489
-SHA1 (patch-ah) = cd44b40fa7e25a9996b2441d1b78a1a6570977b2
-SHA1 (patch-ai) = d988b7d048656080d14bfad1da89c9888c9ddf90
-SHA1 (patch-aj) = 6331fce7f55eef1c2003e693f165dd0565e7172e
-SHA1 (patch-ak) = fa6de630a7414b73dec8b75be0bfbb3493c4192f
-SHA1 (patch-al) = 836de0f424efbc8b803d7c542ec0e3103381d5c4
+SHA1 (lha-1.14i-ac20081023-dc524ca3c90ae701d939f23fdc672a90199e9d22.tar.gz) = 24aa105f20234d19d1f8dafe2a23b9d037553ba0
+RMD160 (lha-1.14i-ac20081023-dc524ca3c90ae701d939f23fdc672a90199e9d22.tar.gz) = 72463d1a76e900abefdf627b5de1ebbfbdc24d7f
+SHA512 (lha-1.14i-ac20081023-dc524ca3c90ae701d939f23fdc672a90199e9d22.tar.gz) = 
2c1f6e75363f5aa852d1b6a46e9ce90002aa480ee78a4d79a7fa041d20657d8ea7d46fea597bac8a773dd8c25775864d9e714db1750387631b39a49fd6c0e919
+Size (lha-1.14i-ac20081023-dc524ca3c90ae701d939f23fdc672a90199e9d22.tar.gz) = 220783 bytes
+SHA1 (patch-src_lhext.c) = 0703579f96b6c9e3969aee2c962b54b890fbf973
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/patches/patch-aa
--- a/archivers/lha/patches/patch-aa    Sat Dec 19 14:56:04 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2006/12/03 03:09:46 obache Exp $
-
---- src/huf.c.orig     2000-10-06 02:35:49.000000000 +0900
-+++ src/huf.c
-@@ -332,7 +332,7 @@ read_pt_len(nn, nbit, i_special)
-       }
-       else {
-               i = 0;
--              while (i < n) {
-+              while (i < MIN(n, NPT)) {
-                       c = bitbuf >> (16 - 3);
-                       if (c == 7) {
-                               unsigned short  mask = 1 << (16 - 4);
-@@ -345,7 +345,7 @@ read_pt_len(nn, nbit, i_special)
-                       pt_len[i++] = c;
-                       if (i == i_special) {
-                               c = getbits(2);
--                              while (--c >= 0)
-+                              while (--c >= 0 && i < NPT)
-                                       pt_len[i++] = 0;
-                       }
-               }
-@@ -370,7 +370,7 @@ read_c_len( /* void */ )
-                       c_table[i] = c;
-       } else {
-               i = 0;
--              while (i < n) {
-+              while (i < MIN(n,NC)) {
-                       c = pt_table[bitbuf >> (16 - 8)];
-                       if (c >= NT) {
-                               unsigned short  mask = 1 << (16 - 9);
-@@ -380,7 +380,7 @@ read_c_len( /* void */ )
-                                       else
-                                               c = left[c];
-                                       mask >>= 1;
--                              } while (c >= NT);
-+                              } while (c >= NT && (mask || c!= left[c])); /* CVE-2006-4338 */
-                       }
-                       fillbuf(pt_len[c]);
-                       if (c <= 2) {
-@@ -427,7 +427,7 @@ decode_c_st1( /*void*/ )
-                       else
-                               j = left[j];
-                       mask >>= 1;
--              } while (j >= NC);
-+              } while (j >= NC && (mask || j != left[j])); /* CVE-2006-4338 */
-               fillbuf(c_len[j] - 12);
-       }
-       return j;
-@@ -451,7 +451,7 @@ decode_p_st1( /* void */ )
-                       else
-                               j = left[j];
-                       mask >>= 1;
--              } while (j >= np);
-+              } while (j >= np && (mask || j != left[j])); /* CVE-2006-4338 */
-               fillbuf(pt_len[j] - 8);
-       }
-       if (j != 0)
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/patches/patch-ab
--- a/archivers/lha/patches/patch-ab    Sat Dec 19 14:56:04 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-$NetBSD: patch-ab,v 1.6 2006/12/03 03:09:46 obache Exp $
-
---- src/maketbl.c.orig 2000-10-04 23:57:38.000000000 +0900
-+++ src/maketbl.c
-@@ -32,8 +32,15 @@ make_table(nchar, bitlen, tablebits, tab
-       }
- 
-       /* count */
--      for (i = 0; i < nchar; i++)
--              count[bitlen[i]]++;
-+      for (i = 0; i < nchar; i++) {
-+              if (bitlen[i] > 16) {
-+                      /* CVE-2006-4335 */
-+                      error("Bad table (case a)");
-+                      exit(1);
-+              }
-+              else
-+                      count[bitlen[i]]++;
-+      }
- 
-       /* calculate first code */
-       total = 0;
-@@ -41,8 +48,10 @@ make_table(nchar, bitlen, tablebits, tab
-               start[i] = total;
-               total += weight[i] * count[i];
-       }
--      if ((total & 0xffff) != 0)
-+      if ((total & 0xffff) != 0 || tablebits > 16) { /* 16 for weight below */
-               error("make_table()", "Bad table (5)\n");
-+              exit(1);
-+      }
- 
-       /* shift data for make table. */
-       m = 16 - tablebits;
-@@ -53,7 +62,7 @@ make_table(nchar, bitlen, tablebits, tab
- 
-       /* initialize */
-       j = start[tablebits + 1] >> m;
--      k = 1 << tablebits;
-+      k = MIN(1 << tablebits, 4096);
-       if (j != 0)
-               for (i = j; i < k; i++)
-                       table[i] = 0;
-@@ -66,12 +75,19 @@ make_table(nchar, bitlen, tablebits, tab
-               l = start[k] + weight[k];
-               if (k <= tablebits) {
-                       /* code in table */
-+                      l = MIN(l, 4096);
-                       for (i = start[k]; i < l; i++)
-                               table[i] = j;
-               }
-               else {
-                       /* code not in table */
--                      p = &table[(i = start[k]) >> m];
-+                      i = start[k];
-+                      if ((i >> m) > 4096) {
-+                              /* CVE-2006-4337 */
-+                              error("Bad table (case c)");
-+                              exit(1);
-+                      }
-+                      p = &table[i >> m];
-                       i <<= tablebits;
-                       n = k - tablebits;
-                       /* make tree (n length) */
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/patches/patch-ac
--- a/archivers/lha/patches/patch-ac    Sat Dec 19 14:56:04 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2010/01/09 19:10:46 dholland Exp $
-
-time_t compat fixes for NetBSD-6+
-
---- src/lha.h.orig     2009-02-13 18:28:46.000000000 -0500
-+++ src/lha.h  2009-02-13 18:28:10.000000000 -0500
-@@ -16,6 +16,7 @@
- #include <sys/types.h>
- #include <sys/file.h>
- #include <sys/stat.h>
-+#include <sys/time.h>
- 
- #include <signal.h>
- 
diff -r f663c925dbe1 -r fd338261e29d archivers/lha/patches/patch-ad
--- a/archivers/lha/patches/patch-ad    Sat Dec 19 14:56:04 2020 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-$NetBSD: patch-ad,v 1.4 2010/01/09 19:10:46 dholland Exp $
-
-1. security fix
-2. utimes() fixes for netbsd-6 time_t
-
-upstream: (1) unknown (2) not reported, docs in .jp only, wakarimasen :( 
-
---- src/lhext.c.orig   2000-10-04 10:57:38.000000000 -0400
-+++ src/lhext.c        2009-02-13 18:42:35.000000000 -0500
-@@ -143,13 +143,15 @@ adjust_info(name, hdr)
-       char           *name;
-       LzHeader       *hdr;
- {
--      time_t          utimebuf[2];
-+      struct timeval  utimebuf[2];
- 
-       /* adjust file stamp */
--      utimebuf[0] = utimebuf[1] = hdr->unix_last_modified_stamp;
-+      utimebuf[0].tv_sec = hdr->unix_last_modified_stamp;
-+      utimebuf[0].tv_usec = 0;
-+      utimebuf[1] = utimebuf[0];
- 
-       if ((hdr->unix_mode & UNIX_FILE_TYPEMASK) != UNIX_FILE_SYMLINK)
--              utime(name, utimebuf);
-+              utimes(name, utimebuf);
- 
-       if (hdr->extend_type == EXTEND_UNIX
-           || hdr->extend_type == EXTEND_OS68K
-@@ -190,8 +192,13 @@ extract_one(afp, hdr)
-               q = (char *) rindex(hdr->name, '/') + 1;
-       }
-       else {
-+              if (is_directory_traversal(q)) {
-+                fprintf(stderr, "Possible directory traversal hack attempt in %s\n", q);
-+                exit(111);
-+              }
-+
-               if (*q == '/') {



Home | Main Index | Thread Index | Old Index