From 053819a5ea289206e72b9f3ec5d8752da934e51a Mon Sep 17 00:00:00 2001
From: Josef Ridky
Date: Thu, 6 Feb 2025 13:12:56 +0100
Subject: [PATCH] Resolves: RHEL-64359 - fix licenses and rabase
Signed-off-by: Josef Ridky
---
.gitignore | 1 +
netpbm-CAN-2005-2471.patch | 10 +-
netpbm-c99-2.patch | 41 -
netpbm-c99.patch | 81 +-
netpbm-glibc.patch | 9 +-
netpbm-manfix.patch | 311 +++-
netpbm-ppmfadeusage.patch | 99 +-
netpbm-security-code.patch | 3138 ++++++---------------------------
netpbm-security-scripts.patch | 119 --
netpbm.spec | 26 +-
sources | 2 +-
11 files changed, 900 insertions(+), 2937 deletions(-)
delete mode 100644 netpbm-c99-2.patch
delete mode 100644 netpbm-security-scripts.patch
diff --git a/.gitignore b/.gitignore
index 8c6b1cc..f9fd4bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,4 @@
/netpbm-11.00.00.tar.xz
/netpbm-11.01.00.tar.xz
/netpbm-11.02.00.tar.xz
+/netpbm-11.09.00.tar.xz
diff --git a/netpbm-CAN-2005-2471.patch b/netpbm-CAN-2005-2471.patch
index ae17d6b..de6bc59 100644
--- a/netpbm-CAN-2005-2471.patch
+++ b/netpbm-CAN-2005-2471.patch
@@ -1,6 +1,6 @@
diff -urNp a/converter/other/pstopnm.c b/converter/other/pstopnm.c
---- a/converter/other/pstopnm.c 2018-07-23 15:14:51.200658026 +0200
-+++ b/converter/other/pstopnm.c 2018-07-23 15:18:12.579910612 +0200
+--- a/converter/other/pstopnm.c 2025-02-04 10:47:27.857451432 +0100
++++ b/converter/other/pstopnm.c 2025-02-04 10:55:56.430470597 +0100
@@ -896,11 +896,11 @@ execGhostscript(int const
ghostscriptProg, arg0,
deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
@@ -9,9 +9,9 @@ diff -urNp a/converter/other/pstopnm.c b/converter/other/pstopnm.c
+ "-dPARANOIDSAFER", "-");
}
- execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt,
-- textalphabitsopt, "-q", "-dNOPAUSE", "-dSAFER", "-", NULL);
-+ "-q", "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
+ execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt,
+- textalphabitsopt, "-q", "-dNOPAUSE", "-dSAFER", "-", NULL);
++ "-q", "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)",
ghostscriptProg, errno, strerror(errno));
diff --git a/netpbm-c99-2.patch b/netpbm-c99-2.patch
deleted file mode 100644
index bcb8a99..0000000
--- a/netpbm-c99-2.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Remove the contents of libjasper_compat.c. The assignment
-
- *errorP = errorP;
-
-is bogus because it creates a non-null value in *errorP even on
-success, and the caller expects a null pointer int his case.
-
-The source file is compiled, but not actually linked in, so this is
-only a problem because of the type error that fails the build.
-
-diff --git a/converter/other/jpeg2000/libjasper_compat.c b/converter/other/jpeg2000/libjasper_compat.c
-index 101820a321212dc6..e69de29bb2d1d643 100644
---- a/converter/other/jpeg2000/libjasper_compat.c
-+++ b/converter/other/jpeg2000/libjasper_compat.c
-@@ -1,26 +0,0 @@
--#include "netpbm/nstring.h"
--
--#include "jasper/jasper.h"
--#include "jasper/jas_image.h"
--
--#ifndef JAS_HAVE_PMJAS_IMAGE_DECODE
--
--void
--pmjas_image_decode(jas_stream_t * const in,
-- int const fmtArg,
-- const char * const optstr,
-- jas_image_t ** const imagePP,
-- const char ** const errorP) {
--
-- jas_image_t * const jasperP = jas_image_decode(in, fmtArg, optstr);
--
-- if (jasperP) {
-- *imagePP = jasperP;
-- *errorP = errorP;
-- } else {
-- pm_asprintf(errorP, "Failed. Details may have been written to "
-- "Standard Error");
-- }
--}
--
--#endif
diff --git a/netpbm-c99.patch b/netpbm-c99.patch
index ed0a887..bcb8a99 100644
--- a/netpbm-c99.patch
+++ b/netpbm-c99.patch
@@ -1,46 +1,41 @@
-Include "pm.h" for the declaration of the overflow_add function. This
-avoids an implicit function declaration. Future C compilers will
-require that all functions are declared explicitly. Implicit function
-declarations are a language feature that was removed in 1999.
+Remove the contents of libjasper_compat.c. The assignment
-Likewise, include "pm.h" for the newly added declarations of realloc2.
-This fixes a pointer truncation bug in pjtoppm.
+ *errorP = errorP;
-Both issues are specific to downstream patches.
+is bogus because it creates a non-null value in *errorP even on
+success, and the caller expects a null pointer int his case.
-diff --git a/converter/pbm/pbmtoppa/pbm.c b/converter/pbm/pbmtoppa/pbm.c
-index 1c8d236219b297e1..d63cab63b13f2051 100644
---- a/converter/pbm/pbmtoppa/pbm.c
-+++ b/converter/pbm/pbmtoppa/pbm.c
-@@ -12,6 +12,7 @@
- #include
- #include
-
-+#include "pm.h"
- #include "ppapbm.h"
-
- int make_pbm_stat(pbm_stat* pbm,FILE* fptr)
-diff --git a/converter/ppm/pjtoppm.c b/converter/ppm/pjtoppm.c
-index c458c06457c2b9bd..5e93a6acb8d6f198 100644
---- a/converter/ppm/pjtoppm.c
-+++ b/converter/ppm/pjtoppm.c
-@@ -10,6 +10,7 @@
- ** implied warranty.
- */
-
-+#include "pm.h"
- #include "ppm.h"
- #include "mallocvar.h"
-
-diff --git a/lib/pm.h b/lib/pm.h
-index 5037c2519c565fbc..435445d5e7f52fbf 100644
---- a/lib/pm.h
-+++ b/lib/pm.h
-@@ -457,6 +457,7 @@ pm_parse_height(const char * const arg);
-
- void *malloc2(int, int);
- void *malloc3(int, int, int);
-+void *realloc2(void * a, int b, int c);
- #define overflow2(a,b) __overflow2(a,b)
- void __overflow2(int, int);
- void overflow3(int, int, int);
+The source file is compiled, but not actually linked in, so this is
+only a problem because of the type error that fails the build.
+
+diff --git a/converter/other/jpeg2000/libjasper_compat.c b/converter/other/jpeg2000/libjasper_compat.c
+index 101820a321212dc6..e69de29bb2d1d643 100644
+--- a/converter/other/jpeg2000/libjasper_compat.c
++++ b/converter/other/jpeg2000/libjasper_compat.c
+@@ -1,26 +0,0 @@
+-#include "netpbm/nstring.h"
+-
+-#include "jasper/jasper.h"
+-#include "jasper/jas_image.h"
+-
+-#ifndef JAS_HAVE_PMJAS_IMAGE_DECODE
+-
+-void
+-pmjas_image_decode(jas_stream_t * const in,
+- int const fmtArg,
+- const char * const optstr,
+- jas_image_t ** const imagePP,
+- const char ** const errorP) {
+-
+- jas_image_t * const jasperP = jas_image_decode(in, fmtArg, optstr);
+-
+- if (jasperP) {
+- *imagePP = jasperP;
+- *errorP = errorP;
+- } else {
+- pm_asprintf(errorP, "Failed. Details may have been written to "
+- "Standard Error");
+- }
+-}
+-
+-#endif
diff --git a/netpbm-glibc.patch b/netpbm-glibc.patch
index 4ae71e8..c500386 100644
--- a/netpbm-glibc.patch
+++ b/netpbm-glibc.patch
@@ -1,9 +1,10 @@
---- netpbm-10.35/converter/other/pnmtotiffcmyk.c.glibc 2006-09-18 12:20:06.000000000 +0200
-+++ netpbm-10.35/converter/other/pnmtotiffcmyk.c 2007-08-23 09:18:30.000000000 +0200
-@@ -974,8 +974,8 @@ int main( int argc, char **argv ) {
+diff -urNp a/converter/other/pnmtotiffcmyk.c b/converter/other/pnmtotiffcmyk.c
+--- a/converter/other/pnmtotiffcmyk.c 2025-02-04 10:47:27.858451429 +0100
++++ b/converter/other/pnmtotiffcmyk.c 2025-02-04 11:04:46.118394226 +0100
+@@ -989,8 +989,8 @@ int main( int argc, char **argv ) {
if ( (err = parseOpts( argc, argv, rt )) ) goto exit ;
-
+
- if ( (err = rt->in->open( rt->in, rt )) ) goto exit ;
- if ( (err = rt->out->open( rt->out, rt )) ) goto exit ;
+ if ( (err = (rt->in->open)( rt->in, rt )) ) goto exit ;
diff --git a/netpbm-manfix.patch b/netpbm-manfix.patch
index 10f635d..6d759c1 100644
--- a/netpbm-manfix.patch
+++ b/netpbm-manfix.patch
@@ -1,25 +1,20 @@
diff -urNp a/userguide/avstopam.html b/userguide/avstopam.html
---- a/userguide/avstopam.html 2022-01-03 16:56:37.731614243 +0100
-+++ b/userguide/avstopam.html 2022-01-03 16:58:29.889416006 +0100
-@@ -2,12 +2,13 @@
+--- a/userguide/avstopam.html 2025-02-04 10:47:27.823451565 +0100
++++ b/userguide/avstopam.html 2025-02-04 17:49:34.981978989 +0100
+@@ -2,9 +2,9 @@
Avstopam User Manual
avstopam
-Updated: 07 February 2010
-
-Table Of Contents
-+
+Updated: 07 February 2010
+
+Table Of Contents
NAME
--avstopam - convert an AVS X image to a Netpbm image
-+
avstopam - convert an AVS X image to a Netpbm image
-
- SYNOPSIS
-
-@@ -16,40 +17,40 @@ Updated: 07 February 2010
+ avstopam - convert an AVS X image to a Netpbm image
+@@ -16,40 +16,40 @@ Updated: 07 February 2010
DESCRIPTION
@@ -72,8 +67,8 @@ diff -urNp a/userguide/avstopam.html b/userguide/avstopam.html
diff -urNp a/userguide/faxformat.html b/userguide/faxformat.html
---- a/userguide/faxformat.html 2022-01-03 16:56:37.731614243 +0100
-+++ b/userguide/faxformat.html 2022-01-03 16:58:29.890416013 +0100
+--- a/userguide/faxformat.html 2025-02-04 10:47:27.824451560 +0100
++++ b/userguide/faxformat.html 2025-02-04 17:50:41.300631089 +0100
@@ -5,10 +5,11 @@
Updated: 03 December 2008
@@ -88,8 +83,8 @@ diff -urNp a/userguide/faxformat.html b/userguide/faxformat.html
(the idea is to provide a way to be sure that a fax machine is able to receive
a fax sent by another). These standards incidentally specify graphics file
diff -urNp a/userguide/libnetpbm_ug.html b/userguide/libnetpbm_ug.html
---- a/userguide/libnetpbm_ug.html 2022-01-03 16:56:37.732614250 +0100
-+++ b/userguide/libnetpbm_ug.html 2022-01-03 16:58:29.891416020 +0100
+--- a/userguide/libnetpbm_ug.html 2025-02-04 10:47:27.824451560 +0100
++++ b/userguide/libnetpbm_ug.html 2025-02-04 17:52:02.045207328 +0100
@@ -374,7 +374,7 @@ plain format.
Reference
@@ -100,8 +95,8 @@ diff -urNp a/userguide/libnetpbm_ug.html b/userguide/libnetpbm_ug.html
The Libnetpbm Utility Manual
diff -urNp a/userguide/pamfunc.html b/userguide/pamfunc.html
---- a/userguide/pamfunc.html 2022-01-03 16:56:37.730614236 +0100
-+++ b/userguide/pamfunc.html 2022-01-03 16:58:29.892416027 +0100
+--- a/userguide/pamfunc.html 2025-02-04 10:47:27.823451565 +0100
++++ b/userguide/pamfunc.html 2025-02-04 17:52:19.661114878 +0100
@@ -60,7 +60,7 @@ output image.
and bit string (such as and with 01001000). For the arithmetic functions, the
function arguments and results are the fraction that a sample is of the
@@ -112,9 +107,9 @@ diff -urNp a/userguide/pamfunc.html b/userguide/pamfunc.html
Arithmetic functions
diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
---- a/userguide/pammixmulti.html 2022-01-03 16:56:37.731614243 +0100
-+++ b/userguide/pammixmulti.html 2022-01-03 16:58:29.893416034 +0100
-@@ -7,8 +7,8 @@ Updated: 18 November 2018
+--- a/userguide/pammixmulti.html 2025-02-04 10:47:27.820451577 +0100
++++ b/userguide/pammixmulti.html 2025-02-04 17:56:58.538651212 +0100
+@@ -7,8 +7,8 @@ Updated: 18 December 2024
Table Of Contents
@@ -125,9 +120,15 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
SYNOPSIS
-@@ -22,14 +22,14 @@ Updated: 18 November 2018
- Minimum unique abbreviation of an option is acceptable. You can use a
- single hyphen instead of double hyphens to denote options. You can use white
+@@ -17,19 +17,19 @@ Updated: 18 December 2024
+ [-maskfile=filename]
+ [-stdev=number]
+ [-randomseed integer]
+- filename ...
++ filename ...
+
+ Minimum unique abbreviation of an option is acceptable. You can use double
+ hyphen instead of a single hyphen to denote options. You can use white
space in place of the equals sign to separate an option name from its
-value.
+value.
@@ -151,17 +152,19 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
+command line options:
- - --blend=average|random|mask
-@@ -50,7 +50,7 @@ output is produced by selecting the corr
- images, chosen at random on a per-pixel basis. With
- --blend=mask
, each pixel in the output is produced by a
- weighted average of the corresponding pixels from all the input images based
--on the grayscale level of an additional mask image.
-+on the grayscale level of an additional mask image.
+ - -blend=average|alpha-weighted|random|mask
+@@ -55,8 +55,8 @@ of the input images, chosen at random on
+ With -blend=mask
, each pixel in the output is
+ produced by a weighted average of the corresponding pixels from all
+ the input images based on the grayscale level of an additional mask
+-image.
+--alpha-weighted was new in Netpbm 11.09 (December 2024).
++image.
++-alpha-weighted was new in Netpbm 11.09 (December 2024).
- - --maskfile=filename
-@@ -60,7 +60,7 @@ grayscale mask file to control the blend
+ - -maskfile=filename
+@@ -66,7 +66,7 @@ grayscale mask file to control the blend
not grayscale, the first channel is treated as gray). Where the mask file is
black, the first image is selected. Where the mask file is white, the last
image is selected. Intermediate levels of gray select intermediate
@@ -169,19 +172,19 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
+images.
- - --stdev=number
-@@ -77,7 +77,7 @@ that includes roughly equal amounts of t
+ - -stdev=number
+@@ -83,7 +83,7 @@ that includes roughly equal amounts of t
and 2 but less of the corresponding pixel from image 3. As number
tends towards the number of input images (going beyond that has diminishing
impact), the output tends to look more
--like --blend=average. number defaults to 0.25.
-+like --blend=average. number defaults to 0.25.
+-like -blend=average. number defaults to 0.25.
++like -blend=average. number defaults to 0.25.
- - --randomseed integer
-@@ -85,45 +85,45 @@ like --blend=average. number
+
- -randomseed integer
+@@ -91,45 +91,45 @@ like -blend=average. numberThis is the seed for the random number generator used with
- --blend=random
+ -blend=random
-
Use this to ensure you get the same image on separate invocations.
+
Use this to ensure you get the same image on separate invocations.
@@ -207,7 +210,7 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
+image:
- pammixmulti --blend=random input*.ppm >output.ppm
+ pammixmulti -blend=random input*.ppm >output.ppm
Use a mask image to control the fading among input images on a
@@ -215,7 +218,7 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
+pixel-by-pixel basis:
- pammixmulti --blend=mask --maskfile=mask.pgm >output.pam \
+ pammixmulti -blend=mask -maskfile=mask.pgm >output.pam \
one.pam two.pam three.pam four.pam
@@ -223,7 +226,7 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
+Do the same but with more abrupt transitions:
- pammixmulti --blend=mask --maskfile=mask.pgm --stdev=0.0 >output.pam \
+ pammixmulti -blend=mask -maskfile=mask.pgm -stdev=0.0 >output.pam \
one.pam two.pam three.pam four.pam
@@ -231,8 +234,8 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
+and now with more gradual transitions:
- pammixmulti --blend=mask --maskfile=mask.pgm --stdev=1.0 >output.pam \
-@@ -133,12 +133,12 @@ pixel-by-pixel basis:
+ pammixmulti -blend=mask -maskfile=mask.pgm -stdev=1.0 >output.pam \
+@@ -139,12 +139,12 @@ pixel-by-pixel basis:
HISTORY
@@ -242,12 +245,12 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html
AUTHOR
--Copyright 2018 Scott Pakin, scott+pbm@pakin.org.
-+
Copyright 2018 Scott Pakin, scott+pbm@pakin.org.
+-Copyright 2018–2024 Scott Pakin, scott+pbm@pakin.org.
++
Copyright 2018–2024 Scott Pakin, scott+pbm@pakin.org.
SEE ALSO
-@@ -146,20 +146,20 @@ pixel-by-pixel basis:
+@@ -152,20 +152,20 @@ pixel-by-pixel basis:
ppmmix,
pamarith,
pnm,
@@ -278,8 +281,8 @@ diff -urNp a/userguide/pammixmulti.html b/userguide/pammixmulti.html