[Unstable][PATCH 1/2] UBUNTU: [Packaging] Move the ABI files up by one directory level
Juerg Haefliger
juerg.haefliger at canonical.com
Mon May 3 08:47:06 UTC 2021
The current ABI root directory name is <DEBIAN/abi/previous/. This commit
drops the 'previous' path component and moves the ABI up one level. We
still need a temporary directory for downloading the current ABIs which now
has to reside outside of the ABI tree. For that, use <DEBIAN>/__abi.current/
which should clearly indicate that it's a temporary directory.
Signed-off-by: Juerg Haefliger <juergh at canonical.com>
---
debian/rules.d/0-common-vars.mk | 4 ++--
debian/scripts/misc/final-checks | 2 +-
debian/scripts/misc/getabis | 8 ++++----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index c3e417e242e4..d70308bb6737 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -125,8 +125,8 @@ ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
endif
-abidir := $(CURDIR)/$(DEBIAN)/abi/current/$(arch)
-prev_abidir := $(CURDIR)/$(DEBIAN)/abi/previous/$(arch)
+abidir := $(CURDIR)/$(DEBIAN)/__abi.current/$(arch)
+prev_abidir := $(CURDIR)/$(DEBIAN)/abi/$(arch)
commonconfdir := $(CURDIR)/$(DEBIAN)/config
archconfdir := $(CURDIR)/$(DEBIAN)/config/$(arch)
sharedconfdir := $(CURDIR)/debian.master/config
diff --git a/debian/scripts/misc/final-checks b/debian/scripts/misc/final-checks
index a20e0a0f96ff..e7d86a453465 100755
--- a/debian/scripts/misc/final-checks
+++ b/debian/scripts/misc/final-checks
@@ -44,7 +44,7 @@ abi_check()
fi
}
-abi_version="$debian/abi/previous/version"
+abi_version="$debian/abi/version"
if ! [ -f "$abi_version" ]
then
failure "$abi_version ABI version file missing"
diff --git a/debian/scripts/misc/getabis b/debian/scripts/misc/getabis
index b2a5585fb618..ba0af3353741 100755
--- a/debian/scripts/misc/getabis
+++ b/debian/scripts/misc/getabis
@@ -24,7 +24,7 @@ verfull=$ver-$revision
WGET="wget --tries=1 --timeout=10 --quiet -c"
-abidir="`pwd`/$DEBIAN/abi/$verfull"
+abidir="`pwd`/$DEBIAN/__abi.current"
tmpdir="`pwd`/abi-tmp-$verfull"
origdir="`pwd`"
fwinfo=$abidir/fwinfo
@@ -166,6 +166,7 @@ getall_set()
# MAIN
# Setup abi directory
+rm -rf "$abidir"
mkdir -p $abidir
echo $abi > $abidir/abiname
echo $verfull > $abidir/version
@@ -189,12 +190,11 @@ mv fwinfo.tmp $fwinfo
rmdir $tmpdir
# Replace the previous ABI directory with the new one
-abiprevdir="$(pwd)/$DEBIAN/abi/previous"
+abiprevdir="$(pwd)/$DEBIAN/abi"
rm -rf "$abiprevdir"
mv "$abidir" "$abiprevdir"
-# If this is running in a git repo, add the current ABI directory and remove any old ones
+# If this is running in a git repo, add the updated ABI files
if [ -d ".git" ]; then
git add "$abiprevdir"
- find "$DEBIAN"/abi/* -maxdepth 0 -type d | grep -v '/previous$' | while read f; do git rm -rf "$f"; done
fi
--
2.27.0
More information about the kernel-team
mailing list