Use Git bundle from Ubuntu Mainline for better performance

This change updates the build scripts to use the Linux stable repository
as submodule and use a Git bundle provided by Ubuntu mainline crack for
the Ubuntu specific changes.
This commit is contained in:
Fabian Mastenbroek 2021-03-27 16:07:46 +01:00
parent a19eeb34f1
commit ad3bde845f
No known key found for this signature in database
GPG key ID: 405FC6F81F0A7B85
5 changed files with 10 additions and 4 deletions

2
.gitmodules vendored
View file

@ -4,5 +4,5 @@
[submodule "linux"]
path = linux
url = git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
url = git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
shallow = true

View file

@ -98,6 +98,8 @@ endif
PVE_PATCHES=$(wildcard patches/pve/*.patch)
${KERNEL_SRC}.prepared: ${KERNEL_SRC_SUBMODULE}
git -C ${KERNEL_SRC} fetch ../crack.bundle $$(git -C ${KERNEL_SRC} ls-remote ../crack.bundle | cut -f1)
git -C ${KERNEL_SRC} checkout -f FETCH_HEAD
rm -rf ${BUILD_DIR}/${KERNEL_SRC} $@
mkdir -p ${BUILD_DIR}
cp -a ${KERNEL_SRC_SUBMODULE} ${BUILD_DIR}/${KERNEL_SRC}

BIN
crack.bundle Normal file

Binary file not shown.

2
linux

@ -1 +1 @@
Subproject commit ccdf20483c3f2fe69df1a766752f027e85c7ddc2
Subproject commit f40ddce88593482919761f74910f42f4b84c004b

View file

@ -4,6 +4,7 @@ set -e
set -o pipefail
LINUX_REPOSITORY=linux
LINUX_VERSION_PREVIOUS=$(scripts/version.sh -L)
while getopts "R:t:v:r:h" OPTION; do
case $OPTION in
@ -43,7 +44,7 @@ git --git-dir $LINUX_REPOSITORY/.git checkout FETCH_HEAD
if [[ -z "$LINUX_VERSION" ]]; then
# Parse the Linux version from the Linux repository if it not provided by the user
LINUX_VERSION=$(dpkg-parsechangelog -l $LINUX_REPOSITORY/debian.master/changelog --show-field Version | sed -n "s/^\([0-9.]*\).*$/\1/p")
LINUX_VERSION=$(scripts/version.sh -L)
fi
echo "Using Linux $LINUX_VERSION."
@ -61,7 +62,7 @@ LINUX_PACKAGE_RELEASE_PREVIOUS=$(scripts/version.sh -r)
# Check whether we need to increment the package release
if [[ -n $LINUX_PACKAGE_RELEASE ]]; then
echo "Using custom package release $LINUX_PACKAGE_RELEASE"
elif [[ $LINUX_VERSION == "$(scripts/version.sh -L)" ]]; then
elif [[ $LINUX_VERSION == "$LINUX_VERSION_PREVIOUS" ]]; then
LINUX_PACKAGE_RELEASE=$((LINUX_PACKAGE_RELEASE_PREVIOUS + 1))
echo "Incrementing package release to $LINUX_PACKAGE_RELEASE"
else
@ -69,6 +70,9 @@ else
echo "New package release"
fi
echo "Updating crack.bundle..."
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v$LINUX_VERSION/crack.bundle -O crack.bundle
echo "Generating entry for change log..."
# Generate a changelog entry
debchange -v $LINUX_VERSION-$LINUX_PACKAGE_RELEASE -D edge --force-distribution -U -M "Update to Linux $LINUX_VERSION."