Compare commits

...

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

2
.gitignore vendored

@ -1,2 +1,2 @@
SOURCES/pnm2ppa-1.13.tar.gz SOURCES/pnm2ppa-1.04.tar.gz
SOURCES/ppa-0.8.6.tar.gz SOURCES/ppa-0.8.6.tar.gz

@ -1,2 +1,2 @@
3de33786e9d3f35a73d7e4acb5281f30654cef7c SOURCES/pnm2ppa-1.13.tar.gz a3cd26788779bc80fa6c8265f3b2aacaaa5acd92 SOURCES/pnm2ppa-1.04.tar.gz
97eedbb777940cd7fa9b2efa181c70f7146325af SOURCES/ppa-0.8.6.tar.gz 97eedbb777940cd7fa9b2efa181c70f7146325af SOURCES/ppa-0.8.6.tar.gz

@ -1,17 +0,0 @@
diff --git a/defaults.h b/defaults.h
index 4385cc6..c3f28a7 100644
--- a/defaults.h
+++ b/defaults.h
@@ -24,10 +24,10 @@
typedef enum
{
- NOPRINTER = 0xff,
HP7X0 = 0,
HP820,
- HP1000
+ HP1000,
+ NOPRINTER
}
printerModel_t;

@ -1,7 +1,7 @@
diff -up pnm2ppa-1.13/calibrate_ppa.c.coverity-return-local pnm2ppa-1.13/calibrate_ppa.c diff -up pnm2ppa-1.04/calibrate_ppa.c.coverity-return-local pnm2ppa-1.04/calibrate_ppa.c
--- pnm2ppa-1.13/calibrate_ppa.c.coverity-return-local 2009-12-12 20:14:55.000000000 +0100 --- pnm2ppa-1.04/calibrate_ppa.c.coverity-return-local 2000-11-11 22:22:38.000000000 +0000
+++ pnm2ppa-1.13/calibrate_ppa.c 2023-10-20 13:34:21.570205199 +0200 +++ pnm2ppa-1.04/calibrate_ppa.c 2011-05-20 16:04:23.233425268 +0100
@@ -80,7 +80,7 @@ main (int argc, char *argv[]) @@ -75,7 +75,7 @@ main (int argc, char *argv[])
BOOLEAN gamma = false ; BOOLEAN gamma = false ;
FILE *outFile = NULL ; FILE *outFile = NULL ;
int testPattern = 0; int testPattern = 0;
@ -10,7 +10,7 @@ diff -up pnm2ppa-1.13/calibrate_ppa.c.coverity-return-local pnm2ppa-1.13/calibra
char c; char c;
static struct option long_opts[] = { static struct option long_opts[] = {
{"gamma",0,0,'g'}, {"gamma",0,0,'g'},
@@ -162,9 +162,7 @@ main (int argc, char *argv[]) @@ -157,9 +157,7 @@ main (int argc, char *argv[])
{ {
if ( strlen(optarg) < MAXPATHLEN ) if ( strlen(optarg) < MAXPATHLEN )
{ {
@ -21,10 +21,10 @@ diff -up pnm2ppa-1.13/calibrate_ppa.c.coverity-return-local pnm2ppa-1.13/calibra
use_stdout = false ; use_stdout = false ;
} }
} }
diff -up pnm2ppa-1.13/pnm2ppa.c.coverity-return-local pnm2ppa-1.13/pnm2ppa.c diff -up pnm2ppa-1.04/pnm2ppa.c.coverity-return-local pnm2ppa-1.04/pnm2ppa.c
--- pnm2ppa-1.13/pnm2ppa.c.coverity-return-local 2023-10-20 13:34:21.570205199 +0200 --- pnm2ppa-1.04/pnm2ppa.c.coverity-return-local 2000-11-11 19:53:03.000000000 +0000
+++ pnm2ppa-1.13/pnm2ppa.c 2023-10-20 13:38:05.524230753 +0200 +++ pnm2ppa-1.04/pnm2ppa.c 2011-05-20 16:04:23.234425246 +0100
@@ -148,21 +148,15 @@ print_pnm (FILE * fptr) @@ -145,20 +145,15 @@ print_pnm (FILE * fptr)
char * char *
readPath(char *input ) readPath(char *input )
{ {
@ -39,8 +39,7 @@ diff -up pnm2ppa-1.13/pnm2ppa.c.coverity-return-local pnm2ppa-1.13/pnm2ppa.c
- a user-specifed file *File_path may later be opened; - a user-specifed file *File_path may later be opened;
- should any extra validation of this be performed now ? - should any extra validation of this be performed now ?
- */ - */
- /* remember to free(path) after use! */ - path = File_path;
- path = strdup(File_path);
- return path; - return path;
- } - }
+ path = strdup(input); + path = strdup(input);

@ -1,6 +1,19 @@
diff -up pnm2ppa-1.13/ppa_syslog.h.gcc10 pnm2ppa-1.13/ppa_syslog.h diff --git a/syslog.c b/syslog.c
--- pnm2ppa-1.13/ppa_syslog.h.gcc10 2023-10-20 14:27:00.381590872 +0200 index e70f12c..af067e2 100644
+++ pnm2ppa-1.13/ppa_syslog.h 2023-10-20 14:27:10.052671328 +0200 --- a/syslog.c
+++ b/syslog.c
@@ -27,6 +27,7 @@
#include "global.h"
+char syslog_message[128];
/*
For some reason, BeOS doesn't seem to implement syslog(), even though it is
diff --git a/syslog.h b/syslog.h
index 7d0e436..5c1accd 100644
--- a/syslog.h
+++ b/syslog.h
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
#include <syslog.h> #include <syslog.h>
#endif #endif
@ -10,15 +23,3 @@ diff -up pnm2ppa-1.13/ppa_syslog.h.gcc10 pnm2ppa-1.13/ppa_syslog.h
extern size_t message_size ; extern size_t message_size ;
void wrap_syslog( int, char *, char *); void wrap_syslog( int, char *, char *);
diff -up pnm2ppa-1.13/syslog.c.gcc10 pnm2ppa-1.13/syslog.c
--- pnm2ppa-1.13/syslog.c.gcc10 2023-10-20 14:23:10.093285301 +0200
+++ pnm2ppa-1.13/syslog.c 2023-10-20 14:26:04.925129503 +0200
@@ -33,6 +33,8 @@
BOOLEAN verbose = false ;
+char syslog_message[128];
+
/*
For some reason, BeOS doesn't seem to implement syslog(), even though it is
included with the system. Wierd. This wraps the syslog functions used

@ -1,18 +1,39 @@
diff -up pnm2ppa-1.13/Makefile.am.ldflags pnm2ppa-1.13/Makefile.am diff -up pnm2ppa-1.04/Makefile.ldflags pnm2ppa-1.04/Makefile
--- pnm2ppa-1.13/Makefile.am.ldflags 2023-10-20 13:52:38.470722125 +0200 --- pnm2ppa-1.04/Makefile.ldflags 2018-03-01 15:38:09.225582684 +0100
+++ pnm2ppa-1.13/Makefile.am 2023-10-20 13:53:24.625056218 +0200 +++ pnm2ppa-1.04/Makefile 2018-03-01 15:50:34.307261745 +0100
@@ -125,7 +125,7 @@ CLEANFILES = hash_ink.c make_hash_ink @@ -11,7 +11,6 @@ INSTALL=install
CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS_FOR_BUILD = $(RPM_OPT_FLAGS) -O2 # production build
CPPFLAGS_FOR_BUILD = -I$(top_srcdir) CFLAGS=$(RPM_OPT_FLAGS) -DNDEBUG
-LDFLAGS_FOR_BUILD = -LDFLAGS=-lm
+LDFLAGS_FOR_BUILD = $(LDFLAGS) OBJS = pnm2ppa.o syslog.o ppa.o image.o dither.o cutswath.o hash_ink.o gamma.o
LDLIBS_FOR_BUILD = SRC = pnm2ppa.c syslog.c ppa.c image.c dither.c cutswath.c hash_ink.c gamma.c
make_hash_ink: make_hash_ink.c @@ -108,10 +107,10 @@ uninstall:
diff -up pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile.ldflags pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile rm -f $(CONFDIR)/pnm2ppa.conf
--- pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile.ldflags 2023-10-20 13:39:19.049686539 +0200
+++ pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile 2023-10-20 13:39:19.053686629 +0200 pnm2ppa: $(OBJS)
- $(CC) $(LDFLAGS) $(CFLAGS) -o pnm2ppa $(OBJS)
+ $(CC) -lm $(LDFLAGS) $(CFLAGS) -o pnm2ppa $(OBJS)
calibrate_ppa: calibrate_ppa.o pnmtools.o gamma.o
- $(CC) $(LDFLAGS) $(CFLAGS) -o calibrate_ppa calibrate_ppa.o pnmtools.o gamma.o
+ $(CC) -lm $(LDFLAGS) $(CFLAGS) -o calibrate_ppa calibrate_ppa.o pnmtools.o gamma.o
calibrate_ppa.o: calibrate_ppa.c global.h image.h defaults.h pnmtools.h
$(CC) $(CFLAGS) -c calibrate_ppa.c
@@ -144,7 +143,7 @@ syslog.o: syslog.c syslog.h global.h
$(CC) $(CFLAGS) -c syslog.c
make_hash_ink: make_hash_ink.c palette.h hash_ink.h
- $(CC) $(CFLAGS) -o make_hash_ink make_hash_ink.c
+ $(CC) $(CFLAGS) -lm $(LDFLAGS) -o make_hash_ink make_hash_ink.c
hash_ink.c: make_hash_ink
./make_hash_ink 4 3 > hash_ink.c
diff -up pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile.ldflags pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile
--- pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile.ldflags 2018-03-01 15:38:09.226582676 +0100
+++ pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile 2018-03-01 15:53:22.016739424 +0100
@@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
CC=gcc CC=gcc
CFLAGS=$(RPM_OPT_FLAGS) CFLAGS=$(RPM_OPT_FLAGS)

@ -0,0 +1,13 @@
diff --git a/pnm2ppa.c b/pnm2ppa.c
index 4ae36ce..0d60fbb 100644
--- a/pnm2ppa.c
+++ b/pnm2ppa.c
@@ -604,7 +604,7 @@ main (int argc, char *argv[])
int i, opt_index;
FILE *in = NULL, *out = NULL, *gf = NULL;
struct stat tmpstat;
- char c;
+ int c;
BOOLEAN get_Gamma = true;
char *gammaFile=NULL;

@ -1,18 +1,18 @@
diff -up pnm2ppa-1.13/Makefile.am.rh pnm2ppa-1.13/Makefile.am diff -up pnm2ppa-1.04/Makefile.rh pnm2ppa-1.04/Makefile
--- pnm2ppa-1.13/Makefile.am.rh 2023-10-20 13:22:50.893888824 +0200 --- pnm2ppa-1.04/Makefile.rh 2000-11-02 18:33:08.000000000 +0000
+++ pnm2ppa-1.13/Makefile.am 2023-10-20 13:30:33.506822860 +0200 +++ pnm2ppa-1.04/Makefile 2008-09-24 15:18:26.000000000 +0100
@@ -123,7 +123,7 @@ CLEANFILES = hash_ink.c make_hash_ink @@ -10,7 +10,7 @@ CC=gcc
# run on the build host in case of cross compiling) INSTALL=install
#
CC_FOR_BUILD = @CC_FOR_BUILD@ # production build
-CFLAGS_FOR_BUILD = -O2 -CFLAGS=-Wall -pedantic -O2 -g -DNDEBUG
+CFLAGS_FOR_BUILD = $(RPM_OPT_FLAGS) -O2 +CFLAGS=$(RPM_OPT_FLAGS) -DNDEBUG
CPPFLAGS_FOR_BUILD = -I$(top_srcdir) LDFLAGS=-lm
LDFLAGS_FOR_BUILD = OBJS = pnm2ppa.o syslog.o ppa.o image.o dither.o cutswath.o hash_ink.o gamma.o
LDLIBS_FOR_BUILD = SRC = pnm2ppa.c syslog.c ppa.c image.c dither.c cutswath.c hash_ink.c gamma.c
diff -up pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile.rh pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile diff -up pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile.rh pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile
--- pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile.rh 2023-10-20 13:18:54.058176682 +0200 --- pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile.rh 2008-09-24 15:18:26.000000000 +0100
+++ pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile 2023-10-20 13:18:54.061176659 +0200 +++ pnm2ppa-1.04/pbm2ppa-0.8.6/Makefile 2008-09-24 15:18:26.000000000 +0100
@@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
CC=gcc CC=gcc
-CFLAGS=-Wall -O2 -CFLAGS=-Wall -O2
@ -20,4 +20,14 @@ diff -up pnm2ppa-1.13/pbm2ppa-0.8.6/Makefile.rh pnm2ppa-1.13/pbm2ppa-0.8.6/Makef
LDFLAGS= LDFLAGS=
PRINTER=HP720 PRINTER=HP720
diff -up pnm2ppa-1.13/pnm2ppa.conf.rh pnm2ppa-1.13/pnm2ppa.conf diff -up pnm2ppa-1.04/pnm2ppa.conf.rh pnm2ppa-1.04/pnm2ppa.conf
--- pnm2ppa-1.04/pnm2ppa.conf.rh 2000-10-28 16:02:57.000000000 +0100
+++ pnm2ppa-1.04/pnm2ppa.conf 2008-09-24 15:18:26.000000000 +0100
@@ -12,7 +12,6 @@
# will be used. The printer version can also be set with the command line
# option e.g., "-v 720".
-version ERROR # PNM2PPA WIIL *NOT* WORK UNTIUL THIS ENTRY IS REMOVED!!!!
#version 720 # 710, 712, 722 also acceptable
#version 820
#version 1000

@ -1,33 +1,26 @@
Name: pnm2ppa Name: pnm2ppa
Summary: Drivers for printing to HP PPA printers Summary: Drivers for printing to HP PPA printers
Epoch: 1 Epoch: 1
Version: 1.13 Version: 1.04
Release: 6%{?dist} Release: 52%{?dist}
URL: http://sourceforge.net/projects/pnm2ppa URL: http://sourceforge.net/projects/pnm2ppa
Source: http://download.sourceforge.net/pnm2ppa/pnm2ppa-%{version}.tar.gz Source: http://download.sourceforge.net/pnm2ppa/pnm2ppa-%{version}.tar.gz
# Following sourcelink is dead currently. # Following sourcelink is dead currently.
Source1: http://www.httptech.com/ppa/files/ppa-0.8.6.tar.gz Source1: http://www.httptech.com/ppa/files/ppa-0.8.6.tar.gz
# Upstream sync. # Upstream sync.
Patch1: pbm2ppa-20000205.diff Patch2: pbm2ppa-20000205.diff
# Use RPM_OPT_FLAGS. # Use RPM_OPT_FLAGS.
Patch2: pnm2ppa-redhat.patch Patch3: pnm2ppa-redhat.patch
# Don't return a local variable out of scope (bug #704568). # Don't return a local variable out of scope (bug #704568).
Patch3: pnm2ppa-coverity-return-local.patch Patch4: pnm2ppa-coverity-return-local.patch
# FTBFS with GCC10
Patch4: pnm2ppa-gcc10.patch
# add ldflags to Makefile # add ldflags to Makefile
Patch5: pnm2ppa-ldflags.patch Patch5: pnm2ppa-ldflags.patch
# match NOPRINTER enum with its position in global printer table # FTBFS with GCC 10
# fixes crash on aarch64 Patch6: pnm2ppa-gcc10.patch
Patch6: pnm2ppa-aarch-help-crash.patch # fix argument reading for non x86_64 archs - use int instead of char
# pbm2ppa, pnm2ppa - GPL-2.0-or-later Patch7: pnm2ppa-optargs-read.patch
# pdq/* - GPL-2.0, but not shipped, thus not mentioned in license tag License: GPLv2+
License: GPL-2.0-or-later
# for autoreconf
BuildRequires: autoconf
# for autoreconf
BuildRequires: automake
# gcc is no longer in buildroot by default # gcc is no longer in buildroot by default
BuildRequires: gcc BuildRequires: gcc
# uses make # uses make
@ -49,12 +42,12 @@ Install pnm2ppa if you need to print to a PPA printer.
#pbm2ppa source #pbm2ppa source
%setup -q -T -D -a 1 %setup -q -T -D -a 1
%patch -P 1 -p0 -b .20000205 %patch2 -p0 -b .20000205
%patch -P 2 -p1 -b .rh %patch3 -p1 -b .rh
%patch -P 3 -p1 -b .coverity-return-local %patch4 -p1 -b .coverity-return-local
%patch -P 4 -p1 -b .gcc10 %patch5 -p1 -b .ldflags
%patch -P 5 -p1 -b .ldflags %patch6 -p1 -b .gcc10
%patch -P 6 -p1 -b .help-aarch-crash %patch7 -p1 -b .optargs-read
for file in docs/en/LICENSE pbm2ppa-0.8.6/LICENSE; do for file in docs/en/LICENSE pbm2ppa-0.8.6/LICENSE; do
sed "s|\r||g" $file > $file.new && \ sed "s|\r||g" $file > $file.new && \
@ -62,12 +55,9 @@ for file in docs/en/LICENSE pbm2ppa-0.8.6/LICENSE; do
mv $file.new $file mv $file.new $file
done done
autoreconf -vfi
%build %build
# set redhat build flags # set redhat build flags
%set_build_flags %set_build_flags
%configure
%make_build %make_build
pushd pbm2ppa-0.8.6 pushd pbm2ppa-0.8.6
%make_build %make_build
@ -75,17 +65,17 @@ popd
%install %install
install -d %{buildroot}%{_bindir} install -d $RPM_BUILD_ROOT%{_bindir}
install -d %{buildroot}%{_sysconfdir} install -d $RPM_BUILD_ROOT%{_sysconfdir}
install -d %{buildroot}%{_mandir}/man1 install -d $RPM_BUILD_ROOT%{_mandir}/man1
make INSTALLDIR=%{buildroot}%{_bindir} CONFDIR=%{buildroot}%{_sysconfdir} DESTDIR=%{buildroot} \ make INSTALLDIR=$RPM_BUILD_ROOT%{_bindir} CONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} \
MANDIR=%{buildroot}%{_mandir}/man1 install MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 install
install -p -m 0755 utils/Linux/detect_ppa %{buildroot}%{_bindir} install -p -m 0755 utils/Linux/detect_ppa $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 utils/Linux/test_ppa %{buildroot}%{_bindir} install -p -m 0755 utils/Linux/test_ppa $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 pbm2ppa-0.8.6/pbm2ppa %{buildroot}%{_bindir} install -p -m 0755 pbm2ppa-0.8.6/pbm2ppa $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 pbm2ppa-0.8.6/pbmtpg %{buildroot}%{_bindir} install -p -m 0755 pbm2ppa-0.8.6/pbmtpg $RPM_BUILD_ROOT%{_bindir}
install -p -m 0644 pbm2ppa-0.8.6/pbm2ppa.conf %{buildroot}%{_sysconfdir} install -p -m 0644 pbm2ppa-0.8.6/pbm2ppa.conf $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m 0644 pbm2ppa-0.8.6/pbm2ppa.1 %{buildroot}%{_mandir}/man1 install -p -m 0644 pbm2ppa-0.8.6/pbm2ppa.1 $RPM_BUILD_ROOT%{_mandir}/man1
chmod 644 docs/en/LICENSE chmod 644 docs/en/LICENSE
mkdir -p pbm2ppa mkdir -p pbm2ppa
@ -114,43 +104,12 @@ done
%config(noreplace) %{_sysconfdir}/pbm2ppa.conf %config(noreplace) %{_sysconfdir}/pbm2ppa.conf
%changelog %changelog
* Tue Dec 03 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.13-6 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.04-52
- RHEL-59030 pnm2ppa --help dumps core on aarch64 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:1.13-5
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Oct 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1:1.13-4
- Rebuilt for MSVSphere 10
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:1.13-4
- Bump release for June 2024 mass rebuild
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Oct 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:1.13-1
- rebase to 1.13
- license rescan and SPDX conversion
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-51 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1:1.04-51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-50 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.04-50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save