Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cabextract for openSUSE:Factory checked in at 2023-03-08 14:53:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cabextract (Old) and /work/SRC/openSUSE:Factory/.cabextract.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cabextract" Wed Mar 8 14:53:27 2023 rev:29 rq:1070074 version:1.11 Changes: -------- --- /work/SRC/openSUSE:Factory/cabextract/cabextract.changes 2023-02-07 18:49:43.147336137 +0100 +++ /work/SRC/openSUSE:Factory/.cabextract.new.31432/cabextract.changes 2023-03-08 14:53:32.238991244 +0100 @@ -1,0 +2,7 @@ +Tue Mar 7 19:51:48 UTC 2023 - Dirk Müller <[email protected]> + +- update to 1.11: + * Fixed bug in creating directories given in archives, e.g. + extracting file + +------------------------------------------------------------------- Old: ---- cabextract-1.10.tar.gz New: ---- cabextract-1.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cabextract.spec ++++++ --- /var/tmp/diff_new_pack.I9LvMT/_old 2023-03-08 14:53:32.818994402 +0100 +++ /var/tmp/diff_new_pack.I9LvMT/_new 2023-03-08 14:53:32.822994424 +0100 @@ -17,7 +17,7 @@ Name: cabextract -Version: 1.10 +Version: 1.11 Release: 0 Summary: A Program to Extract Microsoft Cabinet Files License: GPL-3.0-or-later ++++++ cabextract-1.10.tar.gz -> cabextract-1.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/ChangeLog new/cabextract-1.11/ChangeLog --- old/cabextract-1.10/ChangeLog 2023-02-04 14:53:43.000000000 +0100 +++ new/cabextract-1.11/ChangeLog 2023-02-19 13:43:00.000000000 +0100 @@ -1,3 +1,11 @@ +2023-02-19 Stuart Caie <[email protected]> + + * ensure_filepath(): had wrong logic, for the archive-controlled + part of a pathname, it was using the result of lstat() whether + it succeeded or not, and thus not creating directories when it + ought to. Fixed and added a testcase for cabextract's --directory + option. Thanks to iq2luc for raising the issue and offering a fix. + 2023-02-04 Stuart Caie <[email protected]> * src/cabextract.c: By default, cabextract will now overwrite diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/Makefile.am new/cabextract-1.11/Makefile.am --- old/cabextract-1.10/Makefile.am 2023-02-04 13:13:26.000000000 +0100 +++ new/cabextract-1.11/Makefile.am 2023-02-19 13:43:57.000000000 +0100 @@ -9,7 +9,7 @@ mspack/macros.h mspack/readbits.h mspack/readhuff.h TESTS = test/bugs.test test/case-ascii.test test/case-utf8.test \ - test/dirwalk-vulns.test test/encoding.test \ + test/dir.test test/dirwalk-vulns.test test/encoding.test \ test/mixed.test test/search.test test/simple.test \ test/split.test test/utf8-stresstest.test \ test/symlinks.test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/Makefile.in new/cabextract-1.11/Makefile.in --- old/cabextract-1.10/Makefile.in 2023-02-05 16:09:31.000000000 +0100 +++ new/cabextract-1.11/Makefile.in 2023-02-24 13:03:19.000000000 +0100 @@ -537,7 +537,7 @@ mspack/macros.h mspack/readbits.h mspack/readhuff.h TESTS = test/bugs.test test/case-ascii.test test/case-utf8.test \ - test/dirwalk-vulns.test test/encoding.test \ + test/dir.test test/dirwalk-vulns.test test/encoding.test \ test/mixed.test test/search.test test/simple.test \ test/split.test test/utf8-stresstest.test \ test/symlinks.test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/NEWS new/cabextract-1.11/NEWS --- old/cabextract-1.10/NEWS 2023-02-05 15:42:56.000000000 +0100 +++ new/cabextract-1.11/NEWS 2023-02-24 12:40:23.000000000 +0100 @@ -1,3 +1,7 @@ +New in 1.11 +* Fixed bug in creating directories given in archives, e.g. extracting file + "a/b.c" from a cab file wouldn't create directory "a" (broken in 1.10) + New in 1.10 * Multiple -F filters can be given. cabextract will extract files matching ANY of the filters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/README new/cabextract-1.11/README --- old/cabextract-1.10/README 2023-02-05 14:55:17.000000000 +0100 +++ new/cabextract-1.11/README 2023-02-24 12:38:48.000000000 +0100 @@ -1,4 +1,4 @@ -cabextract 1.10 - a program to extract Microsoft Cabinet files. +cabextract 1.11 - a program to extract Microsoft Cabinet files. (C) 2000-2023 Stuart Caie <[email protected]> This is free software with ABSOLUTELY NO WARRANTY. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/cabextract.spec new/cabextract-1.11/cabextract.spec --- old/cabextract-1.10/cabextract.spec 2023-02-05 16:10:01.000000000 +0100 +++ new/cabextract-1.11/cabextract.spec 2023-02-24 13:03:48.000000000 +0100 @@ -1,6 +1,6 @@ Summary: A program to extract Microsoft Cabinet files Name: cabextract -Version: 1.10 +Version: 1.11 Release: 1 License: GPL Group: Applications/Archiving diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/configure new/cabextract-1.11/configure --- old/cabextract-1.10/configure 2023-02-05 16:09:30.000000000 +0100 +++ new/cabextract-1.11/configure 2023-02-24 13:03:18.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for cabextract 1.10. +# Generated by GNU Autoconf 2.71 for cabextract 1.11. # # Report bugs to <[email protected]>. # @@ -611,8 +611,8 @@ # Identity of this package. PACKAGE_NAME='cabextract' PACKAGE_TARNAME='cabextract' -PACKAGE_VERSION='1.10' -PACKAGE_STRING='cabextract 1.10' +PACKAGE_VERSION='1.11' +PACKAGE_STRING='cabextract 1.11' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1337,7 +1337,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cabextract 1.10 to adapt to many kinds of systems. +\`configure' configures cabextract 1.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1408,7 +1408,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cabextract 1.10:";; + short | recursive ) echo "Configuration of cabextract 1.11:";; esac cat <<\_ACEOF @@ -1520,7 +1520,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cabextract configure 1.10 +cabextract configure 1.11 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2117,7 +2117,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cabextract $as_me 1.10, which was +It was created by cabextract $as_me 1.11, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3390,7 +3390,7 @@ # Define the identity of the package. PACKAGE='cabextract' - VERSION='1.10' + VERSION='1.11' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -8996,7 +8996,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cabextract $as_me 1.10, which was +This file was extended by cabextract $as_me 1.11, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9068,7 +9068,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -cabextract config.status 1.10 +cabextract config.status 1.11 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/configure.ac new/cabextract-1.11/configure.ac --- old/cabextract-1.10/configure.ac 2023-02-05 14:55:06.000000000 +0100 +++ new/cabextract-1.11/configure.ac 2023-02-24 12:39:15.000000000 +0100 @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([cabextract],[1.10],[[email protected]]) +AC_INIT([cabextract],[1.11],[[email protected]]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/cabextract.c]) AC_CONFIG_HEADERS([config.h]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/mspack/ChangeLog new/cabextract-1.11/mspack/ChangeLog --- old/cabextract-1.10/mspack/ChangeLog 2023-02-04 13:13:26.000000000 +0100 +++ new/cabextract-1.11/mspack/ChangeLog 2023-02-13 00:59:28.000000000 +0100 @@ -1,3 +1,7 @@ +2023-02-12 Stuart Caie <[email protected]> + + * chmd.c: add a default tolower() if MSPACK_NO_DEFAULT_SYSTEM is set. + 2023-02-03 Stuart Caie <[email protected]> * configure.ac: do AC_CHECK_SIZEOF([off_t]) test only after diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/mspack/lzxd.c new/cabextract-1.11/mspack/lzxd.c --- old/cabextract-1.10/mspack/lzxd.c 2023-02-04 13:13:26.000000000 +0100 +++ new/cabextract-1.11/mspack/lzxd.c 2023-02-13 01:05:13.000000000 +0100 @@ -536,9 +536,9 @@ case LZX_BLOCKTYPE_ALIGNED: case LZX_BLOCKTYPE_VERBATIM: while (this_run > 0) { - int main_element, length_footer, verbatim_bits, aligned_bits, extra; - int match_length; - unsigned int match_offset; + int main_element, length_footer, verbatim_bits, aligned_bits, extra; + int match_length; + unsigned int match_offset; READ_HUFFSYM(MAINTREE, main_element); if (main_element < LZX_NUM_CHARS) { /* literal: 0 to LZX_NUM_CHARS-1 */ @@ -620,7 +620,7 @@ i = match_length; /* does match offset wrap the window? */ if (match_offset > window_posn) { - if ((off_t)match_offset > lzx->offset && + if ((off_t)match_offset > lzx->offset && (match_offset - window_posn) > lzx->ref_data_size) { D(("match offset beyond LZX stream")) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/mspack/readbits.h new/cabextract-1.11/mspack/readbits.h --- old/cabextract-1.10/mspack/readbits.h 2023-02-04 13:13:26.000000000 +0100 +++ new/cabextract-1.11/mspack/readbits.h 2023-02-13 01:06:24.000000000 +0100 @@ -144,7 +144,7 @@ unsigned char needed = (bits), bitrun; \ (val) = 0; \ while (needed > 0) { \ - if (bits_left <= (int)(BITBUF_WIDTH - 16)) READ_BYTES; \ + if (bits_left <= (int)(BITBUF_WIDTH - 16)) READ_BYTES; \ bitrun = (bits_left < needed) ? bits_left : needed; \ (val) = ((val) << bitrun) | PEEK_BITS(bitrun); \ REMOVE_BITS(bitrun); \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/src/cabextract.c new/cabextract-1.11/src/cabextract.c --- old/cabextract-1.10/src/cabextract.c 2023-02-05 16:08:30.000000000 +0100 +++ new/cabextract-1.11/src/cabextract.c 2023-02-24 12:57:14.000000000 +0100 @@ -146,6 +146,12 @@ #if HAVE_ICONV iconv_t converter = NULL; +/* names for the UTF-8 charset recognised by different iconv_open()s */ +char *utf8_names[] = { + "UTF-8", /* glibc, libiconv, FreeBSD, Solaris, not newlib or HPUX */ + "UTF8", /* glibc, libiconv (< 1.13), newlib, HPUX */ + "UTF_8", /* newlib, Solaris */ +}; #endif /** A special filename. Extracting to this filename will send the output @@ -220,27 +226,20 @@ int main(int argc, char *argv[]) { int i, err; - /* names for the UTF-8 charset recognised by different iconv_open()s */ - char *utf8_names[] = { - "UTF-8", /* glibc, libiconv, FreeBSD, Solaris, not newlib or HPUX */ - "UTF8", /* glibc, libiconv (< 1.13), newlib, HPUX */ - "UTF_8", /* newlib, Solaris */ + /* attempt to set a UTF8-based locale, so that tolower()/towlower() + * in create_output_name() lowercase more than just A-Z in ASCII. + * + * We don't attempt to pick up the system default locale, "", + * because it might not be compatible with ASCII/ISO-8859-1/Unicode + * character codes and would mess up lowercased filenames + */ + char *locales[] = { + "C.UTF-8", /* https://sourceware.org/glibc/wiki/Proposals/C.UTF-8 */ + "en_US.UTF-8", "en_GB.UTF8", "de_DE.UTF-8", "UTF-8", "UTF8" }; - - /* attempt to set a UTF8-based locale, so that tolower()/towlower() - * in create_output_name() lowercase more than just A-Z in ASCII. - * - * We don't attempt to pick up the system default locale, "", - * because it might not be compatible with ASCII/ISO-8859-1/Unicode - * character codes and would mess up lowercased filenames - */ - char *locales[] = { - "C.UTF-8", /* https://sourceware.org/glibc/wiki/Proposals/C.UTF-8 */ - "en_US.UTF-8", "en_GB.UTF8", "de_DE.UTF-8", "UTF-8", "UTF8" - }; - for (i = 0; i < (sizeof(locales)/sizeof(*locales)); i++) { + for (i = 0; i < (sizeof(locales)/sizeof(*locales)); i++) { if (setlocale(LC_CTYPE, locales[i])) break; - } + } /* parse options */ while ((i = getopt_long(argc, argv, OPTSTRING, optlist, NULL)) != -1) { @@ -1036,8 +1035,7 @@ /* worst case: all characters expand from 1 to 4 bytes */ size_t ilen = strlen(name) + 1, olen = ilen * 4; ICONV_CONST char *i = name; - char *newname = malloc(olen); - unsigned char *o = (unsigned char *) newname; + char *newname = malloc(olen), *o = newname; if (!newname) { fprintf(stderr, "WARNING: out of memory converting filename\n"); @@ -1046,11 +1044,11 @@ /* convert filename to UTF8 */ iconv(converter, NULL, NULL, NULL, NULL); - while (iconv(converter, &i, &ilen, (char **) &o, &olen) == (size_t) -1) { + while (iconv(converter, &i, &ilen, &o, &olen) == (size_t) -1) { if (errno == EILSEQ || errno == EINVAL) { /* invalid or incomplete multibyte sequence: skip it */ i++; ilen--; - *o++ = 0xEF; *o++ = 0xBF; *o++ = 0xBD; olen += 3; + memcpy(o, "\xEF\xBF\xBD", 3); o += 3; olen += 3; } else /* E2BIG: should be impossible to get here */ { free(newname); @@ -1227,8 +1225,10 @@ /* in the archive-determined part of the path and not keeping symlinks: * use lstat() and delete symlinks if found */ ok = (lstat(path, &st_buf) == 0); - if (ok && (st_buf.st_mode & S_IFMT) == S_IFLNK) unlink(path); - ok = S_ISDIR(st_buf.st_mode); + if (ok) { + if ((st_buf.st_mode & S_IFMT) == S_IFLNK) unlink(path); + ok = S_ISDIR(st_buf.st_mode); + } } if (!ok) ok = (mkdir(path, 0777 & ~user_umask) == 0); *p = '/'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/test/dir.test new/cabextract-1.11/test/dir.test --- old/cabextract-1.10/test/dir.test 1970-01-01 01:00:00.000000000 +0100 +++ new/cabextract-1.11/test/dir.test 2023-02-19 13:48:30.000000000 +0100 @@ -0,0 +1,59 @@ +#!/bin/sh +# test that cabextract creates directories as expected +. test/testcase + +# extract to user-chosen absolute path +"$cabextract" -d $tmpdir/test cabs/dir.cab >$actual +compare_with <<EOF +Extracting cabinet: cabs/dir.cab + extracting $tmpdir/test/plain.c + extracting $tmpdir/test/1/2/3/4.c + +All done, no errors. +EOF + +# cd to $tmpdir +basedir=`pwd` +cd $tmpdir || exit 1 + +# extract to current path +"$cabextract" "$basedir/cabs/dir.cab" >$actual +compare_with <<EOF +Extracting cabinet: $basedir/cabs/dir.cab + extracting plain.c + extracting 1/2/3/4.c + +All done, no errors. +EOF + +# extract to user-chosen relative directory +"$cabextract" -d tdir "$basedir/cabs/dir.cab" >$actual +compare_with <<EOF +Extracting cabinet: $basedir/cabs/dir.cab + extracting tdir/plain.c + extracting tdir/1/2/3/4.c + +All done, no errors. +EOF + +# extract to user-chosen relative directory with two elements +"$cabextract" -d a/b "$basedir/cabs/dir.cab" >$actual +compare_with <<EOF +Extracting cabinet: $basedir/cabs/dir.cab + extracting a/b/plain.c + extracting a/b/1/2/3/4.c + +All done, no errors. +EOF + +# extract to user-chosen relative directory with two elements, one of which already exists +"$cabextract" -d tdir/a "$basedir/cabs/dir.cab" >$actual +compare_with <<EOF +Extracting cabinet: $basedir/cabs/dir.cab + extracting tdir/a/plain.c + extracting tdir/a/1/2/3/4.c + +All done, no errors. +EOF + +read status < $status && test "x$status" = xsuccess diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/test/symlinks.test new/cabextract-1.11/test/symlinks.test --- old/cabextract-1.10/test/symlinks.test 2023-02-04 13:13:26.000000000 +0100 +++ new/cabextract-1.11/test/symlinks.test 2023-02-19 13:01:14.000000000 +0100 @@ -8,13 +8,6 @@ set -e # every command is a test! -tmpdir=`mktemp -d` -trap cleanup2 0 1 2 -cleanup2() { - rm -rf $tmpdir - cleanup -} - # set up a symlinked file and symlinked directory # extract $tmpdir/plain.c and $tmpdir/1/2/3/4.c # check they did NOT get written to $tmpdir/other.c and $tmpdir/other/4.c @@ -60,4 +53,4 @@ read W < $tmpdir/fake/dest/1/2/3/4.c [ "$H" = "hello" -a "$W" = "world" ] -exit 0 \ No newline at end of file +exit 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabextract-1.10/test/testcase.in new/cabextract-1.11/test/testcase.in --- old/cabextract-1.10/test/testcase.in 2018-12-03 11:05:39.000000000 +0100 +++ new/cabextract-1.11/test/testcase.in 2023-02-20 00:16:21.000000000 +0100 @@ -1,14 +1,15 @@ cabextract="@abs_top_builddir@/cabextract@EXEEXT@" cd "@abs_srcdir@" -status=`mktemp` +tmpdir=`mktemp -d` +status=$tmpdir/status expected=$status.expected actual=$status.actual -echo success >$status +echo success >$status || exit 1 trap cleanup 0 1 2 cleanup() { - rm -f $expected $actual $failed + rm -rf $tmpdir } compare_with() {
