Hello community,

here is the log from the commit of package p7zip for openSUSE:Factory checked 
in at 2018-06-02 11:49:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/p7zip (Old)
 and      /work/SRC/openSUSE:Factory/.p7zip.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "p7zip"

Sat Jun  2 11:49:47 2018 rev:39 rq:610122 version:16.02

Changes:
--------
--- /work/SRC/openSUSE:Factory/p7zip/p7zip.changes      2018-02-12 
10:11:08.746303797 +0100
+++ /work/SRC/openSUSE:Factory/.p7zip.new/p7zip.changes 2018-06-02 
11:49:51.461041090 +0200
@@ -1,0 +2,16 @@
+Tue May 15 13:00:47 UTC 2018 - [email protected]
+
+- p7zip package now provides 7zr binary only. 7z and 7za binaries
+  are moved to the new pzip-full subpackage [bsc#899627]
+- add a new p7zip-doc subpackage (contains HTML manual)
+- pack /usr/bin/p7zip script (gzip-like CLI wrapper for p7zip)
+  [bsc#965140]
+- 7zG requires 7z.so - pzip-gui should require pzip-full package
+- remove unused Codecs dir
+- tweak %descriptions
+- pack documentation and licenses properly (avoid duplications)
+- use %license instead of %doc [bsc#1082318]
+- run test_7zr test
+- run spec-cleaner
+
+-------------------------------------------------------------------

New:
----
  p7zip
  p7zip.1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ p7zip.spec ++++++
--- /var/tmp/diff_new_pack.ZzEsrj/_old  2018-06-02 11:49:52.257011896 +0200
+++ /var/tmp/diff_new_pack.ZzEsrj/_new  2018-06-02 11:49:52.261011749 +0200
@@ -17,13 +17,15 @@
 
 
 %if 0%{?suse_version} >= 1320 || 0%{?is_opensuse}
+# Temporarily disable GUI build as it needs wxWidgets < 3.0 that is no longer
+# available in TW
 %bcond_with     buildgui
 %endif
 Name:           p7zip
 Version:        16.02
 Release:        0
 Summary:        7-zip file compression program
-License:        LGPL-2.1+
+License:        LGPL-2.1-or-later
 Group:          Productivity/Archiving/Compression
 Url:            http://p7zip.sourceforge.net/
 # Update note: RAR sources need to be removed from the package because of the 
incompatible licence
@@ -36,13 +38,17 @@
 # tar cjvf p7zip_${VERSION}_src_all-norar.tar.bz2 p7zip_${VERSION}
 # rm -rf p7zip_${VERSION}_src_all.tar.bz2
 Source:         p7zip_%{version}_src_all-norar.tar.bz2
+# Debian gzip-like CLI wrapper for p7zip (the version shipped within the p7zip 
tarball is too old)
+Source1:        
https://anonscm.debian.org/cgit/users/robert/p7zip.git/plain/debian/scripts/p7zip
+Source2:        
https://anonscm.debian.org/cgit/users/robert/p7zip.git/plain/debian/p7zip.1
 Patch1:         CVE-2016-9296.patch
 # PATCH-FIX-SUSE bnc#1077978 [email protected] -- adjust makefile not to use 
CPP/7zip/Compress/Rar* files
 Patch2:         p7zip_16.02_norar.patch
 # PATCH-FIX-UPSTREAM bnc#1077725 [email protected] -- fix heap-based buffer 
overflow in a shrink decoder
 Patch3:         p7zip-16.02-CVE-2017-17969.patch
+BuildRequires:  fdupes
 BuildRequires:  gcc-c++
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Suggests:       p7zip-full
 %if %{with buildgui}
 BuildRequires:  cmake
 BuildRequires:  hicolor-icon-theme
@@ -53,7 +59,6 @@
 %ifarch x86_64
 BuildRequires:  yasm
 %endif
-BuildRequires:  fdupes
 
 %description
 p7zip is a quick port of 7z.exe and 7za.exe (command line version of
@@ -61,11 +66,35 @@
 highest compression ratio. Since 4.10, p7zip (like 7-zip) supports
 little-endian and big-endian machines.
 
+This package provides:
+  * %{_bindir}/7zr - a light stand-alone executable that supports only 
7z/LZMA/BCJ/BCJ2 archives
+  * %{_bindir}/p7zip - a gzip-like wrapper around 7zr
+
+%package full
+Summary:        7z and 7za archivers that handle more types of archives than 
7zr
+Group:          Productivity/Archiving/Compression
+Requires:       %{name} = %{version}
+Provides:       %{name}:%{_bindir}/7z
+Provides:       %{name}:%{_bindir}/7za
+
+%description full
+p7zip is a quick port of 7z.exe and 7za.exe (command line version of
+7zip, see www.7-zip.org) for Unix. 7-Zip is a file archiver with
+highest compression ratio. Since 4.10, p7zip (like 7-zip) supports
+little-endian and big-endian machines.
+
+This package provides:
+ * %{_bindir}/7z - uses plugins to handle many types of archives
+ * %{_bindir}/7za - a stand-alone executable (handles less archive formats 
than 7z)
+
+This package allows e.g. File Roller or Ark to create/extract 7z archives.
+
 %if %{with buildgui}
 %package gui
 Summary:        GUI for 7-zip file compression program
 Group:          Productivity/Archiving/Compression
 Requires:       %{name} = %{version}
+Requires:       %{name}-full = %{version}
 Requires:       kf5-filesystem
 Requires(post): hicolor-icon-theme
 Requires(post): update-desktop-files
@@ -79,6 +108,15 @@
 little-endian and big-endian machines.
 %endif
 
+%package        doc
+Summary:        HTML manual for 7-zip
+Group:          Productivity/Archiving/Compression
+Provides:       %{name}:%{_defaultdocdir}/%{name}/MANUAL
+BuildArch:      noarch
+
+%description    doc
+This package contains the HTML documentation for 7-Zip.
+
 %prep
 %setup -q -n %{name}_%{version}
 %patch1 -p1
@@ -105,14 +143,17 @@
 perl -pi -e 's/ -s / /' makefile.machine
 perl -pi -e 's/(\$\(LOCAL_FLAGS\))/'"%{optflags} -fno-strict-aliasing"' 
\\\n\t$1/' makefile.machine
 
+# move license files
+mv DOC/License.txt DOC/copying.txt .
+
 %build
 %if %{with buildgui}
 pushd CPP/7zip/CMAKE/
 ./generate.sh
 popd
-make %{?_smp_mflags} OPTFLAGS="%{optflags} -fno-strict-aliasing -Wl,-z,now 
-fPIC -pie" all2 7zG
+make %{?_smp_mflags} OPTFLAGS="%{optflags} -fno-strict-aliasing -Wl,-z,now 
-fPIC -pie" all3 7zG
 %else
-make %{?_smp_mflags} OPTFLAGS="%{optflags} -fno-strict-aliasing -Wl,-z,now 
-fPIC -pie" all2
+make %{?_smp_mflags} OPTFLAGS="%{optflags} -fno-strict-aliasing -Wl,-z,now 
-fPIC -pie" all3
 %endif
 
 %install
@@ -135,13 +176,23 @@
 chmod 755 %{buildroot}%{_bindir}/p7zipForFilemanager
 %endif
 
+# Install p7zip wrapper and its manpage
+install -m755 %{SOURCE1} %{buildroot}%{_bindir}/p7zip
+install -m644 %{SOURCE2} %{buildroot}%{_mandir}/man1/p7zip.1
+# Remove a mention of the p7zip-rar package that we don't have
+sed -i 's/RAR (if the non-free p7zip-rar package is installed)//g' 
%{buildroot}%{_mandir}/man1/p7zip.1
+
+# remove superfluous DOC directory
+mv %{buildroot}%{_defaultdocdir}/%{name}/DOC/* 
%{buildroot}%{_defaultdocdir}/%{name}
+rmdir %{buildroot}%{_defaultdocdir}/%{name}/DOC/
+
 %fdupes -s %{buildroot}
-rm %{buildroot}%{_mandir}/man1/7zr.*
 
 %check
 %if ! 0%{?qemu_user_space_build}
 make %{?_smp_mflags} test
 make %{?_smp_mflags} test_7z
+make %{?_smp_mflags} test_7zr
 %endif
 
 %if %{with buildgui}
@@ -155,22 +206,30 @@
 %endif
 
 %files
-%defattr(-,root,root)
+%license copying.txt License.txt
+%doc ChangeLog
 %doc %{_defaultdocdir}/%{name}
+%exclude %{_defaultdocdir}/%{name}/MANUAL
+%{_bindir}/7zr
+%{_bindir}/p7zip
 %dir %{_libdir}/%{name}
-%dir %{_libdir}/%{name}/Codecs
-%{_libdir}/%{name}/[0-9a-z]*
+%{_libdir}/%{name}/7zr
+%{_mandir}/man1/7zr.1%{?ext_man}
+%{_mandir}/man1/p7zip.1%{?ext_man}
+
+%files full
 %{_bindir}/7z
 %{_bindir}/7za
-%doc ChangeLog DOC/*.txt
-%{_mandir}/man1/*
-%if %{with buildgui}
-%exclude %{_libdir}/%{name}/7zG
-%endif
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/7z
+%{_libdir}/%{name}/7za
+%{_libdir}/%{name}/7z.so
+%{_libdir}/%{name}/7zCon.sfx
+%{_mandir}/man1/7z.1%{?ext_man}
+%{_mandir}/man1/7za.1%{?ext_man}
 
 %if %{with buildgui}
 %files gui
-%defattr(-,root,root)
 %{_bindir}/7zG
 %{_bindir}/p7zipForFilemanager
 %{_libdir}/%{name}/7zG
@@ -182,4 +241,7 @@
 %{_kf5_servicesdir}/ServiceMenus/*.desktop
 %endif
 
+%files doc
+%doc %{_defaultdocdir}/%{name}/MANUAL
+
 %changelog

++++++ p7zip ++++++
#!/bin/sh
# gzip-like CLI wrapper for p7zip
# version 3.0
#
# History
#  2.0 :
#    - support for -filename, "file name"
#    - p7zip file1 file2 ...
#  3.0 :  ([email protected], March 2016)
#    - use 7za or 7zr, whichever one is available
#    - refactor the script for better readability
#    - remove `"$?" != 0 ' checks that do not work with `set -e'
#    - use stderr for error reporting
#    - add support for -c, -f, -k options

set -e

# detect 7z program to use
prg7z="`which 7za 2>/dev/null`" || \
  prg7z="`which 7zr 2>/dev/null`" || \
    { echo "$0: cannot find neither 7za nor 7zr command" >&2; exit 1; }

# global options
f_compress=true
f_keep=false
f_force=false
f_tostdout=false

usage()
{
  echo "Usage: $0 [options] [--] [ name ... ]"
  echo ""
  echo "Options:"
  echo "    -c --stdout --to-stdout      output data to stdout"
  echo "    -d --decompress --uncompress decompress file"
  echo "    -f --force                   do not ask questions"
  echo "    -k --keep                    keep original file"
  echo "    -h --help                    print this help"
  echo "    --                           treat subsequent arguments as file"
  echo "                                 names, even if they start with a dash"
  echo ""
  exit 0
}

has_7z_suffix()
{
  case "$1" in
    *.7z)
      return 0
      ;;
    *)
      return 1
      ;;
  esac;
}

make_tmp_file()
{
  P7ZIPTMP="${TMP:-/tmp}"
  mktemp "${P7ZIPTMP}/p7zip.XXXXXXXX"
}

check_not_a_tty()
{
  if ! ${f_force} && ${f_compress} && tty <&1 >/dev/null ; then
    echo "$0: compressed data not written to a terminal." >&2
    echo "For help, type: $0 -h" >&2
    exit 1
  fi
}

compress_file()
{
  file="$1"

  if ! ${f_force} && has_7z_suffix "${file}"; then
    echo "$0: $file already has the 7z suffix" >&2
    exit 1
  fi

  # compress to stdout via temporary file
  if ${f_tostdout}; then
    check_not_a_tty
    tmp="`make_tmp_file`"
    trap "rm -f -- ${tmp}" 0
    rm -f -- "${tmp}"
    "${prg7z}" a -si -- "${tmp}" < "${file}" >/dev/null && cat "${tmp}" || \
      { echo "$0: failed to compress data to temporary file" >&2;  exit 1; }
    rm -f -- "${tmp}"
    return 0
  fi

  # compress to a file
  if ! ${f_force} && [ -e "${file}.7z" ]; then
    echo "$0: destination file ${file}.7z already exists" >&2
    exit 1
  fi

  rm -f -- "${file}.7z"
  flags=""
  ${f_keep} || flags="$flags -sdel"
  ! ${f_force} || flags="$flags -y"
  "${prg7z}" a $flags -- "${file}.7z" "${file}" || {  rm -f -- "${file}.7z"; 
exit 1; }
}


decompress_file()
{
  file="$1"

  has_7z_suffix "${file}" || { echo "$0: ${file}: unknown suffix" >&2; exit 1; }

  # decompress to stdout
  if ${f_tostdout}; then
    # The following `| cat' pipe shouldn't be needed, however it is here to
    # trick 7z not to complain about writing data to terminal.
    "${prg7z}" x -so -- "${file}" | cat || exit 1
    return 0;
  fi

  flags=""
  ! ${f_force} || flags="$flags -y"
  "${prg7z}" x $flags -- "${file}" || exit 1

  # remove original file unless the archive contains more than one file
  if ! ${f_keep} && "${prg7z}" l --  "${file}" 2>/dev/null | grep -q '^1 file,' 
2>/dev/null; then
    rm -f -- "${file}"
  fi
}

process_file()
{
  file="$1"

  # check if file exists and is readable
  [ -r "${file}" ] || { echo "$0: cannot read ${file}" >&2; exit 1; }

  if ${f_compress}; then
    compress_file "${file}"
  else
    decompress_file "${file}"
  fi
}

process_stdin()
{
  check_not_a_tty

  tmp="`make_tmp_file`"
  trap "rm -f -- ${tmp}" 0

  if ${f_compress}; then

    rm -f -- "${tmp}"
    "${prg7z}" a -si -- "${tmp}" >/dev/null && cat -- "${tmp}" || exit 1

  else # decompress

    cat > "${tmp}"
    # The following `| cat' pipe shouldn't be needed, however it is here to
    # trick 7z not to complain about writing data to terminal.
    "${prg7z}" x -so -- "${tmp}" | cat || exit 1
  fi

  rm -f -- "${tmp}"
}


## MAIN


# files and flags
while [ "$#" != "0" ] ; do
  case "$1" in
    -c|--stdout|--to-stdout)
      f_tostdout=true
      ;;
    -d|--decompress|--uncompress)
      f_compress=false # decompressing
      ;;
    -f|--force)
      f_force=true
      ;;
    -h|--help)
      usage
      ;;
    -k|--keep)
      f_keep=true
      ;;
    --)
      shift
      break
      ;;
    -*)
      echo "$0: ignoring unknown option $1" >&2
      ;;
    *)
      break
      ;;
  esac
  shift
done


# make sure they're present, before we screw up
for i in mktemp rm cat tty grep; do
  if ! which $i >/dev/null ; then
    echo "$0: $i: command not found" >&2
    exit 1
  fi
done

if [ "$#" = 0 ]; then
  # compressing/decompressing using standard I/O
  process_stdin
  exit 0
fi

# only files now
while [ "$#" != "0" ] ; do
  process_file  "$1"
  shift
done

exit 0
++++++ p7zip.1 ++++++
.TH p7zip 1 "March 6th, 2016" "7-Zip"
.SH NAME
p7zip \- Wrapper on 7-Zip file archiver with high compression ratio
.SH SYNOPSIS
.B p7zip
.RB [ \-c | \-\-stdout | \-\-to\-stdout ]
.RB [ \-d | \-\-decompress | \-\-uncompress ]
.RB [ \-f | \-\-force ]
.RB [ \-h | \-\-help ]
.RB [ \-k | \-\-keep ]
.RB [ \-\- ]
.RI [ "file ..." ]
.SH DESCRIPTION
7-Zip is a file archiver supporting 7z (that implements LZMA compression 
algorithm
featuring very high compression ratio), LZMA2, XZ, ZIP, Zip64, CAB,
RAR (if the non-free p7zip-rar package is installed), ARJ, GZIP, BZIP2, TAR, 
CPIO, RPM, ISO,
most filesystem images and DEB formats.
Compression ratio in the new 7z format is 30-50% better than ratio in ZIP 
format.
.PP
.B p7zip
is a gzip-like CLI wrapper script for 7-Zip, and handles only the 7z format 
(the native
format of 7-Zip), internally executing either
.BR 7za (1)
or
.BR 7zr (1)
command.
.PP
With no switches passed in the command line, each given
.I file
argument is compressed into
.IR file.7z ,
and then removed.
.PP
With the
.B \-d
switch each passed
.I file
needs to end with the
.I .7z
extension and is decompressed. After the
decompression the original
.I file
is removed unless it contained more than one archived file.
.PP
When used without any
.I file
argument,
.BR p7zip
reads data from the standard input and compresses (or decompresses in case of
.BR \-d )
it into the standard output.
.SH SWITCHES
.TP
.BR \-c ", " \-\-stdout ", " \-\-to\-stdout
Write output on standard output.
.TP
.BR \-d ", " \-\-decompress ", " \-\-uncompress
Decompress file.
.TP
.BR \-f ", " \-\-force
Skip some checks and force compression or decompression.
.TP
.BR \-h ", " \--help
Print usage.
.TP
.BR \-k ", " \-\-keep
Do not delete input file.
.TP
.B \-\-
Treat all subsequent arguments as file names, even if they start with a dash.
.SH "SEE ALSO"
.BR 7z (1),
.BR 7za (1),
.BR 7zr (1),
.BR bzip2 (1),
.BR gzip (1),
.BR zip (1)
.SH AUTHOR
Written for Debian by Mohammed Adnene Trojette. Updated by Robert Luberda.

Reply via email to