-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests,core-initrd: introduce script to build core-initrd for
just one Ubuntu release.
- Loading branch information
1 parent
b800bb2
commit 9587030
Showing
2 changed files
with
62 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash -ex | ||
|
||
# Builds and installs the ubuntu-core-initramfs package for the Ubuntu | ||
# release running in the system. | ||
build_and_install_initramfs_deb() { | ||
pushd "$PROJECT_PATH"/core-initrd | ||
|
||
# For dpkg-parsechangelog (used by mkversion.sh too) and to have | ||
# the tools needed to build the source package. | ||
quiet eatmydata apt-get install -y dpkg-dev debhelper | ||
codename=$(lsb_release -c -s) | ||
latest=$(dpkg-parsechangelog --file latest/debian/changelog --show-field Distribution) | ||
if [ "$codename" = "$latest" ]; then | ||
rel=latest | ||
else | ||
rel=$(lsb_release -r -s) | ||
fi | ||
|
||
# build source packages using local code | ||
TEST_BUILD=1 ./build-source-pkgs.sh "$rel" | ||
|
||
# build and install binary package | ||
|
||
pushd "$rel" | ||
quiet eatmydata apt-get build-dep -y ./ | ||
dpkg-buildpackage -tc -us -uc | ||
popd | ||
|
||
quiet eatmydata apt-get install -y ./ubuntu-core-initramfs_*.deb | ||
|
||
popd | ||
} |