Skip to content

Commit

Permalink
Speed up build by using gzip instead of xz (#176)
Browse files Browse the repository at this point in the history
Since we're not going to upload the source packages the build process
creates, there's no sense in sacrificing time for better compression
ratios. Instead, we'll use gzip at the default compression value (6),
which is a lot faster and produces files that are 40% larger than what
xz produces. We'll continue to use xz on the binary package files; it's
just the orig.tar.xz (now orig.tar.gz) files where we want to use lower
compression to save time because they're so large.
  • Loading branch information
rmunn authored Dec 9, 2021
1 parent 6b59910 commit a2eae8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions docker/make-source
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ if [ "$(cat debian/source/format)" == "3.0 (native)" ]; then
log "Native package. Building original source package."
# Unfortunately we have to list the files to ignore explicitly and can't use the default
# ignores because we want *.so files in the source package (needed for Mercurial)
TRACE dpkg-source --tar-ignore=*.a --tar-ignore=*.la --tar-ignore=*.o --tar-ignore=.*.sw? \
TRACE dpkg-source -Zgzip -z6 --tar-ignore=*.a --tar-ignore=*.la --tar-ignore=*.o --tar-ignore=.*.sw? \
--tar-ignore=*/*~ --tar-ignore=,,* --tar-ignore=.[#~]* --tar-ignore=.deps \
--tar-ignore=.git --tar-ignore=.gitattributes --tar-ignore=.gitignore \
--tar-ignore=.gitmodules --tar-ignore=.gitreview --tar-ignore=.hg --tar-ignore=.hgignore \
--tar-ignore=.hgsigs --tar-ignore=.hgtags --tar-ignore=.svn --tar-ignore=debian -b .

TRACE mv ../${source_package_name}_${latest_version_in_debian_changelog}.tar.xz ../${source_package_name}_${native_version}.orig.tar.xz
TRACE mv ../${source_package_name}_${latest_version_in_debian_changelog}.tar.gz ../${source_package_name}_${native_version}.orig.tar.gz
TRACE rm ../${source_package_name}_${latest_version_in_debian_changelog}.dsc
echo "3.0 (quilt)" > debian/source/format
debuild_opts="--source-option=--include-binaries --source-option=--tar-ignore"
Expand All @@ -140,7 +140,7 @@ if [ -z "$preserve_changelog_arg" -o -n "${package_version}" ]; then
dch $NEWPACKAGENAME --newversion "${native_version}-1" --force-bad-version --nomultimaint "$changelog_message"
fi

TRACE debuild -S -sa -Zxz -d ${signing_opt} ${debuild_opts}
TRACE debuild -S -sa -Zgzip -z6 -d ${signing_opt} ${debuild_opts}

log "Source package files exist with the following sha256sums:"
if [ -z "$build_in_place" ]; then
Expand Down
8 changes: 3 additions & 5 deletions docker/scripts/build-debpackages-combined.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ echo Should be a directory named "${SOURCE}-${PKGVERSION}"
cd "${SOURCE}-${PKGVERSION}"
# Build package, preserving env vars used in MsBuild packaging
debuild -rfakeroot --preserve-envvar Version --preserve-envvar AssemblyVersion --preserve-envvar FileVersion --preserve-envvar InformationalVersion
# Built packages are placed in parent directory, so move them into finalresults for artifact collection
ls -l *deb || true
ls -l ../*deb || true
cp ../*deb . || true
pwd
# Built packages are placed in parent directory, so now we'll delete the unpacked directory so `docker container cp` doesn't collect it
cd ..
rm -rf "${SOURCE}-${PKGVERSION}"

0 comments on commit a2eae8a

Please sign in to comment.