Compare commits

..
2 Commits
Author SHA1 Message Date
Jakob Borg 7e848a150b docker: Fix handling of PCAP variable (fixes #8567) (#8568)
This correctly handles the absense of the PCAP environment variable,
which was broken in the previous change.
2022-10-02 08:58:22 +02:00
Simon FreiandJakob Borg 81bdde79ea lib/fs: Skip xattrs test on EOPNOTSUPP (fixes #8564) (#8565) 2022-10-02 08:58:19 +02:00
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ RUN apk add --no-cache ca-certificates su-exec tzdata libcap
COPY --from=builder /src/syncthing /bin/syncthing
COPY --from=builder /src/script/docker-entrypoint.sh /bin/entrypoint.sh
ENV PUID=1000 PGID=1000 HOME=/var/syncthing PCAP=
ENV PUID=1000 PGID=1000 HOME=/var/syncthing
HEALTHCHECK --interval=1m --timeout=10s \
CMD nc -z 127.0.0.1 8384 || exit 1
+2 -1
View File
@@ -15,6 +15,7 @@ import (
"sort"
"strconv"
"strings"
"syscall"
"testing"
"time"
@@ -590,7 +591,7 @@ func TestXattr(t *testing.T) {
}
// Set the xattrs, read them back and compare
if err := tfs.SetXattr("/test", attrs, noopXattrFilter{}); errors.Is(err, ErrXattrsNotSupported) {
if err := tfs.SetXattr("/test", attrs, noopXattrFilter{}); errors.Is(err, ErrXattrsNotSupported) || errors.Is(err, syscall.EOPNOTSUPP) {
t.Skip("xattrs not supported")
} else if err != nil {
t.Fatal(err)
+1 -1
View File
@@ -4,7 +4,7 @@ set -eu
if [ "$(id -u)" = '0' ]; then
binary="$1"
if [ "$PCAP" == "" ] ; then
if [ "${PCAP:-}" == "" ] ; then
# If Syncthing should have no extra capabilities, make sure to remove them
# from the binary. This will fail with an error if there are no
# capabilities to remove, hence the || true etc.