Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:bookworm
FROM debian:trixie
LABEL org.opencontainers.image.source https://github.com/hathitrust/feed

ARG UNAME=ingest
Expand All @@ -18,7 +18,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git \
gpg \
gpg-agent \
grokj2k-tools \
imagemagick \
libdate-manip-perl \
libdbd-mysql-perl \
Expand Down Expand Up @@ -49,7 +48,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libxerces-c3-dev \
libxml-libxml-perl \
libyaml-libyaml-perl \
openjdk-17-jre-headless \
openjdk-21-jre-headless \
perl \
rclone \
unzip \
Expand All @@ -58,9 +57,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY etc/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml

COPY etc/jhove-auto-install.xml /tmp/jhove-auto-install.xml
RUN curl https://hathitrust.github.io/jhove/jhove-xplt-installer-latest.jar -o /tmp/jhove-installer.jar
RUN curl -L https://software.openpreservation.org/releases/jhove/1.34/jhove-installer-1.34.0.jar -o /tmp/jhove-installer.jar
RUN java -jar /tmp/jhove-installer.jar /tmp/jhove-auto-install.xml

COPY grok-debian-trixie.zip /tmp
RUN unzip /tmp/grok-debian-trixie.zip -d /tmp
RUN mv /tmp/grok-debian-trixie/lib/* /usr/local/lib
RUN mv /tmp/grok-debian-trixie/bin/* /usr/local/bin
RUN ldconfig

RUN groupadd -g $GID -o $UNAME
RUN useradd -m -d $FEED_HOME -u $UID -g $GID -o -s /bin/bash $UNAME

Expand Down
2 changes: 1 addition & 1 deletion bin/compress_tif_jp2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
if not defined $grk_compress or !-x $grk_compress;

# Single quality level with reqested PSNR of 32dB. See DEV-10
system(qq($grk_compress -i "$infile" -o "$outfile" -p RLCP -n $levels -SOP -EPH -M 62 -I -q 32))
system(qq($grk_compress -i "$infile" -o "$outfile" -p RLCP -n $levels -S -E -M 62 -I -q 32))

and die("grk_compress returned $?");

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ services:
- "9091:9091"
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "wget", "--quiet", "--tries=1", "-O", "/dev/null", "pushgateway:9091/-/healthy" ]
test: [ "CMD", "wget", "--quiet", "--tries=1", "-O", "/dev/null", "http://127.0.0.1:9091/-/healthy" ]


rabbitmq:
Expand Down
4 changes: 2 additions & 2 deletions etc/config/base_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jhove: /opt/jhove/jhove
jhoveconf: /opt/jhove/conf/jhove.conf
xerces: /usr/local/bin/validate-cache
xerces_cache: /usr/local/feed/etc/schema.cache
grk_compress: /usr/bin/grk_compress
grk_decompress: /usr/bin/grk_decompress
grk_compress: /usr/local/bin/grk_compress
grk_decompress: /usr/local/bin/grk_decompress
epubcheck: /usr/bin/java -jar /usr/bin/epubcheck

4 changes: 2 additions & 2 deletions etc/config/premis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ premis_tools:
# FIXME get these versions from debian packages
# Set to the version of Xerces you are using (must be 3.0 or later)
XERCES: qq(Xerces-C 3.2.4)
JHOVE: qq(JHOVE 1.32.0)
JHOVE: qq(JHOVE 1.34.0)
# Leave as is.
DIGEST_MD5: perl_mod_version('Digest::MD5');
# GnuPG is not needed unless downloading packages from Google.
GPG: qq(GnuPG 2.22.40)
ZIP: qq(Zip 3.0)
GRK_COMPRESS: qq(grok-j2k 10.0.5)
GRK_COMPRESS: qq(grok-j2k 20.0.4)
EPUBCHECK: qq(epubcheck 4.2.6)
CLAMAV: qq(ClamAV 1.0.5)

Expand Down
Binary file added grok-debian-trixie.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions lib/HTFeed/Image/Grok.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ sub compress {
"-i '$infile'",
"-o '$outfile'",
"-p RLCP", # the rest of these args never change,
"-SOP", # so for now leave them hard-coded
"-EPH",
"-S", # so for now leave them hard-coded
"-E",
"-M 62",
"-I",
"-q 32",
"> /dev/null 2>&1"
# "> /dev/null 2>&1"
);

my $sys_ret_val = system($full_cmd);
Expand All @@ -79,7 +79,7 @@ sub decompress {
"$base_cmd",
"-i '$infile'",
"-o '$outfile'",
"> /dev/null 2>&1"
# "> /dev/null 2>&1"
);
my $sys_ret_val = system($full_cmd);

Expand Down
Loading