Hello community,

here is the log from the commit of package cdemu-client for openSUSE:Factory 
checked in at 2019-07-11 13:18:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cdemu-client (Old)
 and      /work/SRC/openSUSE:Factory/.cdemu-client.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cdemu-client"

Thu Jul 11 13:18:40 2019 rev:14 rq:714424 version:3.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/cdemu-client/cdemu-client.changes        
2017-08-08 11:59:49.903019942 +0200
+++ /work/SRC/openSUSE:Factory/.cdemu-client.new.4615/cdemu-client.changes      
2019-07-11 13:18:55.178757445 +0200
@@ -1,0 +2,9 @@
+Wed Jul  3 11:49:44 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Update to new upstream release 3.2.0
+  * Switched to python3.
+  * Added "bdr" as valid blank medium type.
+  * Implemented "dvd-report-css" ad device option instead of
+    image-loading parameter.
+
+-------------------------------------------------------------------

Old:
----
  cdemu-client-3.1.0.tar.bz2

New:
----
  cdemu-client-3.2.0.tar.bz2

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

Other differences:
------------------
++++++ cdemu-client.spec ++++++
--- /var/tmp/diff_new_pack.LAlmDc/_old  2019-07-11 13:18:55.746757267 +0200
+++ /var/tmp/diff_new_pack.LAlmDc/_new  2019-07-11 13:18:55.750757265 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package cdemu-client
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,15 +12,15 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 Name:           cdemu-client
-Version:        3.1.0
+Version:        3.2.0
 Release:        0
 Summary:        Command-line client to control cdemu-daemon
-License:        GPL-2.0+
+License:        GPL-2.0-or-later
 Group:          System/Filesystems
 Url:            http://cdemu.sf.net/about/client/
 
@@ -29,9 +29,13 @@
 BuildRequires:  cmake >= 2.8.5
 BuildRequires:  gettext-tools >= 0.15
 BuildRequires:  intltool >= 0.21
-BuildRequires:  python >= 2.6
-Requires:       dbus-1-python
-Requires:       python >= 2.6
+BuildRequires:  python3 >= 3.4
+BuildRequires:  pkgconfig(bash-completion)
+Requires:       python3 >= 3.4
+Requires:       python3-dbus-python
+Requires:       python3-gobject
+Requires:       typelib(GLib)
+Requires:       typelib(Gio)
 BuildArch:      noarch
 
 %description
@@ -59,11 +63,10 @@
 %files
 %defattr(-,root,root)
 %doc AUTHORS COPYING NEWS README
-%dir %_sysconfdir/bash_completion.d/
-%config %_sysconfdir/bash_completion.d/cdemu-bash-completion.sh
 %_bindir/cdemu
 %_datadir/applications/%name.desktop
 %_datadir/pixmaps/%name.svg
+%_datadir/bash-completion/
 %_mandir/man1/cdemu.1*
 
 %files lang -f cdemu.lang

++++++ cdemu-client-3.1.0.tar.bz2 -> cdemu-client-3.2.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/CMakeLists.txt 
new/cdemu-client-3.2.0/CMakeLists.txt
--- old/cdemu-client-3.1.0/CMakeLists.txt       2017-06-10 23:29:17.000000000 
+0200
+++ new/cdemu-client-3.2.0/CMakeLists.txt       2018-07-07 21:55:02.000000000 
+0200
@@ -19,6 +19,7 @@
 # Dependencies
 find_package (IntlTool 0.21 REQUIRED)
 find_package (Gettext 0.15 REQUIRED)
+find_package (PkgConfig REQUIRED)
 
 if (POST_INSTALL_HOOKS)
     find_program (UPDATE_DESKTOP_DATABASE_EXECUTABLE NAMES 
update-desktop-database)
@@ -36,9 +37,33 @@
     DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
 )
 
+# determine the bash-completion install path
+pkg_check_modules(BASH_COMPLETION bash-completion)
+if (BASH_COMPLETION_FOUND)
+    # pkg_get_variable() was introduced in CMake 3.4, but for now, we
+    # need to support older versions as well.
+    if (${CMAKE_VERSION} VERSION_LESS "3.4.0")
+        execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} 
--variable=completionsdir bash-completion
+            OUTPUT_VARIABLE def_completionsdir
+            ERROR_QUIET
+            OUTPUT_STRIP_TRAILING_WHITESPACE)
+    else()
+        pkg_get_variable(def_completionsdir bash-completion completionsdir)
+    endif()
+else()
+    # Fall back to the old path
+    set(def_completionsdir ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d)
+endif()
+
+set(CMAKE_INSTALL_COMPLETIONSDIR "${def_completionsdir}"
+    CACHE PATH "bash shell completions (${def_completionsdir})")
+
 install (
     FILES data/cdemu-bash-completion.sh
-    DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/bash_completion.d
+    DESTINATION ${CMAKE_INSTALL_COMPLETIONSDIR}
+    # the completion filename must match executable name for autoloading
+    # to work (bash-completion 2.0)
+    RENAME cdemu
 )
 
 install (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/README 
new/cdemu-client-3.2.0/README
--- old/cdemu-client-3.1.0/README       2017-06-10 23:29:17.000000000 +0200
+++ new/cdemu-client-3.2.0/README       2018-07-07 21:55:02.000000000 +0200
@@ -1,5 +1,5 @@
 CDEmu client
-3.1.0
+3.2.0
 ~~~~~
 
 Table of Contents:
@@ -26,11 +26,16 @@
 
 2. Requirements:
 ~~~~~~~~~~~~~~~~
- - Python >= 2.6
- - PyGObject >= 3.0.0 (glib and gio modules are required)
+
+ - CMake >= 2.8.5
  - IntlTool >= 0.21
  - GetText >= 0.15
 
+ - Python3 >= 3.4 (default) or Python2 >= 2.7
+ - PyGObject >= 3.0.0
+
+ - GLib, GIO >= 2.28 GIR
+
 
 3. Installation:
 ~~~~~~~~~~~~~~~~
@@ -60,7 +65,8 @@
 the password using standard input without echo)
 
 Loading a raw image of a CSS-encrypted DVD created by 'dd', so it can be 
played by mplayer:
- cdemu load 0 ~/image.iso --dvd-report-css=true
+ cdemu load 0 ~/image.iso
+ cdemu dvd-report-css 0 1
 
 Creating a blank recordable disc: DVD+R SL with ISO image writer:
  cdemu create-blank --writer-id=WRITER-ISO --medium-type=dvd+r 0 
~/output-image.iso
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/data/cdemu-bash-completion.sh 
new/cdemu-client-3.2.0/data/cdemu-bash-completion.sh
--- old/cdemu-client-3.1.0/data/cdemu-bash-completion.sh        2017-06-10 
23:29:17.000000000 +0200
+++ new/cdemu-client-3.2.0/data/cdemu-bash-completion.sh        2018-07-07 
21:55:02.000000000 +0200
@@ -112,7 +112,7 @@
             return 0
             ;;
         "--medium-type")
-            local medium_types="cdr74 cdr80 cdr90 cdr99 dvd+r"
+            local medium_types="cdr74 cdr80 cdr90 cdr99 dvd+r bdr"
             COMPREPLY=( $(compgen -W "${medium_types}" -- ${cur}) )
             return 0
             ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/debian/changelog 
new/cdemu-client-3.2.0/debian/changelog
--- old/cdemu-client-3.1.0/debian/changelog     2017-06-10 23:29:17.000000000 
+0200
+++ new/cdemu-client-3.2.0/debian/changelog     2018-07-07 21:55:02.000000000 
+0200
@@ -1,3 +1,3 @@
-cdemu-client (3.1.0-1) debian; urgency=low
+cdemu-client (3.2.0-1) debian; urgency=low
   * Initial Release. Closes: #705409
  -- Henrik Stokseth <[email protected]>  Sat, 05 Apr 2014 
12:00:00 +0100
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/debian/control 
new/cdemu-client-3.2.0/debian/control
--- old/cdemu-client-3.1.0/debian/control       2017-06-10 23:29:17.000000000 
+0200
+++ new/cdemu-client-3.2.0/debian/control       2018-07-07 21:55:02.000000000 
+0200
@@ -4,14 +4,14 @@
 Homepage: http://cdemu.sourceforge.net/
 Maintainer: Henrik Stokseth <[email protected]>
 Build-Depends: debhelper (>= 9)
-Build-Depends-Indep: python (>= 2.6.6-3), intltool, cmake (>= 2.8.5), dh-python
-X-Python-Version: >= 2.6.6
+Build-Depends-Indep: python3 (>= 3.4.0), intltool, cmake (>= 2.8.5), 
dh-python, bash-completion
+X-Python3-Version: >= 3.4.0
 Standards-Version: 3.9.7
 
 
 Package: cdemu-client
 Architecture: all
-Depends: python (>= 2.6.6-3), python-gi (>= 3.0.0), gir1.2-glib-2.0, 
cdemu-daemon (>= 3.0.0), ${python:Depends}, ${misc:Depends}
+Depends: python3 (>= 3.4.0), python3-gi (>= 3.0.0), gir1.2-glib-2.0, 
cdemu-daemon (>= 3.0.0), ${python3:Depends}, ${misc:Depends}
 Recommends: bash-completion, gcdemu (>= 3.0.0)
 Description: Command-line client to control CDEmu daemon
  This is cdemu-client, a command-line client for controlling the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/debian/rules 
new/cdemu-client-3.2.0/debian/rules
--- old/cdemu-client-3.1.0/debian/rules 2017-06-10 23:29:17.000000000 +0200
+++ new/cdemu-client-3.2.0/debian/rules 2018-07-07 21:55:02.000000000 +0200
@@ -9,5 +9,5 @@
        dh_auto_configure -- "-DPOST_INSTALL_HOOKS:BOOL=OFF"
 
 %:
-       dh $@ --with python2
+       dh $@ --with python3
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/man/cdemu.1 
new/cdemu-client-3.2.0/man/cdemu.1
--- old/cdemu-client-3.1.0/man/cdemu.1  2017-06-10 23:29:17.000000000 +0200
+++ new/cdemu-client-3.2.0/man/cdemu.1  2018-07-07 21:55:02.000000000 +0200
@@ -62,14 +62,6 @@
 Allows an encoding for text-based image format (such as CUE) to be specified. 
This
 might be needed if the image descriptor file contains non-ASCII characters and 
does
 not use Unicode.
-
-.B --dvd-report-css <true/false>
-Mark the DVD image as CSS-encrypted. This influences the generation of fake
-Disc Structure 0x01, and as such works only with images of DVD videos that do
-not provide this information (most images, with exception of perhaps mds/mdf, 
don't).
-Enabling this option allows images of CSS-encrypted DVDs (e.g. created using 
'dd'
-or 'readcd' without running through a CSS decryption step when creating the 
image)
-to be played by a deCSS-enabled Linux media player.
 .TP
 .B create-blank [options] --writer_id=<writer-id> <device> <image_file>
 Creates blank recordable disc in the specified device. \fBdevice\fR is the 
number
@@ -131,6 +123,18 @@
 desired device, or \fIall\fR. \fBnew-value\fR is the new value to be set.
 If this argument is omitted, currently set value is displayed.
 .TP
+.B dvd-report-css <device> [new-value]
+Report the loaded DVD as CSS-encrypted. \fBdevice\fR is the number of the
+desired device, or \fIall\fR. \fBnew-value\fR is the new value to be set.
+If this argument is omitted, currently set value is displayed.
+
+This flag influences the generation of fake Disc Structure 0x01, and as
+such works only with images of DVD videos that do not provide this
+information (most images, with exception of perhaps mds/mdf, don't).
+Enabling this option allows images of CSS-encrypted DVDs (e.g. created using 
'dd'
+or 'readcd' without running through a CSS decryption step when creating the 
image)
+to be played by a deCSS-enabled Linux media player.
+.TP
 .B device-id <device> [new-vendor-id] [new-product-id] [new-revision] 
[new-vendor-specific]
 Displays/sets device ID. \fBdevice\fR is the number of the desired device.
 \fBnew-vendor-id\fR is the new vendor ID string to be set (8 characters max).
@@ -174,7 +178,8 @@
  cdemu load 0 ~/image.daa --password=seeninplain
 .TP
 .B Loading a raw image of a CSS-encrypted DVD created by 'dd', so it can be 
played by mplayer:
- cdemu load 0 ~/image.iso --dvd-report-css=true
+ cdemu load 0 ~/image.iso
+ cdemu dvd-report-css 0 1
 .TP
 .B Creating a blank recordable disc: DVD+R SL with ISO image writer:
 cdemu create-blank --writer-id=WRITER-ISO --medium-type=dvd+r 0 
~/output-image.iso
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cdemu-client-3.1.0/src/cdemu 
new/cdemu-client-3.2.0/src/cdemu
--- old/cdemu-client-3.1.0/src/cdemu    2017-06-10 23:29:17.000000000 +0200
+++ new/cdemu-client-3.2.0/src/cdemu    2018-07-07 21:55:02.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # cdemu: command-line CDEmu client
@@ -41,7 +41,7 @@
 
 # *** Globals ***
 app_name = "cdemu"
-app_version = "3.1.0"
+app_version = "3.2.0"
 supported_daemon_interface_version = [ 7, 0 ]
 
 # I18n
@@ -53,12 +53,18 @@
 
 
 # Set process name
-if sys.platform == "linux2":
-    # Set process name.  Only works on Linux >= 2.1.57.
+# "linux2" is for python2, "linux" is for python3
+if sys.platform == "linux" or sys.platform == "linux2":
+    # Process name must be a byte string...
+    if isinstance(app_name, bytes):
+        app_name_bytes = app_name
+    else:
+        app_name_bytes = app_name.encode('utf-8')
+
     try:
         import ctypes
         libc = ctypes.CDLL("libc.so.6")
-        libc.prctl(15, app_name, 0, 0, 0) # 15 = PR_SET_NAME
+        libc.prctl(15, app_name_bytes, 0, 0, 0) # 15 = PR_SET_NAME
     except Exception:
         pass
 
@@ -115,7 +121,6 @@
         parser.add_argument("image_file", type=str, nargs="+", help=_("image 
file(s)"))
         parser.add_argument("--password", type=str, help=_("password for 
encrypted images"))
         parser.add_argument("--encoding", type=str, help=_("encoding for 
text-based images"))
-        parser.add_argument("--dvd-report-css", action="store_true", 
help=_("flag the DVD disc as CSS-encoded"))
 
     def __call__ (self, proxy, arguments):
         # We need to pass absolute filenames to daemon
@@ -127,8 +132,6 @@
             parser_params["encoding"] = GLib.Variant("s", arguments.encoding)
         if hasattr(arguments, "password"):
             parser_params["password"] = GLib.Variant("s", arguments.password)
-        if hasattr(arguments, "dvd_report_css"):
-            parser_params["dvd-report-css"] = GLib.Variant("b", 
arguments.dvd_report_css)
 
         # Particular device vs. any device
         if arguments.device == "any":
@@ -192,7 +195,7 @@
         parser.add_argument("device", type=str, help=_("device"))
         parser.add_argument("image_file", type=str, help=_("image 
filename/basename"))
         parser.add_argument("--writer-id", type=str, nargs="?", required=True, 
help=_("ID of image writer to use"))
-        parser.add_argument("--medium-type", type=str, nargs="?", 
choices=['cdr74', 'cdr80', 'cdr90', 'cdr99', 'dvd+r'], help=_("medium type"))
+        parser.add_argument("--medium-type", type=str, nargs="?", 
choices=['cdr74', 'cdr80', 'cdr90', 'cdr99', 'dvd+r', 'bdr'], help=_("medium 
type"))
         parser.add_argument("--param", type=str, nargs="?", action='append', 
help=_("additional writer parameter(s)"))
 
     def __call__ (self, proxy, arguments):
@@ -290,7 +293,10 @@
             valid_parameters[parameter_entry[0]] = parameter_entry
 
         # Now, go over given parameters and validate them
-        for key,value in parameters.items():
+        # NOTE: we need to use list(parameters.items()) because we may
+        # change the dictionary (pop() call during validation), and that
+        # raises error in python3
+        for key,value in list(parameters.items()):
             try:
                 parameter_entry = valid_parameters[key]
             except KeyError as e:
@@ -834,6 +840,86 @@
 
 
 ########################################################################
+#                            DVD report CSS                            #
+########################################################################
+class cmd_dvd_report_css (object):
+    def __init__ (self, subparsers):
+        name = "dvd-report-css"
+        description_msg = _("")
+        help_msg = _("displays/sets DVD report CSS/CPPM flag")
+
+        parser = subparsers.add_parser(name, description=description_msg, 
help=help_msg, formatter_class=argparse.ArgumentDefaultsHelpFormatter, 
argument_default=argparse.SUPPRESS)
+        parser.set_defaults(command_function=self)
+
+        parser.add_argument("device", type=str, help=_("device"))
+        parser.add_argument("new_value", nargs="?", type=str, help=_("new 
value"))
+
+    def __call__ (self, proxy, arguments):
+        # Set DVD report CSS flag
+        if hasattr(arguments, "new_value"):
+            try:
+                enabled = str2bool(arguments.new_value)
+            except ValueError:
+                raise CDEmuError(_("String '%s' is not a number") % 
(arguments[1]))
+
+            if arguments.device == "all":
+                try:
+                    num_devices = proxy.GetNumberOfDevices()
+                except GLib.Error as e:
+                    raise CDEmuError(_("Failed to get number of devices: %s") 
% (e))
+
+                print(_("Setting DVD report CSS/CPPM flag of all devices to 
%i.") % (enabled))
+                for device in range(0, num_devices):
+                    try:
+                        proxy.DeviceSetOption(device, "dvd-report-css", 
GLib.Variant("b", enabled))
+                    except GLib.Error as e:
+                        print_warning(_("Failed to set DVD report CSS/CPPM 
flag of device %i to %i: %s") % (device, enabled, e))
+                        continue
+            else:
+                try:
+                    device = int(arguments.device, 0)
+                except ValueError:
+                    raise CDEmuError(_("String '%s' is not a number") % 
(arguments.device))
+
+                print(_("Setting DVD report CSS/CPPM flag of device %i to 
%i.") % (device, enabled))
+                try:
+                    proxy.DeviceSetOption(device, "dvd-report-css", 
GLib.Variant("b", enabled))
+                except GLib.Error as e:
+                    raise CDEmuError(_("Failed to set DVD report CSS/CPPM flag 
of device %i to %i: %s") % (device, enabled, e))
+
+        # Get DVD report CSS flag
+        else:
+            # Particular device vs. all devices
+            if arguments.device == "all":
+                try:
+                    num_devices = proxy.GetNumberOfDevices()
+                except GLib.Error as e:
+                    raise CDEmuError(_("Failed to get number of devices: %s") 
% (e))
+
+                print_header(_("Devices' DVD report CSS/CPPM flag:"))
+                print("%-5s %-10s" % (_("DEV"), _("ENABLED")))
+
+                for device in range(0, num_devices):
+                    try:
+                        enabled = proxy.DeviceGetOption(device, 
"dvd-report-css")
+                    except GLib.Error as e:
+                        print_warning(_("Failed to get DVD report CSS/CPPM 
flag of device %i: %s") % (device, e))
+                        continue
+
+                    print("%-5s %i" % (device, enabled))
+            else:
+                try:
+                    device = int(arguments.device, 0)
+                    enabled = proxy.DeviceGetOption(device, "dvd-report-css")
+                except GLib.Error as e:
+                    raise CDEmuError(_("Failed to get DVD report CSS/CPPM flag 
of device %i: %s") % (device, e))
+                except ValueError:
+                    raise CDEmuError(_("String '%s' is not a number") % 
(arguments.device))
+
+                print(_("DVD report CSS/CPPM flag of device %i: %i") % 
(device, enabled))
+
+
+########################################################################
 #                               Device ID                              #
 ########################################################################
 class cmd_device_id (object):
@@ -897,7 +983,7 @@
                 for device in range(0, num_devices):
                     try:
                         values = proxy.DeviceGetOption(device, "device-id")
-                        device_id = map(str, values)
+                        device_id = list(map(str, values))
                     except GLib.Error as e:
                         print_warning(_("Failed to get device ID of device %i: 
%s") % (device, e))
                         continue
@@ -907,7 +993,7 @@
                 try:
                     device = int(arguments.device, 0)
                     values = proxy.DeviceGetOption(device, "device-id")
-                    device_id = map (str, values)
+                    device_id = list(map(str, values))
                 except GLib.Error as e:
                     raise CDEmuError(_("Failed to get device ID of device %i: 
%s") % (device, e))
                 except ValueError:
@@ -1223,6 +1309,7 @@
     cmd_dpm_emulation(subparsers) # DPM emulation
     cmd_tr_emulation(subparsers) # TR emulation
     cmd_bad_sector_emulation(subparsers) # Bad sector emulation
+    cmd_dvd_report_css(subparsers) # DVD report CSS/CPPM
     cmd_device_id(subparsers) # Device ID
     cmd_enum_parsers(subparsers) # Enumerate parsers
     cmd_enum_writers(subparsers) # Enumerate writers


Reply via email to