Compare commits

..

No commits in common. 'c9' and 'i8' have entirely different histories.
c9 ... i8

2
.gitignore vendored

@ -1 +1 @@
SOURCES/gutenprint-5.3.4.tar.xz SOURCES/gutenprint-5.2.14.tar.bz2

@ -1 +1 @@
46167d00c2a4fb07c3fd3d62c80cd3fa004629f0 SOURCES/gutenprint-5.3.4.tar.xz 821707451bd6c8602ff9273bd9531bc5550e81c9 SOURCES/gutenprint-5.2.14.tar.bz2

@ -255,23 +255,6 @@ def parse_options():
return args return args
def check_encoding(filename):
import chardet
with open(filename, 'rb') as f:
charenc = chardet.detect(f.read())['encoding']
if debug & 1:
print("File encoding: {}".format(charenc))
if charenc in ['ascii', 'utf-8']:
return 'utf-8'
else:
if debug & 1:
print("Trying to use latin1 for decoding {}".format(charenc))
return 'latin1'
def update_ppd (ppd_source_filename): def update_ppd (ppd_source_filename):
global ppd_dest_filename global ppd_dest_filename
global ppd_out_dir global ppd_out_dir
@ -288,8 +271,7 @@ def update_ppd (ppd_source_filename):
ppd_dest_filename = "%s/%s" % (ppd_out_dir, ppd_dest_filename = "%s/%s" % (ppd_out_dir,
os.path.basename (ppd_dest_filename)) os.path.basename (ppd_dest_filename))
fenc = check_encoding(ppd_source_filename) orig = open (ppd_source_filename, encoding="utf-8")
orig = open(ppd_source_filename, encoding=fenc)
orig_metadata = os.fstat (orig.fileno ()) orig_metadata = os.fstat (orig.fileno ())
if debug & 1: if debug & 1:
print ("Source Filename: %s" % ppd_source_filename) print ("Source Filename: %s" % ppd_source_filename)
@ -302,17 +284,7 @@ def update_ppd (ppd_source_filename):
region = "" region = ""
valid = 0 valid = 0
orig_locale = "" orig_locale = ""
for line in orig.readlines ():
try:
orig_lines = orig.readlines()
except UnicodeDecodeError:
if debug & 1:
print('PPD {} has an unexpected enconding, '
'skipping.'.format(ppd_source_filename))
return -1
for line in orig_lines:
line.rstrip () line.rstrip ()
if line.find ("*StpLocale:") != -1: if line.find ("*StpLocale:") != -1:
match = re.search ("\*StpLocale:\s*\"(.*)\"$", line) match = re.search ("\*StpLocale:\s*\"(.*)\"$", line)

@ -0,0 +1,281 @@
diff -up gutenprint-5.2.12-pre3/configure.ac.O6 gutenprint-5.2.12-pre3/configure.ac
--- gutenprint-5.2.12-pre3/configure.ac.O6 2016-10-14 10:41:54.290398824 +0200
+++ gutenprint-5.2.12-pre3/configure.ac 2016-10-14 10:44:04.921328215 +0200
@@ -638,27 +638,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([-D_POSIX_C_SOURCE=200809L -std=c99 -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.12-pre3/configure.O6 gutenprint-5.2.12-pre3/configure
--- gutenprint-5.2.12-pre3/configure.O6 2016-10-14 10:41:54.293398800 +0200
+++ gutenprint-5.2.12-pre3/configure 2016-10-14 10:53:25.392709079 +0200
@@ -17651,246 +17651,6 @@ cat >>confdefs.h <<_ACEOF
#define PKGMODULEDIR "$PKGMODULEDIR"
_ACEOF
-
-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=131072 ; do
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- GNUCFLAGS="${stp_newCFLAGS}"
-
- done
-
- if test x${USE_MAINTAINER_MODE} = xyes ; then
-
- for stp_ac_arg in -D_POSIX_C_SOURCE=200809L -std=c99 -pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls ; do
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- GNUCFLAGS="${stp_newCFLAGS}"
-
- done
-
- fi
- if test x$ENABLE_DEBUG = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5
-$as_echo_n "checking if ${CC} supports -g... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- else
-
- for stp_ac_arg in -O6 -O3 -O2 -O1 -O ; do
- stp_ac_save_CFLAGS="${CFLAGS}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break
- done
-
- fi
-else
- if test x$ENABLE_DEBUG = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5
-$as_echo_n "checking if ${CC} supports -g... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- else
-
- for stp_ac_arg in -O ; do
- stp_ac_save_CFLAGS="${CFLAGS}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break
- done
-
- fi
-fi
-if test x$ENABLE_PROFILE = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -pg" >&5
-$as_echo_n "checking if ${CC} supports -pg... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -pg"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
-fi
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__ syntax" >&5
$as_echo_n "checking if $CC supports __attribute__ syntax... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext

@ -1,7 +1,7 @@
diff -up gutenprint-5.3.3/src/main/gutenprint-internal.h.postscriptdriver gutenprint-5.3.3/src/main/gutenprint-internal.h diff -up gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver gutenprint-5.2.6/src/main/gutenprint-internal.h
--- gutenprint-5.3.3/src/main/gutenprint-internal.h.postscriptdriver 2018-01-28 03:32:45.000000000 +0100 --- gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver 2010-08-04 02:33:56.000000000 +0200
+++ gutenprint-5.3.3/src/main/gutenprint-internal.h 2019-11-06 12:13:29.936061606 +0100 +++ gutenprint-5.2.6/src/main/gutenprint-internal.h 2010-08-11 16:11:19.000000000 +0200
@@ -54,6 +54,8 @@ extern void stpi_init_printer(void); @@ -56,6 +56,8 @@ extern void stpi_init_printer(void);
#define BUFFER_FLAG_FLIP_X 0x1 #define BUFFER_FLAG_FLIP_X 0x1
#define BUFFER_FLAG_FLIP_Y 0x2 #define BUFFER_FLAG_FLIP_Y 0x2
extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags); extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags);
@ -10,10 +10,10 @@ diff -up gutenprint-5.3.3/src/main/gutenprint-internal.h.postscriptdriver gutenp
#define STPI_ASSERT(x,v) \ #define STPI_ASSERT(x,v) \
do \ do \
diff -up gutenprint-5.3.3/src/main/module.c.postscriptdriver gutenprint-5.3.3/src/main/module.c diff -up gutenprint-5.2.6/src/main/module.c.postscriptdriver gutenprint-5.2.6/src/main/module.c
--- gutenprint-5.3.3/src/main/module.c.postscriptdriver 2019-05-25 16:34:21.000000000 +0200 --- gutenprint-5.2.6/src/main/module.c.postscriptdriver 2006-09-30 17:02:59.000000000 +0200
+++ gutenprint-5.3.3/src/main/module.c 2019-11-06 12:13:29.936061606 +0100 +++ gutenprint-5.2.6/src/main/module.c 2010-08-11 16:13:43.000000000 +0200
@@ -159,12 +159,20 @@ int stp_module_load(void) @@ -151,12 +151,20 @@ int stp_module_load(void)
} }
else else
{ {
@ -34,16 +34,17 @@ diff -up gutenprint-5.3.3/src/main/module.c.postscriptdriver gutenprint-5.3.3/sr
} }
#ifdef USE_LTDL #ifdef USE_LTDL
file_list = stp_path_search(dir_list, ".la"); file_list = stp_path_search(dir_list, ".la");
diff -up gutenprint-5.3.3/src/main/path.c.postscriptdriver gutenprint-5.3.3/src/main/path.c diff -up gutenprint-5.2.6/src/main/path.c.postscriptdriver gutenprint-5.2.6/src/main/path.c
--- gutenprint-5.3.3/src/main/path.c.postscriptdriver 2019-05-25 16:34:21.000000000 +0200 --- gutenprint-5.2.6/src/main/path.c.postscriptdriver 2008-06-01 16:41:18.000000000 +0200
+++ gutenprint-5.3.3/src/main/path.c 2019-11-06 12:29:30.709190171 +0100 +++ gutenprint-5.2.6/src/main/path.c 2010-08-11 16:13:43.000000000 +0200
@@ -154,6 +154,17 @@ stp_generate_path(const char *path) @@ -158,7 +158,17 @@ stpi_data_path(void)
return NULL; if (getenv("STP_DATA_PATH"))
stp_list_set_freefunc(dir_list, stp_list_node_free_data); stp_path_split(dir_list, getenv("STP_DATA_PATH"));
stp_path_split(dir_list, path); else
+ if (!strncmp(PKGXMLDATADIR, path, strlen(path))) - stp_path_split(dir_list, PKGXMLDATADIR);
+ { + {
+ const char *prefix = getenv("DESTDIR"); + const char *prefix = getenv("DESTDIR");
+ stp_path_split(dir_list, PKGXMLDATADIR);
+ if (prefix) + if (prefix)
+ { + {
+ stp_list_t *prefix_list; + stp_list_t *prefix_list;
@ -55,7 +56,7 @@ diff -up gutenprint-5.3.3/src/main/path.c.postscriptdriver gutenprint-5.3.3/src/
return dir_list; return dir_list;
} }
@@ -262,6 +273,40 @@ stp_path_split(stp_list_t *list, /* List @@ -226,6 +236,40 @@ stp_path_split(stp_list_t *list, /* List
} }
} }
@ -71,7 +72,7 @@ diff -up gutenprint-5.3.3/src/main/path.c.postscriptdriver gutenprint-5.3.3/src/
+ stp_list_item_t *item; + stp_list_item_t *item;
+ int prefixlen = strlen (prefix); + int prefixlen = strlen (prefix);
+ if (!(new_list = stp_list_create())) + if (!(new_list = stp_list_create()))
+ return NULL; + return;
+ +
+ item = stp_list_get_start (list); + item = stp_list_get_start (list);
+ while (item) + while (item)

@ -1,7 +1,7 @@
--- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax --- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax
+++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in +++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in
@@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename): @@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename):
for line in orig_lines: for line in orig.readlines ():
line.rstrip () line.rstrip ()
if line.find ("*StpLocale:") != -1: if line.find ("*StpLocale:") != -1:
- match = re.search ("\*StpLocale:\s*\"(.*)\"$", line) - match = re.search ("\*StpLocale:\s*\"(.*)\"$", line)

@ -0,0 +1,10 @@
module gutenprint 1.0;
require {
type cupsd_t;
class capability2 bpf;
}
#============= cupsd_t ==============
allow cupsd_t self:capability2 bpf;

@ -1,16 +1,19 @@
#%%global prever pre2 #%%global prever pre2
#%%global ver %%{version}-%%{prever} #%%global ver %%{version}-%%{prever}
%global selinuxtype targeted
Name: gutenprint Name: gutenprint
Summary: Printer Drivers Package Summary: Printer Drivers Package
Version: 5.3.4 Version: 5.2.14
Release: 4%{?dist} Release: 3%{?dist}.inferit
URL: http://gimp-print.sourceforge.net/ URL: http://gimp-print.sourceforge.net/
Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.xz Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2
# Post-install script to update CUPS native PPDs. # Post-install script to update CUPS native PPDs.
Source1: cups-genppdupdate.py.in Source1: cups-genppdupdate.py.in
# ported from old gimp-print package - fix for a menu in gimp gutenprint plugin # ported from old gimp-print package - fix for a menu in gimp gutenprint plugin
Source2: gutenprint.te
Patch0: gutenprint-menu.patch Patch0: gutenprint-menu.patch
Patch1: gutenprint-O6.patch
Patch3: gutenprint-postscriptdriver.patch Patch3: gutenprint-postscriptdriver.patch
Patch4: gutenprint-yyin.patch Patch4: gutenprint-yyin.patch
Patch5: gutenprint-manpage.patch Patch5: gutenprint-manpage.patch
@ -19,23 +22,19 @@ License: GPLv2+
#### removed patches, because the seems useless #### removed patches, because the seems useless
# I'll leave them here, in case its removal will break something # I'll leave them here, in case its removal will break something
#Patch1: gutenprint-O6.patch
#Patch2: gutenprint-selinux.patch #Patch2: gutenprint-selinux.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# gcc is no longer in buildroot by default # gcc is no longer in buildroot by default
BuildRequires: gcc BuildRequires: gcc
# uses make
BuildRequires: make
BuildRequires: cups-libs, cups-devel, cups BuildRequires: cups-libs, cups-devel, cups
BuildRequires: gettext-devel,pkgconfig BuildRequires: gettext-devel,pkgconfig
BuildRequires: libtiff-devel,libjpeg-devel,libpng-devel BuildRequires: libtiff-devel,libjpeg-devel,libpng-devel
BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gtk+-2.0)
%if 0%{?rhel} <= 8 || 0%{?fedora}
BuildRequires: pkgconfig(gimpui-2.0) BuildRequires: pkgconfig(gimpui-2.0)
%endif BuildRequires: gimp
BuildRequires: chrpath BuildRequires: chrpath
# Make sure we get postscriptdriver tags. # Make sure we get postscriptdriver tags.
@ -44,9 +43,13 @@ BuildRequires: python3-cups
# autoreconf # autoreconf
BuildRequires: autoconf automake libtool BuildRequires: autoconf automake libtool
# needed for defining %%{__python3} macro for prep phase # needed for defining %%{__python3} macro in prep phase
BuildRequires: python3-devel BuildRequires: python3-devel
# fix SELinux policy
BuildRequires: selinux-policy-devel
Requires: (%{name}-selinux = %{version}-%{release} if selinux-policy-%{selinuxtype})
## NOTE ## ## NOTE ##
# The README file in this package contains suggestions from upstream # The README file in this package contains suggestions from upstream
# on how to package this software. I'd be inclined to follow those # on how to package this software. I'd be inclined to follow those
@ -86,7 +89,6 @@ Requires: gtk2-devel
This package contains headers and libraries required to build applications that This package contains headers and libraries required to build applications that
uses gutenprint package. uses gutenprint package.
%if 0%{?rhel} <= 8 || 0%{?fedora}
%package plugin %package plugin
Summary: GIMP plug-in for gutenprint Summary: GIMP plug-in for gutenprint
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
@ -102,7 +104,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description extras %description extras
This package contains test pattern generator and the sample test pattern This package contains test pattern generator and the sample test pattern
that is used by gutenprint-devel package. that is used by gutenprint-devel package.
%endif
%package cups %package cups
Summary: CUPS drivers for Canon, Epson, HP and compatible printers Summary: CUPS drivers for Canon, Epson, HP and compatible printers
@ -113,12 +114,21 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains native CUPS support for a wide range of Canon, This package contains native CUPS support for a wide range of Canon,
Epson, HP and compatible printers. Epson, HP and compatible printers.
%package selinux
Summary: SELinux policy module for gutenprint
Requires: %{name} = %{version}-%{release}
%{?selinux_requires}
%description selinux
This package contains the SELinux policy module necessary to run
gutenprint from GNOME Control Center
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
# Fix menu placement of GIMP plugin. # Fix menu placement of GIMP plugin.
%patch0 -p1 -b .menu %patch0 -p1 -b .menu
# Don't use -O6 compiler option. # Don't use -O6 compiler option.
#%%patch1 -p1 -b .O6 %patch1 -p1 -b .O6
# Restore file contexts when updating PPDs. # Restore file contexts when updating PPDs.
#%%patch2 -p1 -b .selinux #%%patch2 -p1 -b .selinux
# Allow the CUPS dynamic driver to run inside a build root. # Allow the CUPS dynamic driver to run inside a build root.
@ -137,6 +147,10 @@ sed -i -e 's,^#!/usr/bin/python3,#!%{__python3},' src/cups/cups-genppdupdate.in
# Python 3.6 invalid escape sequence deprecation fixes, COPYING as license (bug #1448303) # Python 3.6 invalid escape sequence deprecation fixes, COPYING as license (bug #1448303)
%patch6 -p1 -b .python36syntax %patch6 -p1 -b .python36syntax
# SELinux fixes
mkdir -p SELinux
cp %{SOURCE2} SELinux/
%build %build
# Don't run the weave test as it takes a very long time. # Don't run the weave test as it takes a very long time.
sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in
@ -153,6 +167,10 @@ sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in
%make_build %make_build
# Build SELinux policy
cd SELinux
%{__make} NAME=%{selinuxtype} -f /usr/share/selinux/devel/Makefile
# Test suite disabled due to bug #1069274. # Test suite disabled due to bug #1069274.
#%check #%check
#make check #make check
@ -167,21 +185,22 @@ rm -f %{buildroot}%{_datadir}/foomatic/kitload.log
rm -rf %{buildroot}%{_libdir}/gutenprint/5.2/modules/*.la rm -rf %{buildroot}%{_libdir}/gutenprint/5.2/modules/*.la
rm -f %{buildroot}%{_sysconfdir}/cups/command.types rm -f %{buildroot}%{_sysconfdir}/cups/command.types
install -d %{buildroot}%{_datadir}/selinux/%{selinuxtype}
install -p -m 644 SELinux/%{name}.pp %{buildroot}%{_datadir}/selinux/%{selinuxtype}/%{name}.pp
%find_lang %{name} %find_lang %{name}
sed 's!%{_datadir}/locale/\([^/]*\)/LC_MESSAGES/gutenprint.mo!%{_datadir}/locale/\1/gutenprint_\1.po!g' %{name}.lang >%{name}-po.lang sed 's!%{_datadir}/locale/\([^/]*\)/LC_MESSAGES/gutenprint.mo!%{_datadir}/locale/\1/gutenprint_\1.po!g' %{name}.lang >%{name}-po.lang
rm -f %{name}.lang rm -f %{name}.lang
%find_lang %{name} --all-name %find_lang %{name} --all-name
cat %{name}-po.lang >>%{name}.lang cat %{name}-po.lang >>%{name}.lang
#echo .so man8/cups-genppd.8 > %{buildroot}%{_mandir}/man8/cups-genppd.5.3.3 echo .so man8/cups-genppd.8 > %{buildroot}%{_mandir}/man8/cups-genppd.5.2.8
# Fix up rpath. If you can find a way to do this without resorting # Fix up rpath. If you can find a way to do this without resorting
# to chrpath, please let me know! # to chrpath, please let me know!
for file in \ for file in \
%{buildroot}%{_sbindir}/cups-genppd.5.3 \ %{buildroot}%{_sbindir}/cups-genppd.5.2 \
%if 0%{?rhel} <= 8 || 0%{?fedora}
%{buildroot}%{_libdir}/gimp/*/plug-ins/* \ %{buildroot}%{_libdir}/gimp/*/plug-ins/* \
%endif
%{buildroot}%{_libdir}/*.so.* \ %{buildroot}%{_libdir}/*.so.* \
%{buildroot}%{_cups_serverbin}/driver/* \ %{buildroot}%{_cups_serverbin}/driver/* \
%{buildroot}%{_cups_serverbin}/filter/* \ %{buildroot}%{_cups_serverbin}/filter/* \
@ -190,18 +209,35 @@ do
chrpath --delete ${file} chrpath --delete ${file}
done done
%if 0%{?rhel} > 8
%{_bindir}/rm -f %{buildroot}%{_bindir}/testpattern \
%endif
%ldconfig_scriptlets libs %post libs -p /sbin/ldconfig
%ldconfig_scriptlets libs-ui %post libs-ui -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%postun libs-ui -p /sbin/ldconfig
%post cups %post cups
%{_sbindir}/cups-genppdupdate >/dev/null 2>&1 || : /usr/sbin/cups-genppdupdate >/dev/null 2>&1 || :
%{_bindir}/systemctl restart cups >/dev/null 2>&1 || : /sbin/service cups reload >/dev/null 2>&1 || :
exit 0 exit 0
%pre selinux
%selinux_relabel_pre -s %{selinuxtype}
%post selinux
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/%{selinuxtype}/%{name}.pp
%selinux_relabel_post -s %{selinuxtype}
if [ "$1" -le "1" ]; then # First install
# the daemon needs to be restarted for the custom label to be applied
%systemd_postun_with_restart waydroid-container.service
fi
%postun selinux
if [ $1 -eq 0 ]; then
%selinux_modules_uninstall -s %{selinuxtype} %{name}
%selinux_relabel_post -s %{selinuxtype}
fi
%files -f %{name}.lang %files -f %{name}.lang
%license COPYING %license COPYING
@ -215,12 +251,12 @@ exit 0
%license COPYING %license COPYING
%files libs %files libs
%{_libdir}/libgutenprint.so.9 %{_libdir}/libgutenprint.so.2
%{_libdir}/libgutenprint.so.9.5.0 %{_libdir}/libgutenprint.so.2.7.0
%files libs-ui %files libs-ui
%{_libdir}/libgutenprintui2.so.2 %{_libdir}/libgutenprintui2.so.1
%{_libdir}/libgutenprintui2.so.2.5.0 %{_libdir}/libgutenprintui2.so.1.0.0
%files devel %files devel
%doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf %doc ChangeLog doc/developer/reference-html doc/developer/gutenprint.pdf
@ -232,7 +268,6 @@ exit 0
%{_libdir}/pkgconfig/gutenprintui2.pc %{_libdir}/pkgconfig/gutenprintui2.pc
%exclude %{_libdir}/*.la %exclude %{_libdir}/*.la
%if 0%{?rhel} <= 8 || 0%{?fedora}
%files plugin %files plugin
%{_libdir}/gimp/*/plug-ins/gutenprint %{_libdir}/gimp/*/plug-ins/gutenprint
@ -240,7 +275,6 @@ exit 0
%doc %doc
%{_bindir}/testpattern %{_bindir}/testpattern
%{_datadir}/gutenprint/samples/* %{_datadir}/gutenprint/samples/*
%endif
%files cups %files cups
%doc %doc
@ -252,58 +286,22 @@ exit 0
%{_bindir}/cups-calibrate %{_bindir}/cups-calibrate
%{_sbindir}/cups-genppd* %{_sbindir}/cups-genppd*
%{_mandir}/man8/cups-calibrate.8* %{_mandir}/man8/cups-calibrate.8*
%{_mandir}/man8/cups-genppd*8*.gz %{_mandir}/man8/cups-genppd*.8*
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 5.3.4-4
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.3.4-3 %files selinux
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 %doc SELinux/%{name}.te
%{_datadir}/selinux/%{selinuxtype}/%{name}.pp
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.4-2 %changelog
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Fri Mar 15 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 5.2.14-3.inferit
- Added SELinux policy (based on Arkady L. Shane <tigro@msvsphere-os.ru> patch for MSVSphere 9)
* Wed Jan 13 2021 Zdenek Dohnal <zdohnal@redhat.com> - 5.3.4-1 - Rebuilt for MSVSphere 8.9
- 5.3.4
* Fri Nov 06 2020 Zdenek Dohnal <zdohnal@redhat.com> - 5.3.3-7
- 1773690 - cups-genppdupdate doesnt work for non-utf-8 PPDs
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 5.3.3-6
- make is no longer in buildroot by default
* Wed Sep 30 2020 Zdenek Dohnal <zdohnal@redhat.com> - 5.3.3-5
- dont require the gimp package as build require, pkgconfig's gimpui-2.0 suffices
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Mar 25 2020 Tom Stellard <tstellar@redhat.com> - 5.3.3-3
- Fix warning building with clang
- non-void function 'stp_paths_copy_with_prefix' should return a value [-Wreturn-type]
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Nov 06 2019 Zdenek Dohnal <zdohnal@redhat.com> - 5.3.3-1
- 5.3.3
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Apr 09 2019 Zdenek Dohnal <zdohnal@redhat.com> - 5.2.14-6
- rebuilt again (because bodhi cannot release builds of unpushed updates)
* Mon Apr 08 2019 Zdenek Dohnal <zdohnal@redhat.com> - 5.2.14-5
- rebuilt for gimp-2.10.10
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.14-4 * Tue Jul 25 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 5.2.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for MSVSphere 8.8
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.14-3 * Wed Aug 15 2018 Zdenek Dohnal <zdohnal@redhat.com> - 5.2.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - rebuilt with fixed gimp module
* Wed Jul 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 5.2.14-2 * Wed Jul 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 5.2.14-2
- use %%{__python3} macro - use %%{__python3} macro

Loading…
Cancel
Save