Accepting request 150468 from home:rmilasan:branches:Printing

- Move everything (pid, lock, socket files) to /run only for 12.3.
  Added: cups-move-everything-to-run.patch

OBS-URL: https://build.opensuse.org/request/show/150468
OBS-URL: https://build.opensuse.org/package/show/Printing/cups?expand=0&rev=254
This commit is contained in:
Johannes Meixner 2013-02-01 14:39:12 +00:00 committed by Git OBS Bridge
parent 4879e1f57e
commit 12e1c43112
3 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,26 @@
Index: cups-1.5.4/config.h.in
===================================================================
--- cups-1.5.4.orig/config.h.in
+++ cups-1.5.4/config.h.in
@@ -131,7 +131,7 @@
#define CUPS_SBINDIR "/usr/sbin"
#define CUPS_SERVERBIN "/usr/lib/cups"
#define CUPS_SERVERROOT "/etc/cups"
-#define CUPS_STATEDIR "/var/run/cups"
+#define CUPS_STATEDIR "/run/cups"
/*
Index: cups-1.5.4/configure
===================================================================
--- cups-1.5.4.orig/configure
+++ cups-1.5.4/configure
@@ -6424,7 +6424,7 @@ case "$uname" in
;;
*)
# All others
- CUPS_STATEDIR="$localstatedir/run/cups"
+ CUPS_STATEDIR="/run/cups"
;;
esac
cat >>confdefs.h <<_ACEOF

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 30 13:24:43 UTC 2013 - rmilasan@suse.com
- Move everything (pid, lock, socket files) to /run only for 12.3.
Added: cups-move-everything-to-run.patch
-------------------------------------------------------------------
Thu Dec 20 12:38:47 CET 2012 - jsmeix@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package cups
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cups
BuildRequires: dbus-1-devel
BuildRequires: fdupes
@ -151,6 +152,10 @@ Patch105: cups-0001-systemd-add-systemd-socket-activation-and-unit-files.p
Patch106: cups-config-libs.patch
# Patch107 provides cupsd.service in cups.service
Patch107: cups-provides-cupsd-service.patch
%if %suse_version > 1220
# Patch108 cups-move-everything-to-run.patch (move pid, socket and lock files to /run)
Patch108: cups-move-everything-to-run.patch
%endif
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -289,6 +294,10 @@ printer drivers for CUPS.
%patch106
# Patch107 provides cupsd.service in cups.service
%patch107 -p1
%if %suse_version > 1220
# Patch108 moves everything to /run
%patch108 -p1
%endif
%build
# Disable SILENT run of make so that make runs verbose as usual:
@ -341,6 +350,10 @@ install -d -m755 $RPM_BUILD_ROOT/etc/init.d
# Source101: cups.init
install -m755 %{SOURCE101} $RPM_BUILD_ROOT/etc/init.d/cups
ln -sf ../../etc/init.d/cups $RPM_BUILD_ROOT/usr/sbin/rccups
%if %suse_version > 1220
sed -i -e 's|/var/run|/run|g' $RPM_BUILD_ROOT/etc/init.d/cups
sed -i -e 's|/var/lock|/run/lock|g' $RPM_BUILD_ROOT/etc/init.d/cups
%endif
# Source103: cups.sysconfig
install -d -m755 $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 %{SOURCE103} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.cups
@ -352,6 +365,9 @@ ln -sf /usr/share/ghostscript/fonts $RPM_BUILD_ROOT/usr/share/cups/
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cups/ssl
# Add a client.conf as template (Source108: cups-client.conf):
install -m644 %{SOURCE108} $RPM_BUILD_ROOT%{_sysconfdir}/cups/client.conf
%if %suse_version > 1220
sed -i -e 's|/var/run|/run|g' $RPM_BUILD_ROOT%{_sysconfdir}/cups/client.conf
%endif
# Source104: cups.xinetd
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d
install -m 644 -D %{SOURCE104} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/cups-lpd