Skip to content

Commit 485791a

Browse files
committed
UPG: upgrade main/rsync to 3.4.1
1 parent f702f65 commit 485791a

File tree

3 files changed

+81
-34
lines changed

3 files changed

+81
-34
lines changed

main/rsync/Dockerfile

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# syntax=docker.io/docker/dockerfile:1.14
1+
# syntax=docker.io/docker/dockerfile:1.16
22
# https://docs.docker.com/build/dockerfile/frontend/
33

4-
ARG ALPINE_VERSION=3.21
4+
ARG ALPINE_VERSION=3.22
55
ARG PACKAGE_PATH=main/rsync
66
ARG PACKAGE_NAME=rsync
7-
ARG PACKAGE_VERSION=3.4.0
7+
ARG PACKAGE_VERSION=3.4.1
88

99
FROM docker.io/library/alpine:${ALPINE_VERSION} AS build
1010

@@ -34,11 +34,10 @@ ARG EXTRA_DEPS="acl-static lz4-static popt-static zlib-static zstd-static"
3434
# STEP-1: install xxhash dependencies
3535
ARG XXHASH_PATH=main/xxhash
3636
ARG XXHASH_NAME=xxhash
37-
ARG XXHASH_VERSION=0.8.2
37+
ARG XXHASH_VERSION=0.8.3
38+
COPY xxhash "${XXHASH_PATH}"
3839
RUN --mount=type=cache,target=/var/cache/apk,id=apk-$BUILDARCH,sharing=locked \
39-
wget -O "${XXHASH_NAME}.tar.gz" "https://gitlab.alpinelinux.org/alpine/aports/-/archive/${ALPINE_VERSION}-stable/aports-${ALPINE_VERSION}-stable.tar.gz?path=${XXHASH_PATH}" && \
40-
tar -xf "${XXHASH_NAME}.tar.gz" --strip-components=1 && cd "${XXHASH_PATH}" && \
41-
grep -q "pkgver=${XXHASH_VERSION}" APKBUILD && echo 'pkgver matched' && \
40+
cd "${XXHASH_PATH}" && grep -q "pkgver=${XXHASH_VERSION}" APKBUILD && echo 'pkgver matched' && \
4241
abuild -F deps
4342

4443
# STEP-2: build xxhash library
@@ -50,11 +49,9 @@ RUN --mount=type=cache,target=/var/cache/distfiles <<EOT
5049
EOT
5150

5251
# STEP-3: install dependencies
52+
COPY aports "${PACKAGE_PATH}"
5353
RUN --mount=type=cache,target=/var/cache/apk,id=apk-$BUILDARCH,sharing=locked \
54-
wget -O "${PACKAGE_NAME}.tar.gz" "https://gitlab.alpinelinux.org/alpine/aports/-/archive/${ALPINE_VERSION}-stable/aports-${ALPINE_VERSION}-stable.tar.gz?path=${PACKAGE_PATH}" && \
55-
tar -xf "${PACKAGE_NAME}.tar.gz" --strip-components=1 && cd "${PACKAGE_PATH}" && \
56-
grep -q "pkgver=${PACKAGE_VERSION}" APKBUILD && echo 'pkgver matched' && \
57-
sed -i APKBUILD -e '/xxhash-dev/d' && \
54+
cd "${PACKAGE_PATH}" && grep -q "pkgver=${PACKAGE_VERSION}" APKBUILD && echo 'pkgver matched' && \
5855
abuild -F deps && apk add ${EXTRA_DEPS}
5956

6057
# STEP-4: build executable
@@ -64,7 +61,6 @@ RUN --mount=type=cache,target=/var/cache/distfiles <<EOT
6461
export CFLAGS="-static -L/src/${XXHASH_PATH}/pkg/${XXHASH_NAME}/usr/lib"
6562
export CPPFLAGS="-I/src/${XXHASH_PATH}/pkg/${XXHASH_NAME}/usr/include"
6663
sed -i APKBUILD -e 's|https://download.samba.org/pub/rsync|https://download.samba.org/pub/rsync/src|'
67-
sed -i APKBUILD -e 's|make reconfigure$|make|'
6864
abuild -F fetch verify unpack prepare mkusers build package
6965
EOT
7066

@@ -82,6 +78,9 @@ COPY --from=build /usr/local/bin/rsync /
8278
ENTRYPOINT ["/rsync"]
8379

8480
########## CHANGES ##########
81+
# 20250531:
82+
# * Upgrade rsync to 3.4.1
83+
# * Commit APKBUILD to git for reproducible build
8584
# 20250403:
8685
# * Build libxxhash.a for configure --enable-xxhash
8786
# * Enable static build via CFLAGS and CPPFLAGS

main/rsync/xxhash/APKBUILD

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributor: Leo <thinkabit.ukim@gmail.com>
2+
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
3+
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
4+
pkgname=xxhash
5+
pkgver=0.8.3
6+
pkgrel=0
7+
pkgdesc="Extremely fast non-cryptographic hash algorithm"
8+
url="https://cyan4973.github.io/xxHash/"
9+
arch="all"
10+
license="BSD-2-Clause"
11+
subpackages="$pkgname-dev $pkgname-doc lib$pkgname:libs"
12+
source="$pkgname-$pkgver.tar.gz::https://github.com/Cyan4973/xxHash/archive/v$pkgver.tar.gz"
13+
builddir="$srcdir/xxHash-$pkgver"
14+
15+
build() {
16+
export CFLAGS="$CFLAGS -DXXH_FORCE_MEMORY_ACCESS=1 -flto=auto -O2"
17+
18+
case "$CARCH" in
19+
x86*)
20+
# only implemented for x86/x86_64
21+
local dispatch="1"
22+
;;
23+
*)
24+
local dispatch="0"
25+
;;
26+
esac
27+
make DISPATCH="$dispatch" LIBXXH_DISPATCH="$dispatch"
28+
}
29+
30+
check() {
31+
make check
32+
}
33+
34+
package() {
35+
make DESTDIR="$pkgdir" PREFIX=/usr install
36+
rm -rf "$pkgdir"/usr/lib/libxxhash.a
37+
}
38+
39+
sha512sums="
40+
8b5c8b9aad4e869f28310b12cc314037feda81d92f26c23eaecdb35dc65042ca2e65f2e9606033e62a31bcc737a9a950500ffcbdb8677d6ab20e820ea14f2b79 xxhash-0.8.3.tar.gz
41+
"

scripts/aports.sh

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,40 @@ function log_i() { echo -e "$(date +'%Y%m%d %H:%M:%S') \033[32m[I] $1\033[0m"; }
1818
function log_w() { echo -e "$(date +'%Y%m%d %H:%M:%S') \033[33m[W] $1\033[0m"; }
1919
function log_e() { echo -e "$(date +'%Y%m%d %H:%M:%S') \033[31m[E] $1\033[0m"; }
2020
function log_f() { echo -e "$(date +'%Y%m%d %H:%M:%S') \033[31m[F] $1\033[0m" && exit 1; }
21-
function reset_and_pull_aports() {
21+
function reset_and_pull_as_aports() {
2222
log_i "reset and pull aports for $1"
2323
rm -rf "$SOURCE_DIR/$1/aports" && mkdir -p "$SOURCE_DIR/$1/aports"
2424
curl "https://gitlab.alpinelinux.org/alpine/aports/-/archive/${ALPINE_VERSION}-stable/aports-${ALPINE_VERSION}-stable.tar.gz?path=$1" | \
2525
tar -xzf - --strip-components=3 --directory "$SOURCE_DIR/$1/aports"
2626
}
27+
function reset_and_pull_extra_for() {
28+
log_i "reset and pull extra $2 for $1"
29+
rm -rf "$SOURCE_DIR/$1/$(basename $2)" && mkdir -p "$SOURCE_DIR/$1/$(basename $2)"
30+
curl "https://gitlab.alpinelinux.org/alpine/aports/-/archive/${ALPINE_VERSION}-stable/aports-${ALPINE_VERSION}-stable.tar.gz?path=$2" | \
31+
tar -xzf - --strip-components=3 --directory "$SOURCE_DIR/$1/$(basename $2)"
32+
}
2733

2834
[ $ENABLE_DEBUG -eq 1 ] && set -x
2935

30-
reset_and_pull_aports community/fio
31-
reset_and_pull_aports community/redis
32-
reset_and_pull_aports main/7zip
33-
reset_and_pull_aports main/curl
34-
reset_and_pull_aports main/htop
35-
reset_and_pull_aports main/iperf3
36-
reset_and_pull_aports main/iproute2
37-
reset_and_pull_aports main/lsof
38-
reset_and_pull_aports main/mariadb
39-
reset_and_pull_aports main/nano
40-
reset_and_pull_aports main/netcat-openbsd
41-
reset_and_pull_aports main/nmap
42-
reset_and_pull_aports main/pigz
43-
reset_and_pull_aports main/postgresql17
44-
reset_and_pull_aports main/procps-ng
45-
reset_and_pull_aports main/rsync
46-
reset_and_pull_aports main/socat
47-
reset_and_pull_aports main/strace
48-
reset_and_pull_aports main/tcpdump
49-
reset_and_pull_aports main/vim
50-
reset_and_pull_aports main/wget
36+
reset_and_pull_as_aports community/fio
37+
reset_and_pull_as_aports community/redis
38+
reset_and_pull_as_aports main/7zip
39+
reset_and_pull_as_aports main/curl
40+
reset_and_pull_as_aports main/htop
41+
reset_and_pull_as_aports main/iperf3
42+
reset_and_pull_as_aports main/iproute2
43+
reset_and_pull_as_aports main/lsof
44+
reset_and_pull_as_aports main/mariadb
45+
reset_and_pull_as_aports main/nano
46+
reset_and_pull_as_aports main/netcat-openbsd
47+
reset_and_pull_as_aports main/nmap
48+
reset_and_pull_as_aports main/pigz
49+
reset_and_pull_as_aports main/postgresql17
50+
reset_and_pull_as_aports main/procps-ng
51+
reset_and_pull_as_aports main/rsync
52+
reset_and_pull_extra_for main/rsync main/xxhash
53+
reset_and_pull_as_aports main/socat
54+
reset_and_pull_as_aports main/strace
55+
reset_and_pull_as_aports main/tcpdump
56+
reset_and_pull_as_aports main/vim
57+
reset_and_pull_as_aports main/wget

0 commit comments

Comments
 (0)