Skip to content

Add mesa snapshot overlay #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
52 changes: 52 additions & 0 deletions overlay-debs/mesa-snapshot/mesa-snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#! /bin/sh
#
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause

COMMIT=${COMMIT:-origin/main}

set -e

DEB_FILE=${DSC_FILE%%.dsc}.debian.tar.xz
ORIG_FILE=$(echo ${DSC_FILE} | sed -e 's/-.*/.orig.tar.xz/')

rm -rf mesa
git clone --depth 1 https://gitlab.freedesktop.org/mesa/mesa

cd mesa
git fetch --depth 1 origin ${COMMIT##origin/}

date=$(git log -1 --format=%cd --date=format:%Y%m%d ${COMMIT})
subject=$(git log -1 --format="%h (\"%s\")" ${COMMIT})
version=25.2.0~git${date}

rm -rf ../mesa-${version}
mkdir ../mesa-${version}
git archive --format=tar HEAD | tar x -C ../mesa-${version}

cd ../mesa-${version}

rm -rf debian
tar xJf ${DEB_FILE}

cat >> debian/changelog.tmp << EOF
mesa (${version}-0) experimental; urgency=medium
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind changing the version to 0qcom1 so that all packages with qcom changes have a qcom version?


* Build git version from ${date}, commit ${subject}

-- Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Wed, 11 Jun 2025 14:58:50 +0300

EOF
cat debian/changelog >> debian/changelog.tmp
mv debian/changelog.tmp debian/changelog

# orig.tar.xz generation skips all .git* files, drop them from the source dir too.
rm -rf .git*

debian/rules regen_control
debian/rules clean
debian/rules gentarball

rm -rf ../mesa

rm ${DSC_FILE} ${DEB_FILE} ${ORIG_FILE}*
7 changes: 7 additions & 0 deletions overlay-debs/mesa-snapshot/mesa-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dsc_url: "https://snapshot.debian.org/archive/debian/20250519T203618Z/pool/main/m/mesa/mesa_25.1.0-1.dsc"
dsc_sha256sum: "d06c1b0ee300f096de2ac59a2e9583349ca79322612f4502baa5e78ff0be4290"
debdiff_file: "mesa_25.2.0.debdiff"
script: mesa-snapshot.sh
suite: trixie
env:
COMMIT: 8d13fc447e346477bab7e1b587c55fe0451ee654
Loading