Skip to content

Commit 91fddea

Browse files
committed
Regenerate 3.8.3 files with core as addon
1 parent a8ba4f9 commit 91fddea

File tree

6 files changed

+151
-46
lines changed

6 files changed

+151
-46
lines changed

3.8.3/alpine/Dockerfile

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,14 @@ FROM builder-base AS builder
3636
RUN git clone --branch=3.8.3 --depth=1 --quiet \
3737
https://github.com/jgm/pandoc /app
3838

39-
# Add pandoc-crossref to project
40-
RUN printf "extra-packages: pandoc-crossref\n" > cabal.project.local;
41-
42-
# Build pandoc and pandoc-crossref. The `allow-newer` is required for
43-
# when pandoc-crossref has not been updated yet, but we want to build
44-
# anyway.
39+
# Build the pandoc CLI binary.
4540
RUN cabal build \
4641
--jobs \
4742
--disable-tests \
4843
--disable-bench \
4944
--enable-split-sections \
5045
--enable-executable-stripping \
5146
--upgrade-dependencies \
52-
--allow-newer='pandoc-crossref:pandoc' \
5347
--ghc-options='-O1 -optc-Os -optl=-pthread -fPIC -j' \
5448
--ghc-options='+RTS -M4G -A128m -n2m -RTS' \
5549
--constraint='any.Cabal ==3.10.3.0' \
@@ -394,11 +388,11 @@ RUN cabal build \
394388
--constraint='zip-archive -executable' \
395389
--constraint='any.zlib ==0.7.1.1' \
396390
--constraint='zlib -bundled-c-zlib +non-blocking-ffi +pkg-config' \
397-
. pandoc-cli pandoc-crossref
391+
. pandoc-cli
398392

399393
# Cabal's exec stripping doesn't seem to work reliably, let's do it here.
400394
RUN find dist-newstyle \
401-
-name 'pandoc*' -type f -perm -u+x \
395+
-name 'pandoc' -type f -perm -u+x \
402396
-exec strip '{}' ';' \
403397
-exec cp '{}' /usr/local/bin/ ';'
404398

@@ -432,16 +426,3 @@ RUN ln -s /usr/local/bin/pandoc /usr/local/bin/pandoc-lua && \
432426
lua5.4 && \
433427
# Create user data directory
434428
mkdir -p "$XDG_DATA_HOME"/pandoc
435-
436-
# Core ##################################################################
437-
FROM minimal AS core
438-
COPY --from=builder \
439-
/usr/local/bin/pandoc-crossref \
440-
/usr/local/bin/
441-
442-
# Additional packages frequently used during conversions
443-
# NOTE: `libsrvg`, pandoc uses `rsvg-convert` for working with svg images.
444-
# FIXME: Alpine 3.17 and later ships the binary in the rsvg-convert package.
445-
# hadolint ignore=DL3018
446-
RUN apk --no-cache add librsvg; \
447-
apk --no-cache add rsvg-convert || true

3.8.3/alpine/core/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ____
2+
# / ___|___ _ __ ___
3+
# | | / _ \| '__/ _ \
4+
# | |__| (_) | | | __/
5+
# \____\___/|_| \___|
6+
#
7+
FROM pandoc/minimal:3.8.3-alpine
8+
9+
# Additional packages frequently used during conversions
10+
# hadolint ignore=DL3018
11+
RUN apk --no-cache add rsvg-convert
12+
13+
# Install pandoc-crossref
14+
RUN <<EOF
15+
set -eux
16+
apk --no-cache add curl
17+
url_base='https://github.com/lierdakil/pandoc-crossref/releases/download';
18+
case "$(uname -m)" in
19+
('x86_64')
20+
arch="X64"
21+
crossref_hash=a521900745f7c1621b4104119f92dd4a9b4cc527f50157ef544ae1cb8435f9c1
22+
;;
23+
('aarch64')
24+
arch="ARM64"
25+
crossref_hash=aaaeae858b73a4150cc91581b07e08fb6e383f476a04fd024bb03ef323b32c3e
26+
;;
27+
(*)
28+
echo >&2 "error: unsupported architecture '$(uname -m)'"
29+
exit 1
30+
;;
31+
esac
32+
version="v0.3.22b"
33+
filename="pandoc-crossref-Linux-${arch}.tar.xz"
34+
curl --proto '=https' --tlsv1.3 -sSfL -o /tmp/pandoc-crossref.tar.xz \
35+
"${url_base}/${version}/pandoc-crossref-linux-${arch}.tar.xz"
36+
echo "$crossref_hash /tmp/pandoc-crossref.tar.xz" | sha256sum -c
37+
tar -xf /tmp/pandoc-crossref.tar.xz -C /usr/local/bin pandoc-crossref
38+
# Remove archive
39+
rm /tmp/pandoc-crossref.tar.xz
40+
# Curl is no longer needed
41+
apk del curl
42+
EOF

3.8.3/debian/Dockerfile

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,14 @@ RUN git clone --branch=3.8.3 --depth=1 --quiet \
2323
https://github.com/jgm/pandoc /app
2424

2525
# Install Haskell dependencies
26-
# Add pandoc-crossref to project
27-
RUN printf "extra-packages: pandoc-crossref\n" > cabal.project.local;
28-
29-
# Build pandoc and pandoc-crossref. The `allow-newer` is required for
30-
# when pandoc-crossref has not been updated yet, but we want to build
31-
# anyway.
26+
# Build pandoc CLI binary.
3227
RUN cabal build \
3328
--jobs \
3429
--disable-tests \
3530
--disable-bench \
3631
--enable-split-sections \
3732
--enable-executable-stripping \
3833
--upgrade-dependencies \
39-
--allow-newer='pandoc-crossref:pandoc' \
4034
--ghc-options='-O1 -optc-Os -optl=-pthread -fPIC -j' \
4135
--ghc-options='+RTS -M4G -A128m -n2m -RTS' \
4236
--constraint='any.Cabal ==3.14.1.0' \
@@ -377,11 +371,11 @@ RUN cabal build \
377371
--constraint='zip-archive -executable' \
378372
--constraint='any.zlib ==0.7.1.1' \
379373
--constraint='zlib -bundled-c-zlib +non-blocking-ffi +pkg-config' \
380-
. pandoc-cli pandoc-crossref
374+
. pandoc-cli
381375

382376
# Cabal's exec stripping doesn't seem to work reliably, let's do it here.
383377
RUN find dist-newstyle \
384-
-name 'pandoc*' -type f -perm -u+x \
378+
-name 'pandoc' -type f -perm -u+x \
385379
-exec strip '{}' ';' \
386380
-exec cp '{}' /usr/local/bin/ ';'
387381

@@ -420,17 +414,3 @@ RUN ln -s /usr/local/bin/pandoc /usr/local/bin/pandoc-lua \
420414
&& rm -rf /var/lib/apt/lists/* \
421415
# Create user data directory
422416
&& mkdir -p "$XDG_DATA_HOME"/pandoc
423-
424-
# Core ##################################################################
425-
FROM minimal AS core
426-
COPY --from=builder \
427-
/usr/local/bin/pandoc-crossref \
428-
/usr/local/bin/
429-
430-
# Additional packages frequently used during conversions
431-
# NOTE: `libsrvg`, pandoc uses `rsvg-convert` for working with svg images.
432-
RUN apt-get -q --no-allow-insecure-repositories update \
433-
&& DEBIAN_FRONTEND=noninteractive \
434-
apt-get install --assume-yes --no-install-recommends \
435-
librsvg2-bin=2.* \
436-
&& rm -rf /var/lib/apt/lists/*

3.8.3/debian/core/Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# ____
2+
# / ___|___ _ __ ___
3+
# | | / _ \| '__/ _ \
4+
# | |__| (_) | | | __/
5+
# \____\___/|_| \___|
6+
#
7+
FROM pandoc/minimal:3.8.3-debian
8+
9+
# Additional packages frequently used during conversions
10+
# NOTE: `libsrvg`, pandoc uses `rsvg-convert` for working with svg images.
11+
RUN apt-get -q --no-allow-insecure-repositories update \
12+
&& DEBIAN_FRONTEND=noninteractive \
13+
apt-get install --assume-yes --no-install-recommends \
14+
librsvg2-bin=2.* \
15+
&& rm -rf /var/lib/apt/lists/*
16+
17+
# Install pandoc-crossref
18+
RUN <<EOF
19+
set -eux
20+
21+
# Install curl
22+
apt-get -q --no-allow-insecure-repositories update
23+
apt-get install --assume-yes --no-install-recommends --mark-auto curl xz-utils
24+
25+
url_base='https://github.com/lierdakil/pandoc-crossref/releases/download';
26+
case "$(uname -m)" in
27+
('x86_64')
28+
arch="X64"
29+
crossref_hash=a521900745f7c1621b4104119f92dd4a9b4cc527f50157ef544ae1cb8435f9c1
30+
;;
31+
('aarch64')
32+
arch="ARM64"
33+
crossref_hash=aaaeae858b73a4150cc91581b07e08fb6e383f476a04fd024bb03ef323b32c3e
34+
;;
35+
(*)
36+
echo >&2 "error: unsupported architecture '$(uname -m)'"
37+
exit 1
38+
;;
39+
esac
40+
version="v0.3.22b"
41+
filename="pandoc-crossref-Linux-${arch}.tar.xz"
42+
curl --proto '=https' --tlsv1.3 -sSfL -o /tmp/pandoc-crossref.tar.xz \
43+
"${url_base}/${version}/pandoc-crossref-linux-${arch}.tar.xz"
44+
echo "$crossref_hash /tmp/pandoc-crossref.tar.xz" | sha256sum -c
45+
tar -xf /tmp/pandoc-crossref.tar.xz -C /usr/local/bin pandoc-crossref
46+
# Remove archive
47+
rm /tmp/pandoc-crossref.tar.xz
48+
# Curl is no longer needed
49+
apt-get autoremove --purge --assume-yes; \
50+
rm -rf /var/lib/apt/lists/*;
51+
EOF

0 commit comments

Comments
 (0)