Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151086765
D49821.id153631.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D49821.id153631.diff
View Options
diff --git a/release/release.sh b/release/release.sh
--- a/release/release.sh
+++ b/release/release.sh
@@ -309,6 +309,41 @@
done
fi
+ _gtarcmd="$(which gtar)"
+ if [ ! -z "${WITH_OCIIMAGES}" -a -z "${_gtarcmd}" ]; then
+ # We use gtar for building container image layers due to an
+ # incompatiblity issue with bsdtar
+ # (https://github.com/containers/podman/issues/25270)
+ if [ -d ${CHROOTDIR}/usr/ports ]; then
+ # Trick the ports 'run-autotools-fixup' target to do the right
+ # thing.
+ _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U)
+ REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION)
+ BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH)
+ UNAME_r=${REVISION}-${BRANCH}
+ GITUNSETOPTS="CONTRIB CURL CVS GITWEB GUI HTMLDOCS"
+ GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL"
+ GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN"
+ GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2"
+ PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
+ PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}"
+ PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}"
+ PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports"
+ PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles"
+ eval chroot ${CHROOTDIR} env OPTIONS_UNSET=\"${GITUNSETOPTS}\" \
+ ${PBUILD_FLAGS} \
+ make -C /usr/ports/archivers/gtar FORCE_PKG_REGISTER=1 \
+ WRKDIRPREFIX=/tmp/ports \
+ DISTDIR=/tmp/distfiles \
+ install clean distclean
+ else
+ eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \
+ pkg install -y archivers/gtar
+ eval chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \
+ pkg clean -y
+ fi
+ fi
+
buildenv_setup
return 0
diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh
--- a/release/scripts/make-oci-image.sh
+++ b/release/scripts/make-oci-image.sh
@@ -95,8 +95,13 @@
local image=$1; shift
local output=$1; shift
- # Note: the diff_id (needed for image config) is the hash of the uncompressed tar
- tar -C ${workdir}/rootfs --strip-components 1 -cf ${workdir}/rootfs.tar .
+ # Note: the diff_id (needed for image config) is the hash of the
+ # uncompressed tar.
+ #
+ # We use gtar for building container image layers due to an
+ # incompatiblity issue with bsdtar
+ # (https://github.com/containers/podman/issues/25270)
+ gtar -C ${workdir}/rootfs --strip-components 1 -cf ${workdir}/rootfs.tar .
local diff_id=$(sha256 -q < ${workdir}/rootfs.tar)
gzip -f ${workdir}/rootfs.tar
local create_time=$(date -u +%Y-%m-%dT%TZ)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 10:09 PM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31000671
Default Alt Text
D49821.id153631.diff (2 KB)
Attached To
Mode
D49821: release: Avoid sparse-file handling for container image layers
Attached
Detach File
Event Timeline
Log In to Comment