commit cdemu-daemon for openSUSE:Factory
Hello community, here is the log from the commit of package cdemu-daemon for openSUSE:Factory checked in at 2015-11-26 17:04:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cdemu-daemon (Old) and /work/SRC/openSUSE:Factory/.cdemu-daemon.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "cdemu-daemon" Changes: -------- --- /work/SRC/openSUSE:Factory/cdemu-daemon/cdemu-daemon.changes 2015-03-01 14:46:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cdemu-daemon.new/cdemu-daemon.changes 2015-11-26 17:04:03.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Nov 23 22:21:26 UTC 2015 - jengelh@inai.de + +- Update to new upstream release 3.0.3 +* fixed a copy-and-paste error in feature initialization code +* daemon: device: signal the Media Eject Request event only when + device unload is requested via D-Bus API +- Run %fillup and populate /etc/sysconfig/cdemu-daemon +- Drop cdemu_daemon_typo_in_mmc_packet_commands_h.patch (merged) + +------------------------------------------------------------------- Old: ---- cdemu-daemon-3.0.2.tar.bz2 cdemu_daemon_typo_in_mmc_packet_commands_h.patch New: ---- cdemu-daemon-3.0.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cdemu-daemon.spec ++++++ --- /var/tmp/diff_new_pack.Y7wuQR/_old 2015-11-26 17:04:03.000000000 +0100 +++ /var/tmp/diff_new_pack.Y7wuQR/_new 2015-11-26 17:04:03.000000000 +0100 @@ -17,7 +17,7 @@ Name: cdemu-daemon -Version: 3.0.2 +Version: 3.0.3 Release: 0 Summary: Device daemon for cdemu, a virtual CD-ROM device emulator License: GPL-2.0+ @@ -29,7 +29,6 @@ Source2: 60-vhba.rules Source3: cdemu-daemon.sysconfig Patch1: logfile.diff -Patch2: cdemu_daemon_typo_in_mmc_packet_commands_h.patch BuildRequires: cmake >= 2.8.5 BuildRequires: pkgconfig BuildRequires: pkgconfig(ao) >= 0.8.0 @@ -39,6 +38,7 @@ BuildRequires: pkgconfig(gobject-2.0) >= 2.28 BuildRequires: pkgconfig(gthread-2.0) >= 2.28 BuildRequires: pkgconfig(libmirage) >= %version +Requires(pre): %fillup_prereq %description cdemu-daemon receives SCSI commands from kernel module thorugh the @@ -53,18 +53,15 @@ %prep %setup -q -%patch -P 1 -P 2 -p1 +%patch -P 1 -p1 %build -cmake . \ - -DCMAKE_INSTALL_PREFIX:PATH="%_prefix" \ - -DCMAKE_INSTALL_LIBEXECDIR:PATH="%_libexecdir" \ - -DCMAKE_C_FLAGS:STRING="%optflags" +%cmake -DCMAKE_INSTALL_LIBEXECDIR:PATH="%_libexecdir" make %{?_smp_mflags} %install b="%buildroot" -%make_install +%cmake_install mkdir -p "$b/%_sbindir" "$b/%_localstatedir/adm/fillup-templates" \ "$b/%_prefix/lib/udev/rules.d" install -pm0644 "%{S:2}" "$b/%_prefix/lib/udev/rules.d/60-vhba.rules" @@ -72,6 +69,9 @@ # Not desired for security; it would permit a user to start a system service. rm -rf "$b/%_datadir/dbus-1/system-services" "$b/%_sysconfdir/dbus-1/system.d/" +%post +%fillup_only + %files %defattr(-,root,root) %doc AUTHORS COPYING README ++++++ cdemu-daemon-3.0.2.tar.bz2 -> cdemu-daemon-3.0.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/CMakeLists.txt new/cdemu-daemon-3.0.3/CMakeLists.txt --- old/cdemu-daemon-3.0.2/CMakeLists.txt 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/CMakeLists.txt 2015-11-21 15:07:45.000000000 +0100 @@ -4,7 +4,7 @@ project (cdemu-daemon C) # Versioning -set (CDEMU_DAEMON_VERSION 3.0.2) +set (CDEMU_DAEMON_VERSION 3.0.3) set (CDEMU_DAEMON_INTERFACE_VERSION_MAJOR 7) set (CDEMU_DAEMON_INTERFACE_VERSION_MINOR 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/README new/cdemu-daemon-3.0.3/README --- old/cdemu-daemon-3.0.2/README 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/README 2015-11-21 15:07:45.000000000 +0100 @@ -1,5 +1,5 @@ CDEmu Daemon -3.0.2 +3.0.3 ~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/debian/cdemu-daemon.postinst new/cdemu-daemon-3.0.3/debian/cdemu-daemon.postinst --- old/cdemu-daemon-3.0.2/debian/cdemu-daemon.postinst 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/debian/cdemu-daemon.postinst 2015-11-21 15:07:45.000000000 +0100 @@ -15,8 +15,8 @@ case "$1" in configure) - # Set GID on cdemu daemon - dpkg-statoverride --update --add root cdrom 2755 "/usr/bin/cdemu-daemon" || myerror "Adding statoverride failed." + # Set permissions on cdemu daemon + dpkg-statoverride --update --add root cdrom 755 "/usr/bin/cdemu-daemon" || myerror "Adding statoverride failed." ;; abort-upgrade|abort-remove|abort-deconfigure) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/debian/cdemu-daemon.prerm new/cdemu-daemon-3.0.3/debian/cdemu-daemon.prerm --- old/cdemu-daemon-3.0.2/debian/cdemu-daemon.prerm 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/debian/cdemu-daemon.prerm 2015-11-21 15:07:45.000000000 +0100 @@ -18,7 +18,7 @@ # Kill any session instances of cdemu-daemon running. pkill -KILL "^cdemu-daemon$" && mywarning "Killed running daemon instances." - # Unset GID on cdemu daemon + # Unset permissions on cdemu daemon dpkg-statoverride --remove "/usr/bin/cdemu-daemon" || myerror "Removing statoverride failed." ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/debian/changelog new/cdemu-daemon-3.0.3/debian/changelog --- old/cdemu-daemon-3.0.2/debian/changelog 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/debian/changelog 2015-11-21 15:07:45.000000000 +0100 @@ -1,3 +1,8 @@ +cdemu-daemon (3.0.3-1) debian; urgency=low + * Updated to 3.0.3 + * Discontinue setting GID on the executable. + -- Rok Mandeljc <rok.mandeljc@gmail.com> Sat, 21 Nov 2015 12:00:00 +0100 + cdemu-daemon (3.0.2-1) debian; urgency=low * 01-dbus-config.diff: Patch D-BUS configuration. * Initial Release. Closes: #705409 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/src/device-commands.c new/cdemu-daemon-3.0.3/src/device-commands.c --- old/cdemu-daemon-3.0.2/src/device-commands.c 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/src/device-commands.c 2015-11-21 15:07:45.000000000 +0100 @@ -2335,7 +2335,7 @@ if (!cdb->start) { CDEMU_DEBUG(self, DAEMON_DEBUG_MMC, "%s: unloading disc...\n", __debug__); - if (!cdemu_device_unload_disc_private(self, FALSE, NULL)) { + if (!cdemu_device_unload_disc_private(self, NULL)) { CDEMU_DEBUG(self, DAEMON_DEBUG_MMC, "%s: failed to unload disc\n", __debug__); cdemu_device_write_sense(self, NOT_READY, MEDIUM_REMOVAL_PREVENTED); return FALSE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/src/device-features.c new/cdemu-daemon-3.0.3/src/device-features.c --- old/cdemu-daemon-3.0.2/src/device-features.c 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/src/device-features.c 2015-11-21 15:07:45.000000000 +0100 @@ -319,7 +319,7 @@ We return same three DCB descriptors as my drive does. */ general_feature = initialize_feature(0x010A, sizeof(struct Feature_0x010A) + 3*4); if (general_feature) { - struct Feature_0x0107 *feature = (struct Feature_0x0107 *)general_feature; + struct Feature_0x010A *feature = (struct Feature_0x010A *)general_feature; feature->ver = 0x00; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/src/device-load.c new/cdemu-daemon-3.0.3/src/device-load.c --- old/cdemu-daemon-3.0.2/src/device-load.c 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/src/device-load.c 2015-11-21 15:07:45.000000000 +0100 @@ -245,15 +245,10 @@ /**********************************************************************\ * Unload disc * \**********************************************************************/ -gboolean cdemu_device_unload_disc_private (CdemuDevice *self, gboolean force, GError **error) +gboolean cdemu_device_unload_disc_private (CdemuDevice *self, GError **error) { - /* We have to report eject request, even if it doesn't actually get carried - out, for example because device is locked. However, this should give - HAL a clue that it might be good idea to unlock the device... */ - self->priv->media_event = MEDIA_EVENT_EJECTREQUEST; - /* Check if the door is locked */ - if (!force && self->priv->locked) { + if (self->priv->locked) { CDEMU_DEBUG(self, DAEMON_DEBUG_MMC, "%s: device is locked\n", __debug__); g_set_error(error, CDEMU_ERROR, CDEMU_ERROR_DEVICE_LOCKED, "Device is locked!"); return FALSE; @@ -311,15 +306,24 @@ gboolean succeeded; g_mutex_lock(self->priv->device_mutex); - succeeded = cdemu_device_unload_disc_private(self, FALSE, error); + + /* This call is the equivalent of the user pressing the mechanical + switch on the logical unit to eject the disc, so it needs to + generate the media eject request event. The actual unload will + likely not happen at this point, due to device being locked; + instead, HAL/udev/udisksd2 may pick up the request, unlock the + device, and proceed with ejection again... */ + self->priv->media_event = MEDIA_EVENT_EJECTREQUEST; + + /* Attempt the actual unload */ + succeeded = cdemu_device_unload_disc_private(self, error); + g_mutex_unlock(self->priv->device_mutex); - /* Currently, the only case of unload command failing is when device is - locked. However, in that case, the unload attempt is reported, and if - HAL daemon is running, it will try to unlock the device and unload it - again. So in order not to bother clients with device locked error when - device will most likely get unloaded anyway, we ignore the command's - return status here... */ + /* Ignore the command's return value to avoid bothering the clients + with errors when device is most likely locked, and will be + unloaded by HAL/udev/udisksd2 upon reception of the above-set + eject request event ...*/ succeeded = TRUE; return succeeded; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/src/device-mapping.c new/cdemu-daemon-3.0.3/src/device-mapping.c --- old/cdemu-daemon-3.0.2/src/device-mapping.c 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/src/device-mapping.c 2015-11-21 15:07:45.000000000 +0100 @@ -27,7 +27,7 @@ { gboolean try_again = FALSE; gint ioctl_ret; - gint32 id[4]; + gint32 id[4] = {0}; /* Perform IOCTL */ ioctl_ret = ioctl(g_io_channel_unix_get_fd(self->priv->io_channel), 0xBEEF001, id); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/src/device-private.h new/cdemu-daemon-3.0.3/src/device-private.h --- old/cdemu-daemon-3.0.2/src/device-private.h 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/src/device-private.h 2015-11-21 15:07:45.000000000 +0100 @@ -181,7 +181,7 @@ void cdemu_device_write_sense (CdemuDevice *self, SenseKey sense_key, guint16 asc_ascq); /* Load/unload */ -gboolean cdemu_device_unload_disc_private (CdemuDevice *self, gboolean force, GError **error); +gboolean cdemu_device_unload_disc_private (CdemuDevice *self, GError **error); /* Mode pages */ gpointer cdemu_device_get_mode_page (CdemuDevice *self, gint page, ModePageType type); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cdemu-daemon-3.0.2/src/mmc-packet-commands.h new/cdemu-daemon-3.0.3/src/mmc-packet-commands.h --- old/cdemu-daemon-3.0.2/src/mmc-packet-commands.h 2014-09-28 21:19:13.000000000 +0200 +++ new/cdemu-daemon-3.0.3/src/mmc-packet-commands.h 2015-11-21 15:07:45.000000000 +0100 @@ -1667,7 +1667,7 @@ struct READ_TOC_PMA_ATIP_4_Descriptor { #if G_BYTE_ORDER == G_BIG_ENDIAN - guint8 one1 : 1 + guint8 one1 : 1; guint8 itwp : 3; guint8 reserved1 : 1; guint8 ref_speed : 3;
participants (1)
-
root@hilbert.suse.de