- Restore SELinux file contexts of modified PPDs.
This commit is contained in:
Tim Waugh 2008-11-20 17:15:23 +00:00
parent 9cd1ced75d
commit a27e7de978
5 changed files with 82 additions and 54 deletions

View File

@ -2,3 +2,4 @@ gutenprint-5.0.0.tar.bz2
gutenprint-5.0.0.99.1.tar.bz2 gutenprint-5.0.0.99.1.tar.bz2
gutenprint-5.0.1.tar.bz2 gutenprint-5.0.1.tar.bz2
gutenprint-5.0.2.tar.bz2 gutenprint-5.0.2.tar.bz2
gutenprint-5.2.2.tar.bz2

View File

@ -1,13 +1,44 @@
diff -up gutenprint-5.0.2/configure.O6 gutenprint-5.0.2/configure diff -up gutenprint-5.2.2/configure.ac.O6 gutenprint-5.2.2/configure.ac
--- gutenprint-5.0.2/configure.O6 2008-01-18 12:19:25.000000000 +0000 --- gutenprint-5.2.2/configure.ac.O6 2008-11-19 11:23:29.000000000 +0000
+++ gutenprint-5.0.2/configure 2008-01-18 12:21:05.000000000 +0000 +++ gutenprint-5.2.2/configure.ac 2008-11-19 11:24:35.000000000 +0000
@@ -26044,410 +26044,6 @@ cat >>confdefs.h <<_ACEOF @@ -625,27 +625,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu
PKGMODULEDIR="${PACKAGE_LIB_DIR}/${GUTENPRINT_RELEASE_VERSION}/modules"
AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"])
-dnl Compiler flags
-if test x$ac_compiler_gnu = "xyes"; then
- STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072],, [GNUCFLAGS])
- if test x${USE_MAINTAINER_MODE} = xyes ; then
- STP_ADD_COMPILER_ARGS([-pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS])
- fi
- if test x$ENABLE_DEBUG = xyes ; then
- STP_ADD_COMPILER_ARG([-g])
- else
- STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O])
- fi
-else
- if test x$ENABLE_DEBUG = xyes ; then
- STP_ADD_COMPILER_ARG([-g])
- else
- STP_ADD_FIRST_COMPILER_ARG([-O])
- fi
-fi
-if test x$ENABLE_PROFILE = xyes ; then
- STP_ADD_COMPILER_ARG([-pg])
-fi
AC_SUBST(GNUCFLAGS)
AH_TEMPLATE([HAVE_GCC_ATTRIBUTES],
diff -up gutenprint-5.2.2/configure.O6 gutenprint-5.2.2/configure
--- gutenprint-5.2.2/configure.O6 2008-11-19 11:23:32.000000000 +0000
+++ gutenprint-5.2.2/configure 2008-11-19 11:24:49.000000000 +0000
@@ -26509,410 +26509,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
-if test x$ac_compiler_gnu = "xyes"; then -if test x$ac_compiler_gnu = "xyes"; then
- -
- for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=1048576 ; do - for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072 ; do
- -
- { echo "$as_me:$LINENO: checking if ${CC} supports ${stp_ac_arg}" >&5 - { echo "$as_me:$LINENO: checking if ${CC} supports ${stp_ac_arg}" >&5
-echo $ECHO_N "checking if ${CC} supports ${stp_ac_arg}... $ECHO_C" >&6; } -echo $ECHO_N "checking if ${CC} supports ${stp_ac_arg}... $ECHO_C" >&6; }
@ -412,36 +443,3 @@ diff -up gutenprint-5.0.2/configure.O6 gutenprint-5.0.2/configure
diff -up gutenprint-5.0.2/configure.ac.O6 gutenprint-5.0.2/configure.ac
--- gutenprint-5.0.2/configure.ac.O6 2008-01-18 12:18:40.000000000 +0000
+++ gutenprint-5.0.2/configure.ac 2008-01-18 12:19:20.000000000 +0000
@@ -648,29 +648,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu
PKGMODULEDIR="${PACKAGE_LIB_DIR}/${PACKAGE_VERSION}/modules"
AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"])
-dnl Compiler flags
-if test x$ac_compiler_gnu = "xyes"; then
- STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=1048576],, [GNUCFLAGS])
- if test x${USE_MAINTAINER_MODE} = xyes ; then
- STP_ADD_COMPILER_ARGS([-pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS])
- fi
- if test x$ENABLE_DEBUG = xyes ; then
- STP_ADD_COMPILER_ARG([-g])
- else
- STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O])
- fi
-else
- if test x$ENABLE_DEBUG = xyes ; then
- STP_ADD_COMPILER_ARG([-g])
- else
- STP_ADD_FIRST_COMPILER_ARG([-O])
- fi
-fi
-if test x$ENABLE_PROFILE = xyes ; then
- STP_ADD_COMPILER_ARG([-pg])
-fi
-AC_SUBST(GNUCFLAGS)
-
AH_TEMPLATE([HAVE_GCC_ATTRIBUTES],
[Define to 1 if GCC special attributes are supported])
AC_MSG_CHECKING([if $CC supports __attribute__ syntax])

12
gutenprint-selinux.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up gutenprint-5.2.2/src/cups/cups-genppdupdate.in.selinux gutenprint-5.2.2/src/cups/cups-genppdupdate.in
--- gutenprint-5.2.2/src/cups/cups-genppdupdate.in.selinux 2008-11-20 16:08:57.000000000 +0000
+++ gutenprint-5.2.2/src/cups/cups-genppdupdate.in 2008-11-20 16:21:48.000000000 +0000
@@ -667,6 +667,8 @@ default_loop:
unlink $tmpnew;
return 0;
}
+ my @args = ("chcon", "--reference=$ppd_dest_filename", $tmpnew);
+ system(@args);
if (! rename $tmpnew, $ppd_dest_filename) {
warn "Can't rename $tmpnew to $ppd_dest_filename: $!\n";

View File

@ -3,14 +3,15 @@
Name: gutenprint Name: gutenprint
Summary: Printer Drivers Package. Summary: Printer Drivers Package.
Version: 5.0.2 Version: 5.2.2
Release: 3%{?dist} Release: 1%{?dist}
Group: System Environment/Base Group: System Environment/Base
URL: http://gimp-print.sourceforge.net/ URL: http://gimp-print.sourceforge.net/
Source0: http://dl.sf.net/gimp-print/gutenprint-%{version}.tar.bz2 Source0: http://dl.sf.net/gimp-print/gutenprint-%{version}.tar.bz2
Source1: gutenprint-foomaticppdupdate Source1: gutenprint-foomaticppdupdate
Patch0: gutenprint-menu.patch Patch0: gutenprint-menu.patch
Patch1: gutenprint-O6.patch Patch1: gutenprint-O6.patch
Patch2: gutenprint-selinux.patch
License: GPLv2+ License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cups-libs >= 1.1.22-0.rc1.9.10, cups >= 1.1.22-0.rc1.9.10 BuildRequires: cups-libs >= 1.1.22-0.rc1.9.10, cups >= 1.1.22-0.rc1.9.10
@ -21,6 +22,7 @@ BuildRequires: foomatic,gtk2-devel
BuildRequires: ghostscript-devel BuildRequires: ghostscript-devel
%endif %endif
BuildRequires: gimp BuildRequires: gimp
BuildRequires: chrpath
Obsoletes: gimp-print-utils <= 4.2.7-25 Obsoletes: gimp-print-utils <= 4.2.7-25
Provides: gimp-print-utils = 4.2.7-25 Provides: gimp-print-utils = 4.2.7-25
@ -126,6 +128,7 @@ Epson, HP and compatible printers..
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch0 -p1 -b .menu %patch0 -p1 -b .menu
%patch1 -p1 -b .O6 %patch1 -p1 -b .O6
%patch2 -p1 -b .selinux
%build %build
%ifarch ppc64 %ifarch ppc64
@ -135,20 +138,21 @@ export CFLAGS="${CFLAGS} -O0"
--with-foomatic --with-ghostscript \ --with-foomatic --with-ghostscript \
--disable-libgutenprintui --without-gimp \ --disable-libgutenprintui --without-gimp \
--with-user-guide --with-samples \ --with-user-guide --with-samples \
--with-escputil --with-test --disable-rpath --with-escputil --with-test --disable-rpath \
--enable-cups-1_2-enhancements \
--enable-simplified-cups-ppds
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install
mv %{buildroot}%{cups_serverbin}/driver/gutenprint.5.0 %{buildroot}%{_sbindir}
ln -s %{_sbindir}/gutenprint.5.0 %{buildroot}%{cups_serverbin}/driver/
mkdir -p %{buildroot}%{_sbindir}
install -m755 %{SOURCE1} %{buildroot}%{_sbindir} install -m755 %{SOURCE1} %{buildroot}%{_sbindir}
rm -rf %{buildroot}%{_datadir}/gutenprint/doc rm -rf %{buildroot}%{_datadir}/gutenprint/doc
rm -rf %{buildroot}%{_libdir}/gutenprint/5.0.0/modules/*.la rm -rf %{buildroot}%{_libdir}/gutenprint/5.2/modules/*.la
%find_lang gutenprint %find_lang gutenprint
@ -157,6 +161,19 @@ rm -rf %{buildroot}%{_libdir}/gutenprint/5.0.0/modules/*.la
rm -f %{buildroot}%{_mandir}/man1/ijsgutenprint.1* rm -f %{buildroot}%{_mandir}/man1/ijsgutenprint.1*
%endif %endif
# Fix up rpath. If you can find a way to do this without resorting
# to chrpath, please let me know!
for file in \
%{buildroot}%{_sbindir}/cups-genppd.5.2 \
%{buildroot}%{_libdir}/gimp/*/plug-ins/* \
%{buildroot}%{_libdir}/*.so.* \
%{buildroot}%{cups_serverbin}/driver/* \
%{buildroot}%{cups_serverbin}/filter/* \
%{buildroot}%{_bindir}/*
do
chrpath --delete ${file}
done
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -166,11 +183,7 @@ rm -rf %{buildroot}
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%post cups %post cups
/usr/sbin/cups-genppdupdate.5.0 /usr/sbin/cups-genppdupdate
/sbin/service cups reload >/dev/null 2>&1 || :
exit 0
%postun cups
/sbin/service cups reload >/dev/null 2>&1 || : /sbin/service cups reload >/dev/null 2>&1 || :
exit 0 exit 0
@ -180,7 +193,7 @@ exit 0
%doc COPYING AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf %doc COPYING AUTHORS NEWS README doc/FAQ.html doc/gutenprint-users-manual.odt doc/gutenprint-users-manual.pdf
%{_bindir}/escputil %{_bindir}/escputil
%{_mandir}/man1/escputil.1* %{_mandir}/man1/escputil.1*
%{_bindir}/ijsgutenprint.5.0 %{_bindir}/ijsgutenprint.5.2
%if %{build_with_ijs_support} %if %{build_with_ijs_support}
%{_mandir}/man1/ijsgutenprint.1* %{_mandir}/man1/ijsgutenprint.1*
%endif %endif
@ -188,12 +201,14 @@ exit 0
%{_libdir}/*.so.* %{_libdir}/*.so.*
%{_libdir}/gutenprint/ %{_libdir}/gutenprint/
# For some reason the po files are needed as well.
%{_datadir}/locale/*/gutenprint_*.po
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf %doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf
%doc doc/gutenprint doc/gutenprintui2 %doc doc/gutenprint doc/gutenprintui2
%{_includedir}/gutenprint/ %{_includedir}/gutenprint/
%{_includedir}/gutenprintui/
%{_includedir}/gutenprintui2/ %{_includedir}/gutenprintui2/
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/gutenprint.pc %{_libdir}/pkgconfig/gutenprint.pc
@ -222,12 +237,10 @@ exit 0
%defattr(-, root, root,-) %defattr(-, root, root,-)
%config(noreplace) %{_sysconfdir}/cups/command.types %config(noreplace) %{_sysconfdir}/cups/command.types
%{_datadir}/cups/calibrate.ppm %{_datadir}/cups/calibrate.ppm
%{cups_serverbin}/backend/*
%{cups_serverbin}/filter/* %{cups_serverbin}/filter/*
%{cups_serverbin}/driver/* %{cups_serverbin}/driver/*
%{_bindir}/cups-calibrate %{_bindir}/cups-calibrate
%{_sbindir}/cups-genppd* %{_sbindir}/cups-genppd*
%{_sbindir}/gutenprint.5.0
%{_mandir}/man8/cups-calibrate.8* %{_mandir}/man8/cups-calibrate.8*
%{_mandir}/man8/cups-genppd*.8* %{_mandir}/man8/cups-genppd*.8*
@ -239,6 +252,10 @@ exit 0
/bin/rm -f /var/cache/foomatic/* /bin/rm -f /var/cache/foomatic/*
%changelog %changelog
* Thu Nov 20 2008 Tim Waugh <twaugh@redhat.com> 5.2.2-1
- 5.2.2.
- Restore SELinux file contexts of modified PPDs.
* Mon Aug 4 2008 Tim Waugh <twaugh@redhat.com> * Mon Aug 4 2008 Tim Waugh <twaugh@redhat.com>
- Fixed summary for foomatic sub-package. - Fixed summary for foomatic sub-package.

View File

@ -1 +1 @@
ca6c45616caa720e9e185817272b08d7 gutenprint-5.0.2.tar.bz2 ffd3fefd28638dfe49caad04ef6d9f50 gutenprint-5.2.2.tar.bz2