aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/agent/agent.cxx5
-rw-r--r--bbot/agent/http-service.cxx31
-rw-r--r--bbot/machine-manifest.hxx32
-rw-r--r--bbot/machine-manifest.test.testscript9
-rw-r--r--bbot/worker/worker.cxx61
-rw-r--r--doc/manual.cli16
-rw-r--r--tests/integration/testscript20
7 files changed, 105 insertions, 69 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index 0b57208..b6f1783 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -1117,7 +1117,10 @@ enumerate_machines (const dir_path& machines)
machine_type::kvm,
string ("de:ad:be:ef:de:ad"),
nullopt,
- strings ()},
+ strings (),
+ nullopt,
+ nullopt,
+ nullopt},
toolchain_manifest {tc_id},
bootstrap_manifest {}}});
diff --git a/bbot/agent/http-service.cxx b/bbot/agent/http-service.cxx
index 1921edc..3214885 100644
--- a/bbot/agent/http-service.cxx
+++ b/bbot/agent/http-service.cxx
@@ -4,6 +4,7 @@
#include <bbot/agent/http-service.hxx>
#include <libbutl/curl.hxx>
+#include <libbutl/semantic-version.hxx>
#include <bbot/diagnostics.hxx>
@@ -14,6 +15,8 @@ namespace bbot
{
namespace http_service
{
+ static optional<semantic_version> curl_version;
+
result
post (const agent_options& o, const string& u, const parameters& params)
{
@@ -77,6 +80,17 @@ namespace bbot
p.name + '=' + p.value);
}
+ // Query the curl's version, if not done yet. If something goes wrong,
+ // set the version to 0.0.0 so that we treat it as a really old curl.
+ //
+ if (!curl_version)
+ {
+ if (optional<semantic_version> v = curl::version (path ("curl")))
+ curl_version = move (*v);
+ else
+ curl_version = semantic_version {0, 0, 0};
+ }
+
// Note that we prefer the low-level process API for running curl over
// using butl::curl because in this context it is restrictive and
// inconvenient.
@@ -110,6 +124,23 @@ namespace bbot
//
"--include",
+ // Note that in the presence of the
+ // --include|-i option, the output may
+ // include the CONNECT request response
+ // headers if curl tunnels through a
+ // proxy. To suppress these headers we
+ // also add the
+ // --suppress-connect-headers option for
+ // the curl versions 7.54.0 (when the
+ // option was invented) and above. For
+ // the earlier versions we just don't
+ // support the tunneling.
+ //
+ (*curl_version >=
+ semantic_version {7, 54, 0}
+ ? "--suppress-connect-headers"
+ : nullptr),
+
"--max-time", o.request_timeout (),
"--connect-timeout", o.connect_timeout (),
fos,
diff --git a/bbot/machine-manifest.hxx b/bbot/machine-manifest.hxx
index d500957..b488425 100644
--- a/bbot/machine-manifest.hxx
+++ b/bbot/machine-manifest.hxx
@@ -40,26 +40,26 @@ namespace bbot
strings
unquoted_options () const; // Return empty if absent.
- machine_manifest (std::string i,
- std::string n,
- std::string s,
+ machine_manifest (string i,
+ string n,
+ string s,
machine_type t,
optional<string> m,
optional<strings> o,
- strings c)
- : machine_header_manifest (std::move (i),
- std::move (n),
- std::move (s),
- //
- // @@ TMP AUXILIARY
- //
- nullopt /* role */,
- nullopt /* ram_minimum */,
- nullopt /* ram_maximum */),
+ strings c,
+ optional<machine_role> r,
+ optional<uint64_t> rmn,
+ optional<uint64_t> rmx)
+ : machine_header_manifest (move (i),
+ move (n),
+ move (s),
+ r,
+ rmn,
+ rmx),
type (t),
- mac (std::move (m)),
- options (std::move (o)),
- changes (std::move (c)) {}
+ mac (move (m)),
+ options (move (o)),
+ changes (move (c)) {}
public:
machine_manifest () = default;
diff --git a/bbot/machine-manifest.test.testscript b/bbot/machine-manifest.test.testscript
index e358ff3..f6a2eae 100644
--- a/bbot/machine-manifest.test.testscript
+++ b/bbot/machine-manifest.test.testscript
@@ -19,7 +19,8 @@
type: kvm
mac: de:ad:be:ef:de:ad
options: -device "virtio-scsi-pci,id=scsi" -device "scsi-hd,drive=disk0"
- changes:\
+ changes:
+ \
0.7.0
- mac is changed to de:ad:be:ef:de:ad
- increased disk size to 30GB
@@ -34,7 +35,8 @@
name: windows_10-msvc_14
summary: Windows 10 build 1607 with VC 14 update 3
type: kvm
- options:\
+ options:
+ \
-device "virtio-scsi-pci,id=scsi"
-device "scsi-hd,drive=disk0"
\
@@ -331,7 +333,8 @@
ram-minimum: 1048576
type: kvm
mac: e6:38:72:53:61:ae
- changes:\
+ changes:
+ \
1.0
- clone off linux_debian_12-small-1.0
- postgresql-15 15.6.0+deb12u1
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 8fb7796..b019337 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -2402,8 +2402,7 @@ build (size_t argc, const char* argv[])
// Configure.
//
{
- operation_result* pr (&add_result ("configure"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("configure"));
// If we have auxiliary environment, show it in the logs.
//
@@ -2549,7 +2548,7 @@ build (size_t argc, const char* argv[])
}
else
{
- // b create(<dir>) config.config.load=~host
+ // b create(<dir>) config.config.load=~host-no-warnings
//
// Note also that we suppress warnings about unused config.* values.
//
@@ -2559,7 +2558,7 @@ build (size_t argc, const char* argv[])
bkp_step, bkp_status, aux_env, last_cmd,
"-V",
"create(" + host_conf.representation () + ",cc)",
- "config.config.load=~host",
+ "config.config.load=~host-no-warnings",
"config.config.persist+='config.*'@unused=drop");
if (!r.status)
@@ -2592,9 +2591,14 @@ build (size_t argc, const char* argv[])
// Create the module configuration.
//
{
- // b create(<dir>) config.config.load=~build2 [<env-config-args>
- // <tgt-config-args>
- // <pkg-config-args>]
+ // b create(<dir>) config.config.load=~build2[-no-warnings]
+ // [<env-config-args>
+ // <tgt-config-args>
+ // <pkg-config-args>]
+ //
+ // If the main package is not a build system module or the
+ // configuration is not self-hosted, then we load the
+ // ~build2-no-warnings configuration rather than ~build2.
//
// Note also that we suppress warnings about unused config.* values.
//
@@ -2634,7 +2638,9 @@ build (size_t argc, const char* argv[])
bkp_step, bkp_status, aux_env, last_cmd,
"-V",
"create(" + module_conf.representation () + ',' + mods + ')',
- "config.config.load=~build2",
+ (module_pkg && selfhost
+ ? "config.config.load=~build2"
+ : "config.config.load=~build2-no-warnings"),
"config.config.persist+='config.*'@unused=drop",
eas,
cas,
@@ -2675,9 +2681,9 @@ build (size_t argc, const char* argv[])
mods += m;
}
- // b create(<dir>) config.config.load=~build2 [<env-config-args>
- // <tgt-config-args>
- // <pkg-config-args>]
+ // b create(<dir>) config.config.load=~build2 <env-config-args>
+ // <tgt-config-args>
+ // <pkg-config-args>
//
r.status |= run_b (
b,
@@ -3551,8 +3557,7 @@ build (size_t argc, const char* argv[])
// Update the main package.
//
{
- operation_result* pr (&add_result ("update"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("update"));
change_wd (trace, &r.log, rwd / main_pkg_conf);
@@ -3759,8 +3764,7 @@ build (size_t argc, const char* argv[])
if (has_internal_tests || has_runtime_tests || has_buildtime_tests)
{
- operation_result* pr (&add_result ("test"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("test"));
// Run internal tests.
//
@@ -3887,8 +3891,7 @@ build (size_t argc, const char* argv[])
//
if (install_root)
{
- operation_result* pr (&add_result ("install"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("install"));
change_wd (trace, &r.log, effective_install_conf);
@@ -4022,8 +4025,7 @@ build (size_t argc, const char* argv[])
if (bindist)
{
- operation_result* pr (&add_result ("bindist"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("bindist"));
// Fail if the breakpoint refers to a bpkg.bindist.* step but this
// step differs from the enabled one.
@@ -4335,8 +4337,7 @@ build (size_t argc, const char* argv[])
//
if (sys_install)
{
- operation_result* pr (&add_result ("sys-install"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("sys-install"));
// Fail if the breakpoint refers to the bbot.sys-install step since
// it has no specific command associated.
@@ -4660,8 +4661,7 @@ build (size_t argc, const char* argv[])
if (has_internal_tests || has_runtime_tests || has_buildtime_tests)
{
- operation_result* pr (&add_result ("test-installed"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("test-installed"));
change_wd (trace, &r.log, rwd);
@@ -4972,7 +4972,7 @@ build (size_t argc, const char* argv[])
//
if (create_module)
{
- // b create(<dir>) config.config.load=~build2
+ // b create(<dir>) config.config.load=~build2-no-warnings
//
step_id b (step_id::bpkg_test_separate_installed_create);
@@ -4982,7 +4982,7 @@ build (size_t argc, const char* argv[])
bkp_step, bkp_status, aux_env, last_cmd,
"-V",
"create(" + module_conf.representation () + ",cc)",
- "config.config.load=~build2",
+ "config.config.load=~build2-no-warnings",
"config.config.persist+='config.*'@unused=drop");
if (!r.status)
@@ -5456,8 +5456,7 @@ build (size_t argc, const char* argv[])
(*bindist == step_id::bpkg_bindist_debian ||
*bindist == step_id::bpkg_bindist_fedora))
{
- operation_result* pr (&add_result ("sys-uninstall"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("sys-uninstall"));
// Noop, just for the log record.
//
@@ -5578,8 +5577,7 @@ build (size_t argc, const char* argv[])
//
if (install_root)
{
- operation_result* pr (&add_result ("uninstall"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("uninstall"));
change_wd (trace, &r.log, effective_install_conf);
@@ -5637,8 +5635,7 @@ build (size_t argc, const char* argv[])
if (bindist_upload)
{
- operation_result* pr (&add_result ("upload"));
- operation_result& r (*pr); // @@ TMP: Apple Clang 14.0.3 ICE
+ operation_result& r (add_result ("upload"));
change_wd (trace, &r.log, rwd);
@@ -5851,8 +5848,6 @@ build (size_t argc, const char* argv[])
// artifacts preparation for upload, then use this log to report the
// error. Otherwise, add the new log for that.
//
- // @@ TMP: Apple Clang 14.0.3 ICE
- //
operation_result* pr (&rm.results.back ());
if (pr->operation != "upload")
diff --git a/doc/manual.cli b/doc/manual.cli
index 2fa3248..64f2179 100644
--- a/doc/manual.cli
+++ b/doc/manual.cli
@@ -1505,7 +1505,7 @@ Worker script for \c{host} packages:
{
# [bpkg.create]
#
- b -V create(<host-conf>, cc) config.config.load=~host
+ b -V create(<host-conf>, cc) config.config.load=~host-no-warnings
bpkg -v create --existing --type host -d <host-conf>
}
@@ -1549,7 +1549,7 @@ bpkg -v fetch -d <host-conf> --trust <repository-fp>
# [bpkg.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) config.config.load=~build2-no-warnings
bpkg -v create --existing --type build2 -d <module-conf>
# [bpkg.link]
@@ -1801,7 +1801,9 @@ bpkg -v update -d <host-conf> <package-name>
# [bpkg.test-separate-installed.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) \\
+ config.config.load=~build2-no-warnings
+
bpkg -v create --existing --type build2 -d <module-conf>
# [bpkg.test-separate-installed.link]
@@ -1934,7 +1936,7 @@ Worker script for \c{module} packages:
{
# [bpkg.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) config.config.load=~build2-no-warnings
bpkg -v create --existing --type build2 -d <module-conf>
}
@@ -1976,7 +1978,7 @@ bpkg -v fetch -d <module-conf> --trust <repository-fp>
# [bpkg.create]
#
- b -V create(<host-conf>, cc) config.config.load=~host
+ b -V create(<host-conf>, cc) config.config.load=~host-no-warnings
bpkg -v create --existing --type host -d <host-conf>
# [bpkg.link]
@@ -2146,7 +2148,9 @@ bpkg -v update -d <module-conf> <package-name>
{
# [bpkg.test-separate-installed.create]
#
- b -V create(<module-conf>, cc) config.config.load=~build2
+ b -V create(<module-conf>, cc) \\
+ config.config.load=~build2-no-warnings
+
bpkg -v create --existing --type build2 -d <module-conf>
# bpkg.test-separate-installed.create (
diff --git a/tests/integration/testscript b/tests/integration/testscript
index 988859f..2dcd849 100644
--- a/tests/integration/testscript
+++ b/tests/integration/testscript
@@ -64,7 +64,7 @@ b.test-installed.configure:\"config.cc.loptions=-L'$~/install/lib'\" \
bpkg.test-separate-installed.create:\"config.cc.loptions=-L'$~/install/lib'\""
pkg = libhello
-ver = 1.0.0+11
+ver = 1.0.0+12
#rep_url = "https://git.build2.org/hello/libhello.git#1.0"
#rep_type = git
rep_url = https://stage.build2.org/1
@@ -153,14 +153,14 @@ rfp = yes
#
#\
pkg = libbuild2-hello
-ver = 0.1.0
+ver = 0.2.0
rep_url = "https://github.com/build2/libbuild2-hello.git#master"
rep_type = git
#rep_url = https://stage.build2.org/1
#rep_type = pkg
rfp = yes
-tests="tests: * libbuild2-hello-tests == $ver"
-host='host: true'
+tests = "tests: * libbuild2-hello-tests == $ver"
+host = 'host: true'
#\
#package_config = 'package-config: -bpkg.install:'
#\
@@ -175,7 +175,7 @@ bpkg.module.create:config.bin.rpath=[null]
#
#\
pkg = libbuild2-kconfig
-ver = 0.3.0-a.0.20221118053819.f702eb65da87
+ver = 0.3.0
rep_url = "https://github.com/build2/libbuild2-kconfig.git#master"
rep_type = git
#ver = 0.1.0-a.0.20200910053253.a71aa3f3938b
@@ -409,7 +409,7 @@ rfp = yes
#\
pkg = libodb-sqlite
ver = 2.5.0-b.26.20240131175206.1c7f67f47770
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=sqlite'
@@ -424,7 +424,7 @@ package_config = 'package-config:
#\
pkg = libodb-pgsql
ver = 2.5.0-b.26.20240131175206.1c7f67f47770
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
tests="tests: odb-tests == $ver"' ? (!$defined(config.odb_tests.database)) config.odb_tests.database=pgsql'
@@ -439,7 +439,7 @@ package_config = 'package-config:
#\
pkg = odb-tests
ver = 2.5.0-b.26.20240131175206.1c7f67f47770
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
#\
@@ -453,7 +453,7 @@ config.odb_tests.database="sqlite pgsql"
#\
pkg = libodb-oracle
ver = 2.5.0-b.26.20240201133448.3fa01c83a095
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
package_config = 'package-config:
@@ -465,7 +465,7 @@ config.cc.poptions+=-I/usr/include/oracle/12.2/client64 config.cc.loptions+=-L/u
#\
pkg = libodb-qt
ver = 2.5.0-b.26.20240201180613.633ad7ccad39
-rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git#multi-package"
+rep_url = "https://git.codesynthesis.com/var/scm/odb/odb.git"
rep_type = git
rfp = yes
#\