Skip to content

Commit ee2b8c7

Browse files
committed
Use new CentOS 7 Docker container for Linux builds
... in order to add SHA-256 payload digests to the official libjpeg-turbo RPMS, for FIPS compliance. - Update README.md to reflect that the official Linux binaries now require GLIBC 2.17+ across the board. - Update rpmsign to use the gpg --passphrase option, which eliminates the need to use expect. - Remove the detailed Linux build environment description from README.md. At this point, the Docker recipe is too complex to perfectly describe in plain English, and since the recipe is open source, such a description is unnecessary.
1 parent ddba15b commit ee2b8c7

File tree

4 files changed

+16
-40
lines changed

4 files changed

+16
-40
lines changed

README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ DRC's libjpeg-turbo Build Scripts
22
=================================
33

44
These scripts are used to build the "official" libjpeg-turbo binaries, which
5-
work on any Linux platform with GLIBC 2.12 and later, as well as Windows XP and
5+
work on any Linux platform with GLIBC 2.17 and later, as well as Windows XP and
66
later and OS X/macOS 10.7 and later.
77

88
See **BUILDING.md** in the libjpeg-turbo source for basic build requirements.
@@ -12,27 +12,10 @@ Additional build requirements for these scripts are listed below.
1212
Build Environment: Linux
1313
------------------------
1414

15-
Recommended distro: Red Hat or CentOS Enterprise Linux 6 x86-64
15+
Recommended distro: Red Hat or CentOS Enterprise Linux 7 x86-64
1616

17-
Both x86-64 and i386 JDKs should be installed. The x86-64 version should be in
18-
your `PATH`, and the directory containing the i386 version should be symlinked
19-
to **/usr/java/default32**.
20-
21-
Install a compatible x86-64 Linux hosted/AArch64 Linux target toolchain
22-
(available at
23-
<https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads>)
24-
under **/opt/gcc.arm64**. Note that 9.2-2019.12 is the latest toolchain that
25-
will run on RHEL 6.
26-
27-
Install OpenJDK 8 for Linux/AArch64 (available at
28-
<https://adoptium.net/releases.html?variant=openjdk8>) under
29-
**/opt/openjdk.arm64**.
30-
31-
Install all other software necessary to build an i386 and an x86-64 version of
32-
libjpeg-turbo (refer to **BUILDING.md**.)
33-
34-
For convenience, a Docker recipe is available at
35-
<https://github.com/libjpeg-turbo/docker>.
17+
Complete Linux build environment requirements are best understood by examining
18+
the official Docker recipe at <https://github.com/libjpeg-turbo/docker>.
3619

3720

3821
Build Environment: macOS

buildljt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ if [ $NOSRC = 0 ]; then
243243
popd
244244
mv $DIR/libjpeg-turbo-official-$VERSION.src.rpm $OUTDIR/files/
245245
if [ -f $SCRIPTDIR/gpgsign ]; then
246-
. $SCRIPTDIR/gpgsign
247-
expect $SCRIPTDIR/rpmsign "$GPG_KEY_PASS" "$GPG_KEY_NAME" $OUTDIR/files/libjpeg-turbo-official-$VERSION.src.rpm
246+
$SCRIPTDIR/rpmsign $OUTDIR/files/libjpeg-turbo-official-$VERSION.src.rpm
248247
rpm --checksig -v $OUTDIR/files/libjpeg-turbo-official-$VERSION.src.rpm
249248
fi
250249
fi

buildljt.linux

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ rm -rf ./opt
7070
rm -rf rpmbuild
7171

7272
if [ -f $SCRIPTDIR/gpgsign ]; then
73-
. $SCRIPTDIR/gpgsign
74-
expect $SCRIPTDIR/rpmsign "$GPG_KEY_PASS" "$GPG_KEY_NAME" $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM64.rpm
73+
$SCRIPTDIR/rpmsign $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM64.rpm
7574
rpm --checksig -v $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM64.rpm
7675
fi
7776

@@ -96,7 +95,7 @@ fi
9695
VERSION=`rpm -q -p libjpeg-turbo-official-[0-9]*.$RPM32.rpm | cut -f4 -d-`
9796
mv libjpeg-turbo-official-[0-9]*.$RPM32.rpm $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM32.rpm
9897
if [ -f $SCRIPTDIR/gpgsign ]; then
99-
expect $SCRIPTDIR/rpmsign "$GPG_KEY_PASS" "$GPG_KEY_NAME" $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM32.rpm
98+
$SCRIPTDIR/rpmsign $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM32.rpm
10099
rpm --checksig -v $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM32.rpm
101100
fi
102101
rpm2cpio $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPM32.rpm | cpio -idv ./opt/libjpeg-turbo/lib32/libturbojpeg.so*
@@ -114,6 +113,7 @@ make test
114113
#make tjtest
115114
mv libjpeg-turbo-official_[0-9]*_$DEB64.deb $OUTDIR/files/
116115
if [ -f $SCRIPTDIR/gpgsign ]; then
116+
. $SCRIPTDIR/gpgsign
117117
expect $SCRIPTDIR/debsign "$GPG_KEY_PASS" "$GPG_KEY_ID" $OUTDIR/files/libjpeg-turbo-official_[0-9]*_$DEB64.deb
118118
fi
119119
popd
@@ -151,7 +151,7 @@ if [ "$RPM64" != "$RPMA64" -a "$DEB64" != "$DEBA64" ]; then
151151
VERSION=`rpm -q -p libjpeg-turbo-official-[0-9]*.$RPMA64.rpm | cut -f4 -d-`
152152
mv libjpeg-turbo-official-[0-9]*.$RPMA64.rpm $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPMA64.rpm
153153
if [ -f $SCRIPTDIR/gpgsign ]; then
154-
expect $SCRIPTDIR/rpmsign "$GPG_KEY_PASS" "$GPG_KEY_NAME" $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPMA64.rpm
154+
$SCRIPTDIR/rpmsign $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPMA64.rpm
155155
rpm --checksig -v $OUTDIR/files/libjpeg-turbo-official-$VERSION.$RPMA64.rpm
156156
fi
157157
make deb

rpmsign

100644100755
Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
#!/usr/bin/expect -f
1+
set -u
2+
set -e
23

3-
set password [lindex $argv 0]
4-
set key [lindex $argv 1]
5-
set files [lrange $argv 2 2 ]
4+
SCRIPTDIR=`dirname $0`
65

7-
spawn rpm --define "%_gpg_name $key" \
8-
--define "%__gpg_sign_cmd %{__gpg} gpg --digest-algo sha256 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u \"%{_gpg_name}\" -sbo %{__signature_filename} %{__plaintext_filename}" \
9-
--addsign $files
10-
expect "Enter pass phrase:"
11-
send -- "$password\r"
6+
. $SCRIPTDIR/gpgsign
127

13-
expect {
14-
"Pass phrase check failed" { exit 1 }
15-
eof
16-
}
8+
rpm --define "%_gpg_name $GPG_KEY_NAME" \
9+
--define "%__gpg_sign_cmd %{__gpg} gpg --digest-algo sha256 --batch --no-verbose --no-armor --passphrase $GPG_KEY_PASS --no-secmem-warning -u \"%{_gpg_name}\" -sbo %{__signature_filename} %{__plaintext_filename}" \
10+
--addsign ${1+"$@"}

0 commit comments

Comments
 (0)