Skip to content

Commit bf8c8d0

Browse files
committed
Build from source to guarantee AFP mount tools are shipped with the image
1 parent a170c9d commit bf8c8d0

File tree

6 files changed

+51
-4
lines changed

6 files changed

+51
-4
lines changed

afp2s3/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.5
4+
5+
- Build `afpfs-ng` from source to guarantee AFP mount tools are shipped with the image.
6+
37
## 0.1.4
48

59
- Validate AFP mounts by requiring the `.com.apple.timemachine.supported` marker file from the remote share.

afp2s3/Dockerfile

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,57 @@
11
ARG BUILD_FROM
2+
ARG AFPFS_VERSION=0.8.1
3+
4+
FROM ${BUILD_FROM} AS afpfs_build
5+
6+
ARG AFPFS_VERSION
7+
8+
# Build afpfs-ng from source so the AFP tools are available on all architectures
9+
RUN apk add --no-cache \
10+
autoconf \
11+
automake \
12+
bash \
13+
build-base \
14+
ca-certificates \
15+
fuse-dev \
16+
fuse3-dev \
17+
glib-dev \
18+
libgcrypt-dev \
19+
libgpg-error-dev \
20+
libtool \
21+
linux-headers \
22+
openssl-dev \
23+
pkgconfig \
24+
tar \
25+
wget
26+
27+
WORKDIR /tmp
28+
29+
RUN wget -O afpfs-ng.tar.gz https://github.com/afpfs-ng/afpfs-ng/releases/download/v${AFPFS_VERSION}/afpfs-ng-${AFPFS_VERSION}.tar.gz \
30+
&& tar -xzf afpfs-ng.tar.gz \
31+
&& cd afpfs-ng-${AFPFS_VERSION} \
32+
&& if ! ./configure --prefix=/usr --sysconfdir=/etc --disable-python; then \
33+
./configure --prefix=/usr --sysconfdir=/etc; \
34+
fi \
35+
&& make -j"$(getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)" \
36+
&& make install DESTDIR=/tmp/afpfs-install
37+
238
FROM ${BUILD_FROM}
339

4-
# Install dependencies
40+
# Install runtime dependencies, including libraries required by afpfs-ng
541
RUN apk add --no-cache \
42+
ca-certificates \
43+
fuse \
644
fuse3 \
7-
afpfs-ng \
45+
glib \
46+
libgcrypt \
47+
libgpg-error \
48+
openssl \
849
util-linux \
950
jq \
1051
wget
1152

53+
COPY --from=afpfs_build /tmp/afpfs-install/ /
54+
1255
# Copy data for add-on
1356
COPY rootfs /
1457
RUN chmod a+x /run.sh

afp2s3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![afp2s3 Logo](https://raw.githubusercontent.com/hassio-infrastructure/afp2s3/main/logo.png)
1+
![afp2s3 Logo](logo.png)
22

33
# Home Assistant Add-on: afp2s3
44

afp2s3/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: AFP to S3
3-
version: "0.1.4"
3+
version: "0.1.5"
44
slug: afp2s3
55
description: Mounts an AFP share and exposes it as an S3 endpoint using Minio.
66
url: https://github.com/alsotoes/hassio-infrastructure/tree/main/afp2s3

afp2s3/icon.png

6.8 KB
Loading

afp2s3/logo.png

-9.15 KB
Loading

0 commit comments

Comments
 (0)