RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/jbigkit#868fa1e2b23267292567f6abc5f93a2410e1550f
This commit is contained in:
Petr Šabata 2020-10-15 14:08:37 +02:00
parent dee5254a7c
commit 30da153be2
8 changed files with 637 additions and 0 deletions

2
.gitignore vendored
View File

@ -0,0 +1,2 @@
/jbigkit-2.0.tar.gz
/jbigkit-2.1.tar.gz

View File

@ -0,0 +1,77 @@
diff -up jbigkit-2.1/pbmtools/pbmtojbg85.c.warnings jbigkit-2.1/pbmtools/pbmtojbg85.c
--- jbigkit-2.1/pbmtools/pbmtojbg85.c.warnings 2008-08-26 00:26:39.000000000 +0200
+++ jbigkit-2.1/pbmtools/pbmtojbg85.c 2012-07-17 16:24:56.741332942 +0200
@@ -72,9 +72,12 @@ static unsigned long getint(FILE *f)
while ((c = getc(f)) != EOF && !(c == 13 || c == 10)) ;
if (c != EOF) {
ungetc(c, f);
- fscanf(f, "%lu", &i);
+ if (fscanf(f, "%lu", &i) != 1) {
+ /* should never fail, since c must be a digit */
+ fprintf(stderr, "Unexpected failure reading digit '%c'\n", c);
+ exit(1);
+ }
}
-
return i;
}
@@ -239,7 +242,9 @@ int main (int argc, char **argv)
break;
case '4':
/* PBM raw binary format */
- fread(next_line, bpl, 1, fin);
+ if (fread(next_line, bpl, 1, fin) != 1) {
+ /* silence compiler warnings; ferror/feof checked below */
+ }
break;
default:
fprintf(stderr, "Unsupported PBM type P%c!\n", type);
diff -up jbigkit-2.1/pbmtools/pbmtojbg.c.warnings jbigkit-2.1/pbmtools/pbmtojbg.c
--- jbigkit-2.1/pbmtools/pbmtojbg.c.warnings 2008-07-16 22:59:41.000000000 +0200
+++ jbigkit-2.1/pbmtools/pbmtojbg.c 2012-07-17 16:23:46.584285686 +0200
@@ -88,7 +88,11 @@ static unsigned long getint(FILE *f)
while ((c = getc(f)) != EOF && !(c == 13 || c == 10)) ;
if (c != EOF) {
ungetc(c, f);
- fscanf(f, "%lu", &i);
+ if (fscanf(f, "%lu", &i) != 1) {
+ /* should never fail, since c must be a digit */
+ fprintf(stderr, "Unexpected failure reading digit '%c'\n", c);
+ exit(1);
+ }
}
return i;
@@ -302,7 +306,9 @@ int main (int argc, char **argv)
break;
case '4':
/* PBM raw binary format */
- fread(bitmap[0], bitmap_size, 1, fin);
+ if (fread(bitmap[0], bitmap_size, 1, fin) != 1) {
+ /* silence compiler warnings; ferror/feof checked below */
+ }
break;
case '2':
case '5':
@@ -314,8 +320,18 @@ int main (int argc, char **argv)
for (j = 0; j < bpp; j++)
image[x * bpp + (bpp - 1) - j] = v >> (j * 8);
}
- } else
- fread(image, width * height, bpp, fin);
+ } else {
+ if (fread(image, width * height, bpp, fin) != (size_t) bpp) {
+ if (ferror(fin)) {
+ fprintf(stderr, "Problem while reading input file '%s", fnin);
+ perror("'");
+ exit(1);
+ } else {
+ fprintf(stderr, "Unexpected end of input file '%s'!\n", fnin);
+ exit(1);
+ }
+ }
+ }
jbg_split_planes(width, height, planes, encode_planes, image, bitmap,
use_graycode);
free(image);

160
jbigkit-2.1-shlib.patch Normal file
View File

@ -0,0 +1,160 @@
diff -Naur jbigkit-2.1.old/libjbig/Makefile jbigkit-2.1/libjbig/Makefile
--- jbigkit-2.1.old/libjbig/Makefile 2014-03-27 19:47:15.000000000 +0100
+++ jbigkit-2.1/libjbig/Makefile 2014-08-04 10:45:31.865773710 +0200
@@ -4,25 +4,27 @@
CC = gcc
# Options for the compiler: A high optimization level is suggested
-CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage
+CFLAGS = $(RPM_OPT_FLAGS) -W -Wall -ansi -pedantic # --coverage
+PICFLAGS := -fPIC -DPIC
-all: libjbig.a libjbig85.a tstcodec tstcodec85
+all: libjbig.so.$(VERSION) tstcodec tstcodec85
-tstcodec: tstcodec.o jbig.o jbig_ar.o
- $(CC) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o
+tstcodec: tstcodec.o libjbig.so
+ $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig
-tstcodec85: tstcodec85.o jbig85.o jbig_ar.o
- $(CC) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o
+tstcodec85: tstcodec85.o libjbig85.so
+ $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig
-libjbig.a: jbig.o jbig_ar.o
- rm -f libjbig.a
- ar rc libjbig.a jbig.o jbig_ar.o
- -ranlib libjbig.a
+%.so: %.so.$(VERSION)
+ ln -sf $< $@
-libjbig85.a: jbig85.o jbig_ar.o
- rm -f libjbig85.a
- ar rc libjbig85.a jbig85.o jbig_ar.o
- -ranlib libjbig85.a
+libjbig.so.$(VERSION): jbig.o jbig_ar.o
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+
+libjbig85.so.$(VERSION): jbig85.o jbig_ar.o
+ $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+
+jbig.o jbig85.o jbig_ar.o: CFLAGS += $(PICFLAGS)
jbig.o: jbig.c jbig.h jbig_ar.h
jbig85.o: jbig85.c jbig85.h jbig_ar.h
@@ -43,11 +45,11 @@
clang --analyze *.c
test: tstcodec tstcodec85
- ./tstcodec
- ./tstcodec85
+ LD_LIBRARY_PATH=`pwd` ./tstcodec
+ LD_LIBRARY_PATH=`pwd` ./tstcodec85
t82test.pbm: tstcodec
- ./tstcodec $@
+ LD_LIBRARY_PATH=`pwd` ./tstcodec $@
clean:
rm -f *.o *.gcda *.gcno *.gcov *.plist *~ core gmon.out dbg_d\=??.pbm
diff -Naur jbigkit-2.1.old/Makefile jbigkit-2.1/Makefile
--- jbigkit-2.1.old/Makefile 2014-03-27 19:47:15.000000000 +0100
+++ jbigkit-2.1/Makefile 2014-08-04 10:52:09.242027746 +0200
@@ -4,25 +4,26 @@
CC = gcc
# Options for the compiler: A high optimization level is suggested
-CFLAGS = -O2 -W -Wno-unused-result
+CFLAGS = $(RPM_OPT_FLAGS) -W -Wno-unused-result
# CFLAGS = -O -g -W -Wall -Wno-unused-result -ansi -pedantic # -DDEBUG
export CC CFLAGS
VERSION=2.1
+export VERSION
all: lib pbm
@echo "Enter 'make test' in order to start some automatic tests."
lib:
- cd libjbig && $(MAKE) -e
+ make -C libjbig
pbm: lib
- cd pbmtools && $(MAKE) -e
+ make -C pbmtools
test: lib pbm
- cd libjbig && $(MAKE) test
- cd pbmtools && $(MAKE) test
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C libjbig test
+ LD_LIBRARY_PATH=`pwd`/libjbig make -C pbmtools test
analyze:
cd libjbig && $(MAKE) analyze
@@ -30,8 +31,8 @@
clean:
rm -f *~ core
- cd libjbig && $(MAKE) clean
- cd pbmtools && $(MAKE) clean
+ make -C libjbig clean
+ make -C pbmtools clean
distribution:
rm -rf jbigkit-$(VERSION)
diff -Naur jbigkit-2.1.old/pbmtools/Makefile jbigkit-2.1/pbmtools/Makefile
--- jbigkit-2.1.old/pbmtools/Makefile 2014-03-27 19:47:15.000000000 +0100
+++ jbigkit-2.1/pbmtools/Makefile 2014-08-04 10:49:47.694581174 +0200
@@ -4,26 +4,26 @@
CC = gcc
# Options for the compiler
-CFLAGS = -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
+CFLAGS = $(RPM_OPT_FLAGS) -W -Wall -Wno-unused-result -ansi -pedantic # --coverage
CPPFLAGS = -I../libjbig
.SUFFIXES: .1 .5 .txt $(SUFFIXES)
.PHONY: txt test test82 test85 clean
-all: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 txt
+all: pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85 # txt
txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
-pbmtojbg: pbmtojbg.o ../libjbig/libjbig.a
+pbmtojbg: pbmtojbg.o ../libjbig/libjbig.so
$(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
-jbgtopbm: jbgtopbm.o ../libjbig/libjbig.a
+jbgtopbm: jbgtopbm.o ../libjbig/libjbig.so
$(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
-pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.a
+pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.so
$(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
-jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.a
+jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.so
$(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
@@ -31,13 +31,13 @@
jbgtopbm85.o: jbgtopbm85.c ../libjbig/jbig85.h
pbmtojbg85.o: pbmtojbg85.c ../libjbig/jbig85.h
-../libjbig/libjbig.a: ../libjbig/jbig.c ../libjbig/jbig.h \
+../libjbig/libjbig.so: ../libjbig/jbig.c ../libjbig/jbig.h \
../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
- make -C ../libjbig libjbig.a
+ make -C ../libjbig libjbig.so
-../libjbig/libjbig85.a: ../libjbig/jbig85.c ../libjbig/jbig85.h \
+../libjbig/libjbig85.so: ../libjbig/jbig85.c ../libjbig/jbig85.h \
../libjbig/jbig_ar.c ../libjbig/jbig_ar.h
- make -C ../libjbig libjbig85.a
+ make -C ../libjbig libjbig85.so
analyze:
clang $(CPPFLAGS) --analyze *.c

113
jbigkit-CVE-2013-6369.patch Normal file
View File

@ -0,0 +1,113 @@
From 377085a7fd41e01c0c1ad5d1c1f90b59e8257593
From: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk>
Subject: [PATCH] Fix two DPPRIV buffer overflows and a bug
* jbig.c:jbg_dec_in(): when a BIE with option DPPRIV=1 was received,
the included private DP table (1728 bytes) was loaded into
20-byte array s->buffer, creating a buffer overflow vulnerability.
It is now loaded instead into a malloc'ed temporary buffer.
* jbig.c:jbg_dec_in(): buffer allocated for internal representation
of private DP table was 1728 bytes long, but must be 6912 bytes long,
creating another buffer overflow vulnerability.
* jbig.c: a loop in the routines for converting between the internal and
external representations of a DP table terminated earlier than intended.
As a result, a private DP table provided to the decoder was not
interpreted correctly. Likewise, if a user asked the encoder to output
its standard DP table (which is only useful for testing), the result
would have been incorrect.
* tstcodec.c: test case for DPPRIV=1 added.
The buffer overflow vulnerability was reported by Florian Weimer (Red Hat)
and has been assigned CVE-2013-6369.
None of these fixes should affect ABI compatibility; jbig.h remains unchanged.
All past releases of jbig.c are believed to be affected.
The jbig85.c lightwight implementation was not affected.
---
libjbig/jbig.c | 16 ++++++++++------
libjbig/tstcodec.c | 11 ++++++++---
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/libjbig/jbig.c b/libjbig/jbig.c
index f3c35cc..48fc128 100644
--- a/libjbig/jbig.c
+++ b/libjbig/jbig.c
@@ -1738,7 +1738,7 @@ void jbg_int2dppriv(unsigned char *dptable, const char *internal)
#define FILL_TABLE1(offset, len, trans) \
for (i = 0; i < len; i++) { \
k = 0; \
- for (j = 0; j < 8; j++) \
+ for (j = 0; i >> j; j++) \
k |= ((i >> j) & 1) << trans[j]; \
dptable[(i + offset) >> 2] |= \
(internal[k + offset] & 3) << ((3 - (i&3)) << 1); \
@@ -1769,7 +1769,7 @@ void jbg_dppriv2int(char *internal, const unsigned char *dptable)
#define FILL_TABLE2(offset, len, trans) \
for (i = 0; i < len; i++) { \
k = 0; \
- for (j = 0; j < 8; j++) \
+ for (j = 0; i >> j; j++) \
k |= ((i >> j) & 1) << trans[j]; \
internal[k + offset] = \
(dptable[(i + offset) >> 2] >> ((3 - (i & 3)) << 1)) & 3; \
@@ -2574,6 +2574,7 @@ int jbg_dec_in(struct jbg_dec_state *s, unsigned char *data, size_t len,
unsigned long x, y;
unsigned long is[3], ie[3];
size_t dummy_cnt;
+ unsigned char *dppriv;
if (!cnt) cnt = &dummy_cnt;
*cnt = 0;
@@ -2711,13 +2712,16 @@ int jbg_dec_in(struct jbg_dec_state *s, unsigned char *data, size_t len,
(s->options & (JBG_DPON | JBG_DPPRIV | JBG_DPLAST)) ==
(JBG_DPON | JBG_DPPRIV)) {
assert(s->bie_len >= 20);
+ if (!s->dppriv || s->dppriv == jbg_dptable)
+ s->dppriv = (char *) checked_malloc(1728, sizeof(char));
while (s->bie_len < 20 + 1728 && *cnt < len)
- s->buffer[s->bie_len++ - 20] = data[(*cnt)++];
+ s->dppriv[s->bie_len++ - 20] = data[(*cnt)++];
if (s->bie_len < 20 + 1728)
return JBG_EAGAIN;
- if (!s->dppriv || s->dppriv == jbg_dptable)
- s->dppriv = (char *) checked_malloc(1728, sizeof(char));
- jbg_dppriv2int(s->dppriv, s->buffer);
+ dppriv = s->dppriv;
+ s->dppriv = (char *) checked_malloc(6912, sizeof(char));
+ jbg_dppriv2int(s->dppriv, dppriv);
+ checked_free(dppriv);
}
/*
diff --git a/libjbig/tstcodec.c b/libjbig/tstcodec.c
index 44bae57..6289748 100644
--- a/libjbig/tstcodec.c
+++ b/libjbig/tstcodec.c
@@ -483,11 +483,16 @@ int main(int argc, char **argv)
problems += test_cycle(&pp, 1960, 1951,
JBG_DELAY_AT | JBG_TPBON | JBG_TPDON | JBG_DPON,
0, 6, 1, 2, 8, 279314L, "3.4");
-#if 0
- puts("Test 3.5: as Test 3.4 but with order bit SEQ set");
+ puts("Test 3.5: as Test 3.4 but with DPPRIV=1");
+ problems += test_cycle(&pp, 1960, 1951,
+ JBG_DELAY_AT | JBG_TPBON | JBG_TPDON | JBG_DPON |
+ JBG_DPPRIV,
+ 0, 6, 1, 2, 8, 279314L + 1728, "3.5");
+#if 0 /* Note: option SEQ is currently not supported by the decoder */
+ puts("Test 3.6: as Test 3.4 but with order bit SEQ set");
problems += test_cycle(&pp, 1960, 1951,
JBG_DELAY_AT | JBG_TPBON | JBG_TPDON | JBG_DPON,
- JBG_SEQ, 6, 1, 2, 8, 279314L, "3.5");
+ JBG_SEQ, 6, 1, 2, 8, 279314L, "3.6");
#endif
#endif
--
1.7.9.5

30
jbigkit-covscan.patch Normal file
View File

@ -0,0 +1,30 @@
diff --git a/libjbig/jbig.c b/libjbig/jbig.c
index 751ceff..3c76e07 100644
--- a/libjbig/jbig.c
+++ b/libjbig/jbig.c
@@ -889,7 +889,7 @@ void jbg_enc_options(struct jbg_enc_state *s, int order, int options,
if (order >= 0 && order <= 0x0f) s->order = order;
if (options >= 0) s->options = options;
if (l0 > 0) s->l0 = l0;
- if (mx >= 0 && my < 128) s->mx = mx;
+ if (mx >= 0 && mx < 128) s->mx = mx;
if (my >= 0 && my < 256) s->my = my;
return;
diff --git a/pbmtools/Makefile b/pbmtools/Makefile
index 85e1783..6ae2d33 100644
--- a/pbmtools/Makefile
+++ b/pbmtools/Makefile
@@ -56,9 +56,9 @@ test82: pbmtojbg jbgtopbm
make IMG=sandra "OPTIONSP=-o 2" OPTIONSJ= dotest2g
make IMG=multi OPTIONSP= OPTIONSJ= dotest2g
make IMG=multi OPTIONSP=-b OPTIONSJ=-b dotest2g
- make IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest1
- make IMG=mx "OPTIONSP=-q -s 3 -m 128" dotest2b
- make IMG=mx "OPTIONSP=-q -s 3 -m 128 -p 92" dotest2b
+ make IMG=mx "OPTIONSP=-q -s 3 -m 127" dotest1
+ make IMG=mx "OPTIONSP=-q -s 3 -m 127" dotest2b
+ make IMG=mx "OPTIONSP=-q -s 3 -m 127 -p 92" dotest2b
make IMG=mx "OPTIONSP=-q -Y -1" dotest2b
make IMG=mx "OPTIONSP=-Y -1" dotest2b
rm -f test-*.jbg test-*.pbm test-*.pgm

51
jbigkit-ldflags.patch Normal file
View File

@ -0,0 +1,51 @@
diff -up jbigkit-2.1/libjbig/Makefile.ldflags jbigkit-2.1/libjbig/Makefile
--- jbigkit-2.1/libjbig/Makefile.ldflags 2018-02-27 17:50:15.786038149 +0100
+++ jbigkit-2.1/libjbig/Makefile 2018-02-27 17:55:44.042093437 +0100
@@ -10,19 +10,19 @@ PICFLAGS := -fPIC -DPIC
all: libjbig.so.$(VERSION) tstcodec tstcodec85
tstcodec: tstcodec.o libjbig.so
- $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig
+ $(CC) $(CFLAGS) -o tstcodec $< -L. -ljbig $(LDFLAGS)
tstcodec85: tstcodec85.o libjbig85.so
- $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig
+ $(CC) $(CFLAGS) -o tstcodec85 $^ -L. -ljbig $(LDFLAGS)
%.so: %.so.$(VERSION)
ln -sf $< $@
libjbig.so.$(VERSION): jbig.o jbig_ar.o
- $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
libjbig85.so.$(VERSION): jbig85.o jbig_ar.o
- $(CC) $(CFLAGS) -shared -Wl,-soname,$@ -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
jbig.o jbig85.o jbig_ar.o: CFLAGS += $(PICFLAGS)
diff -up jbigkit-2.1/pbmtools/Makefile.ldflags jbigkit-2.1/pbmtools/Makefile
--- jbigkit-2.1/pbmtools/Makefile.ldflags 2018-02-27 17:50:35.902857687 +0100
+++ jbigkit-2.1/pbmtools/Makefile 2018-02-27 17:57:09.296328639 +0100
@@ -15,16 +15,16 @@ all: pbmtojbg jbgtopbm pbmtojbg85 jbgtop
txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt
pbmtojbg: pbmtojbg.o ../libjbig/libjbig.so
- $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig
+ $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig $(LDFLAGS)
jbgtopbm: jbgtopbm.o ../libjbig/libjbig.so
- $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig
+ $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig $(LDFLAGS)
pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.so
- $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85
+ $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85 $(LDFLAGS)
jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.so
- $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85
+ $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85 $(LDFLAGS)
jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h
pbmtojbg.o: pbmtojbg.c ../libjbig/jbig.h

203
jbigkit.spec Normal file
View File

@ -0,0 +1,203 @@
Name: jbigkit
Version: 2.1
Release: 19%{?dist}
Summary: JBIG1 lossless image compression tools
License: GPLv2+
URL: http://www.cl.cam.ac.uk/~mgk25/jbigkit/
Source0: http://www.cl.cam.ac.uk/~mgk25/download/jbigkit-%{version}.tar.gz
Patch0: jbigkit-2.1-shlib.patch
Patch1: jbigkit-2.0-warnings.patch
Patch2: jbigkit-ldflags.patch
# patch for coverity issues - backported from upstream
Patch3: jbigkit-covscan.patch
# gcc is no longer in buildroot by default
# gcc needed for libjbig library and several filters - jbigtopbm, pbmtojbig e.g.
BuildRequires: gcc
Requires: jbigkit-libs%{?_isa} = %{version}-%{release}
%package libs
Summary: JBIG1 lossless image compression library
%package devel
Summary: JBIG1 lossless image compression library -- development files
Requires: jbigkit-libs%{?_isa} = %{version}-%{release}
%description libs
JBIG-KIT provides a portable library of compression and decompression
functions with a documented interface that you can include very easily
into your image or document processing software. In addition, JBIG-KIT
provides ready-to-use compression and decompression programs with a
simple command line interface (similar to the converters found in netpbm).
JBIG-KIT implements the specification:
ISO/IEC 11544:1993 and ITU-T Recommendation T.82(1993):
Information technology Coded representation of picture and audio
information Progressive bi-level image compression
which is commonly referred to as the “JBIG1 standard”
%description devel
The jbigkit-devel package contains files needed for development using
the JBIG-KIT image compression library.
%description
The jbigkit package contains tools for converting between PBM and JBIG1
formats.
%prep
%setup -q -n jbigkit-2.1
%patch0 -p1 -b .shlib
%patch1 -p1 -b .warnings
# jbigkit: Partial Fedora build flags injection (bug #1548546)
%patch2 -p1 -b .ldflags
# covscan issues - backported from upstream
%patch3 -p1 -b .covscan
%build
# get the correct redhat build flags
%set_build_flags
%make_build
%install
mkdir -p $RPM_BUILD_ROOT%{_libdir}
mkdir -p $RPM_BUILD_ROOT%{_includedir}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m0755 libjbig/libjbig.so.%{version} $RPM_BUILD_ROOT/%{_libdir}
install -p -m0755 libjbig/libjbig85.so.%{version} $RPM_BUILD_ROOT/%{_libdir}
ln -sf libjbig.so.%{version} $RPM_BUILD_ROOT/%{_libdir}/libjbig.so
ln -sf libjbig85.so.%{version} $RPM_BUILD_ROOT/%{_libdir}/libjbig85.so
install -p -m0644 libjbig/jbig.h $RPM_BUILD_ROOT%{_includedir}
install -p -m0644 libjbig/jbig85.h $RPM_BUILD_ROOT%{_includedir}
install -p -m0644 libjbig/jbig_ar.h $RPM_BUILD_ROOT%{_includedir}
install -p -m0755 pbmtools/???to??? $RPM_BUILD_ROOT%{_bindir}
install -p -m0755 pbmtools/???to???85 $RPM_BUILD_ROOT%{_bindir}
install -p -m0644 pbmtools/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
%check
make test
%ldconfig_scriptlets libs
%files
%{_bindir}/???to*
%{_mandir}/man1/*
%license COPYING
%files libs
%{_libdir}/libjbig*.so.%{version}
%doc ANNOUNCE TODO CHANGES
%license COPYING
%files devel
%{_libdir}/libjbig*.so
%{_includedir}/jbig*.h
%changelog
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Oct 25 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-15
- fixed typo found by coverity
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jul 11 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-13
- ship license in correct tag
* Tue Feb 27 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-12
- 1548546 - jbigkit: Partial Fedora build flags injection
* Fri Feb 09 2018 Zdenek Dohnal <zdohnal@redhat.com> - 2.1-10
- remove old stuff
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Sep 7 2014 Ville Skyttä <ville.skytta@iki.fi> - 2.1-3
- Build with $RPM_OPT_FLAGS again
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Mon Aug 04 2014 Fridolin Pokorny <fpokorny@redhat.com> - 2.1-1
- Update to 2.1
- Removed jbigkit-CVE-2013-6369.patch (accepted by upstream)
- Updated jbigkit-2.0-warnings.patch to fix only fread() checks
- Updated jbigkit-2.0-shlib.patch
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Apr 08 2014 Jiri Popelka <jpopelka@redhat.com> - 2.0-10
- CVE-2013-6369 (#1085362)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Jul 17 2012 Jiri Popelka <jpopelka@redhat.com> - 2.0-7
- Fix a number of compiler warnings per feedback from Ubuntu security team (#840608)
* Mon Apr 16 2012 Jiri Popelka <jpopelka@redhat.com> - 2.0-6
- Don't install up-to-date license file, use the upstream one. (#807760)
* Wed Mar 28 2012 Jiri Popelka <jpopelka@redhat.com> - 2.0-5
- Moving from rpmfusion-free to Fedora because it will be free of known patents
in all countries from 2012-04-04 onwards
- Changed license from GPL to GPLv2+ and included up-to-date license file
* Wed Feb 08 2012 Nicolas Chauvet <kwizart@gmail.com> - 2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.0-3
- rebuild for new F11 features
* Fri Sep 05 2008 David Woodhouse <dwmw2@infradead.org> 2.0-2
- Add missing jbig_ar.h
* Wed Sep 03 2008 David Woodhouse <dwmw2@infradead.org> 2.0-1
- Update to 2.0
* Sun Aug 03 2008 Thorsten Leemhuis <fedora@leemhuis.info> - 1.6-3
- rebuild
* Sun Oct 1 2006 David Woodhouse <dwmw2@infradead.org> 1.6-2
- Review fixes
* Tue Sep 12 2006 David Woodhouse <dwmw2@infradead.org> 1.6-1
- Initial version

1
sources Normal file
View File

@ -0,0 +1 @@
ebcf09bed9f14d7fa188d3bd57349522 jbigkit-2.1.tar.gz