|
@@ -9,7 +9,7 @@
|
|
|
|
|
|
Summary: Common Unix Printing System
|
|
|
Name: cups
|
|
|
-Version: 2.3.3
|
|
|
+Version: 2.4.7
|
|
|
Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
Group: servers
|
|
|
Vendor: Project Vine
|
|
@@ -23,16 +23,12 @@ Source: https://github.com/OpenPrinting/cups/archive/v%{version}.tar.gz#/cups-%{
|
|
|
Source1: cups.init
|
|
|
# Pixmap for desktop file
|
|
|
Source2: cupsprinter.png
|
|
|
-# udev rules for libusb devices
|
|
|
-Source3: cups-libusb.rules
|
|
|
# LSPP-required ps->pdf filter
|
|
|
Source4: pstopdf
|
|
|
# xinetd config file for cups-lpd service
|
|
|
Source5: cups-lpd
|
|
|
# Logrotate configuration
|
|
|
Source6: cups.logrotate
|
|
|
-# Backend for NCP protocol
|
|
|
-Source7: ncp.backend
|
|
|
# Cron-based tmpwatch for /var/spool/cups/tmp
|
|
|
Source8: cups.cron
|
|
|
# Filter and PPD for textonly printing
|
|
@@ -40,7 +36,6 @@ Source9: textonly.filter
|
|
|
Source10: textonly.ppd
|
|
|
Source11: macros.cups
|
|
|
|
|
|
-Source101: http://www.openprinting.org/download/printing/dnssd
|
|
|
Source102: pstoraster
|
|
|
Source103: pstoraster.convs
|
|
|
Source104: postscript.ppd.gz
|
|
@@ -69,60 +64,36 @@ Patch3: cups-banners.patch
|
|
|
Patch4: cups-no-export-ssllibs.patch
|
|
|
# enables old uri usb:/dev/usb/lp0 - leave it here for users of old printers
|
|
|
Patch5: cups-direct-usb.patch
|
|
|
-# fix for redhat dbus spooler - adding new dbus functions to backend/ipp.c
|
|
|
-# -> initialize dbus connection and sending dbus broadcast about job queued
|
|
|
-# on remote queue with QueueChanged type for PRINTER_CHANGED, JOB_STATE_CHANGED
|
|
|
-# and PRINTER_STATE_CHANGED events
|
|
|
-Patch6: cups-eggcups.patch
|
|
|
# when system workload is high, timeout for cups-driverd can be reached -
|
|
|
# increase the timeout
|
|
|
-Patch7: cups-driverd-timeout.patch
|
|
|
-# cupsd implement its own logrotate, but when MaxLogSize 0 is used, logrotated
|
|
|
-# takes care of it
|
|
|
-Patch8: cups-logrotate.patch
|
|
|
+Patch6: cups-driverd-timeout.patch
|
|
|
# usb backend didn't get any notification about out-of-paper because of kernel
|
|
|
-Patch9: cups-usb-paperout.patch
|
|
|
+Patch7: cups-usb-paperout.patch
|
|
|
# uri compatibility with old Fedoras
|
|
|
-Patch10: cups-uri-compat.patch
|
|
|
-# fixing snmp oid for hp printer - upstream doesn't want to support too much
|
|
|
-# snmp backend, because it's deprecated
|
|
|
-Patch11: cups-hp-deviceid-oid.patch
|
|
|
-# same as HP OID
|
|
|
-Patch12: cups-ricoh-deviceid-oid.patch
|
|
|
-# change to notify type, because when it fails to start, it gives a error
|
|
|
-# message + renaming org.cups.cupsd names, because we have cups units in
|
|
|
-# in older Fedoras
|
|
|
-Patch13: cups-systemd-socket.patch
|
|
|
+Patch8: cups-uri-compat.patch
|
|
|
# use IP_FREEBIND, because cupsd cannot bind to not yet existing IP address
|
|
|
# by default
|
|
|
-Patch14: cups-freebind.patch
|
|
|
+Patch9: cups-freebind.patch
|
|
|
# add support of multifile
|
|
|
-Patch15: cups-ipp-multifile.patch
|
|
|
+Patch10: cups-ipp-multifile.patch
|
|
|
# prolongs web ui timeout
|
|
|
-Patch16: cups-web-devices-timeout.patch
|
|
|
-# needs to be set to Yes to avoid race conditions
|
|
|
-Patch17: cups-synconclose.patch
|
|
|
-# ypbind must be started before cups if NIS configured
|
|
|
-Patch18: cups-ypbind.patch
|
|
|
+Patch11: cups-web-devices-timeout.patch
|
|
|
# failover backend for implementing failover functionality
|
|
|
# TODO: move it to the cups-filters upstream
|
|
|
-Patch19: cups-failover-backend.patch
|
|
|
-
|
|
|
-# reported upstream
|
|
|
-# adds logs when job fails due bad conversion
|
|
|
-Patch20: cups-filter-debug.patch
|
|
|
+Patch12: cups-failover-backend.patch
|
|
|
# add device id for dymo printer
|
|
|
-Patch21: cups-dymo-deviceid.patch
|
|
|
-# 1822154 - cups.service doesn't execute automatically on request
|
|
|
-# https://github.com/apple/cups/issues/5708
|
|
|
-Patch22: cups-autostart-when-enabled.patch
|
|
|
+Patch13: cups-dymo-deviceid.patch
|
|
|
|
|
|
+%if 0%{?lspp}
|
|
|
# selinux and audit enablement for CUPS - needs work and CUPS upstream wants
|
|
|
# to have these features implemented their way in the future
|
|
|
Patch100: cups-lspp.patch
|
|
|
+%endif
|
|
|
|
|
|
-# vine
|
|
|
-Patch1000: cups-2.3.3-serverbin-compat.patch
|
|
|
+#### UPSTREAM PATCHES (starts with 1000) ####
|
|
|
+# https://github.com/OpenPrinting/cups/pull/742
|
|
|
+# 2218124 - The command "cancel -x <job>" does not remove job files
|
|
|
+Patch1001: 0001-Use-purge-job-instead-of-purge-jobs-when-canceling-a.patch
|
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
@@ -271,7 +242,7 @@ lpd emulation.
|
|
|
|
|
|
%package -n compat32-%{name}-libs
|
|
|
Summary: Common Unix Printing System - libraries
|
|
|
-Group: system
|
|
|
+Group: system,legacy
|
|
|
|
|
|
%description -n compat32-%{name}-libs
|
|
|
CUPS printing system provides a portable printing layer for
|
|
@@ -294,7 +265,7 @@ natively, without needing the lp/lpr commands.
|
|
|
|
|
|
%package -n compat32-%{name}-devel
|
|
|
Summary: Common Unix Printing System - development environment
|
|
|
-Group: programming
|
|
|
+Group: programming,legacy
|
|
|
Requires: compat32-%{name}-libs = %{version}-%{release}
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
Requires: compat32-e2fsprogs-devel
|
|
@@ -321,70 +292,53 @@ additional printer drivers, and other CUPS services.
|
|
|
%prep
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
# Use the system pam configuration.
|
|
|
-%patch1 -p1 -b .system-auth
|
|
|
+%patch -P 1 -p1 -b .system-auth
|
|
|
# Prevent multilib conflict in cups-config script.
|
|
|
-%patch2 -p1 -b .multilib
|
|
|
+%patch -P 2 -p1 -b .multilib
|
|
|
# Ignore rpm save/new files in the banners directory.
|
|
|
-%patch3 -p1 -b .banners
|
|
|
+%patch -P 3 -p1 -b .banners
|
|
|
# Don't export SSLLIBS to cups-config.
|
|
|
-%patch4 -p1 -b .no-export-ssllibs
|
|
|
+%patch -P 4 -p1 -b .no-export-ssllibs
|
|
|
# Allow file-based usb device URIs.
|
|
|
-%patch5 -p1 -b .direct-usb
|
|
|
+%patch -P 5 -p1 -b .direct-usb
|
|
|
# Increase driverd timeout to 70s to accommodate foomatic (bug #744715).
|
|
|
-%patch7 -p1 -b .driverd-timeout
|
|
|
-# Re-open the log if it has been logrotated under us.
|
|
|
-%patch8 -p1 -b .logrotate
|
|
|
+%patch -P 6 -p1 -b .driverd-timeout
|
|
|
# Support for errno==ENOSPACE-based USB paper-out reporting.
|
|
|
-%patch9 -p1 -b .usb-paperout
|
|
|
+%patch -P 7 -p1 -b .usb-paperout
|
|
|
# Allow the usb backend to understand old-style URI formats.
|
|
|
-%patch10 -p1 -b .uri-compat
|
|
|
-# Add an SNMP query for HP's device ID OID (STR #3552).
|
|
|
-%patch11 -p1 -b .hp-deviceid-oid
|
|
|
-# Add an SNMP query for Ricoh's device ID OID (STR #3552).
|
|
|
-%patch12 -p1 -b .ricoh-deviceid-oid
|
|
|
-# Make cups.service Type=notify (bug #1088918).
|
|
|
-%patch13 -p1 -b .systemd-socket
|
|
|
+%patch -P 8 -p1 -b .uri-compat
|
|
|
# Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
|
|
|
-%patch14 -p1 -b .freebind
|
|
|
+%patch -P 9 -p1 -b .freebind
|
|
|
# Fixes for jobs with multiple files and multiple formats.
|
|
|
-%patch15 -p1 -b .ipp-multifile
|
|
|
+%patch -P 10 -p1 -b .ipp-multifile
|
|
|
# Increase web interface get-devices timeout to 10s (bug #996664).
|
|
|
-%patch16 -p1 -b .web-devices-timeout
|
|
|
-# Set the default for SyncOnClose to Yes.
|
|
|
-%patch17 -p1 -b .synconclose
|
|
|
-# CUPS may fail to start if NIS groups are used (bug #1494558)
|
|
|
-%patch18 -p1 -b .ypbind
|
|
|
+%patch -P 11 -p1 -b .web-devices-timeout
|
|
|
# Add failover backend (bug #1689209)
|
|
|
-%patch19 -p1 -b .failover
|
|
|
+%patch -P 12 -p1 -b .failover
|
|
|
+# Added IEEE 1284 Device ID for a Dymo device (bug #747866).
|
|
|
+%patch -P 13 -p1 -b .dymo-deviceid
|
|
|
+
|
|
|
+# UPSTREAM PATCHES
|
|
|
+# 2218124 - The command "cancel -x <job>" does not remove job files
|
|
|
+%patch -P 1001 -p1 -b .purge-job
|
|
|
|
|
|
%if %{?lspp}0
|
|
|
# LSPP support.
|
|
|
%patch100 -p1 -b .lspp
|
|
|
%endif
|
|
|
|
|
|
-# Log extra debugging information if no filters are available.
|
|
|
-%patch20 -p1 -b .filter-debug
|
|
|
-# Added IEEE 1284 Device ID for a Dymo device (bug #747866).
|
|
|
-%patch21 -p1 -b .dymo-deviceid
|
|
|
-# 1822154 - cups.service doesn't execute automatically on request
|
|
|
-%patch22 -p1 -b .autostart-when-enabled
|
|
|
-
|
|
|
-# removed dbus patch - seems breaking things
|
|
|
-# Fix implementation of com.redhat.PrinterSpooler D-Bus object.
|
|
|
-#%%patch6 -p1 -b .eggcups
|
|
|
-
|
|
|
-%patch1000 -p1 -b .serverbin-compat
|
|
|
-
|
|
|
# make to use cjktexttops instead texttops.
|
|
|
perl -pi -e 's/texttops$/cjktexttops/' conf/mime.convs.in
|
|
|
|
|
|
+%if %{with systemd}
|
|
|
+# Log to the system journal by default (bug #1078781, bug #1519331).
|
|
|
+sed -i -e 's,^ErrorLog .*$,ErrorLog syslog,' conf/cups-files.conf.in
|
|
|
+sed -i -e 's,^AccessLog .*$,AccessLog syslog,' conf/cups-files.conf.in
|
|
|
+sed -i -e 's,^PageLog .*,PageLog syslog,' conf/cups-files.conf.in
|
|
|
+%else
|
|
|
# if cupsd is set to log into /var/log/cups, then 'MaxLogSize 0' needs to be
|
|
|
# in cupsd.conf to disable cupsd logrotate functionality and use logrotated
|
|
|
sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in
|
|
|
-
|
|
|
-%if %{with systemd}
|
|
|
-# Add comment text mentioning syslog is systemd journal (bug #1358589)
|
|
|
-sed -i -e 's,\"syslog\",\"syslog\" \(syslog means systemd journal by default\),' conf/cups-files.conf.in
|
|
|
%endif
|
|
|
|
|
|
perl -pi -e 's,^#(DefaultCharset\s)utf-8,$1notused,' conf/cupsd.conf.in
|
|
@@ -410,121 +364,130 @@ rm "$f"~
|
|
|
aclocal -I config-scripts
|
|
|
autoconf -I config-scripts
|
|
|
|
|
|
+
|
|
|
%build
|
|
|
-export DSOFLAGS="$DSOFLAGS -L../cgi-bin -L../filter -L../ppdc -L../scheduler -Wl,-z,relro -Wl,-z,now -Wl,-z,relro,-z,now -fPIE -pie"
|
|
|
-export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1"
|
|
|
+export DSOFLAGS="$DSOFLAGS $RPM_LD_FLAGS"
|
|
|
+export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -DLDAP_DEPRECATED=1"
|
|
|
+export CXXFLAGS="$CXXFLAGS $RPM_OPT_FLAGS -DLDAP_DEPRECATED=1"
|
|
|
+
|
|
|
# --enable-debug to avoid stripping binaries
|
|
|
%configure --with-docdir=%{_datadir}/%{name}/www --enable-debug \
|
|
|
- --with-exe-file-perm=0755 \
|
|
|
- --with-log-file-perm=0600 \
|
|
|
- --enable-relro \
|
|
|
- --with-pdftops=pdftops \
|
|
|
- --with-dbusdir=%{_sysconfdir}/dbus-1 \
|
|
|
- --with-php=/usr/bin/php-cgi \
|
|
|
- --enable-avahi \
|
|
|
- --enable-threads \
|
|
|
- --enable-gnutls \
|
|
|
- --enable-webif \
|
|
|
- --disable-slp \
|
|
|
+ --enable-page-logging \
|
|
|
+ --enable-relro \
|
|
|
+ --enable-sync-on-close \
|
|
|
+ --enable-webif \
|
|
|
+ --with-access-log-level=actions \
|
|
|
+ --with-cupsd-file-perm=0755 \
|
|
|
+ --with-dbusdir=%{_sysconfdir}/dbus-1 \
|
|
|
+ --with-dnssd=avahi \
|
|
|
+ --with-log-file-perm=0600 \
|
|
|
+ --with-pkgconfpath=%{_libdir}/pkgconfig \
|
|
|
%if %{with systemd}
|
|
|
- --with-rundir=/run/cups \
|
|
|
+ --with-rundir=/run/cups \
|
|
|
+ --with-ondemand=systemd \
|
|
|
+ --with-xinetd=no \
|
|
|
+%endif
|
|
|
+ --with-tls=gnutls \
|
|
|
+%if 0%{?rhel}
|
|
|
+ --without-idle-exit-timeout \
|
|
|
+ --without-systemd-timeoutstartsec \
|
|
|
%endif
|
|
|
- localedir=%{_datadir}/locale
|
|
|
+ --localedir=%{_datadir}/locale \
|
|
|
+ --with-pdftops=pdftops \
|
|
|
+ --disable-slp
|
|
|
|
|
|
# If we got this far, all prerequisite libraries must be here.
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
+
|
|
|
%install
|
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
+rm -rf %{buildroot}
|
|
|
|
|
|
-make BUILDROOT=$RPM_BUILD_ROOT install
|
|
|
+make BUILDROOT=%{buildroot} install
|
|
|
|
|
|
-rm -rf $RPM_BUILD_ROOT%{initdir} \
|
|
|
- $RPM_BUILD_ROOT%{_sysconfdir}/init.d \
|
|
|
- $RPM_BUILD_ROOT%{_sysconfdir}/rc?.d
|
|
|
-%if %{with systemd}
|
|
|
-mkdir -p %{buildroot}%{_unitdir}
|
|
|
-mv %{buildroot}%{_unitdir}/org.cups.cupsd.path %{buildroot}%{_unitdir}/cups.path
|
|
|
-mv %{buildroot}%{_unitdir}/org.cups.cupsd.service %{buildroot}%{_unitdir}/cups.service
|
|
|
-mv %{buildroot}%{_unitdir}/org.cups.cupsd.socket %{buildroot}%{_unitdir}/cups.socket
|
|
|
-mv %{buildroot}%{_unitdir}/org.cups.cups-lpd.socket %{buildroot}%{_unitdir}/cups-lpd.socket
|
|
|
-mv %{buildroot}%{_unitdir}/org.cups.cups-lpd@.service %{buildroot}%{_unitdir}/cups-lpd@.service
|
|
|
-/bin/sed -i -e "s,org.cups.cupsd,cups,g" %{buildroot}%{_unitdir}/cups.service
|
|
|
-%else
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{initdir}
|
|
|
-install -m 755 $RPM_SOURCE_DIR/cups.init $RPM_BUILD_ROOT%{initdir}/cups
|
|
|
+rm -rf %{buildroot}%{initdir} \
|
|
|
+ %{buildroot}%{_sysconfdir}/init.d \
|
|
|
+ %{buildroot}%{_sysconfdir}/rc?.d
|
|
|
+
|
|
|
+%if ! %{with systemd}
|
|
|
+mkdir -p %{buildroot}%{initdir}
|
|
|
+install -m 755 %{SOURCE1} %{buildroot}%{initdir}/cups
|
|
|
%endif
|
|
|
|
|
|
-find $RPM_BUILD_ROOT%{_datadir}/cups/model -name "*.ppd" |xargs gzip -n9f
|
|
|
+find %{buildroot}%{_datadir}/cups/model -name "*.ppd" |xargs gzip -n9f
|
|
|
+
|
|
|
+pushd %{buildroot}%{_datadir}/%{name}/ipptool
|
|
|
+for file in color.jpg document-a4.pdf document-a4.ps document-letter.pdf document-letter.ps gray.jpg onepage-a4.pdf onepage-a4.ps onepage-letter.pdf onepage-letter.ps testfile.jpg testfile.pcl testfile.pdf testfile.ps testfile.txt
|
|
|
+do
|
|
|
+ mv $file{,.gz}
|
|
|
+done
|
|
|
+popd
|
|
|
|
|
|
%if %{use_alternatives}
|
|
|
-pushd $RPM_BUILD_ROOT%{_bindir}
|
|
|
+pushd %{buildroot}%{_bindir}
|
|
|
for i in cancel lp lpq lpr lprm lpstat; do
|
|
|
mv $i $i.cups
|
|
|
done
|
|
|
-cd $RPM_BUILD_ROOT%{_sbindir}
|
|
|
+cd %{buildroot}%{_sbindir}
|
|
|
mv lpc lpc.cups
|
|
|
-cd $RPM_BUILD_ROOT%{_mandir}/man1
|
|
|
+cd %{buildroot}%{_mandir}/man1
|
|
|
for i in cancel lp lpq lpr lprm lpstat; do
|
|
|
mv $i.1 $i-cups.1
|
|
|
done
|
|
|
-cd $RPM_BUILD_ROOT%{_mandir}/man8
|
|
|
+cd %{buildroot}%{_mandir}/man8
|
|
|
mv lpc.8 lpc-cups.8
|
|
|
popd
|
|
|
%endif
|
|
|
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps $RPM_BUILD_ROOT%{_sysconfdir}/X11/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
|
|
|
-install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
|
|
-%if !%{with systemd}
|
|
|
-install -c -m 644 cups-lpd.real $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/cups-lpd
|
|
|
+mkdir -p %{buildroot}%{_datadir}/pixmaps %{buildroot}%{_sysconfdir}/X11/sysconfig %{buildroot}%{_sysconfdir}/X11/applnk/System %{buildroot}%{_sysconfdir}/xinetd.d %{buildroot}%{_sysconfdir}/logrotate.d %{buildroot}%{_sysconfdir}/cron.daily
|
|
|
+
|
|
|
+mkdir -p %{buildroot}%{_datadir}/pixmaps %{buildroot}%{_sysconfdir}/X11/sysconfig %{buildroot}%{_sysconfdir}/X11/applnk/System
|
|
|
+
|
|
|
+install -c -m 644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps
|
|
|
+%if ! %{with systemd}
|
|
|
+install -c -m 644 cups-lpd.real %{buildroot}%{_sysconfdir}/xinetd.d/cups-lpd
|
|
|
+install -c -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/cups
|
|
|
%endif
|
|
|
-install -c -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups
|
|
|
-install -c -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{_libdir}/cups/backend/ncp
|
|
|
-install -c -m 755 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups
|
|
|
-install -c -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{_libdir}/cups/filter/textonly
|
|
|
-install -c -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd
|
|
|
+install -c -m 755 %{SOURCE8} %{buildroot}%{_sysconfdir}/cron.daily/cups
|
|
|
+install -c -m 755 %{SOURCE9} %{buildroot}%{_libdir}/cups/filter/textonly
|
|
|
+install -c -m 644 %{SOURCE10} %{buildroot}%{_datadir}/cups/model/textonly.ppd
|
|
|
|
|
|
-#install -c -m 644 %{SOURCE105} $RPM_BUILD_ROOT%{_sysconfdir}/cups/pdftops.conf
|
|
|
+#install -c -m 644 %{SOURCE105} %{buildroot}%{_sysconfdir}/cups/pdftops.conf
|
|
|
|
|
|
# Ship an rpm macro for where to put driver executables.
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
|
|
|
-install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/
|
|
|
+mkdir -p %{buildroot}%{_sysconfdir}/rpm/
|
|
|
+install -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/rpm/
|
|
|
|
|
|
# Ship a printers.conf file, and a client.conf file. That way, they get
|
|
|
# their SELinux file contexts set correctly.
|
|
|
-touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/printers.conf
|
|
|
-touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/classes.conf
|
|
|
-touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/client.conf
|
|
|
-touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/subscriptions.conf
|
|
|
+touch %{buildroot}%{_sysconfdir}/cups/printers.conf
|
|
|
+touch %{buildroot}%{_sysconfdir}/cups/classes.conf
|
|
|
+touch %{buildroot}%{_sysconfdir}/cups/client.conf
|
|
|
+touch %{buildroot}%{_sysconfdir}/cups/subscriptions.conf
|
|
|
|
|
|
# This is %%ghost'ed, but needs to be created in %%install anyway.
|
|
|
-touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/lpoptions
|
|
|
+touch %{buildroot}%{_sysconfdir}/cups/lpoptions
|
|
|
|
|
|
# Tell portreserve which port we want it to protect.
|
|
|
-# mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/portreserve
|
|
|
-# echo ipp > $RPM_BUILD_ROOT%{_sysconfdir}/portreserve/%{name}
|
|
|
+# mkdir -p %{buildroot}%{_sysconfdir}/portreserve
|
|
|
+# echo ipp > %{buildroot}%{_sysconfdir}/portreserve/%{name}
|
|
|
|
|
|
# LSB 3.2 printer driver directory
|
|
|
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/ppd
|
|
|
+mkdir -p %{buildroot}%{_datadir}/ppd
|
|
|
|
|
|
# Remove unshipped files.
|
|
|
-rm -rf $RPM_BUILD_ROOT%{_mandir}/cat? $RPM_BUILD_ROOT%{_mandir}/*/cat?
|
|
|
-rm -f $RPM_BUILD_ROOT%{_datadir}/applications/cups.desktop
|
|
|
-rm -rf $RPM_BUILD_ROOT%{_datadir}/icons
|
|
|
-
|
|
|
-# Install the udev rules.
|
|
|
-%{__mkdir_p} %{buildroot}/lib/udev/rules.d
|
|
|
-install -m644 %{SOURCE3} \
|
|
|
- %{buildroot}/lib/udev/rules.d/70-cups-libusb.rules
|
|
|
+rm -rf %{buildroot}%{_mandir}/cat? %{buildroot}%{_mandir}/*/cat?
|
|
|
+rm -f %{buildroot}%{_datadir}/applications/cups.desktop
|
|
|
+rm -rf %{buildroot}%{_datadir}/icons
|
|
|
|
|
|
# there are pdf-banners shipped with cups-filters (#919489)
|
|
|
-rm -rf $RPM_BUILD_ROOT%{_datadir}/cups/banners
|
|
|
-rm -f $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint
|
|
|
+rm -rf %{buildroot}%{_datadir}/cups/banners
|
|
|
+rm -f %{buildroot}%{_datadir}/cups/data/testprint
|
|
|
|
|
|
%if %{with systemd}
|
|
|
# install /etc/tmpfiles.d/cups.conf (bug #656566)
|
|
|
-mkdir -p ${RPM_BUILD_ROOT}%{_tmpfilesdir}
|
|
|
-cat > ${RPM_BUILD_ROOT}%{_tmpfilesdir}/cups.conf <<EOF
|
|
|
+mkdir -p %{buildroot}%{_tmpfilesdir}
|
|
|
+cat > %{buildroot}%{_tmpfilesdir}/cups.conf <<EOF
|
|
|
# See tmpfiles.d(5) for details
|
|
|
|
|
|
d /run/cups 0755 root lp -
|
|
@@ -534,7 +497,7 @@ d /var/spool/cups/tmp - - - 30d
|
|
|
EOF
|
|
|
|
|
|
# /usr/lib/tmpfiles.d/cups-lp.conf (bug #812641)
|
|
|
-cat > ${RPM_BUILD_ROOT}%{_tmpfilesdir}/cups-lp.conf <<EOF
|
|
|
+cat > %{buildroot}%{_tmpfilesdir}/cups-lp.conf <<EOF
|
|
|
# Legacy parallel port character device nodes, to trigger the
|
|
|
# auto-loading of the kernel module on access.
|
|
|
#
|
|
@@ -547,32 +510,29 @@ c /dev/lp3 0660 root lp - 6:3
|
|
|
EOF
|
|
|
%endif
|
|
|
|
|
|
+find %{buildroot} -type f -o -type l | sed '
|
|
|
+s:.*\('%{_datadir}'/\)\([^/_]\+\)\(.*\.po$\):%lang(\2) \1\2\3:
|
|
|
+/^%lang(C)/d
|
|
|
+/^\([^%].*\)/d
|
|
|
+' > %{name}.lang
|
|
|
+
|
|
|
# Ship a PCL XL/PCL 6 filter file from ESP gs-7.07.1
|
|
|
-install -c -m 644 %{SOURCE206} $RPM_BUILD_ROOT%{_datadir}/cups/model
|
|
|
-install -c -m 644 %{SOURCE207} $RPM_BUILD_ROOT%{_datadir}/cups/model
|
|
|
+install -c -m 644 %{SOURCE206} %{buildroot}%{_datadir}/cups/model
|
|
|
+install -c -m 644 %{SOURCE207} %{buildroot}%{_datadir}/cups/model
|
|
|
|
|
|
# Ship a dvitops
|
|
|
-install -c -m 755 %{SOURCE201} $RPM_BUILD_ROOT%{_libdir}/cups/filter
|
|
|
-install -c -m 644 %{SOURCE202} $RPM_BUILD_ROOT%{_sysconfdir}/cups
|
|
|
-install -c -m 644 %{SOURCE203} $RPM_BUILD_ROOT%{_sysconfdir}/cups
|
|
|
+install -c -m 755 %{SOURCE201} %{buildroot}%{_libdir}/cups/filter
|
|
|
+install -c -m 644 %{SOURCE202} %{buildroot}%{_sysconfdir}/cups
|
|
|
+install -c -m 644 %{SOURCE203} %{buildroot}%{_sysconfdir}/cups
|
|
|
|
|
|
# Ship a cjktexttops (import from mdv)
|
|
|
-install -c -m 755 %{SOURCE204} $RPM_BUILD_ROOT%{_libdir}/cups/filter/
|
|
|
+install -c -m 755 %{SOURCE204} %{buildroot}%{_libdir}/cups/filter/
|
|
|
|
|
|
# disable imagetoraster.
|
|
|
perl -pi -e 's/^(image.+imagetoraster)/#$1/g' %{buildroot}/usr/share/cups/mime/mime.convs
|
|
|
|
|
|
-#install -c -m 644 conf/mime.types $RPM_BUILD_ROOT%{_sysconfdir}/cups/mime.types
|
|
|
-#install -c -m 644 conf/mime.convs $RPM_BUILD_ROOT%{_sysconfdir}/cups/mime.convs
|
|
|
-
|
|
|
-# create directories for 32bit drivers on x86_64.
|
|
|
-%ifarch x86_64
|
|
|
-mkdir -p %{buildroot}/usr/lib/cups/{backend,cgi-bin,daemon,driver,filter,monitor,notifier}
|
|
|
-%endif
|
|
|
-
|
|
|
-
|
|
|
-%clean
|
|
|
-rm -rf $RPM_BUILD_ROOT
|
|
|
+#install -c -m 644 conf/mime.types %{buildroot}%{_sysconfdir}/cups/mime.types
|
|
|
+#install -c -m 644 conf/mime.convs %{buildroot}%{_sysconfdir}/cups/mime.convs
|
|
|
|
|
|
|
|
|
%triggerpostun -- cups < 1.4.8
|
|
@@ -623,22 +583,22 @@ do
|
|
|
then
|
|
|
if [ ! -f %{_localstatedir}/log/cups/${lognames[i]} ]
|
|
|
then
|
|
|
- %{_bindir}/touch %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
+ touch %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
fi
|
|
|
- perms=`%{_bindir}/ls -lah %{_localstatedir}/log/cups/${lognames[i]} | /bin/grep -v -e "\-rw-------" -e "root lp"`
|
|
|
+ perms=`ls -lah %{_localstatedir}/log/cups/${lognames[i]} | /bin/grep -v -e "\-rw-------" -e "root lp"`
|
|
|
if [ ! -z "$perms" ]
|
|
|
then
|
|
|
# we need to set correct permissions and ownership because of possible
|
|
|
# security issues
|
|
|
# we need to have it here, because previous CUPS releases had the bug.
|
|
|
# Checking permissions and ownership here fixes it.
|
|
|
- %{_bindir}/chown root:lp %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
- %{_bindir}/chmod 600 %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
+ chown root:lp %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
+ chmod 600 %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
fi
|
|
|
lastmessage=`%{_bindir}/tail -n 1 %{_localstatedir}/log/cups/${lognames[i]} | /bin/grep "$message"`
|
|
|
if [ -z "$lastmessage" ]
|
|
|
then
|
|
|
- %{_bindir}/echo $message >> %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
+ echo $message >> %{_localstatedir}/log/cups/${lognames[i]} || :
|
|
|
fi
|
|
|
fi
|
|
|
done
|
|
@@ -660,10 +620,6 @@ fi
|
|
|
exit 0
|
|
|
%endif
|
|
|
|
|
|
-%post libs -p /sbin/ldconfig
|
|
|
-
|
|
|
-%postun libs -p /sbin/ldconfig
|
|
|
-
|
|
|
%post client
|
|
|
%if %{use_alternatives}
|
|
|
/sbin/update-alternatives --install %{_bindir}/lpr print %{_bindir}/lpr.cups 40 \
|
|
@@ -688,10 +644,6 @@ exit 0
|
|
|
exit 0
|
|
|
%endif
|
|
|
|
|
|
-%post -n compat32-%{name}-libs -p /sbin/ldconfig
|
|
|
-
|
|
|
-%postun -n compat32-%{name}-libs -p /sbin/ldconfig
|
|
|
-
|
|
|
%preun
|
|
|
%if %{with systemd}
|
|
|
%systemd_preun %{name}.path %{name}.socket %{name}.service
|
|
@@ -744,13 +696,13 @@ rm -f %{_libdir}/cups/backend/smb
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
-%license LICENSE.txt
|
|
|
+%license LICENSE
|
|
|
+%license NOTICE
|
|
|
%doc README.md CREDITS.md CHANGES.md
|
|
|
%attr(0660,root,lp) %dev(char,6,0) /lib/udev/devices/lp0
|
|
|
%attr(0660,root,lp) %dev(char,6,1) /lib/udev/devices/lp1
|
|
|
%attr(0660,root,lp) %dev(char,6,2) /lib/udev/devices/lp2
|
|
|
%attr(0660,root,lp) %dev(char,6,3) /lib/udev/devices/lp3
|
|
|
-/lib/udev/rules.d/70-cups-libusb.rules
|
|
|
%dir %attr(0755,root,lp) %{_sysconfdir}/cups
|
|
|
%config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf
|
|
|
%attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf.default
|
|
@@ -772,13 +724,13 @@ rm -f %{_libdir}/cups/backend/smb
|
|
|
%dir %attr(0755,root,lp) %{_sysconfdir}/cups/ppd
|
|
|
%dir %attr(0700,root,lp) %{_sysconfdir}/cups/ssl
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/cups
|
|
|
-%config(noreplace) %{_sysconfdir}/logrotate.d/cups
|
|
|
%if %{with systemd}
|
|
|
%{_unitdir}/%{name}.service
|
|
|
%{_unitdir}/%{name}.socket
|
|
|
%{_unitdir}/%{name}.path
|
|
|
%config(noreplace) %{_tmpfilesdir}/cups*.conf
|
|
|
%else
|
|
|
+%config(noreplace) %{_sysconfdir}/logrotate.d/cups
|
|
|
%config(noreplace) %{_sysconfdir}/xinetd.d/cups-lpd
|
|
|
%dir %attr(0755,root,lp) /var/run/cups
|
|
|
%dir %attr(0511,lp,sys) /var/run/cups/certs
|
|
@@ -800,10 +752,6 @@ rm -f %{_libdir}/cups/backend/smb
|
|
|
%{_libdir}/cups/filter
|
|
|
%{_libdir}/cups/monitor
|
|
|
%{_libdir}/cups/driver
|
|
|
-%ifarch x86_64
|
|
|
-%dir %{_prefix}/lib/cups
|
|
|
-%dir %{_prefix}/lib/cups/*
|
|
|
-%endif
|
|
|
%{_mandir}/man1/cups.1*
|
|
|
%{_mandir}/man1/cupstest*
|
|
|
%{_mandir}/man1/ipp*
|
|
@@ -824,16 +772,17 @@ rm -f %{_libdir}/cups/backend/smb
|
|
|
%dir %{_libdir}/cups/command
|
|
|
%{_libdir}/cups/command/ippevepcl
|
|
|
%{_libdir}/cups/command/ippeveps
|
|
|
-%{_mandir}/man7/ippevepcl.7.gz
|
|
|
|
|
|
%files libs
|
|
|
%defattr(-,root,root)
|
|
|
-%doc LICENSE.txt
|
|
|
+%license LICENSE
|
|
|
+%license NOTICE
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
%files devel
|
|
|
%defattr(-,root,root)
|
|
|
%{_bindir}/cups-config
|
|
|
+%{_libdir}/pkgconfig/*
|
|
|
%{_libdir}/*.so
|
|
|
%{_includedir}/cups
|
|
|
%{_mandir}/man1/cups-config.1*
|
|
@@ -865,13 +814,18 @@ rm -f %{_libdir}/cups/backend/smb
|
|
|
%{_libdir}/*.so
|
|
|
|
|
|
%files -n compat32-%{name}-libs
|
|
|
-%doc LICENSE.txt
|
|
|
+%license LICENSE
|
|
|
+%license NOTICE
|
|
|
%defattr(-,root,root)
|
|
|
%{_libdir}/*.so.*
|
|
|
%endif
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Tue Oct 03 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.4.7-1
|
|
|
+- new upstream release.
|
|
|
+- dropped to support 32bit drivers.
|
|
|
+
|
|
|
* Sun Nov 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.3-2
|
|
|
- shifted to OpenPrinting version.
|
|
|
|