From 082fc2596b568e0f7a012cf4249bdbad90dbd208 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 11:43:51 +0800 Subject: [PATCH 01/10] Attempted adjustments for 5.7.1 --- platforms/Linux/DEB/Shared/build_deb.sh | 2 +- .../Linux/DEB/Ubuntu/focal/debian/changelog | 6 +++--- .../debian/patches/build-preset-install-dir | 10 +++++----- .../focal/debian/patches/fix-toolchain-path | 20 +++++++++---------- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/platforms/Linux/DEB/Shared/build_deb.sh b/platforms/Linux/DEB/Shared/build_deb.sh index da865eed..52e22bea 100755 --- a/platforms/Linux/DEB/Shared/build_deb.sh +++ b/platforms/Linux/DEB/Shared/build_deb.sh @@ -36,7 +36,7 @@ mk-build-deps --install ${package_dir}/debian/control.in --tool 'apt-get -y -o D # build the installable package # TODO: add signing key information cd ${package_dir} -DEB_BUILD_OPTIONS=parallel=64 debuild +DEB_BUILD_OPTIONS=parallel=64 debuild -sa # copy the final packages to /output cd ${staging_dir} diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/changelog b/platforms/Linux/DEB/Ubuntu/focal/debian/changelog index 8d5d499c..43037f79 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/changelog +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/changelog @@ -1,5 +1,5 @@ -swiftlang (5.6.0-1) focal; urgency=medium +swiftlang (5.7.1-1) focal; urgency=medium - * Debian packaging introduction for Swift 5.6. + * Debian packaging introduction for Swift 5.7.1. - -- Julien Blache Tue, 15 Mar 2022 16:36:34 -0700 + -- Julien Blache Tue, 15 Mar 2022 16:36:34 -0700 diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir index a262cc95..b9523453 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir @@ -3,16 +3,16 @@ Description: Make target installation directory a command line option time on the command line. Author: Julien Blache -Index: swiftlang-5.6.3/swift/utils/build-presets.ini +Index: swiftlang-5.7.1/swift/utils/build-presets.ini =================================================================== ---- swiftlang-5.6.3.orig/swift/utils/build-presets.ini -+++ swiftlang-5.6.3/swift/utils/build-presets.ini -@@ -831,7 +831,7 @@ install-swiftpm +--- swiftlang-5.7.1.orig/swift/utils/build-presets.ini ++++ swiftlang-5.7.1/swift/utils/build-presets.ini +@@ -824,7 +824,7 @@ install-swiftpm install-swift-driver install-xctest install-libicu -install-prefix=/usr +install-prefix=%(install_prefix)s - install-libcxx install-sourcekit-lsp install-swiftdocc + build-swift-static-stdlib diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/fix-toolchain-path b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/fix-toolchain-path index 82a49415..6ad3d1ef 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/fix-toolchain-path +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/fix-toolchain-path @@ -3,11 +3,11 @@ Description: Fix toolchain path for build-script-helper.py assumption that /usr is used. Author: Julien Blache -Index: swiftlang-5.6.3/swift/benchmark/scripts/build_script_helper.py +Index: swiftlang-5.7.1/swift/benchmark/scripts/build_script_helper.py =================================================================== ---- swiftlang-5.6.3.orig/swift/benchmark/scripts/build_script_helper.py -+++ swiftlang-5.6.3/swift/benchmark/scripts/build_script_helper.py -@@ -53,7 +53,7 @@ def main(): +--- swiftlang-5.7.1.orig/swift/benchmark/scripts/build_script_helper.py ++++ swiftlang-5.7.1/swift/benchmark/scripts/build_script_helper.py +@@ -51,7 +51,7 @@ def main(): if not os.path.isdir(bin_dir): os.makedirs(bin_dir) @@ -16,11 +16,11 @@ Index: swiftlang-5.6.3/swift/benchmark/scripts/build_script_helper.py perform_build(args, swiftbuild_path, "debug", "Benchmark_Onone", "-Onone") perform_build(args, swiftbuild_path, "release", "Benchmark_Osize", "-Osize") perform_build(args, swiftbuild_path, "release", "Benchmark_O", "-O") -Index: swiftlang-5.6.3/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py +Index: swiftlang-5.7.1/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py =================================================================== ---- swiftlang-5.6.3.orig/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py -+++ swiftlang-5.6.3/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py -@@ -100,13 +100,17 @@ class Benchmarks(product.Product): +--- swiftlang-5.7.1.orig/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py ++++ swiftlang-5.7.1/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py +@@ -100,11 +100,17 @@ class Benchmarks(product.Product): def _get_toolchain_path(host_target, product, args): @@ -28,9 +28,7 @@ Index: swiftlang-5.6.3/swift/utils/swift_build_support/swift_build_support/produ # this logic initially was inside run_build_script_helper # and was factored out so it can be used in testing as well -- toolchain_path = swiftpm.SwiftPM.get_install_destdir(args, -- host_target, -- product.build_dir) +- toolchain_path = product.host_install_destdir(host_target) + install_destdir = args.install_destdir + if swiftpm.SwiftPM.has_cross_compile_hosts(args): + install_destdir = swiftpm.SwiftPM.get_install_destdir(args, From 1e176da33410f7cf205931cfbbaa1b4567383b37 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 15:20:11 +0800 Subject: [PATCH 02/10] Add --skip-early-swift-driver --- platforms/Linux/DEB/Ubuntu/focal/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/rules b/platforms/Linux/DEB/Ubuntu/focal/debian/rules index f30714ec..9bae7065 100755 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/rules +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/rules @@ -68,7 +68,7 @@ override_dh_dwz: # need to investigate whether or not it is suitable for us. override_dh_auto_build: - swift/utils/build-script $(BUILD_SCRIPT_ARGS) --preset=buildbot_linux,no_assertions,no_test \ + swift/utils/build-script $(BUILD_SCRIPT_ARGS) --skip-early-swift-driver --preset=buildbot_linux,no_assertions,no_test \ install_prefix=/opt/swift/$(SWIFTLANG_PKG_VER) \ install_destdir=$(SWIFT_BUILDDIR)/discard \ installable_package=$(SWIFT_BUILDDIR)/swiftdeb-$(SWIFTLANG_PKG_VER).tar.gz From b5756640c602a7ff60a79817ced2c8ac353aa9eb Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 09:51:45 +0200 Subject: [PATCH 03/10] Add skip-early-swift-driver --- .../DEB/Ubuntu/focal/debian/patches/build-preset-install-dir | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir index b9523453..cd3ef0ec 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir @@ -13,6 +13,7 @@ Index: swiftlang-5.7.1/swift/utils/build-presets.ini install-libicu -install-prefix=/usr +install-prefix=%(install_prefix)s ++skip-early-swift-driver install-sourcekit-lsp install-swiftdocc build-swift-static-stdlib From 7078d36b1cade7672ed4aa71105f0730c2f67dc2 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 09:53:26 +0200 Subject: [PATCH 04/10] Fixing up changelog (need to add the original entry back as well) --- platforms/Linux/DEB/Ubuntu/focal/debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/changelog b/platforms/Linux/DEB/Ubuntu/focal/debian/changelog index 43037f79..e6ca615f 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/changelog +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/changelog @@ -1,5 +1,5 @@ swiftlang (5.7.1-1) focal; urgency=medium - * Debian packaging introduction for Swift 5.7.1. + * Debian packaging updated for Swift 5.7.1. - -- Julien Blache Tue, 15 Mar 2022 16:36:34 -0700 + -- Matias Piipari Tue, 15 Mar 2022 16:36:34 -0700 From 3d3436c69506bfece43f6ee16a87887636512b48 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 09:54:23 +0200 Subject: [PATCH 05/10] Changelog entry tweaks --- platforms/Linux/DEB/Ubuntu/focal/debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/changelog b/platforms/Linux/DEB/Ubuntu/focal/debian/changelog index e6ca615f..aea28e03 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/changelog +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/changelog @@ -2,4 +2,4 @@ swiftlang (5.7.1-1) focal; urgency=medium * Debian packaging updated for Swift 5.7.1. - -- Matias Piipari Tue, 15 Mar 2022 16:36:34 -0700 + -- Matias Piipari Tue, 6 Dec 2022 15:53:00 +000 From 7ab16a8e482c275d2a3fc665745b8027e7d58bb3 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 09:56:40 +0200 Subject: [PATCH 06/10] Drops the --skip-early-swift-driver option --- platforms/Linux/DEB/Ubuntu/focal/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/rules b/platforms/Linux/DEB/Ubuntu/focal/debian/rules index 9bae7065..f30714ec 100755 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/rules +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/rules @@ -68,7 +68,7 @@ override_dh_dwz: # need to investigate whether or not it is suitable for us. override_dh_auto_build: - swift/utils/build-script $(BUILD_SCRIPT_ARGS) --skip-early-swift-driver --preset=buildbot_linux,no_assertions,no_test \ + swift/utils/build-script $(BUILD_SCRIPT_ARGS) --preset=buildbot_linux,no_assertions,no_test \ install_prefix=/opt/swift/$(SWIFTLANG_PKG_VER) \ install_destdir=$(SWIFT_BUILDDIR)/discard \ installable_package=$(SWIFT_BUILDDIR)/swiftdeb-$(SWIFTLANG_PKG_VER).tar.gz From 2bb48e4492880e4c195b38bad3c25bf571fbec57 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 10:03:21 +0200 Subject: [PATCH 07/10] Correction to the build preset patch --- .../DEB/Ubuntu/focal/debian/patches/build-preset-install-dir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir index cd3ef0ec..ed832c69 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir @@ -7,7 +7,7 @@ Index: swiftlang-5.7.1/swift/utils/build-presets.ini =================================================================== --- swiftlang-5.7.1.orig/swift/utils/build-presets.ini +++ swiftlang-5.7.1/swift/utils/build-presets.ini -@@ -824,7 +824,7 @@ install-swiftpm +@@ -824,7 +824,8 @@ install-swiftpm install-swift-driver install-xctest install-libicu From 6813bf424bdb90847e90cb638ee3afc93fe9fb9c Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 14:40:51 +0200 Subject: [PATCH 08/10] Adds skip-build-benchmarks as an attempt of avoiding a build failure. Adjusts yams_version to 5.0.1 which it appears to be at 5.7.1-RELEASE --- platforms/Linux/DEB/Shared/versions.sh | 2 +- .../DEB/Ubuntu/focal/debian/patches/build-preset-install-dir | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/platforms/Linux/DEB/Shared/versions.sh b/platforms/Linux/DEB/Shared/versions.sh index 89ea0aab..3dbbe87f 100644 --- a/platforms/Linux/DEB/Shared/versions.sh +++ b/platforms/Linux/DEB/Shared/versions.sh @@ -4,7 +4,7 @@ debversion=5.7.1 swift_version=5.7.1-RELEASE icu_version=65-1 -yams_version=4.0.2 +yams_version=5.0.1 swift_argument_parser_version=1.0.3 swift_crypto_version=1.1.5 ninja_version=1.10.2 diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir index ed832c69..69d5a766 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir @@ -7,13 +7,14 @@ Index: swiftlang-5.7.1/swift/utils/build-presets.ini =================================================================== --- swiftlang-5.7.1.orig/swift/utils/build-presets.ini +++ swiftlang-5.7.1/swift/utils/build-presets.ini -@@ -824,7 +824,8 @@ install-swiftpm +@@ -824,7 +824,9 @@ install-swiftpm install-swift-driver install-xctest install-libicu -install-prefix=/usr +install-prefix=%(install_prefix)s +skip-early-swift-driver ++skip-build-benchmarks install-sourcekit-lsp install-swiftdocc build-swift-static-stdlib From 0269dfd6413e6ae77a163a9af3fc3239a3a00d55 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Tue, 6 Dec 2022 15:07:01 +0200 Subject: [PATCH 09/10] Drop the -sa --- platforms/Linux/DEB/Shared/build_deb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/Linux/DEB/Shared/build_deb.sh b/platforms/Linux/DEB/Shared/build_deb.sh index 52e22bea..da865eed 100755 --- a/platforms/Linux/DEB/Shared/build_deb.sh +++ b/platforms/Linux/DEB/Shared/build_deb.sh @@ -36,7 +36,7 @@ mk-build-deps --install ${package_dir}/debian/control.in --tool 'apt-get -y -o D # build the installable package # TODO: add signing key information cd ${package_dir} -DEB_BUILD_OPTIONS=parallel=64 debuild -sa +DEB_BUILD_OPTIONS=parallel=64 debuild # copy the final packages to /output cd ${staging_dir} From 696c47ebba21adc914a9313f5433b9947747c0d0 Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Sat, 17 Dec 2022 12:39:32 +0200 Subject: [PATCH 10/10] Removes the toolchain-benchmarks from the preset --- .../focal/debian/patches/build-preset-install-dir | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir index 69d5a766..51796c7b 100644 --- a/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir +++ b/platforms/Linux/DEB/Ubuntu/focal/debian/patches/build-preset-install-dir @@ -15,6 +15,16 @@ Index: swiftlang-5.7.1/swift/utils/build-presets.ini +install-prefix=%(install_prefix)s +skip-early-swift-driver +skip-build-benchmarks ++skip-test-toolchain-benchmarks install-sourcekit-lsp install-swiftdocc build-swift-static-stdlib +@@ -837,7 +840,6 @@ build-swift-stdlib-unittest-extra + test-installable-package + + # Build the benchmarks against the toolchain. +-toolchain-benchmarks + + # Path to the root of the installation filesystem. + install-destdir=%(install_destdir)s +