Browse Source

updated 2 packages

cups-2.3.3-1

libexif-0.6.22-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@12412 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 4 years ago
parent
commit
9bd6616bda
2 changed files with 396 additions and 167 deletions
  1. 389 156
      c/cups/cups-vl.spec
  2. 7 11
      lib/libe/libexif/libexif-vl.spec

+ 389 - 156
c/cups/cups-vl.spec

@@ -1,3 +1,5 @@
+%bcond_with systemd
+
 %define _libexecdir %{_libdir}
 %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
 %define initdir %{_sysconfdir}/rc.d/init.d
@@ -7,16 +9,16 @@
 
 Summary: Common Unix Printing System
 Name: cups
-Version: 2.2.11
-Release: 1%{?_dist_release}
-License: GPL
+Version: 2.3.3
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
 Group: System Environment/Daemons
-
 Vendor: Project Vine
 Distribution: Vine Linux
 Packager: daisuke, tomop
 
-Source: https://github.com/apple/cups/releases/download/release-%{version}/cups-%{version}-source.tar.gz
+License: GPL
+Url: https://www.cups.org/
+Source: https://github.com/apple/cups/releases/download/v%{version}/cups-%{version}-source.tar.gz
 # Our initscript
 Source1: cups.init
 # Pixmap for desktop file
@@ -52,51 +54,81 @@ Source206: pxlmono.ppd.gz
 Source207: pxlcolor.ppd.gz
 Source208: cups.conf
 
-Patch1: cups-no-gzip-man.patch
-Patch2: cups-system-auth.patch
-Patch3: cups-multilib.patch
-Patch5: cups-banners.patch
-Patch7: cups-no-export-ssllibs.patch
-Patch8: cups-direct-usb.patch
-Patch12: cups-eggcups.patch
-Patch13: cups-driverd-timeout.patch
-Patch15: cups-logrotate.patch
-Patch16: cups-usb-paperout.patch
-Patch19: cups-uri-compat.patch
-Patch22: cups-hp-deviceid-oid.patch
-Patch23: cups-dnssd-deviceid.patch
-Patch24: cups-ricoh-deviceid-oid.patch
-Patch25: cups-systemd-socket.patch
-Patch30: cups-freebind.patch
-Patch35: cups-ipp-multifile.patch
-Patch36: cups-web-devices-timeout.patch
-Patch37: cups-synconclose.patch
-Patch38: cups-ypbind.patch
-
-#Patch100: cups-lspp.patch
-
-# upstream
-Patch9: cups-lpr-help.patch
-Patch18: cups-filter-debug.patch
-Patch29: cups-dymo-deviceid.patch
+# PAM enablement, very old patch, not even git can track when or why
+# the patch was added.
+Patch1: cups-system-auth.patch
+# cups-config from devel package conflicted on multilib arches,
+# fixed hack with pkg-config calling for gnutls' libdir variable
+Patch2: cups-multilib.patch
+# if someone makes a change to banner files, then there will <banner>.rpmnew
+# with next update of cups-filters - this patch makes sure the banner file 
+# changed by user is used and .rpmnew or .rpmsave is ignored
+# Note: This could be rewrite with use a kind of #define and send to upstream
+Patch3: cups-banners.patch
+# don't export ssl libs to cups-config - can't find the reason.
+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
+# usb backend didn't get any notification about out-of-paper because of kernel 
+Patch9: 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
+# use IP_FREEBIND, because cupsd cannot bind to not yet existing IP address
+# by default
+Patch14: cups-freebind.patch
+# add support of multifile
+Patch15: 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
+# 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
+# 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
+
+# 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
 
 # vine
-Patch1000: cups-serverbin-compat.patch
-Patch1001: cups-serverbin-compat2.patch
+Patch1000: cups-2.3.3-serverbin-compat.patch
 
-Url: http://www.cups.org/
 BuildRoot: %{_tmppath}/%{name}-root
-Requires(pre): chkconfig initscripts perl alternatives
 Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-client = %{version}-%{release}
 Requires: tmpwatch
 Requires: ghostscript >= 8.71-4
-%if %use_alternatives
-Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat
-Requires(pre): alternatives
-%else
-Obsoletes: lpd lpr LPRng printtool
-Provides: lpd lpr LPRng
-%endif
 BuildRequires: aspell-devel
 BuildRequires: avahi-devel >= 0.6.20
 BuildRequires: dbus-devel >= 0.90
@@ -114,13 +146,19 @@ BuildRequires: pkgconfig
 BuildRequires: poppler-utils
 BuildRequires: python-cups
 
-
 Requires: avahi >= 0.6.20
 Requires: avahi-tools
 Requires: dbus >= 0.90
 Requires: poppler-utils
 Requires: cups-filters
 
+%if %{with systemd}
+BuildRequires: systemd-devel
+%{?systemd_requires}
+%else
+Requires(pre): chkconfig initscripts perl
+%endif
+
 %package devel
 Summary: Common Unix Printing System - development environment
 Group: Development/Libraries
@@ -136,6 +174,29 @@ Summary: Common Unix Printing System - libraries
 Group: System Environment/Libraries
 License: LGPL
 
+%package client
+Summary: CUPS printing system - client programs
+License: GPLv2
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+%if %{use_alternatives}
+Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat
+Requires(pre): alternatives
+Requires(preun): alternatives
+%endif
+Provides: lpd lpr LPRng
+
+%package lpd
+Summary: CUPS printing system - lpd emulation
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}-libs%{?_isa} = %{version}-%{release}
+Provides: lpd
+%if %{with systemd}
+%{?systemd_requires}
+%else
+Requires: xinetd
+%endif
+
+
 %package -n compat32-%{name}-libs
 Summary: Common Unix Printing System - libraries
 Group: System Environment/Libraries
@@ -150,137 +211,184 @@ Requires: compat32-gnutls-devel
 Requires: compat32-krb5-devel
 Requires: compat32-zlib-devel
 
+
 %description
-The Common UNIX Printing System provides a portable printing layer for 
-UNIX. operating systems. It has been developed by Easy Software Products 
-to promote a standard printing solution for all UNIX vendors and users. 
+CUPS printing system provides a portable printing layer for
+UNIX® operating systems. It has been developed by Apple Inc.
+to promote a standard printing solution for all UNIX vendors and users.
 CUPS provides the System V and Berkeley command-line interfaces. 
 
-If you want to use CUPS on VineLinux, you should rebuild ghostscript package.
-Please read README.vine in your CUPS's document dir.
-#'
-
 %description -l ja
-Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供します。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューションを提供するためにEasy Software Productsで開発されました。CUPSはSystem VやBerkeleyコマンドラインなインターフェースを提供します。
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を提供
+します。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューショ
+ンを提供するためにApple Inc.により開発されました。
+
+ CUPSはSystem VやBerkeleyコマンドラインのインターフェースを提供します。
+
 
 %description devel
-The Common UNIX Printing System provides a portable printing layer for 
+CUPS printing system provides a portable printing layer for
 UNIX. operating systems. This is the development package for creating
 additional printer drivers, and other CUPS services.
 
 %description devel -l ja
-Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。このパッケージはプリンタドライバを追加したり他のCUPSサービスを開発するためのパッケージです。
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を提供
+します。
+
+ このパッケージはプリンタドライバを追加したり他のCUPSサービスを開発す
+るためのパッケージです。
+
 
 %description libs
-The Common UNIX Printing System provides a portable printing layer for 
-UNIXョ operating systems. It has been developed by Easy Software Products 
-to promote a standard printing solution for all UNIX vendors and users. 
-CUPS provides the System V and Berkeley command-line interfaces. 
+CUPS printing system provides a portable printing layer for
+UNIX® operating systems. It has been developed by Apple Inc.
+to promote a standard printing solution for all UNIX vendors and users.
+CUPS provides the System V and Berkeley command-line interfaces.
 The cups-libs package provides libraries used by applications to use CUPS
 natively, without needing the lp/lpr commands.
 
 %description libs -l ja
-Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューションを提供するためにEasy Software Productsで開発されました。CUPSはSystem VやBerkeleyコマンドラインなインターフェースを提供します。cups-libsパッケージはlp/lprコマンドを必要としないCUPSネイティブなアプリケーションから使われるライブラリ類です。
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を提供
+します。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューショ
+ンを提供するためにApple Inc.により開発されました。
+
+ CUPSはSystem VやBerkeleyコマンドラインのインターフェースを提供します。
+
+ cups-libsパッケージはlp/lprコマンドを必要としないCUPSネイティブなアプ
+リケーションから使われるライブラリ類です。
+
+
+%description client
+CUPS printing system provides a portable printing layer for
+UNIX® operating systems. This package contains command-line client
+programs.
+
+%description client -l ja
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を
+提供します。
+
+ このパッケージはコマンドラインクライアントプログラムを含んでいま
+す。
+
+
+%description lpd
+CUPS printing system provides a portable printing layer for
+UNIX® operating systems. This is the package that provides standard
+lpd emulation.
+
+%description lpd -l ja
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を
+提供します。
+
+ このパッケージは標準的なlpdエミュレーションを提供します。
+
 
 %description -n compat32-%{name}-libs
-The Common UNIX Printing System provides a portable printing layer for 
-UNIXョ operating systems. It has been developed by Easy Software Products 
-to promote a standard printing solution for all UNIX vendors and users. 
-CUPS provides the System V and Berkeley command-line interfaces. 
+CUPS printing system provides a portable printing layer for
+UNIX® operating systems. It has been developed by Apple Inc.
+to promote a standard printing solution for all UNIX vendors and users.
+CUPS provides the System V and Berkeley command-line interfaces.
 The cups-libs package provides libraries used by applications to use CUPS
 natively, without needing the lp/lpr commands.
 
 %description -n compat32-%{name}-libs -l ja
-Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューションを提供するためにEasy Software Productsで開発されました。CUPSはSystem VやBerkeleyコマンドラインなインターフェースを提供します。cups-libsパッケージはlp/lprコマンドを必要としないCUPSネイティブなアプリケーションから使われるライブラリ類です。
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を提供
+します。CUPSは全てのUNIXベンダーやユーザのために標準的な印刷ソリューショ
+ンを提供するためにApple Inc.により開発されました。
+
+ CUPSはSystem VやBerkeleyコマンドラインのインターフェースを提供します。
+
+ cups-libsパッケージはlp/lprコマンドを必要としないCUPSネイティブなアプリ
+ケーションから使われるライブラリ類です。
+
 
 %description -n compat32-%{name}-devel
-The Common UNIX Printing System provides a portable printing layer for 
+CUPS printing system provides a portable printing layer for
 UNIX. operating systems. This is the development package for creating
 additional printer drivers, and other CUPS services.
 
 %description -n compat32-%{name}-devel -l ja
-Common UNIX Printing SystemはUNIX操作環境においてポータブルな印刷環境を提供しま\す。このパッケージはプリンタドライバを追加したり他のCUPSサービスを開発するためのパッケージです。
+ CUPS printing systemはUNIX操作環境においてポータブルな印刷環境を提供
+します。
+
+ このパッケージはプリンタドライバを追加したり他のCUPSサービスを開発す
+るためのパッケージです。
+
+
+%debug_package
+
 
 %prep
 %setup -q -n %{name}-%{version}
-
-# Don't gzip man pages in the Makefile, let rpmbuild do it.
-%patch1 -p1 -b .no-gzip-man
 # Use the system pam configuration.
-%patch2 -p1 -b .system-auth
+%patch1 -p1 -b .system-auth
 # Prevent multilib conflict in cups-config script.
-%patch3 -p1 -b .multilib
+%patch2 -p1 -b .multilib
 # Ignore rpm save/new files in the banners directory.
-%patch5 -p1 -b .banners
+%patch3 -p1 -b .banners
 # Don't export SSLLIBS to cups-config.
-%patch7 -p1 -b .no-export-ssllibs
+%patch4 -p1 -b .no-export-ssllibs
 # Allow file-based usb device URIs.
-%patch8 -p1 -b .direct-usb
-# Add --help option to lpr.
-%patch9 -p1 -b .lpr-help
-# Fix compilation of peer credentials support.
-#%%patch10 -p1 -b .peercred
-# Maintain a cupsd.pid file.
-#%%patch11 -p1 -b .pid
-# Fix implementation of com.redhat.PrinterSpooler D-Bus object.
-%patch12 -p1 -b .eggcups
+%patch5 -p1 -b .direct-usb
 # Increase driverd timeout to 70s to accommodate foomatic (bug #744715).
-%patch13 -p1 -b .driverd-timeout
-# Only enforce maximum PPD line length when in strict mode.
-#%%patch14 -p1 -b .strict-ppd-line-length
+%patch7 -p1 -b .driverd-timeout
 # Re-open the log if it has been logrotated under us.
-%patch15 -p1 -b .logrotate
+%patch8 -p1 -b .logrotate
 # Support for errno==ENOSPACE-based USB paper-out reporting.
-%patch16 -p1 -b .usb-paperout
-# Re-initialise the resolver on failure in httpAddrGetList() (bug #567353).
-#%%patch17 -p1 -b .res_init
-# Log extra debugging information if no filters are available.
-%patch18 -p1 -b .filter-debug
+%patch9 -p1 -b .usb-paperout
 # Allow the usb backend to understand old-style URI formats.
-%patch19 -p1 -b .uri-compat
-# Fix temporary filename creation.
-#%%patch20 -p1 -b .str3382
-# Use mode 0755 for binaries and libraries where appropriate.
-#%%patch21 -p1 -b .0755
+%patch10 -p1 -b .uri-compat
 # Add an SNMP query for HP's device ID OID (STR #3552).
-%patch22 -p1 -b .hp-deviceid-oid
-# Mark DNS-SD Device IDs that have been guessed at with "FZY:1;".
-#%%patch23 -p1 -b .dnssd-deviceid
+%patch11 -p1 -b .hp-deviceid-oid
 # Add an SNMP query for Ricoh's device ID OID (STR #3552).
-%patch24 -p1 -b .ricoh-deviceid-oid
+%patch12 -p1 -b .ricoh-deviceid-oid
 # Make cups.service Type=notify (bug #1088918).
-%patch25 -p1 -b .systemd-socket
-# Use IP address when resolving DNSSD URIs (bug #948288).
-#%%patch27 -p1 -b .avahi-address
-# Added IEEE 1284 Device ID for a Dymo device (bug #747866).
-%patch29 -p1 -b .dymo-deviceid
+%patch13 -p1 -b .systemd-socket
 # Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
-%patch30 -p1 -b .freebind
-# Don't link against libgcrypt needlessly.
-#%%patch31 -p1 -b .no-gcry
-# Default to IPP/1.1 for now (bug #977813).
-#%%patch33 -p1 -b .use-ipp1.1
-# Don't use D-Bus from two threads (bug #979748).
-#%%patch34 -p1 -b .avahi-no-threaded
+%patch14 -p1 -b .freebind
 # Fixes for jobs with multiple files and multiple formats.
-%patch35 -p1 -b .ipp-multifile
+%patch15 -p1 -b .ipp-multifile
 # Increase web interface get-devices timeout to 10s (bug #996664).
-%patch36 -p1 -b .web-devices-timeout
+%patch16 -p1 -b .web-devices-timeout
 # Set the default for SyncOnClose to Yes.
-%patch37 -p1 -b .synconclose
+%patch17 -p1 -b .synconclose
 # CUPS may fail to start if NIS groups are used (bug #1494558)
-%patch38 -p1 -b .ypbind
+%patch18 -p1 -b .ypbind
+# Add failover backend (bug #1689209)
+%patch19 -p1 -b .failover
+
+%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
-%patch1001 -p1 -b .serverbin-compat2
 
 # make to use cjktexttops instead texttops.
 perl -pi -e 's/texttops$/cjktexttops/' conf/mime.convs.in
 
+# 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
 perl -pi -e 's,^#(Printcap\s+/etc/printcap),$1,' conf/cupsd.conf.in
-perl -pi -e 's,^#(MaxLogSize\s+0),$1,' conf/cupsd.conf.in
 perl -pi -e 's,exec_prefix/lib/cups,exec_prefix/%{_lib}/cups,' config-scripts/cups-directories.m4
 autoconf
 
@@ -303,7 +411,7 @@ 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"
 # --enable-debug to avoid stripping binaries
 %configure --with-docdir=%{_datadir}/%{name}/www --enable-debug \
@@ -318,11 +426,11 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1"
 	--enable-gnutls \
 	--enable-webif \
 	--disable-slp \
+%if %{with systemd}
+	--with-rundir=/run/cups \
+%endif
 	localedir=%{_datadir}/locale
 
-
-perl -pi -e "s,^DSO	=.*,DSO=gcc -fpic," Makedefs
-
 # If we got this far, all prerequisite libraries must be here.
 make %{?_smp_mflags}
 
@@ -334,12 +442,22 @@ make BUILDROOT=$RPM_BUILD_ROOT 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
+%endif
 
 find $RPM_BUILD_ROOT%{_datadir}/cups/model -name "*.ppd" |xargs gzip -n9f
 
-%if %use_alternatives
+%if %{use_alternatives}
 pushd $RPM_BUILD_ROOT%{_bindir}
 for i in cancel lp lpq lpr lprm lpstat; do
 	mv $i $i.cups
@@ -350,7 +468,6 @@ cd $RPM_BUILD_ROOT%{_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
 mv lpc.8 lpc-cups.8
 popd
@@ -358,7 +475,9 @@ popd
 
 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
+%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
@@ -402,9 +521,10 @@ install -m644 %{SOURCE3} \
 rm -rf $RPM_BUILD_ROOT%{_datadir}/cups/banners
 rm -f $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint
 
+%if %{with systemd}
 # install /etc/tmpfiles.d/cups.conf (bug #656566)
-mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d
-cat > ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d/cups.conf <<EOF
+mkdir -p ${RPM_BUILD_ROOT}%{_tmpfilesdir}
+cat > ${RPM_BUILD_ROOT}%{_tmpfilesdir}/cups.conf <<EOF
 # See tmpfiles.d(5) for details
 
 d /run/cups 0755 root lp -
@@ -414,7 +534,7 @@ d /var/spool/cups/tmp - - - 30d
 EOF
 
 # /usr/lib/tmpfiles.d/cups-lp.conf (bug #812641)
-cat > ${RPM_BUILD_ROOT}%{_sysconfdir}/tmpfiles.d/cups-lp.conf <<EOF
+cat > ${RPM_BUILD_ROOT}%{_tmpfilesdir}/cups-lp.conf <<EOF
 # Legacy parallel port character device nodes, to trigger the
 # auto-loading of the kernel module on access.
 #
@@ -425,6 +545,7 @@ c /dev/lp1 0660 root lp - 6:1
 c /dev/lp2 0660 root lp - 6:2
 c /dev/lp3 0660 root lp - 6:3
 EOF
+%endif
 
 # 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
@@ -449,6 +570,11 @@ perl -pi -e 's/^(image.+imagetoraster)/#$1/g' %{buildroot}/usr/share/cups/mime/m
 mkdir -p %{buildroot}/usr/lib/cups/{backend,cgi-bin,daemon,driver,filter,monitor,notifier}
 %endif
 
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
 %triggerpostun -- cups < 1.4.8
 %ifarch x86_64
 
@@ -473,14 +599,73 @@ if [ -L /usr/lib/cups ]; then
 fi
 %endif
 
-
 %post
+%if %{with systemd}
+%systemd_post %{name}.path %{name}.socket %{name}.service
+
+# Previous migration script unnecessarily put PageLogFormat into cups-files.conf
+# (see bug #1148995)
+FILE=%{_sysconfdir}/cups/cups-files.conf
+for keyword in PageLogFormat; do
+    /bin/sed -i -e "s,^$keyword,#$keyword,i" "$FILE" || :
+done
+
+# Because of moving logs to journal, we need to create placeholder files
+# at /var/log/cups for users, whose are going to install CUPS on new OS
+# machine with info message
+confignames=( "ErrorLog" "AccessLog" "PageLog" )
+lognames=( "error_log" "access_log" "page_log" )
+message="This CUPS log has been moved into journal by default unless changes have     been made in /etc/cups/cups-files.conf. Log messages can be got by \"$ journalctl -u  cups -e\""
+for ((i=0;i<${#confignames[@]};i++));
+do
+  found=`/bin/grep -i "${confignames[i]} syslog" /etc/cups/cups-files.conf`
+  if [ ! -z "$found" ]
+  then
+    if [ ! -f %{_localstatedir}/log/cups/${lognames[i]} ]
+    then
+      %{_bindir}/touch %{_localstatedir}/log/cups/${lognames[i]} || :
+    fi
+    perms=`%{_bindir}/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]} || :
+    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]} || :
+    fi
+  fi
+done
+
+%else
 /sbin/chkconfig --del cupsd 2>/dev/null || true # Make sure old versions aren't there anymore
 /sbin/chkconfig --add cups || true
+%endif
 # Remove old-style certs directory; new-style is /var/run
 # (see bug #194581 for why this is necessary).
 /bin/rm -rf /etc/cups/certs
-%if %use_alternatives
+rm -f %{_localstatedir}/cache/cups/*.ipp %{_localstatedir}/cache/cups/*.cache
+
+%if !%{with systemd}
+if [ $1 -eq 1 ]; then
+  # First install.  Build ppds.dat.
+  /sbin/service cups reload >/dev/null 2>&1 || :
+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 \
 	 --slave %{_bindir}/lp print-lp %{_bindir}/lp.cups \
 	 --slave %{_bindir}/lpq print-lpq %{_bindir}/lpq.cups \
@@ -496,36 +681,58 @@ fi
 	 --slave %{_mandir}/man1/lprm.1.gz print-lprmman %{_mandir}/man1/lprm-cups.1.gz \
 	 --slave %{_mandir}/man1/lpstat.1.gz print-lpstatman %{_mandir}/man1/lpstat-cups.1.gz
 %endif
-if [ $1 -eq 1 ]; then
-  # First install.  Build ppds.dat.
-  /sbin/service cups reload >/dev/null 2>&1 || :
-fi
-exit 0
 
-%post libs -p /sbin/ldconfig
-
-%postun libs -p /sbin/ldconfig
+%if %{with systemd}
+%post lpd
+%systemd_post cups-lpd.socket
+exit 0
+%endif
 
 %post -n compat32-%{name}-libs -p /sbin/ldconfig
 
 %postun -n compat32-%{name}-libs -p /sbin/ldconfig
 
 %preun
-if [ "$1" = "0" ]; then
+%if %{with systemd}
+%systemd_preun %{name}.path %{name}.socket %{name}.service
+%else
+if [ "$1" = "0" -o -x /bin/systemctl ]; then
 	/sbin/service cups stop > /dev/null 2>&1
 	/sbin/chkconfig --del cups
-%if %use_alternatives
-        /sbin/update-alternatives --remove print %{_bindir}/lpr.cups
+fi
+exit 0
 %endif
+
+%preun client
+%if %{use_alternatives}
+if [ $1 -eq 0 ] ; then
+	/usr/sbin/alternatives --remove print %{_bindir}/lpr.cups
 fi
+%endif
+exit 0
+
+%if %{with systemd}
+%preun lpd
+%systemd_preun cups-lpd.socket
 exit 0
+%endif
 
+%if %{with systemd}
 %postun
+%systemd_postun_with_restart %{name}.path %{name}.socket %{name}.service
+%endif
+
 if [ "$1" -ge "1" ]; then
 	/sbin/service cups condrestart > /dev/null 2>&1
 fi
 exit 0
 
+%if %{with systemd}
+%postun lpd
+%systemd_postun_with_restart cups-lpd.socket
+exit 0
+%endif
+
 %triggerin -- samba-client
 ln -sf ../../../bin/smbspool %{_libdir}/cups/backend/smb || :
 exit 0
@@ -534,8 +741,6 @@ exit 0
 [ $2 = 0 ] || exit 0
 rm -f %{_libdir}/cups/backend/smb
 
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root)
@@ -547,9 +752,6 @@ rm -rf $RPM_BUILD_ROOT
 %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
-%dir %attr(0755,root,lp) /var/run/cups
-%dir %attr(0511,lp,sys) /var/run/cups/certs
-%config(noreplace) %{_sysconfdir}/tmpfiles.d/cups*.conf
 %config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf
 %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf.default
 %config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/classes.conf
@@ -571,19 +773,21 @@ rm -rf $RPM_BUILD_ROOT
 %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}/xinetd.d/cups-lpd
+%dir %attr(0755,root,lp) /var/run/cups
+%dir %attr(0511,lp,sys) /var/run/cups/certs
 %config(noreplace) %{initdir}/cups
+%endif
 %{_bindir}/cupstestppd
-%{_bindir}/cupstestdsc
-%{_bindir}/cancel*
+#{_bindir}/cupstestdsc
 %{_bindir}/ippfind
 %{_bindir}/ipptool
-%{_bindir}/lp.cups
-%{_bindir}/lpoptions
-%{_bindir}/lpq.cups
-%{_bindir}/lpr.cups
-%{_bindir}/lprm.cups
-%{_bindir}/lpstat.cups
 %{_bindir}/ppd*
 %dir %{_libdir}/cups
 %{_libdir}/cups/backend
@@ -592,7 +796,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/cups/daemon/cups-exec
 %{_libdir}/cups/daemon/cups-deviced
 %{_libdir}/cups/daemon/cups-driverd
-%{_libdir}/cups/daemon/cups-lpd
 %{_libdir}/cups/notifier
 %{_libdir}/cups/filter
 %{_libdir}/cups/monitor
@@ -601,14 +804,13 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_prefix}/lib/cups
 %dir %{_prefix}/lib/cups/*
 %endif
-%{_mandir}/man1/cancel*
 %{_mandir}/man1/cups.1*
 %{_mandir}/man1/cupstest*
 %{_mandir}/man1/ipp*
-%{_mandir}/man1/lp*
 %{_mandir}/man1/ppd*
 %{_mandir}/man[578]/*
 %{_sbindir}/*
+%exclude %{_sbindir}/lpc.cups
 %{_datadir}/cups
 %{_datadir}/locale/*/*
 %{_datadir}/ppd
@@ -619,6 +821,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_sysconfdir}/cron.daily/cups
 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/cups.conf
 
+%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
@@ -632,6 +839,26 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/cups-config.1*
 %{_sysconfdir}/rpm/macros.cups
 
+%files client
+%{_sbindir}/lpc.cups
+%{_bindir}/cancel*
+%{_bindir}/lp*
+%{_mandir}/man1/lp*.1.gz
+%{_mandir}/man1/cancel-cups.1.gz
+%{_mandir}/man8/lpc-cups.8.gz
+
+%{_bindir}/ippeveprinter
+%{_mandir}/man1/ippeveprinter.1.gz
+
+%files lpd
+%defattr(-,root,root)
+%if %{with systemd}
+%{_unitdir}/cups-lpd.socket
+%{_unitdir}/cups-lpd@.service
+%endif
+%{_libdir}/cups/daemon/cups-lpd
+%{_mandir}/man8/cups-lpd.8.gz
+
 %if %{build_compat32}
 %files -n compat32-%{name}-devel
 %defattr(-,root,root)
@@ -643,7 +870,13 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/*.so.*
 %endif
 
+
 %changelog
+* Fri May 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.3.3-1
+- new upstream release.
+- added systemd support (disabled as default).
+- splitted the main package into 3 subpackages: cups, cups-client, cups-lpd.
+
 * Wed May 08 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.2.11-1
 - new upstream release.
 

+ 7 - 11
lib/libe/libexif/libexif-vl.spec

@@ -1,23 +1,16 @@
 Name: libexif
 Summary: EXIF tag library
 Summary(ja): EXIF タグライブラリ
-Version: 0.6.21
-Release: 3%{?_dist_release}
+Version: 0.6.22
+Release: 1%{?_dist_release}
 Group: System Environment/Libraries
 Vendor: Project Vine
 Distribution: Vine Linux
 
 License: LGPLv2+
 URL: https://libexif.github.io/
-Source: http://prdownloads.sourceforge.net/libexif/%{name}-%{version}.tar.bz2
-# CVE-2016-6328, RHBZ#1366239
-Patch0: 41bd04234b104312f54d25822f68738ba8d7133d.patch
-# CVE-2018-20030, RHBZ#
-Patch1: 5d28011c40ec86cf52cffad541093d37c263898a.patch
-Patch2: 6aa11df549114ebda520dde4cdaea2f9357b2c89.patch
-
-# CVE-2020-12767
-Patch3: CVE-2020-12767.patch
+%define altver %(echo %{version} | tr . _)
+Source: https://github.com/libexif/libexif/releases/download/libexif-%{altver}-release/%{name}-%{version}.tar.xz
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: pkgconfig gettext doxygen
@@ -81,6 +74,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri May 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.22-1
+- dropped Patch0-4: fixed in upstream.
+
 * Sun May 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.6.21-3
 - added Patch0-4 to fix CVE-2016-6328, CVE-2018-20030 and CVE-2020-12767.