tooling/package: fix deb/rpm packaging against the real distro layouts
Verified locally in debian:12 and fedora:43 containers before pushing:
- deb: dpkg-deb rejected the control file because `paste -sd', '` uses
the delimiter list cyclically (comma, space, comma, ...) — join with a
plain comma instead;
- rpm: rpm 4.20+ (Fedora 43) computes %{buildroot} itself and ignores a
caller-supplied buildroot define, so stage the payload and let the
spec's %install copy it via %{_oak_stage}; add a changelog entry (the
%source_date_epoch_from_changelog warning) and drop it from the
changelog-less build.
This commit is contained in:
@@ -99,7 +99,7 @@ DEPS=$(cd "$DEPS_DIR" && for bin in "$STAGING_ABS"/usr/bin/*; do
|
||||
dpkg-shlibdeps -O --ignore-missing-info "$bin" || exit 1
|
||||
done \
|
||||
| sed 's/^shlibs:Depends=//' | tr ',' '\n' | sed 's/^ //;s/ $//' | sort -u \
|
||||
| paste -sd', ' -)
|
||||
| paste -sd, -)
|
||||
echo "declared deps: $DEPS"
|
||||
|
||||
cat > "$STAGING/DEBIAN/control" <<EOF
|
||||
|
||||
@@ -26,21 +26,26 @@ TOP=$(pwd)/target/pkg/rpm
|
||||
rm -rf "$TOP"
|
||||
mkdir -p "$TOP"/{BUILD,RPMS,SOURCES,SPECS,BUILDROOT}
|
||||
|
||||
ROOT="$TOP/BUILDROOT/oak-editor-$VERSION-1.x86_64"
|
||||
mkdir -p "$ROOT/usr/bin" "$ROOT/usr/share/applications" \
|
||||
"$ROOT/usr/share/icons/hicolor/512x512/apps" "$ROOT/usr/share/oak/i18n" \
|
||||
"$ROOT/usr/share/icons/hicolor/scalable/apps"
|
||||
# Stage the payload; the spec's %install copies it into rpmbuild's own
|
||||
# %{buildroot}. rpm 4.20+ (Fedora 43) computes the buildroot itself and
|
||||
# ignores a caller-supplied `buildroot` define, so the spec must install
|
||||
# through the macro.
|
||||
STAGE="$TOP/stage"
|
||||
mkdir -p "$STAGE/usr/bin" "$STAGE/usr/share/applications" \
|
||||
"$STAGE/usr/share/icons/hicolor/512x512/apps" "$STAGE/usr/share/oak/i18n" \
|
||||
"$STAGE/usr/share/icons/hicolor/scalable/apps"
|
||||
install -m755 target/release/oak-editor target/release/oak-cli target/release/oak-worker \
|
||||
"$ROOT/usr/bin/"
|
||||
install -m644 packaging/oak.desktop "$ROOT/usr/share/applications/oak.desktop"
|
||||
install -m644 icons/icon.png "$ROOT/usr/share/icons/hicolor/512x512/apps/oak.png"
|
||||
install -m644 Oak_Icon.svg "$ROOT/usr/share/icons/hicolor/scalable/apps/oak.svg"
|
||||
install -m644 assets/i18n/*.yaml "$ROOT/usr/share/oak/i18n/"
|
||||
"$STAGE/usr/bin/"
|
||||
install -m644 packaging/oak.desktop "$STAGE/usr/share/applications/oak.desktop"
|
||||
install -m644 icons/icon.png "$STAGE/usr/share/icons/hicolor/512x512/apps/oak.png"
|
||||
install -m644 Oak_Icon.svg "$STAGE/usr/share/icons/hicolor/scalable/apps/oak.svg"
|
||||
install -m644 assets/i18n/*.yaml "$STAGE/usr/share/oak/i18n/"
|
||||
|
||||
rpmbuild -bb \
|
||||
--define "_topdir $TOP" \
|
||||
--define "_version $VERSION" \
|
||||
--define "buildroot $ROOT" \
|
||||
--define "_oak_stage $STAGE" \
|
||||
--define "source_date_epoch_from_changelog 0" \
|
||||
--define "_binary_payload w6.zstdio" \
|
||||
tooling/package/oak.spec
|
||||
|
||||
|
||||
@@ -29,9 +29,11 @@ Oak is a non-linear video editor written in Rust (OpenFX plug-in host,
|
||||
proxy editing, multicam, hardware decoding).
|
||||
|
||||
%install
|
||||
# Everything is staged into %{buildroot} by the caller (build-rpm.sh);
|
||||
# nothing to compile here.
|
||||
true
|
||||
# The caller staged the payload in %{_oak_stage} (build-rpm.sh); rpm
|
||||
# 4.20+ computes %{buildroot} itself, so copy the tree in through the
|
||||
# macro instead of relying on a caller-supplied buildroot define.
|
||||
install -d %{buildroot}
|
||||
cp -a %{_oak_stage}/usr %{buildroot}/
|
||||
|
||||
%files
|
||||
/usr/bin/oak-editor
|
||||
@@ -43,3 +45,5 @@ true
|
||||
/usr/share/oak/i18n/
|
||||
|
||||
%changelog
|
||||
* Thu Sep 24 2026 Oak Team <noreply@oakvideoeditor.org> - 0.5.0-1
|
||||
- Release build of the Rust rewrite.
|
||||
|
||||
Reference in New Issue
Block a user