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:
parent
a19eeb34f1
commit
ad3bde845f
5 changed files with 10 additions and 4 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -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
|
||||
|
|
2
Makefile
2
Makefile
|
@ -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
BIN
crack.bundle
Normal file
Binary file not shown.
2
linux
2
linux
|
@ -1 +1 @@
|
|||
Subproject commit ccdf20483c3f2fe69df1a766752f027e85c7ddc2
|
||||
Subproject commit f40ddce88593482919761f74910f42f4b84c004b
|
|
@ -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."
|
||||
|
|
Loading…
Reference in a new issue