[arch-commits] Commit in cdemu-daemon/trunk (3 files)

Jan Steffens heftig at archlinux.org
Mon Apr 19 13:26:34 UTC 2021


    Date: Monday, April 19, 2021 @ 13:26:33
  Author: heftig
Revision: 919980

3.2.5-1

Modified:
  cdemu-daemon/trunk/PKGBUILD
  cdemu-daemon/trunk/cdemu-daemon.install
Deleted:
  cdemu-daemon/trunk/0001-Patch-system-daemon-for-Arch-friendliness.patch

------------------------------------------------------+
 0001-Patch-system-daemon-for-Arch-friendliness.patch |  153 -----------------
 PKGBUILD                                             |   27 +--
 cdemu-daemon.install                                 |   32 ---
 3 files changed, 18 insertions(+), 194 deletions(-)

Deleted: 0001-Patch-system-daemon-for-Arch-friendliness.patch
===================================================================
--- 0001-Patch-system-daemon-for-Arch-friendliness.patch	2021-04-19 12:36:25 UTC (rev 919979)
+++ 0001-Patch-system-daemon-for-Arch-friendliness.patch	2021-04-19 13:26:33 UTC (rev 919980)
@@ -1,153 +0,0 @@
-From de8825af23b63b78e6d8262b408f8350581ba58e Mon Sep 17 00:00:00 2001
-Message-Id: <de8825af23b63b78e6d8262b408f8350581ba58e.1547584763.git.jan.steffens at gmail.com>
-From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
-Date: Mon, 12 Jun 2017 22:22:51 +0200
-Subject: [PATCH] Patch system daemon for Arch-friendliness
-
----
- cdemu-daemon/CMakeLists.txt                     | 17 +++++++++++++++--
- cdemu-daemon/system/cdemu-daemon-dbus.conf      |  9 +++++++--
- cdemu-daemon/system/cdemu-daemon-system.sh      |  6 +++---
- cdemu-daemon/system/cdemu-daemon.conf           |  8 ++++++++
- cdemu-daemon/system/cdemu-daemon.service.in     | 10 ++++++++++
- .../system/net.sf.cdemu.CDEmuDaemon.service.in  |  4 ++--
- 6 files changed, 45 insertions(+), 9 deletions(-)
- create mode 100644 cdemu-daemon/system/cdemu-daemon.conf
- create mode 100644 cdemu-daemon/system/cdemu-daemon.service.in
-
-diff --git a/cdemu-daemon/CMakeLists.txt b/cdemu-daemon/CMakeLists.txt
-index cf41234a..adfcc3ac 100644
---- a/cdemu-daemon/CMakeLists.txt
-+++ b/cdemu-daemon/CMakeLists.txt
-@@ -15,7 +15,7 @@ set (CDEMU_DAEMON_INTERFACE_VERSION_MINOR 0)
- include (GNUInstallDirs)
- 
- # Options
--option (SYSTEM_BUS_SERVICE "Install CDEmu daemon as D-Bus system bus service" off)
-+option (SYSTEM_BUS_SERVICE "Install CDEmu daemon as D-Bus system bus service" on)
- option (SESSION_BUS_SERVICE "Install CDEmu daemon as D-Bus session bus service" on)
- 
- # If install prefix is /usr, override the sysconf dir to be /etc instead of /usr/etc
-@@ -45,6 +45,10 @@ configure_file (
-     ${PROJECT_SOURCE_DIR}/system/net.sf.cdemu.CDEmuDaemon.service.in
-     ${PROJECT_BINARY_DIR}/system/net.sf.cdemu.CDEmuDaemon.service
- )
-+configure_file (
-+    ${PROJECT_SOURCE_DIR}/system/cdemu-daemon.service.in
-+    ${PROJECT_BINARY_DIR}/system/cdemu-daemon.service
-+)
- 
- # Global definitions
- add_definitions (-std=c99) # We're compiling using C99
-@@ -122,13 +126,22 @@ if (SYSTEM_BUS_SERVICE)
-         PROGRAMS system/cdemu-daemon-system.sh
-         DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
-     )
-+    install (
-+        FILES ${PROJECT_BINARY_DIR}/system/cdemu-daemon.service
-+        DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system/
-+    )
-     install (
-         FILES ${PROJECT_BINARY_DIR}/system/net.sf.cdemu.CDEmuDaemon.service
-         DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system-services/
-     )
-     install (
-         FILES system/cdemu-daemon-dbus.conf
--        DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
-+        DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/system.d
-+    )
-+    install (
-+        FILES system/cdemu-daemon.conf
-+        RENAME cdemu-daemon
-+        DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/conf.d
-     )
- endif ()
- 
-diff --git a/cdemu-daemon/system/cdemu-daemon-dbus.conf b/cdemu-daemon/system/cdemu-daemon-dbus.conf
-index c450d78c..e86b62cf 100644
---- a/cdemu-daemon/system/cdemu-daemon-dbus.conf
-+++ b/cdemu-daemon/system/cdemu-daemon-dbus.conf
-@@ -11,8 +11,13 @@
-         <allow own="net.sf.cdemu.CDEmuDaemon"/>
-     </policy>
- 
--    <!-- Allow anyone to invoke methods on the interface -->
--    <policy context="default">
-+    <!-- Allow users at the console to invoke methods on the interface -->
-+    <policy at_console="true">
-+        <allow send_destination="net.sf.cdemu.CDEmuDaemon"/>
-+    </policy>
-+
-+    <!-- Allow users in the 'cdemu' group to invoke methods on the interface -->
-+    <policy group="cdemu">
-         <allow send_destination="net.sf.cdemu.CDEmuDaemon"/>
-     </policy>
- </busconfig>
-diff --git a/cdemu-daemon/system/cdemu-daemon-system.sh b/cdemu-daemon/system/cdemu-daemon-system.sh
-index d9ab60aa..735c2444 100755
---- a/cdemu-daemon/system/cdemu-daemon-system.sh
-+++ b/cdemu-daemon/system/cdemu-daemon-system.sh
-@@ -1,15 +1,15 @@
- #!/bin/sh
- # Starts the CDEmu daemon instance on D-Bus *system* bus. Optional
- # configuration (number of devices, audio driver, log file) are read
--# from /etc/sysconfig/cdemu-daemon
-+# from /etc/conf.d/cdemu-daemon
- 
- # Default settings
- NUM_DEVICES=1
- AUDIO_DRIVER=null
--LOG_FILE=/tmp/cdemu-daemon.log
-+LOG_FILE=/var/log/cdemu-daemon.log
- 
- # Read the settings
--CONFIG_FILE=/etc/sysconfig/cdemu-daemon
-+CONFIG_FILE=/etc/conf.d/cdemu-daemon
- 
- if [ -f ${CONFIG_FILE} ]; then
-     . ${CONFIG_FILE};
-diff --git a/cdemu-daemon/system/cdemu-daemon.conf b/cdemu-daemon/system/cdemu-daemon.conf
-new file mode 100644
-index 00000000..d0d6ecfe
---- /dev/null
-+++ b/cdemu-daemon/system/cdemu-daemon.conf
-@@ -0,0 +1,8 @@
-+# how many optical drives to emulate
-+#NUM_DEVICES=1
-+
-+# audio backend (null, default, alsa, or pulse)
-+#AUDIO_DRIVER=null
-+
-+# log file
-+#LOG_FILE=/var/log/cdemu-daemon.log
-diff --git a/cdemu-daemon/system/cdemu-daemon.service.in b/cdemu-daemon/system/cdemu-daemon.service.in
-new file mode 100644
-index 00000000..43b5a61d
---- /dev/null
-+++ b/cdemu-daemon/system/cdemu-daemon.service.in
-@@ -0,0 +1,10 @@
-+[Unit]
-+Description=CDEmu Daemon
-+
-+[Service]
-+Type=dbus
-+BusName=net.sf.cdemu.CDEmuDaemon
-+ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/cdemu-daemon-system.sh
-+
-+[Install]
-+WantedBy=multi-user.target
-diff --git a/cdemu-daemon/system/net.sf.cdemu.CDEmuDaemon.service.in b/cdemu-daemon/system/net.sf.cdemu.CDEmuDaemon.service.in
-index f9cf646b..9004c310 100644
---- a/cdemu-daemon/system/net.sf.cdemu.CDEmuDaemon.service.in
-+++ b/cdemu-daemon/system/net.sf.cdemu.CDEmuDaemon.service.in
-@@ -1,5 +1,5 @@
- [D-BUS Service]
--Name=net.sf.cdemu.CdemuDaemon
-+Name=net.sf.cdemu.CDEmuDaemon
- Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/cdemu-daemon-system.sh
- User=root
--
-+SystemdService=cdemu-daemon.service
--- 
-2.20.1
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-04-19 12:36:25 UTC (rev 919979)
+++ PKGBUILD	2021-04-19 13:26:33 UTC (rev 919980)
@@ -4,8 +4,8 @@
 # Contributor: Charles Lindsay <charles at chaoslizard.org>
 
 pkgname=cdemu-daemon
-pkgver=3.2.4
-pkgrel=2
+pkgver=3.2.5
+pkgrel=1
 pkgdesc="CD/DVD-ROM device emulator daemon"
 arch=(x86_64)
 url="https://cdemu.sourceforge.io/"
@@ -14,34 +14,29 @@
 makedepends=(cmake intltool)
 optdepends=('alsa-lib: to enable the ALSA audio driver'
             'pulseaudio: to enable the PA audio driver')
-backup=(etc/conf.d/cdemu-daemon)
 install=cdemu-daemon.install
-source=("https://downloads.sourceforge.net/cdemu/$pkgname/$pkgname-$pkgver.tar.bz2"
-        0001-Patch-system-daemon-for-Arch-friendliness.patch)
-sha256sums=('a6b32d4b78631e5f449f05f8d26b7f2f46dd3e82387f5855ccabb4933592de0b'
-            '233dc79359e53da3a0df880984b5ea6033756070cfe84183f39c602274f4b2d6')
+source=("https://downloads.sourceforge.net/cdemu/$pkgname/$pkgname-$pkgver.tar.xz")
+sha256sums=('8d1053b195e8f9040c5628340740aa9bbfdd4891bac06fbc5eb5cd4ec376e699')
 
 prepare() {
   cd $pkgname-$pkgver
-
-  # It's disabled by default. Should we even ship it?
-  patch -Np2 -i ../0001-Patch-system-daemon-for-Arch-friendliness.patch
 }
 
 build() {
-  CFLAGS+=" -fcommon"
   cmake -S $pkgname-$pkgver -B build \
     -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
-    -DCMAKE_INSTALL_SYSCONFDIR=/etc \
-    -DCMAKE_INSTALL_LIBEXECDIR=lib/$pkgname
+    -DCMAKE_INSTALL_PREFIX=/usr
   cmake --build build
 }
 
 package() {
   DESTDIR="$pkgdir" cmake --install build
+  install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 $pkgname-$pkgver/README
+  install -Dt "$pkgdir/usr/lib/systemd/user" -m644 \
+    $pkgname-$pkgver/service-example/cdemu-daemon.service
+  install -Dt "$pkgdir/usr/share/dbus-1/services" -m644 \
+    $pkgname-$pkgver/service-example/net.sf.cdemu.CDEmuDaemon.service
   echo vhba | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/cdemu.conf"
 }
 
-# vim:set ts=2 sw=2 et:
+# vim:set sw=2 et:

Modified: cdemu-daemon.install
===================================================================
--- cdemu-daemon.install	2021-04-19 12:36:25 UTC (rev 919979)
+++ cdemu-daemon.install	2021-04-19 13:26:33 UTC (rev 919980)
@@ -1,34 +1,16 @@
 post_install () {
-  cat <<MSG
-  > Only users with a hardware seat or in the 'cdemu' group
-    can communicate with the system daemon or make use of a
-    session daemon.
-
-  > If you want to output CD-Audio you need to use a session
-    daemon, e.g. via "cdemu -b session". If you use ALSA and
-    not PulseAudio, echo AUDIO_DRIVER=alsa > ~/.cdemu-daemon
-
-  > The daemons are usually started on-demand, but a system
-    daemon can be manually started via cdemu-daemon.service.
-    See /etc/conf.d/cdemu-daemon for further configuration.
-
-MSG
-
-  modprobe vhba
+  modprobe vhba || :
 }
 
 post_upgrade () {
-  if (( $(vercmp $2 2.0.0) < 0)); then
+  if (( $(vercmp $2 3.2.5) < 0)); then
     cat <<MSG
-  > Configuration files and log files have been renamed in
-    order to bring Arch closer to upstream. In particular,
-    this affects:
-      /etc/conf.d/cdemud  --> /etc/conf.d/cdemu-daemon
-      /var/log/cdemud.log --> /var/log/cdemu-daemon.log
-      ~/.cdemud           --> ~/.cdemu-daemon
-      ~/.cdemud.log       --> ~/.cdemu-daemon.log
-    Please move your configuration.
+  > The system daemon has been removed. The session daemon must now be used.
 
+  > The daemon now uses a configuration file at ~/.config/cdemu-daemon . It
+    uses a different format from the old ~/.cdemu-daemon file. If you have
+    customized the configuration before, you need to port your old settings.
+    See /usr/share/doc/cdemu-daemon/README for details.
 MSG
   fi
 }



More information about the arch-commits mailing list