debian: Switch to elementpath 2.5.0-1 and xmlschema 1.10.0-1

After changes from https://github.com/projectacrn/acrn-hypervisor/pull/7390
we can move to latest versions available.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
This commit is contained in:
Helmut Buchsbaum 2022-05-07 00:50:31 +02:00 committed by acrnsi-robot
parent 5f1ee365d9
commit 8ecf0fe7e8
3 changed files with 89 additions and 94 deletions

4
debian/control vendored
View File

@ -33,8 +33,8 @@ Build-Depends:
acpica-tools (>= 20200326), acpica-tools (>= 20200326),
python3-lxml, python3-lxml,
python3-defusedxml, python3-defusedxml,
python3-xmlschema (= 1.9.2-1), python3-xmlschema (>= 1.10.0),
python3-elementpath (= 2.4.0-1) python3-elementpath (>= 2.5.0)
Standards-Version: 4.3.0 Standards-Version: 4.3.0
Homepage: https://projectacrn.org/ Homepage: https://projectacrn.org/
Vcs-Browser: https://github.com/projectacrn/acrn-hypervisor Vcs-Browser: https://github.com/projectacrn/acrn-hypervisor

View File

@ -68,98 +68,93 @@ RUN mkdir -p /opt/apt && cd /opt/apt && \
RUN git config --global user.name "ACRN Debian Package Build" && \ RUN git config --global user.name "ACRN Debian Package Build" && \
git config --global user.email "acrn-dev@lists.projectacrn.org" git config --global user.email "acrn-dev@lists.projectacrn.org"
# elementpath 2.4.0 # elementpath >=2.5.0
# Attention: 2.4.0 not available at Debian package repos, so RUN NEEDEDVERSION="2.5.0"; \
# import the upstream version and repackage PKGVERSION=$(apt-cache policy python3-elementpath | grep "Candidate:" | awk '{ print $2}'); \
RUN NEEDEDVERSION="2.4.0" && \ if [ -z "${PKGVERSION}" -o "${NEEDEDVERSION}" != "$(echo ${NEEDEDVERSION}\\n${PKGVERSION} | sort -V | head -n1)" ]; then \
srcpkg="elementpath" && \ srcpkg="elementpath" && \
url="https://salsa.debian.org/debian/${srcpkg}.git" && \ url="https://salsa.debian.org/debian/${srcpkg}.git" && \
upstream_tag="upstream/2.3.1" && \ upstream_tag="upstream/${NEEDEDVERSION}" && \
debian_tag="debian/2.3.1-1" && \ debian_tag="debian/${NEEDEDVERSION}-1" && \
debian_branch="master" && \ debian_branch="master" && \
upstream_branch="upstream" && \ upstream_branch="upstream" && \
mkdir -p /usr/src/${srcpkg} && cd /usr/src/${srcpkg} && \ mkdir -p /usr/src/${srcpkg} && cd /usr/src/${srcpkg} && \
git init && git remote add origin ${url} && \ git init && git remote add origin ${url} && \
git fetch origin --depth 1 refs/tags/${upstream_tag}:refs/tags/${upstream_tag} && \ git fetch origin --depth 1 refs/tags/${upstream_tag}:refs/tags/${upstream_tag} && \
git fetch origin --depth 1 refs/tags/${debian_tag}:refs/tags/${debian_tag} && \ git fetch origin --depth 1 refs/tags/${debian_tag}:refs/tags/${debian_tag} && \
if git show ${debian_tag}:debian | grep -qw gbp.conf; then \ if git show ${debian_tag}:debian | grep -qw gbp.conf; then \
pristine_tar=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/pristine-tar/ {print $2}' | tr '[:upper:]' '[:lower:]' | xargs); \ pristine_tar=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/pristine-tar/ {print $2}' | tr '[:upper:]' '[:lower:]' | xargs); \
if [ "${pristine_tar}" = "true" ]; then \ if [ "${pristine_tar}" = "true" ]; then \
git fetch origin pristine-tar; git branch -t pristine-tar origin/pristine-tar; \ git fetch origin pristine-tar; git branch -t pristine-tar origin/pristine-tar; \
fi; \ fi; \
debian_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/debian-branch/ {print $2}' | xargs) && \ debian_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/debian-branch/ {print $2}' | xargs) && \
if [ -z "${debian_branch}" ]; then \ if [ -z "${debian_branch}" ]; then \
debian_branch="master"; \ debian_branch="master"; \
fi; \ fi; \
upstream_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/upstream-branch/ {print $2}' | xargs) && \ upstream_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/upstream-branch/ {print $2}' | xargs) && \
if [ -z "${upstream_branch}" ]; then \ if [ -z "${upstream_branch}" ]; then \
upstream_branch="upstream"; \ upstream_branch="upstream"; \
fi; \ fi; \
fi && \ fi && \
git checkout -b ${upstream_branch} ${upstream_tag} && \ git checkout -b ${upstream_branch} ${upstream_tag} && \
git checkout -b ${debian_branch} ${debian_tag} && \ git checkout -b ${debian_branch} ${debian_tag} && \
sed -i 's#/latest##g' debian/watch && git add -u && git commit -m "d/watch: Fix watch url to get arbitrary versions" && \ mk-build-deps --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' --install debian/control --remove && \
gbp import-orig --uscan --upstream-version ${NEEDEDVERSION} && \ rm -f $(dpkg-parsechangelog -Ssource)-build-deps_$(dpkg-parsechangelog -Sversion)_*.* && \
EDITOR=true DEBEMAIL=$(git config user.email) DEBFULLNAME=$(git config user.name) gbp dch -R -N ${NEEDEDVERSION}-1 --commit && \ DEB_BUILD_OPTIONS="nocheck" gbp buildpackage -b -us -uc && \
mk-build-deps --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' --install debian/control --remove && \ for p in $(grep -E '^Package:' debian/control | awk '{print $2}'); do \
rm -f $(dpkg-parsechangelog -Ssource)-build-deps_$(dpkg-parsechangelog -Sversion)_*.* && \ echo "Package: $p" >> /etc/apt/preferences.d/pin-acrn; \
DEB_BUILD_OPTIONS="nocheck" gbp buildpackage -b -us -uc && \ echo "Pin: release l=acrn-local-build" >> /etc/apt/preferences.d/pin-acrn; \
for p in $(grep -E '^Package:' debian/control | awk '{print $2}'); do \ echo "Pin-Priority: 900" >> /etc/apt/preferences.d/pin-acrn; \
echo "Package: $p" >> /etc/apt/preferences.d/pin-acrn; \ echo "" >> /etc/apt/preferences.d/pin-acrn; \
echo "Pin: release l=acrn-local-build" >> /etc/apt/preferences.d/pin-acrn; \ done && \
echo "Pin-Priority: 900" >> /etc/apt/preferences.d/pin-acrn; \ cd /usr/src && mv *.deb /opt/apt && \
echo "" >> /etc/apt/preferences.d/pin-acrn; \ cd /opt/apt && apt-ftparchive packages . > Packages && cp .Release.header Release && apt-ftparchive release . >> Release && \
done && \ apt-get update -y; \
cd /usr/src && mv *.deb /opt/apt && \ fi
cd /opt/apt && apt-ftparchive packages . > Packages && cp .Release.header Release && apt-ftparchive release . >> Release && \
ls -al /opt/apt && \
cat /etc/apt/preferences.d/pin-acrn && \
apt-get update -y
# xmlschema 1.9.2 # xmlschema >=1.10.0
# Again we need to repackage. This the upstream version is already available, but no debian version. RUN NEEDEDVERSION="1.10.0"; \
# Use 1.4.2-1 as base PKGVERSION=$(apt-cache policy python3-xmlschema | grep "Candidate:" | awk '{ print $2}'); \
RUN NEEDEDVERSION="1.9.2"; \ if [ -z "${PKGVERSION}" -o "${NEEDEDVERSION}" != "$(echo ${NEEDEDVERSION}\\n${PKGVERSION} | sort -V | head -n1)" ]; then \
srcpkg="xmlschema" && \ srcpkg="xmlschema" && \
url="https://salsa.debian.org/python-team/packages/python-xmlschema.git" && \ url="https://salsa.debian.org/python-team/packages/python-${srcpkg}.git" && \
upstream_tag="upstream/${NEEDEDVERSION}" && \ upstream_tag="upstream/${NEEDEDVERSION}" && \
debian_tag="debian/1.4.2-1" && \ debian_tag="debian/${NEEDEDVERSION}-1" && \
debian_branch="master" && \ debian_branch="master" && \
upstream_branch="upstream" && \ upstream_branch="upstream" && \
mkdir -p /usr/src/${srcpkg} && cd /usr/src/${srcpkg} && \ mkdir -p /usr/src/${srcpkg} && cd /usr/src/${srcpkg} && \
git init && git remote add origin ${url} && \ git init && git remote add origin ${url} && \
git fetch origin refs/tags/${upstream_tag}:refs/tags/${upstream_tag} && \ git fetch origin --depth 1 refs/tags/${upstream_tag}:refs/tags/${upstream_tag} && \
git fetch origin refs/tags/${debian_tag}:refs/tags/${debian_tag} && \ git fetch origin --depth 1 refs/tags/${debian_tag}:refs/tags/${debian_tag} && \
if git show ${debian_tag}:debian | grep -qw gbp.conf; then \ if git show ${debian_tag}:debian | grep -qw gbp.conf; then \
pristine_tar=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/pristine-tar/ {print $2}' | tr '[:upper:]' '[:lower:]' | xargs); \ pristine_tar=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/pristine-tar/ {print $2}' | tr '[:upper:]' '[:lower:]' | xargs); \
if [ "${pristine_tar}" = "true" ]; then \ if [ "${pristine_tar}" = "true" ]; then \
git fetch origin pristine-tar; git branch -t pristine-tar origin/pristine-tar; \ git fetch origin pristine-tar; git branch -t pristine-tar origin/pristine-tar; \
fi; \ fi; \
debian_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/debian-branch/ {print $2}' | xargs) && \ debian_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/debian-branch/ {print $2}' | xargs) && \
if [ -z "${debian_branch}" ]; then \ if [ -z "${debian_branch}" ]; then \
debian_branch="master"; \ debian_branch="master"; \
fi; \ fi; \
upstream_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/upstream-branch/ {print $2}' | xargs) && \ upstream_branch=$(git show ${debian_tag}:debian/gbp.conf | awk -F "=" '/upstream-branch/ {print $2}' | xargs) && \
if [ -z "${upstream_branch}" ]; then \ if [ -z "${upstream_branch}" ]; then \
upstream_branch="upstream"; \ upstream_branch="upstream"; \
fi; \ fi; \
fi && \ fi && \
git checkout -b ${upstream_branch} ${upstream_tag} && \ git checkout -b ${upstream_branch} ${upstream_tag} && \
git checkout -b ${debian_branch} ${debian_tag} && \ git checkout -b ${debian_branch} ${debian_tag} && \
git merge --no-edit ${upstream_tag} && \ mk-build-deps --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' --install debian/control --remove && \
EDITOR=true DEBEMAIL=$(git config user.email) DEBFULLNAME=$(git config user.name) gbp dch -R -N ${NEEDEDVERSION}-1 --commit && \ rm -f $(dpkg-parsechangelog -Ssource)-build-deps_$(dpkg-parsechangelog -Sversion)_*.* && \
mk-build-deps --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' --install debian/control --remove && \ DEB_BUILD_OPTIONS="nocheck" gbp buildpackage -b -us -uc && \
rm -f $(dpkg-parsechangelog -Ssource)-build-deps_$(dpkg-parsechangelog -Sversion)_*.* && \ for p in $(grep -E '^Package:' debian/control | awk '{print $2}'); do \
DEB_BUILD_OPTIONS="nocheck" gbp buildpackage -b -us -uc && \ echo "Package: $p" >> /etc/apt/preferences.d/pin-acrn; \
for p in $(grep -E '^Package:' debian/control | awk '{print $2}'); do \ echo "Pin: release l=acrn-local-build" >> /etc/apt/preferences.d/pin-acrn; \
echo "Package: $p" >> /etc/apt/preferences.d/pin-acrn; \ echo "Pin-Priority: 900" >> /etc/apt/preferences.d/pin-acrn; \
echo "Pin: release l=acrn-local-build" >> /etc/apt/preferences.d/pin-acrn; \ echo "" >> /etc/apt/preferences.d/pin-acrn; \
echo "Pin-Priority: 900" >> /etc/apt/preferences.d/pin-acrn; \ done && \
echo "" >> /etc/apt/preferences.d/pin-acrn; \ cd /usr/src && mv *.deb /opt/apt && \
done && \ cd /opt/apt && apt-ftparchive packages . > Packages && cp .Release.header Release && apt-ftparchive release . >> Release && \
cd /usr/src && mv *.deb /opt/apt && \ apt-get update -y; \
cd /opt/apt && apt-ftparchive packages . > Packages && cp .Release.header Release && apt-ftparchive release . >> Release && \ fi
apt-get update
# acpica-unix >= 20200925 # acpica-unix >= 20200925
RUN NEEDEDVERSION="20200925"; \ RUN NEEDEDVERSION="20200925"; \

View File

@ -24,7 +24,7 @@ fi
# copy all Debian packages in local APT repo and create local APT repository # copy all Debian packages in local APT repo and create local APT repository
export HOME=$(echo ~docker-build) export HOME=$(echo ~docker-build)
sudo -E -u docker-build /bin/bash -c "\ sudo -E -u docker-build /bin/bash -c "\
cd $1 && cp /opt/apt/*.deb . && \ cd $1 && if ls -A /opt/apt/*.deb >/dev/null 2>&1; then cp /opt/apt/*.deb .; fi && \
apt-ftparchive packages . > Packages && \ apt-ftparchive packages . > Packages && \
cp /opt/apt/.Release.header Release && \ cp /opt/apt/.Release.header Release && \
apt-ftparchive release . >> Release" apt-ftparchive release . >> Release"