summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-format125
-rw-r--r--.gitattributes19
-rw-r--r--AUTHORS7
-rw-r--r--CONTRIBUTING.md16
-rw-r--r--COPYRIGHT11
-rw-r--r--LICENSE33
-rwxr-xr-xbootstrap484
-rw-r--r--doc/bash-style.cli461
-rw-r--r--doc/build2-cxx-style.txt (renamed from doc/cxx-style.txt)0
-rwxr-xr-xdoc/cli.sh2
-rw-r--r--doc/release.cli274
m---------doc/style0
-rw-r--r--git/modules82
-rwxr-xr-xintro5
-rwxr-xr-xintro2-tldr23
-rw-r--r--intro2-tldr.orig49
-rwxr-xr-xintro2-tour142
-rw-r--r--intro2-tour.orig772
-rwxr-xr-xreview4
-rwxr-xr-xstage88
-rwxr-xr-xstage-pkg147
-rwxr-xr-xstage-queue87
-rwxr-xr-xupgrade179
-rwxr-xr-xversion54
24 files changed, 2349 insertions, 715 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..62c95e0
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,125 @@
+---
+Language: Cpp
+# BasedOnStyle: LLVM
+AccessModifierOffset: -2
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Right
+AlignOperands: true
+AlignTrailingComments: true
+AllowAllArgumentsOnNextLine: false
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: Empty
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: All
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: MultiLine
+BinPackArguments: false
+BinPackParameters: false
+BraceWrapping:
+ AfterClass: true
+ AfterControlStatement: true
+ AfterEnum: true
+ AfterFunction: true
+ AfterNamespace: true
+ AfterObjCDeclaration: true
+ AfterStruct: true
+ AfterUnion: true
+ AfterExternBlock: true
+ BeforeCatch: true
+ BeforeElse: true
+ IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+ BeforeLambdaBody: true
+BreakBeforeBinaryOperators: None
+# BreakBeforeBraces: Allman
+BreakBeforeBraces: Custom
+BreakBeforeInheritanceComma: false
+BreakInheritanceList: BeforeColon
+BreakBeforeTernaryOperators: true
+BreakConstructorInitializersBeforeComma: false
+BreakConstructorInitializers: BeforeColon
+BreakAfterJavaFieldAnnotations: false
+BreakStringLiterals: true
+ColumnLimit: 78
+CommentPragmas: '^ IWYU pragma:'
+CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: false
+ForEachMacros:
+ - foreach
+ - Q_FOREACH
+ - BOOST_FOREACH
+IncludeBlocks: Preserve
+IncludeCategories:
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ Priority: 2
+ - Regex: '^(<|"(gtest|gmock|isl|json)/)'
+ Priority: 3
+ - Regex: '.*'
+ Priority: 1
+IncludeIsMainRegex: '(Test)?$'
+IndentCaseLabels: false
+IndentCaseBlocks: true
+IndentPPDirectives: None
+IndentWidth: 2
+IndentWrappedFunctionNames: false
+JavaScriptQuotes: Leave
+JavaScriptWrapImports: true
+KeepEmptyLinesAtTheStartOfBlocks: true
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: All
+ObjCBinPackProtocolList: Auto
+ObjCBlockIndentWidth: 2
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakAssignment: 2
+PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyBreakTemplateDeclaration: 10
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 60
+PointerAlignment: Left
+ReflowComments: true
+SortIncludes: false
+SortUsingDeclarations: true
+SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCpp11BracedList: true
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: false
+SpaceBeforeParens: Always
+SpaceBeforeRangeBasedForLoopColon: false
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: Cpp11
+StatementMacros:
+ - Q_UNUSED
+ - QT_REQUIRE_VERSION
+TabWidth: 8
+UseTab: Never
+...
+
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9fce1b0
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,19 @@
+# This is a good default: files that are auto-detected by git to be text are
+# converted to the platform-native line ending (LF on Unix, CRLF on Windows)
+# in the working tree and to LF in the repository.
+#
+* text=auto
+
+# Use `eol=crlf` for files that should have the CRLF line ending both in the
+# working tree (even on Unix) and in the repository.
+#
+#*.bat text eol=crlf
+
+# Use `eol=lf` for files that should have the LF line ending both in the
+# working tree (even on Windows) in the repository.
+#
+#*.sh text eol=lf
+
+# Use `binary` to make sure certain files are never auto-detected as text.
+#
+#*.png binary
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..9780708
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+This file contains information about the build2 authors for copyright
+purposes.
+
+The copyright for the code is held by the contributors of the code. The
+revision history in the version control system is the primary source of
+authorship information for copyright purposes. Contributors that have
+requested to also be noted explicitly in this file are listed below:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..6bfc34f
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,16 @@
+This project is part of the `build2` toolchain; see its
+[Community](https://build2.org/community.xhtml) page for various ways to
+contribute.
+
+The copyright for the code is held by the contributors of the code (see the
+`AUTHORS` file). The code is licensed under permissive open source licensing
+terms (see the `LICENSE` file). When you contribute code to this project, you
+license it under these terms. Before contributing please make sure that these
+terms are acceptable to you (and to your employer(s), if they have rights to
+intellectual property that you create) and that the code being contributed is
+your original creation.
+
+The revision history in the version control system is the primary source of
+authorship information for copyright purposes. If, however, you would like
+to also be noted explicitly, please include the appropriate change to the
+`AUTHORS` file along with your contribution.
diff --git a/COPYRIGHT b/COPYRIGHT
deleted file mode 100644
index eec7815..0000000
--- a/COPYRIGHT
+++ /dev/null
@@ -1,11 +0,0 @@
-Copyright (c) 2014-2020 Code Synthesis Ltd and the build2 contributors.
-
-For the full list of contributors, see the revision history in version control
-system.
-
-The copyright for the code is held by the contributors of the code. The code
-is licensed under permissive open source licensing terms (see the accompanying
-LICENSE file). When you contribute code to this project, you license it under
-these terms. Before contributing please make sure these terms are acceptable
-to you (or the organization that employs you) and that you are the author of
-the code being contributed.
diff --git a/LICENSE b/LICENSE
index 6ab7903..da8df38 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,22 +1,21 @@
MIT License
-See the accompanying COPYRIGHT file for the copyright information.
+Copyright (c) 2014-2023 the build2 authors (see the AUTHORS file).
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/bootstrap b/bootstrap
new file mode 100755
index 0000000..16aa666
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,484 @@
+#! /usr/bin/env bash
+
+# @@ Do we really want to require PDF doc generation? This will unlikely
+# work anywhere except Linux. Maybe we should only distribute .xhtml
+# and only generate PDFs for web publishing? Maybe decide when moving
+# to ad hoc rules?
+
+# Boostrap the build2 development setup.
+#
+# See HOWTO/setup-build2-for-development.md for step by step instructions.
+#
+# Typical command lines for "full" development setup:
+#
+# --ssh --clean --extra --module rust --cxx g++-7 --cfg gcc7 --loptions "-fuse-ld=gold -Wl,--threads,--thread-count,4"
+#
+# Additional configuration:
+#
+# --no-clone --no-symlink --no-libs --no-modules --cxx g++-7 --cfg gcc7-tsan --coptions "-Wall -Wextra -Werror -g -fsanitize=thread" --loptions "-fuse-ld=gold -Wl,--threads,--thread-count,4"
+#
+# To initialize any additional projects:
+#
+# bdep init -d <proj> -A builds/gcc7 @gcc7
+#
+# Note that this script runs git-update-index commands specified in the
+# README-GIT files of cloned repositories. It also expected the staged
+# toolchain, CLI, and ODB to be runnable (i.e., already in PATH).
+#
+# Options:
+#
+# --ssh
+# Use SSH URL for cloning (rw access).
+#
+# --extra
+# Initialize additional packages (bbot, brep, etc) that are not part of
+# the toolchain core (build2, bpkg, and bdep). Note that they are
+# configured but not updated. Also note that for brep we assume libapr1,
+# libapreq2, and libpq are available from the system (see brep/INSTALL
+# for details).
+#
+# --module <name>
+# Additional (to standard pre-installed) build system module to initialize.
+# Repeat this option to specify multiple modules. Note: <name> should be
+# without the libbuild2- prefix.
+#
+# --no-modules
+# Do not initialize standard pre-installed build system modules.
+#
+# --no-clone
+# Do not clone the repositories or build the bootstrap build system
+# (b-boot) assuming this has already been done. This option is primarily
+# useful for initializing additional configurations (e.g., Clang in
+# addition to GCC).
+#
+# --clean
+# Clean (or clone if does not exist) the source directories (remove .bdep/,
+# forwarded configurations) and the configuration directories. This is
+# primarily useful to re-initialized an already initialized (or failed)
+# setup.
+#
+# --no-libs
+# Do not create an extra configuration for libraries. Having such a
+# configuration allows you to test changes in libraries without rendering
+# the rest of the toolchain no longer runnable/functional.
+#
+# --no-symlink
+# Do not create executable symlinks in /usr/local/bin/.
+#
+# --cxx
+# --cfg
+# C++ compiler to use and the corresponding build configuration name, for
+# example, g++-9/gcc9 or clang++-8/clang8; g++/gcc by default.
+#
+# --coptions
+# --loptions
+# Compiler and linker options to use. By default a debug build with
+# ASAN/UBSAN is configured:
+#
+# -Wall -Wextra -Werror -g -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer
+#
+# To configure TSAN, use the following coptions instead:
+#
+# -Wall -Wextra -Werror -g -fsanitize=thread
+#
+# To enable parallel linking with gold, use the following loptions:
+#
+# -fuse-ld=gold -Wl,--threads,--thread-count,4
+#
+owd="$(pwd)"
+trap "{ cd '$owd'; exit 1; }" ERR
+set -o errtrace # Trap in functions.
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+# Run a command with tracing (similar to set -x).
+#
+# Note that this function will execute a command with arguments that contain
+# spaces but it will not print them as quoted (and neither does set -x).
+#
+function run ()
+{
+ echo "+ $@" 1>&2
+ "$@"
+}
+
+# Make sure the necessary tools are runnable.
+#
+cli --version >/dev/null
+odb --version >/dev/null
+b --version >/dev/null
+bpkg --version >/dev/null
+bdep --version >/dev/null
+
+url="https://git.build2.org"
+mod_url="https://github.com/build2"
+extra=
+mod=(hello autoconf kconfig)
+sym=true
+clone=true
+clean=
+libs=true
+cxx=g++
+cfg=gcc
+copt="-Wall -Wextra -Werror -g -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
+lopt=
+popt=
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --ssh)
+ url="git.build2.org:/var/scm"
+ mod_url="git@github.com:build2"
+ shift
+ ;;
+ --extra)
+ extra=true
+ shift
+ ;;
+ --module)
+ shift
+ mod+=("$1")
+ shift
+ ;;
+ --no-modules)
+ mod=()
+ shift
+ ;;
+ --no-symlink)
+ sym=
+ shift
+ ;;
+ --no-clone)
+ clone=
+ shift
+ ;;
+ --clean)
+ clean=true
+ shift
+ ;;
+ --no-libs)
+ libs=
+ shift
+ ;;
+ --cxx)
+ shift
+ cxx="$1"
+ shift
+ ;;
+ --cfg)
+ shift
+ cfg="$1"
+ shift
+ ;;
+ --coptions)
+ shift
+ copt="$1"
+ shift
+ ;;
+ --loptions)
+ shift
+ lopt="$1"
+ shift
+ ;;
+ *)
+ error "unexpected $1"
+ ;;
+ esac
+done
+
+if [ "$clean" ]; then
+
+ if [ "$sym" ]; then
+ run sudo rm -f /usr/local/bin/b-boot
+ run sudo rm -f /usr/local/bin/b
+ run sudo rm -f /usr/local/bin/bpkg
+ run sudo rm -f /usr/local/bin/bdep
+ fi
+
+ run rm -rf builds/
+
+ for m in "${mod[@]}"; do
+ run rm -rf "libbuild2-$m-build/"
+ done
+
+ run cd build2
+ run make -f bootstrap.gmake CXX="$cxx" CXXFLAGS=-O3 clean
+ run cd -
+
+ def=true
+
+else
+ # Determine if this is the first/default configuration.
+ #
+ if test -d build2/.bdep; then
+ def=
+ else
+ def=true
+ fi
+fi
+
+if [ ! "$def" ]; then
+
+ if [ "$libs" ]; then
+ error "non-default configuration requires --no-libs"
+ fi
+
+ if [ "${#mod[@]}" -ne 0 ]; then
+ error "non-default configuration requires --no-modules"
+ fi
+fi
+
+if [ "$extra" ]; then
+ popt="$popt -I$(apxs -q includedir)"
+fi
+
+# Clone or clean the repository.
+#
+function git_clone () # <url>
+{
+ local u d l
+
+ u="$1"
+ d="$(basename -s .git "$u")"
+
+ # Clone it if doesn't exist.
+ #
+ if [ "$clean" -a -d "$d" ]; then
+
+ run rm -rf "$d/.bdep/"
+
+ for l in $(find "$d" -name out-root.build); do
+ run rm -f "$l"
+ done
+
+ else
+ run git clone --recursive "$u"
+ fi
+
+ # Run git-update-index commands from README-GIT.
+ #
+ if [ -f "$d/README-GIT" ]; then
+ run cd "$d"
+ l=
+ while read l || [ -n "$l" ]; do
+ info "+ $l"
+ eval $l
+ done < <(sed -rn -e 's/^(git update-index .+)/\1/p' README-GIT)
+ run cd -
+ fi
+
+ # Generate documentation (currently and temporarily handled with a script).
+ #
+ if [ -f "$d/doc/cli.sh" ]; then
+ run cd "$d/doc"
+ run ./cli.sh
+ run cd -
+ fi
+}
+
+if [ "$clone" -o "$clean" ]; then
+ git_clone "$url/libbutl.git"
+ git_clone "$url/build2.git"
+ git_clone "$url/libbpkg.git"
+ git_clone "$url/bpkg.git"
+ git_clone "$url/bdep.git"
+
+ if [ "$extra" ]; then
+ git_clone "$url/libbutl.bash.git"
+ git_clone "$url/bpkg-util.git"
+ git_clone "$url/bdep-util.git"
+ git_clone "$url/libbbot.git"
+ git_clone "$url/bbot.git"
+ git_clone "$url/brep.git"
+ fi
+
+ for m in "${mod[@]}"; do
+ git_clone "$mod_url/libbuild2-$m.git"
+ done
+
+ # Build the bootstrap build system (b-boot).
+ #
+ run cd build2
+ run make -f bootstrap.gmake CXX="$cxx" CXXFLAGS=-O3 -j 8
+ run make -f bootstrap.gmake CXX="$cxx" CXXFLAGS=-O3 cleano # Cleanup objs.
+ run build2/b-boot --version
+ run cd -
+fi
+
+run mkdir -p builds
+
+# The -libs configuration.
+#
+# Note that by doing this first we automatically make sure this will be their
+# default/forwarded configuration.
+#
+if [ "$libs" ]; then
+
+ run bpkg create -d "builds/$cfg-libs" cc cli \
+ config.cli=cli \
+ config.cxx="$cxx" \
+ config.cc.coptions="$copt" \
+ config.cc.loptions="$lopt" \
+ config.bin.lib=shared \
+ config.install.root=/tmp/install config.dist.root=/tmp/dist
+
+ run bdep init -d libbutl -A "builds/$cfg-libs" "@$cfg-libs"
+ run bdep init -d libbpkg -A "builds/$cfg-libs" "@$cfg-libs"
+
+ if [ "$extra" ]; then
+ run bdep init -d libbutl.bash -A "builds/$cfg-libs" "@$cfg-libs"
+ run bdep init -d libbbot -A "builds/$cfg-libs" "@$cfg-libs"
+ fi
+fi
+
+# Relative and absolute configuration directories.
+#
+rd="builds/$cfg"
+ad="$owd/$rd"
+
+# Build system configuration.
+#
+# Notes:
+#
+# 1. Using ?cli since this should be buildable by b-boot.
+#
+# 2. Only building shared libraries for speed of development.
+#
+run bpkg create -d "$rd" cc ?cli \
+ config.cli=cli \
+ config.cxx="$cxx" \
+ config.cc.poptions="$popt" \
+ config.cc.coptions="$copt" \
+ config.cc.loptions="$lopt" \
+ config.bin.lib=shared \
+ config.install.root=/tmp/install config.dist.root=/tmp/dist
+
+run bdep init -d libbutl -A "$rd" "@$cfg"
+run bdep init -d build2 -A "$rd" "@$cfg"
+run bdep init -d libbpkg -A "$rd" "@$cfg"
+run bdep init -d bpkg -A "$rd" "@$cfg"
+run bdep init -d bdep -A "$rd" "@$cfg"
+
+if [ "$extra" ]; then
+ run bdep init -d libbutl.bash -A "$rd" "@$cfg"
+ run bdep init -d bpkg-util -A "$rd" "@$cfg"
+ run bdep init -d bdep-util -A "$rd" "@$cfg"
+ run bdep init -d libbbot -A "$rd" "@$cfg"
+ run bdep init -d bbot -A "$rd" "@$cfg"
+ run bdep init -d brep -A "$rd" "@$cfg" \
+ ?sys:libapr1 ?sys:libapreq2 ?sys:libpq
+fi
+
+# Generate database support (currently and temporarily handled with a script).
+#
+# Note: this has to be done after bdep-init since we need the libodb headers.
+# We also have to pre-update version headers.
+#
+if [ $def ]; then
+ run bpkg update -d "$rd" libodb
+ run b "$rd/libbutl/libbutl/hxx{version}"
+ run b "$rd/libbpkg/libbpkg/hxx{version}"
+ run b "$rd/bpkg/bpkg/hxx{version common-options}"
+ run b "$rd/bdep/bdep/hxx{version common-options project-options}"
+
+ run cd bpkg/bpkg
+ run ./odb.sh
+ run cd -
+
+ run cd bdep/bdep
+ run ./odb.sh
+ run cd -
+
+ if [ "$extra" ]; then
+ run b "$rd/brep/web/xhtml/hxx{version}"
+ run b "$rd/brep/libbrep/hxx{version}"
+
+ run cd brep/libbrep
+ run ./odb.sh
+ run cd -
+ fi
+fi
+
+if [ $def ]; then
+ run b build2/build2/ bpkg/bpkg/ bdep/bdep/
+ run build2/build2/b --version
+ run bpkg/bpkg/bpkg --version
+ run bdep/bdep/bdep --version
+else
+ run b "$rd/build2/build2/" "$rd/bpkg/bpkg/" "$rd/bdep/bdep/"
+ run "$rd/build2/build2/b" --version
+ run "$rd/bpkg/bpkg/bpkg" --version
+ run "$rd/bdep/bdep/bdep" --version
+fi
+
+# Add symlinks.
+#
+if [ "$sym" ]; then
+ # Note that we symlink the actual executable in the build configuration
+ # rather than the backlink in the forwarded source to make the old binary
+ # runnable in the face of compilation errors (which trigger the removal of
+ # backlinks).
+ #
+ run sudo mkdir -p /usr/local/bin
+ run sudo ln -s "$owd/build2/build2/b-boot" /usr/local/bin/b-boot
+ run sudo ln -s "$ad/build2/build2/b" /usr/local/bin/b
+ run sudo ln -s "$ad/bpkg/bpkg/bpkg" /usr/local/bin/bpkg
+ run sudo ln -s "$ad/bdep/bdep/bdep" /usr/local/bin/bdep
+
+ run export PATH="/usr/local/bin:$PATH"
+else
+ run export PATH="$ad/build2/build2:$PATH"
+ run export PATH="$ad/bpkg/bpkg:$PATH"
+ run export PATH="$ad/bdep/bdep:$PATH"
+fi
+
+run which b bpkg bdep
+
+# Re-run update using the bootstrapped toolchain (normally should be a
+# noop).
+#
+if [ $def ]; then
+ run b build2/build2/ bpkg/bpkg/ bdep/bdep/
+else
+ run b "$rd/build2/build2/" "$rd/bpkg/bpkg/" "$rd/bdep/bdep/"
+fi
+
+# Configure the modules.
+#
+for m in "${mod[@]}"; do
+ d="libbuild2-$m"
+
+ run cd "$d"
+
+ run bdep init --empty
+ run bdep config create @module "../$d-build/module/" --type build2 cc config.config.load=~build2
+ run bdep config create @target "../$d-build/target/" cc config.cxx="$cxx"
+
+ run bdep init @module -d "$d/"
+
+ # See if this module requires bootstrap.
+ #
+ b=$(sed -rn -e 's/^\s*requires\s*:\s*bootstrap\s*$/true/p' "$d/manifest")
+
+ if [ "$b" ]; then
+ info "module $d requires bootstrapping"
+ info "make sure ~/.build2/b.option contains the following line and press Enter"
+ info "!config.import.libbuild2_$m=$owd/$d-build/module/"
+ read
+ fi
+
+ # Assume every package other than the module is a test.
+ #
+ # Note: sed regex is from the glue buildfile.
+ #
+ for t in $(sed -rn -e 's/^\s*location\s*:\s*(\S+)\s*$/\1/p' packages.manifest); do
+ if [ "$d/" = "$t" ]; then
+ continue
+ fi
+
+ run bdep init @target -d "$t"
+ done
+
+ run cd -
+done
diff --git a/doc/bash-style.cli b/doc/bash-style.cli
index ef81af2..4edc984 100644
--- a/doc/bash-style.cli
+++ b/doc/bash-style.cli
@@ -15,7 +15,7 @@
\h1#intro|Introduction|
Bash works best for simple tasks. Needing arrays, arithmetic, and so on, is
-usually a good indication that the task at hand is too complex for Bash.
+usually a good indication that the task at hand may be too complex for Bash.
Most of the below rules can be broken if there is a good reason for it.
Besides making things consistent, rules free you from having to stop and think
@@ -31,8 +31,11 @@ the former provides a lot more rationale compared to this guide.
\h1#style|Style|
Don't use any extensions for your scripts. That is, call it just \c{foo}
-rather than \c{foo.sh} or \c{foo.bash}. Use lower-case letters and dash
-to separate words, for example \c{foo-bar}.
+rather than \c{foo.sh} or \c{foo.bash} (though we do use the \c{.bash}
+extension for
+\l{https://build2.org/build2/doc/build2-build-system-manual.xhtml#module-bash
+Bash modules}). Use lower-case letters and dash to separate words, for example
+\c{foo-bar}.
Indentation is two spaces (not tabs). Maximum line length is 79 characters
(excluding newline). Use blank lines between logical blocks to improve
@@ -45,16 +48,29 @@ For \c{if}/\c{while} and \c{for}/\c{do} the corresponding \c{then} or \c{do}
is written on the same line after a semicolon, for example:
\
-if [ ... ]; then
+if [[ ... ]]; then
+ ...
fi
for x in ...; do
+ ...
done
\
-For \c{if} use \c{[ ]} for basic tests and \c{[[ ]]} only if the previous form
-is not sufficient. Use \c{test} for filesystem tests (presence of files,
-etc). Do use \c{elif}.
+Do use \c{elif} instead of nested \c{else} and \c{if} (and consider if
+\c{case} can be used instead).
+
+For \c{if}/\c{while} use \c{[[ ]]} since it results in cleaner code for
+complex expressions, for example:
+
+\
+if [[ \"$foo\" && (\"$bar\" || \"$baz\") ]]; then
+ ...
+fi
+\
+
+\N|If for some reason you need the semantics of \c{[}, use \c{test} instead to
+make it clear this is intentional.|
\h1#struct|Structure|
@@ -73,7 +89,10 @@ usage=\"usage: $0 <OPTIONS>\"
owd=\"$(pwd)\"
trap \"{ cd '$owd'; exit 1; }\" ERR
-set -o errtrace # Trap in functions.
+set -o errtrace # Trap in functions and subshells.
+set -o pipefail # Fail if any pipeline command fails.
+shopt -s lastpipe # Execute last pipeline command in the current shell.
+shopt -s nullglob # Expand no-match globs to nothing rather than themselves.
function info () { echo \"$*\" 1>&2; }
function error () { info \"$*\"; exit 1; }
@@ -131,7 +150,7 @@ file=
Parse the command line options/arguments. For example:
\
-while [ \"$#\" -gt 0 ]; do
+while [[ \"$#\" -gt 0 ]]; do
case \"$1\" in
-q)
quiet=\"y\"
@@ -143,7 +162,7 @@ while [ \"$#\" -gt 0 ]; do
shift
;;
*)
- if [ -n \"$file\" ]; then
+ if [[ -n \"$file\" ]]; then
error \"$usage\"
fi
@@ -155,19 +174,19 @@ done
\
If the value you are expecting from the command line is a directory path,
-the always strip the trailing slash (as shown above for the \c{-t} option).
+then always strip the trailing slash (as shown above for the \c{-t} option).
\h#struct-opt-arg-valid|OPTIONS-ARGUMENTS-VALIDATION|
Validate option/argument values. For example:
\
-if [ -z \"$file\" ]; then
+if [[ -z \"$file\" ]]; then
error \"$usage\"
fi
-if [ ! -d \"$file\" ]; then
- fail \"'$file' does not exist or is not a directory\"
+if [[ ! -d \"$file\" ]]; then
+ error \"'$file' does not exist or is not a directory\"
fi
\
@@ -182,11 +201,14 @@ functions, then define them just before use.
We quote every variable expansion, no exceptions. For example:
\
-if [ -n \"$foo\" ]; then
+if [[ -n \"$foo\" ]]; then
...
fi
\
+\N|While there is no word splitting in the \c{[[ ]]} context, we still quote
+variable expansions for consistency.|
+
This also applies to command substitution (which we always write as
\c{$(foo arg)} rather than \c{`foo arg`}), for example:
@@ -201,28 +223,42 @@ list=\"$(basename \"$1\")\"
\
We also quote values that are \i{strings} as opposed to options/file names,
-paths, or integers. If setting a variable that will contain one of these
-unquoted values, try to give it a name that reflects its type (e.g.,
-\c{foo_file} rather than \c{foo_name}). Prefer single quotes for \c{sed}
+paths, enum-like values, or integers. Prefer single quotes for \c{sed}
scripts, for example:
\
-proto=\"https\"
-quiet=\"y\"
-verbosity=1
-dir=/etc
-out=/dev/null
-file=manifest
-seds='s%^./%%'
+url=\"https://example.org\" # String.
+quiet=y # Enum-like.
+verbosity=1 # Integer.
+dir=/etc # Directory path.
+out=/dev/null # File path.
+file=manifest # File name.
+option=--quiet # Option name.
+seds='s%^./%%' # sed script.
\
-Note that quoting will inhibit globbing so you may end up with expansions
-along these lines:
+Take care to quote globs that are not meant to be expanded, for example:
+
+\
+unset \"array[0]\"
+\
+
+And since quoting will inhibit globbing, you may end up with expansions along
+these lines:
\
rm -f \"$dir/$name\".*
\
+Note also that globbing is not performed in the \c{[[ ]]} context so this is
+ok:
+
+\
+if [[ -v array[0] ]]; then
+ ...
+fi
+\
+
\N|One exception to this quoting rule is arithmetic expansion (\c{$((\ ))}):
Bash treats it as if it was double-quoted and, as a result, any inner quoting
is treated literally. For example:
@@ -243,14 +279,13 @@ typical example of a space-aware argument handling:
\
files=()
-while [ \"$#\" -gt 0 ]; do
+while [[ \"$#\" -gt 0 ]]; do
case \"$1\" in
...
*)
- shift
- files=(\"${files[@]}\" \"$1\")
+ files+=(\"$1\")
shift
;;
esac
@@ -279,58 +314,87 @@ echo \"files: ${files[@]}\" # $1='files: one', $2='2 two', $3='three'
echo \"files: ${files[*]}\" # $1='files: one 2 two three'
\
-\h1#trap|Trap|
-Our scripts use the error trap to automatically terminate the script in case
-any command fails. If you need to check the exit status of a command, use
-\c{if}, for example:
+\h1#bool|Boolean|
-\
-if grep \"foo\" /tmp/bar; then
- info \"found\"
-fi
+For boolean values use empty for false and \c{true} for true. This way you
+can have terse and natural looking conditions, for example:
-if ! grep \"foo\" /tmp/bar; then
- info \"not found\"
-fi
\
+first=true
+while ...; do
-Note that the \c{if}-condition can be combined with capturing the output, for
-example:
+ if [[ ! \"$first\" ]]; then
+ ...
+ fi
-\
-if v=\"$(...)\"; then
- ...
-fi
+ if [[ \"$first\" ]]; then
+ first=
+ fi
+
+done
\
-If you need to ignore the exit status, you can use \c{|| true}, for example:
+
+\h1#subshell|Subshell|
+
+Bush executes certain constructs in \i{subshells} and some of these constructs
+may not be obvious:
+
+\ul|
+
+\li|Explicit subshell: \c{(...)}|
+
+\li|Pipeline: \c{...|...}|
+
+\li|Command substitution: \c{$(...)}|
+
+\li|Process substitution: \c{<(...)}, \c{>(...)}|
+
+\li|Background: \c{...&}, \c{coproc ...}|
+
+|
+
+Naturally, a subshell cannot modify any state in the parent shell, which
+sometimes leads to counter-intuitive behavior, for example:
\
-foo || true
-\
+lines=()
+... | while read l; do
+ lines+=(\"$l\")
+done
+\
-\h1#bool|Boolean|
+At the end of the loop, \c{lines} will remain empty since the loop body is
+executed in a subshell. One way to resolve this is to use the program
+substitution instead of the pipeline:
-For boolean values use empty for false and \c{true} for true. This way you
-can have terse and natural looking conditions, for example:
+\
+lines=()
+while read l; do
+ lines+=(\"$l\")
+done < <(...)
\
-first=true
-while ...; do
- if [ ! \"$first\" ]; then
- ...
- fi
+This, however, results in an unnatural, backwards-looking (compared to the
+pipeline) code. Instead, we can request the last command of the pipeline to be
+executed in the parent shell with the \c{lastpipe} shell option, for example:
- if [ \"$first\" ]; then
- first=
- fi
+\
+shopt -s lastpipe
+lines=()
+
+... | while read l; do
+ lines+=(\"$l\")
done
\
+\N|The \c{lastpipe} shell option is inherited by functions and subshells.|
+
+
\h1#function|Functions|
If a function takes arguments, provide a brief usage after the function
@@ -347,8 +411,8 @@ For non-trivial/obvious functions also provide a short description of its
functionality/purpose, for example:
\
-# Prepare a distribution of the specified packages and place it into the
-# specified directory.
+# Prepare a distribution of the specified packages and place it
+# into the specified directory.
#
function dist() # <pkg> <dir>
{
@@ -367,7 +431,7 @@ function dist()
If the evaluation of the value may fail (e.g., it contains a program
substitution), then place the assignment on a separate line since \c{local}
-will cause the error to be ignore. For example:
+will cause the error to be ignored. For example:
\
function dist()
@@ -377,10 +441,273 @@ function dist()
}
\
+A function can return data in two primary ways: exit code and stdout.
+Normally, exit code 0 means success and exit code 1 means failure though
+additional codes can be used to distinguish between different kinds of
+failures (for example, \"hard\" and \"soft\" failures), signify special
+conditions, etc., see \l{#error-handing Error Handling} for details.
+
+A function can also write to stdout with the result available to the caller in
+the same way as from programs (command substitution, pipeline, etc). If a
+function needs to return multiple values, then it can print them separated
+with newlines with the caller using the \c{readarray} builtin to read them
+into an indexed array, for example:
+
+\
+function func ()
+{
+ echo one
+ echo two
+ echo three
+}
+
+func | readarray -t r
+\
+
+\N|The use of the newline as a separator means that values may not contain
+newlines. While \c{readarray} supports specifying a custom separator with the
+\c{-d} option, including a \c{NUL} separator, this support is only available
+since Bash 4.4.|
+
+This technique can also be extended to return an associative array by first
+returning the values as an indexed array and then converting them to
+an associative array with \c{eval}, for example:
+
+\
+function func ()
+{
+ echo \"[a]=one\"
+ echo \"[b]=two\"
+ echo \"[c]=three\"
+}
+
+func | readarray -t ia
+
+eval declare -A aa=(\"${ia[@]}\")
+\
+
+Note that if a key or a value contains whitespaces, then it must be quoted.
+The recommendation is to always quote both, for example:
+
+\
+function func ()
+{
+ echo \"['a']='one ONE'\"
+ echo \"['b']='two'\"
+ echo \"['c']='three'\"
+}
+\
+
+Or, if returning a local array:
+
+\
+function func ()
+{
+ declare -A a=([a]='one ONE' [b]=two [c]=three)
+
+ for k in \"${!a[@]}\"; do
+ echo \"['$k']='${a[$k]}'\"
+ done
+}
+\
+
For more information on returning data from functions, see
\l{https://mywiki.wooledge.org/BashFAQ/084 BashFAQ#084}.
-For more information on writing reusable functions, see
-\l{https://stackoverflow.com/questions/11369522/bash-utility-script-library
-Bash Utility Script Library}.
+
+\h1#error-handing|Error Handling|
+
+Our scripts use the \c{ERR} trap to automatically terminate the script in case
+any command fail. This semantics is also propagated to functions and subshells
+by specifying the \c{errtrace} shell option and to all the commands of a
+pipeline by specifying the \c{pipefail} option.
+
+\N|Without \c{pipefail}, a non-zero exit of any command in the pipeline except
+the last is ignored. The \c{pipefail} shell option is inherited by functions
+and subshells.|
+
+\N|While the \c{nounset} options may also seem like a good idea, it has
+subtle, often latent pitfalls that make it more trouble than it's worth (see
+\l{https://mywiki.wooledge.org/BashPitfalls#nounset \c{nounset} pitfalls}).|
+
+The \c{pipefail} semantics is not without pitfalls which should be kept in
+mind. In particular, if a command in a pipeline exits before reading the
+preceding command's output in its entirety, such a command may exit with a
+non-zero exit status (see \l{https://mywiki.wooledge.org/BashPitfalls#pipefail
+\c{pipefail} pitfalls} for details).
+
+\N|Note that in such a situation the preceding command may exit with zero
+status not only because it gracefully handled \c{SIGPIPE} but also because all
+of its output happened to fit into the pipe buffer.|
+
+For example, these are the two common pipelines that may exhibit this issue:
+
+\
+prog | head -n 1
+prog | grep -q foo
+\
+
+In these two cases, the simplest (though not the most efficient) way to work
+around this issue is to reimplement \c{head} with \c{sed} and to get rid of
+\c{-q} in \c{grep}, for example:
+
+\
+prog | sed -n -e '1p'
+prog | grep foo >/dev/null
+\
+
+If you need to check the exit status of a command, use \c{if}, for example:
+
+\
+if grep -q \"foo\" /tmp/bar; then
+ info \"found\"
+fi
+
+if ! grep -q \"foo\" /tmp/bar; then
+ info \"not found\"
+fi
+\
+
+Note that the \c{if}-condition can be combined with capturing the output, for
+example:
+
+\
+if v=\"$(...)\"; then
+ ...
+fi
+\
+
+But keep in mind that in Bash a failure is often indistinguishable from a
+true/false result. For example, in the above \c{grep} command, the result will
+be the same whether there is no match or if the file does not exist.
+
+Furthermore, in certain contexts, the above-mentioned \c{ERR} trap is ignored.
+Quoting from the Bash manual:
+
+\i{The \c{ERR} trap is not executed if the failed command is part of the
+command list immediately following an \c{until} or \c{while} keyword, part of
+the test following the \c{if} or \c{elif} reserved words, part of a command
+executed in a \c{&&} or \c{||} list except the command following the final
+\c{&&} or \c{||}, any command in a pipeline but the last, or if the command’s
+return status is being inverted using \c{!}. These are the same conditions
+obeyed by the \c{errexit} (\c{-e}) option.}
+
+To illustrate the gravity of this point, consider the following example:
+
+\
+function cleanup()
+{
+ cd \"$1\"
+ rm -f *
+}
+
+if ! cleanup /no/such/dir; then
+ ...
+fi
+\
+
+Here, the \c{cleanup()} function will continue executing (and may succeed)
+even if the \c{cd} command has failed.
+
+Note, however, that notwithstanding the above statement from the Bash manual,
+the \c{ERR} trap is executed inside all the subshell commands of a pipeline
+provided the \c{errtrace} option is specified. As a result, the above code can
+be made to work by temporarily disabling \c{pipefail} and reimplementing it as
+a pipeline:
+
+\
+set +o pipefail
+cleanup /no/such/dir | cat
+r=\"${PIPESTATUS[0]}\"
+set -o pipefail
+
+if [[ \"$r\" -ne 0 ]]; then
+ ...
+fi
+\
+
+\N|Here, if \c{cleanup}'s \c{cd} fails, the \c{ERR} trap will be executed in
+the subshell, causing it to exit with an error status, which the parent shell
+then makes available in \c{PIPESTATUS}.|
+
+The recommendation is then to avoid calling functions in contexts where the
+\c{ERR} trap is ignored resorting to the above pipe trick where that's not
+possible. And to be mindful of the potential ambiguity between the true/false
+result and failure for other commands. The use of the \c{&&} and \c{||}
+command expressions is best left to the interactive shell.
+
+\N|The pipe trick cannot be used if the function needs to modify the global
+state. Such a function, however, might as well return the exit status also as
+part of the global state. The pipe trick can also be used to ignore the exit
+status of a command.|
+
+The pipe trick can also be used to distinguish between different exit codes,
+for example:
+
+\
+function func()
+{
+ bar # If this command fails, the function returns 1.
+
+ if ... ; then
+ return 2
+ fi
+}
+
+set +o pipefail
+func | cat
+r=\"${PIPESTATUS[0]}\"
+set -o pipefail
+
+case \"$r\" in
+ 0)
+ ;;
+ 1)
+ exit 1
+ ;;
+ 2)
+ ...
+ ;;
+esac
+\
+
+\N|In such functions it makes sense to keep exit code 1 to mean failure so
+that the inherited \c{ERR} trap can be re-used.|
+
+This technique can be further extended to implement functions that both
+return multiple exit codes and produce output, for example:
+
+\
+function func()
+{
+ bar # If this command fails, the function returns 1.
+
+ if ... ; then
+ return 2
+ fi
+
+ echo result
+}
+
+set +o pipefail
+func | readarray -t ro
+r=\"${PIPESTATUS[0]}\"
+set -o pipefail
+
+case \"$r\" in
+ 0)
+ echo \"${ro[0]}\"
+ ;;
+ 1)
+ exit 1
+ ;;
+ 2)
+ ...
+ ;;
+esac
+\
+
+\N|We use \c{readarray} instead of \c{read} since the latter fails if the left
+hand side of the pipeline does not produce anything.|
+
"
diff --git a/doc/cxx-style.txt b/doc/build2-cxx-style.txt
index 8e968b8..8e968b8 100644
--- a/doc/cxx-style.txt
+++ b/doc/build2-cxx-style.txt
diff --git a/doc/cli.sh b/doc/cli.sh
index 458ff87..3f10993 100755
--- a/doc/cli.sh
+++ b/doc/cli.sh
@@ -6,7 +6,7 @@ set -o errtrace # Trap in functions.
function info () { echo "$*" 1>&2; }
function error () { info "$*"; exit 1; }
-copyright="$(sed -n -re 's%^Copyright \(c\) (.+)\.$%\1%p' ../COPYRIGHT)"
+copyright="$(sed -n -re 's%^Copyright \(c\) (.+) \(see the AUTHORS file\)\.$%\1%p' ../LICENSE)"
while [ $# -gt 0 ]; do
case $1 in
diff --git a/doc/release.cli b/doc/release.cli
index 6def002..8aba681 100644
--- a/doc/release.cli
+++ b/doc/release.cli
@@ -17,6 +17,13 @@
Review the state and services list (currently on paper) for any new additions.
Consider how/when they are updated/tested during the release process.
+@@ We have switched to a single configuration for the entire toolchain
+ (plus -libs).
+
+@@ We currently have an issue in that \c{queue} builds \c{public} using
+\c{public} \c{buildtabs} (since it's querying \c{public} brep) which means
+existing packages are not tested with new build configurations. But maybe
+that's correct, conceptually.
\h1#stage|Stage|
@@ -27,8 +34,10 @@ any of these dependencies are in the unreleased state, then they should go
through the applicable steps in this section (e.g., updating of \c{NEWS}, etc)
and then be queued and published (effectively released) as part of the
\c{build2} release. Generally, however, we should strive to not unnecessarily
-bundle the release of dependencies with the release of \c{build2} to keep
-the process as streamlined as possible.
+bundle the release of dependencies with the release of \c{build2} to keep the
+process as streamlined as possible. In fact, we now have \c{queue.stage} (see
+\c{etc/stage-queue}) which is the place for such \"extra packages for
+testing\".
\N|When unbundling the release of a dependency we need to remove its
distribution from \c{etc/stage} and add the pre-distributed packages
@@ -44,6 +53,14 @@ distribution from \c{etc/stage} and add the pre-distributed packages
Use the \c{git/copyright} script. See the script header for instructions.
+ Note that most of (all?) our project have been converted to the automatic
+ copyright update notification via a pre-commit hook. So perhaps this step
+ can be removed.
+
+\h#install-times|Update install script times.|
+
+ See \c{private/install/build2-times.txt} for instructions.
+
\h#etc|Update \c{etc/git/modules}|
Review for any new modules. Remove \c{etc/} and \c{private/} from
@@ -51,7 +68,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\h#review|Review \c{@@}|
- Review \c{@@} notes:
+ Review \c{etc/review} for new modules. Then review \c{@@} notes:
\
etc/review | less -R
@@ -81,7 +98,10 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\h#packaging|Release \c{packaging/} dependencies|
Release dependencies that have the snapshot version as described in
- \c{private/build2-packaging.txt}.
+ \l{https://github.com/build2-packaging/README#version-and-release-management
+ Version and Release Management}.
+
+ Also, consider upgrading the \c{curl/ca-certificates-curl}.
\N|Maybe this should be done during queuing? Why do we release (but not
publish) these now and other dependencies later? Maybe so that we can
@@ -113,6 +133,41 @@ distribution from \c{etc/stage} and add the pre-distributed packages
etc/upgrade
\
+ Or, if released ODB on the previous step, update \c{libodb*} version
+ constraint using \c{etc/version}, commit, and then:
+
+ \
+ # Step 0: make sure b, bpkg, bdep are runnable.
+
+ # Step 1: pull ODB compiler and build it, make sure runnable.
+
+ # Step 2: pull everything in build2 (including brep).
+
+ # Step 3: upgrade (in configure-only mode).
+ #
+ # If this step goes sideways, use the saved .bak configurations to
+ # revert, fix the issue, and try again. If unable to fix the issue
+ # (for example, the toolchain is not runnable), then do the from-
+ # scratch bootstrap using the etc/bootstrap script.
+ #
+ etc/upgrade -c
+
+ # Step 4: trigger header regeneration (ignore ODB version errors).
+ #
+ BDEP_SYNC=0 b --match-only ~/work/build2/builds/gcc7/
+
+ # Step 5: regenerated ODB code in the relevant projects (bpkg, bdep, brep):
+ #
+ ./odb.sh ~/work/build2/builds/gcc7/
+
+ # Step 6: finish toolchain update:
+ #
+ BDEP_SYNC=0 b build2/ bpkg/ bdep/
+ b build2/ bpkg/ bdep/ # Should be noop.
+ \
+
+ Then push \c{build2} repositories.
+
\h#hello|Update \c{hello/} projects|
@@ -131,17 +186,19 @@ distribution from \c{etc/stage} and add the pre-distributed packages
git push ...
\
- Once done, run the \c{intro} scripts and review any changes in the output
- (this information will be helpful on the next step):
+ Once done, make sure the latest \c{libhello} revision is on stage, run the
+ \c{intro} scripts, and review any changes in the output (this information
+ will be helpful on the next step):
\
cd etc
- ./intro2-tldr 2>&1 | tee intro2-tldr.out
+ script -qc ./intro2-tldr intro2-tldr.out && sed -i -e 's/\r//g' intro2-tldr.out
diff -u intro2-tldr.orig intro2-tldr.out # Or use gitk.
mv intro2-tldr.out intro2-tldr.orig
- ./intro2-tour 2>&1 | tee intro2-tour.out
+
+ script -qc ./intro2-tour intro2-tour.out && sed -i -e 's/\r//g' intro2-tour.out
diff -u intro2-tour.orig intro2-tour.out # Or use gitk.
mv intro2-tour.out intro2-tour.orig
\
@@ -158,7 +215,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\ul|
- \li|Install guide: 1 & 2.|
+ \li|Install guide: 1 & 2 (also review \c{build2-toolchain} commit log).|
\li|Toolchain introduction: 1, 2 & 3 (use \c{intro} script output for 2).|
@@ -193,6 +250,12 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\h#stage-machines|Update \c{stage} \c{buildtab}s and build machines|
+ NOTE: may want to keep old machines around for public testing (since we use
+ existing public buildtabs, none of the new machines will be used).
+
+ Note: normally, we try to do all of this as part of normal development
+ (e.g., when adding new machines, etc).
+
Review \c{stage} \c{buildtab} for any configurations to drop (for example,
an intermediate version of a compiler), classes to adjust (\c{legacy},
\c{default}, \c{latest}, etc).
@@ -207,6 +270,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\
cd private/buildos/
+ grep '.*' .../brep-buildtab | cut -d' ' -f1 | sort -u
./ls-machines -c stage -c devel
~/work/buildos/remove-machine <host> <machine>
@@ -218,7 +282,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\
cd private/buildos/
- ./ls-machines -l \"/btrfs/$(whoami)/machines/default/\"
+ ./ls-machines -l \"/btrfs/$(whoami)/machines/default/\" | sort
./ls-machines -c stage -c devel
~/work/build2/buildos/upload-machine <host> .../new-ver .../old-ver
@@ -235,6 +299,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
If no upgrade is possible from the previous version, uncomment errors in
install scripts (and add a note to restore after the release).
+ Enable extra packages for testing in \c{etc/stage} script.
+
Restage and upgrade \c{brep} by performing the following steps:
\ol|
@@ -248,6 +314,12 @@ distribution from \c{etc/stage} and add the pre-distributed packages
etc/stage -b
\
+ Consider restaging queue for good measure.
+
+ \
+ etc/stage-queue
+ \
+
|
\li|While build machines are bootstrapping, upgrade \c{brep} on \c{stage},
@@ -265,6 +337,27 @@ distribution from \c{etc/stage} and add the pre-distributed packages
Verify \c{stage} build is clean, nothing is unbuilt.
+\h#test-extra|Perform extra testing|
+
+ CI: (check for any new repositories in github.com/build2/)\n
+ \n
+ \c{libauto-symexport}\n
+ \c{hello-thrift}\n
+ \c{assembler-with-cpp}\n
+
+ Test \c{cxx20-modules-examples} (see \c{test} script).
+
+ Test any third-party/demos (\c{build2-dynamic-module-demo},
+ \c{cherimcu}, \c{boost-dependency}).
+
+ Test on ARM Mac (run tests for \c{libbutl/build2/bpkg/bdep}).
+
+ Test build system modules (especially standard pre-installed).
+
+ Test old toolchain version (can fetch and build old packages from
+ \c{queue.stage}; add dummy package if all require to be released toolchain).
+
+
\h#install-stage|Test install scripts|
Test \l{https://stage.build2.org/0/ \c{stage} install scripts}, including
@@ -309,7 +402,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\
git pull
bdep release --no-open --show-push [--alpha|--beta]
- # review commit
+ # review commit, run update (in case anything comitted is pre-generated)
git push ...
\
@@ -333,29 +426,63 @@ distribution from \c{etc/stage} and add the pre-distributed packages
done if created projects use new features.}
\N|Why shouldn't we always do this for simplicity? Maybe because then
- we cannot run tests using \c{public} services? Also the below upgrade
- steps will break since there is no continuity.||
+ we cannot run tests using \c{public} services?
- \li|Change version by updating (including with new modules and/or new
- dependencies) and then executing:
+ Also if we change this in toolchain packages, the below upgrade steps
+ will break since there is no continuity. Perhaps do it in two stages:
+ first change version to final, upgrade, then change toolchain
+ dependencies to final, upgrade again? But then nobody involed in
+ development will be able to pull and upgrade. Maybe KISS and keep
+ it pre-release.||
- \
- etc/version
- ./commit.sh
- git -C build2-toolchain commit --amend # \"Change version to X.Y.Z\"
- \
+ \li|Change version by updating \c{etc/version} (including with new modules
+ and/or new dependencies, but keep pre-release in minimum toolchain
+ version requirements) and then executing:
- Note that \c{libbuild2-hello} is independently versioned but may still
- need to update minimum \c{build2} version requirements (see below).
+ \
+ etc/version
+ ./commit.sh
+ git -C build2-toolchain commit --amend # \"Change version to X.Y.Z\"
+ \
- |
+ Note that \c{libbuild2-*} modules (e.g., \c{libbuild2-hello}) are
+ independently versioned but may still need to update minimum toolchain
+ version requirements (see below).|
\li|Tag by executing \c{tag.sh\ <version>}.|
- \li|Regenerate documentation in each package.|
+
+ \li|Release all standard pre-installed build system modules. Update
+ minimum toolchain version requirements.
+
+ \
+ bdep release --no-open --show-push
+ \
+
+ Also release \c{libbuild2-hello} (it's not standard pre-installed
+ but it gets published).
+
+ |
+
+ \li|Regenerate documentation in each package (including standard
+ pre-installed build system modules, use \c{BDEP_SYNC=0}).|
\li|Upgrade all dependencies in configure-only mode by executing
- \c{etc/upgrade\ -c}.|
+ \c{etc/upgrade\ -c}.
+
+ Avoid this (see above): If the \c{build2}/\c{bpkg} requirements in the
+ manifests have been bumped to the version being released, then first
+ bootstrap the build system and update \c{bpkg}/\c{bdep} (might have to
+ hack their generated \c{version.hxx} to disable constraint checking;
+ also if you forget \c{BDEP_SYNC=0} it will most likely hose the build
+ configuration).
+
+ \
+ BDEP_SYNC=0 b-boot build2/build2/
+ BDEP_SYNC=0 b bpkg/ bdep/
+ \
+
+ |
\li|Trigger regeneration of version files (might require several runs
to \"close off\"):
@@ -387,12 +514,16 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\
BDEP_SYNC=0 b ~/work/build2/builds/gcc7-asan/
+
+ b build2/ bpkg/ bdep/
+
+ # Update standard pre-installed build system modules.
\
|
- \li|Update \c{libbuild2-hello} if required.||
+ \li|Update other \c{libbuild2-*} modules if required.||
Verify key tests pass (in particular, the \c{bdep} tests will now be running
against \c{public} services):
@@ -401,6 +532,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
b test: build2/ bpkg/ bdep/
b test: bpkg/ config.bpkg.test.remote=true
b test: libbuild2-hello/libbuild2-hello-tests/
+
+ # Test standard pre-installed build system modules.
\
\N|We could have queued after this step before preparing
@@ -415,6 +548,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\
./push.sh
+ # Push (with tags) standard pre-installed build system modules.
+
cd build2-toolchain
git submodule update --remote --checkout
@@ -429,12 +564,13 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\ul|
\li|Regenerate documentation in each package inside as well as in
- \c{build2-toolchain} itself.|
+ \c{build2-toolchain} itself. @@ \c{libbuild-kconfig} not configured
+ out of tree? Or maybe it gets updated automatically during dist?|
\li|Update ODB by copying relevant files from the previous step (trust me,
this is the easy way for now). Make sure all \c{*-odb.*} are copied!|
- \li|Change \c{BUILD2_REPO} in \c{build2-toolchain} build scripts to
+ \li|Change \c{build2_repo} in \c{build2-toolchain} \c{buildfile} to
\c{queue}.||
Finally, push the changes:
@@ -445,7 +581,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\h#queuing|Queue|
- Prepare packages and the toolchain distribution:
+ Prepare packages and the toolchain distribution (disable extra packages
+ first if any were enabled in the \c{etc/stage} script):
\
etc/stage -q -b
@@ -468,10 +605,13 @@ distribution from \c{etc/stage} and add the pre-distributed packages
git push
\
- If queued package manifests contain new values, then the bpkg-rep-publish
- script will fail to create repository due to unknown manifest values. To
- resolve this we temporarily add (to \c{crontab}) \c{--ignore-unknown} and
- make a note to restore.
+ If queued package manifests contain new values, then the
+ \c{bpkg-rep-publish} script will fail to create repository due to unknown
+ manifest values. To resolve this we temporarily add (to \c{crontab})
+ \c{--ignore-unknown} and make a note to restore.
+
+ Also change \c{--min-bpkg-version} from previous to current release
+ (not the one being released).
\h#build-public|Verify queued packages build with \c{public}|
@@ -516,7 +656,12 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\N|Note that the \c{queue} \c{buildtab} is shared between \c{public} and
\c{queue} builds. As a result, after this update, \c{public} build hosts
- may not have some of the new (or renamed) build machines.|
+ may not have some of the new (or renamed) build machines.
+
+ This also means that if the \c{buildtab} contains anything new (options,
+ etc) that are incompatible with \c{public}, then they should only be
+ enabled later, when upgrading \c{public} \c{buildtab} (make a note if
+ that's the case).|
Adjust \c{stage} and \c{devel} build host configurations (both \c{*-config}
and hardware classes) to enable the \c{queue} toolchain. Shift most
@@ -535,6 +680,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
replacements. We can only proceed further once we have a \"resolution\"
for every (newly) broken package.
+ \N|If public has been built with the staged toolchain, rebuilding of the
+ public repository (which takes days) can be omitted.|
\h#stop-queue|Stop \c{queue} builds|
@@ -572,18 +719,24 @@ distribution from \c{etc/stage} and add the pre-distributed packages
(effectively making it a no-toolchain configuration), regenerate, and power
on the new set of \c{public} build hosts.
- Review deployed machines against the updated \c{public} \c{buildtab} and
- remove those that are no longer used:
+
+ @@ See new sync scripts for this step: Review deployed machines against the
+ updated \c{public} \c{buildtab} and remove those that are no longer used:
\
cd private/buildos/
+ grep '.*' .../brep-buildtab | cut -d' ' -f1 | sort -u
./ls-machines -c public
~/work/build2/buildos/remove-machine <host> <machine>
\
- Then move now legacy machines to the \"legacy\" build host.
+ Then move now legacy machines to the \"legacy\" build host:
+
+ \
+ grep 'legacy' .../brep-buildtab | cut -d' ' -f1 | sort -u
+ \
Also review deployed machines against the latest available versions and
upgrade those that are not the latest:
@@ -591,12 +744,18 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\
cd private/buildos/
- ./ls-machines -l \"/btrfs/$(whoami)/machines/default/\"
+ ./ls-machines -l \"/btrfs/$(whoami)/machines/default/\" | sort
./ls-machines -c public
~/work/build2/buildos/upload-machine <host> .../new-ver .../old-ver
\
+ Finally, add any new machines:
+
+ \
+ grep -v 'legacy' .../brep-buildtab | cut -d' ' -f1 | sort -u
+ \
+
Uncomment the \c{public} toolchain in the build host configuration and
regenerate. The only remaining step is to reboot (not yet):
@@ -606,7 +765,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\h#pub-dist|Publish distribution|
- Change \c{BUILD2_REPO} in \c{build2-toolchain} build scripts to \c{public},
+ Change \c{build2_repo} in \c{build2-toolchain} \c{buildfile} to \c{public},
commit, and publish the distribution (this also cleans/disables the
\c{queue} toolchain):
@@ -616,6 +775,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\h#pub-pkg|Publish packages|
+ @@ Need to add --min-bpkg-version 0.13.0
+
Move packages (manually for now) from the \c{queue} to \c{public} \c{git}
repository, including ownership information. Move old/replaced/FTB
packages either to legacy or delete.
@@ -627,7 +788,7 @@ distribution from \c{etc/stage} and add the pre-distributed packages
Note that once published, the existing install instructions/download
links are no longer usable, so do not linger (in fact, may make sense
to update Download and Install pages before publishing packages and
- sync only them immediately after).
+ only sync them immediately after).
\h#start-public|Start \c{public} builds|
@@ -642,6 +803,9 @@ distribution from \c{etc/stage} and add the pre-distributed packages
we just smoke-test each script on its \"primary\" platform and make sure
\c{public} URLs/repositories are used.
+ Also test building an old package with the previous version of the
+ toolchain.
+
\h#web|Update web|
\ul|
@@ -747,13 +911,17 @@ distribution from \c{etc/stage} and add the pre-distributed packages
Essentially, the same steps as in \l{#version-release Change to
release version} (but no tagging).
+ Revert changes to install scripts if upgrade was disabled.
+
\h#stage-machines-reopen|Update \c{stage} \c{buildtab}s and build machines|
Essentially, the same steps as in \l{#public-machines Update \c{public}
\c{buildtab}s and build machines} but for stage. Some differences:
Clean \c{buildtab}s (both \c{stage} and CI) by removing no longer relevant
- configurations, moving some to \c{legacy}, etc.
+ configurations, moving some to \c{legacy}, etc. NOTE: we now keep the
+ same set of machines as public until next release so that we can build
+ public with stage for testing.
More generally, this is the time to do sweeping changes such as renaming
machines/configurations, adjusting classes, etc. This is also the time to
@@ -765,6 +933,8 @@ distribution from \c{etc/stage} and add the pre-distributed packages
\c{baseutils} and \c{mingw}; the idea is that we will start with those and
maybe upgrade later).
+ Review \c{etc/stage} for any packages to enabled/disable.
+
Then cleanup and restage:
\
@@ -782,6 +952,14 @@ distribution from \c{etc/stage} and add the pre-distributed packages
Upgrade \c{brep} on \c{stage}.
+ Review \c{etc/stage-queue} and restage queue.stage:
+
+ \
+ rm -r staging/repository/1/*/
+
+ etc/stage-queue
+ \
+
\h#commit-reopen|Commit and push \c{etc/} and \c{private/}.|
Commit and push changes to \c{etc/} and \c{private/}.
@@ -830,6 +1008,20 @@ distribution from \c{etc/stage} and add the pre-distributed packages
Adjust \c{bdep-new}-generated projects to use any newly available features.
+\h1#re-review|Re-review \c{@@}|
+
+ Review \c{@@} notes (in case some should be fixed after the release):
+
+ \
+ etc/review | less -R
+ \
+
+ At least look for \c{@@\ TMP}
+
+ \
+ etc/review | grep TMP
+ \
+
\h1#plan|Plan|
Plan the next release and update the project roadmap.
diff --git a/doc/style b/doc/style
-Subproject 5d12805f877ff931b1195789e0cb0dae2ee9747
+Subproject b72eb624d13b1628e27e9f6c0b3c80853e8e015
diff --git a/git/modules b/git/modules
index d1821ff..415c795 100644
--- a/git/modules
+++ b/git/modules
@@ -1,18 +1,22 @@
-modules=" \
-git \
-change \
-libbutl \
-libbutl.bash \
-build2 \
-libbpkg \
-bpkg \
-bpkg-rep \
-bdep \
-brep \
-libbbot \
-bbot \
-libstd-modules \
-libbuild2-hello"
+modules=" \
+git \
+change \
+libbutl \
+libbutl.bash \
+build2 \
+libbpkg \
+bpkg \
+bpkg-util \
+bdep \
+bdep-util \
+brep \
+libbbot \
+bbot \
+libbuild2-hello \
+libbuild2-rust \
+libbuild2-kconfig \
+libbuild2-autoconf \
+libbuild2-qt"
# During release it is useful to exclude some of these so can do mass
# commits (like version updates).
@@ -23,11 +27,12 @@ modules="$modules build2-toolchain"
modules="$modules buildos"
modules="$modules msvc-linux"
modules="$modules openssl-agent"
+modules="$modules libpkg-config"
modules="$modules etc"
modules="$modules private"
-# We don't tag git/, libbuild2-hello.
+# We don't tag git/, libbuild2-*.
# And etc/, private/, build2-toolchain/ are tagged manually.
#
tag_modules=" \
@@ -36,33 +41,38 @@ libbutl.bash \
build2 \
libbpkg \
bpkg \
-bpkg-rep \
+bpkg-util \
bdep \
+bdep-util \
brep \
libbbot \
bbot \
-libstd-modules \
msvc-linux \
openssl-agent \
buildos"
# Submodule update in build2-toolchain has to be done manually.
#
-sub_modules=" \
-etc \
-private \
-libbutl \
-libbutl.bash \
-build2 \
-libbpkg \
-bpkg \
-bpkg-rep \
-bdep \
-brep \
-libbbot \
-bbot \
-libstd-modules \
-libbuild2-hello \
-buildos \
-msvc-linux \
-openssl-agent"
+sub_modules=" \
+etc \
+private \
+libbutl \
+libbutl.bash \
+build2 \
+libbpkg \
+bpkg \
+bpkg-util \
+bdep \
+bdep-util \
+brep \
+libbbot \
+bbot \
+libbuild2-hello \
+libbuild2-rust \
+libbuild2-kconfig \
+libbuild2-autoconf \
+libbuild2-qt \
+buildos \
+msvc-linux \
+openssl-agent \
+libpkg-config"
diff --git a/intro b/intro
index 6b2b747..d7dfed0 100755
--- a/intro
+++ b/intro
@@ -45,10 +45,9 @@ hello2=hello/hello2
show=n
prompt=-y
-# Add for both build2.org and stage.build2.org.
+# Add for **build2.org.
#
-trust="--trust FF:DF:7D:38:67:4E:C3:82:65:7E:EE:1F:D4:80:EC:56:C4:33:5B:65:3F:9B:29:9A:30:56:B9:77:B9:F2:01:94"
-trust+=" --trust 37:CE:2C:A5:1D:CF:93:81:D7:07:46:AD:66:B3:C3:90:83:B8:96:9E:34:F0:E7:B3:A2:B0:6C:EF:66:A4:BE:65"
+trust="--trust EC:50:13:E2:3D:F7:92:B4:50:0B:BF:2A:1F:7D:31:04:C6:57:6F:BC:BE:04:2E:E0:58:14:FA:66:66:21:1F:14"
c1=g++-5
c2=clang++-3.6
diff --git a/intro2-tldr b/intro2-tldr
index ee1f487..6fd2d09 100755
--- a/intro2-tldr
+++ b/intro2-tldr
@@ -15,15 +15,28 @@ function error () { echo "$*" 1>&2; exit 1; }
tmp=/tmp
show=y
+# Keep in sync with *-tour.
+#
function show () # <cmd> ...
{
if [ $show = "y" ]; then
echo
echo "+ $*"
- "${@}"
- else
- "${@}"
fi
+
+ local p=("$1")
+
+ if [ "$1" = b -o "$1" = bpkg -o "$1" = bdep ]; then
+ p+=(--no-progress)
+ fi
+
+ if [ "$1" = tree ]; then
+ p+=(-n) # No color.
+ fi
+
+ shift
+
+ "${p[@]}" "${@}"
}
cd "$tmp"
@@ -39,7 +52,7 @@ git add .
git commit -m "first commit"
cd ..
-show git clone file://$tmp/hello.git
+show git clone --no-progress file://$tmp/hello.git
show tree hello
show cd hello
@@ -64,7 +77,7 @@ show b
sed -i -re 's/#v1.0.0//' repositories.manifest
show bdep fetch
-bdep sync
+bdep sync --no-progress
show bdep status -i
show bdep sync libhello
diff --git a/intro2-tldr.orig b/intro2-tldr.orig
index 7f3e9a0..445493d 100644
--- a/intro2-tldr.orig
+++ b/intro2-tldr.orig
@@ -1,6 +1,8 @@
+Script started on 2023-06-28 11:17:30+02:00 [COMMAND="./intro2-tldr" TERM="xterm-256color" TTY="/dev/pts/21" COLUMNS="160" LINES="47"]
created new executable project hello in /tmp/hello.git/
-[master (root-commit) 2fe4497] first commit
- 12 files changed, 107 insertions(+)
+[master (root-commit) ddbbb0a] first commit
+ 13 files changed, 143 insertions(+)
+ create mode 100644 .gitattributes
create mode 100644 .gitignore
create mode 100644 README.md
create mode 100644 build/.gitignore
@@ -14,7 +16,7 @@ created new executable project hello in /tmp/hello.git/
create mode 100644 manifest
create mode 100644 repositories.manifest
-+ git clone file:///tmp/hello.git
++ git clone --no-progress file:///tmp/hello.git
Cloning into 'hello'...
+ tree hello
@@ -31,19 +33,19 @@ hello
├── README.md
└── repositories.manifest
-2 directories, 9 files
+3 directories, 9 files
+ cd hello
+ bdep init --config-create ../hello-gcc cc config.cxx=g++
initializing in project /tmp/hello/
-created configuration /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+created configuration /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new hello/0.1.0
+ b
mkdir ../hello-gcc/hello/fsdir{hello/}
-c++ hello/cxx{hello}@../hello-gcc/hello/hello/
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
ld ../hello-gcc/hello/hello/exe{hello}
ln ../hello-gcc/hello/hello/exe{hello} -> hello/
@@ -52,48 +54,37 @@ Hello, World!
+ b
fetching git:build2.org/hello/libhello#v1.0.0 (prerequisite of dir:/tmp/hello)
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
synchronizing /tmp/hello-gcc/:
new libhello/1.0.0+4 (required by hello)
upgrade hello/0.1.0#1
-distributing libhello/1.0.0+4
-version.in ../hello-gcc/libhello-1.0.0+4/libhello/version.hxx.in
-c++ ../hello-gcc/libhello-1.0.0+4/libhello/cxx{hello}
-c++ hello/cxx{hello}@../hello-gcc/hello/hello/
+version ../hello-gcc/libhello-1.0.0+4/libhello/in{version} -> ../hello-gcc/libhello-1.0.0+4/libhello/hxx{version}
+c++ ../hello-gcc/libhello-1.0.0+4/libhello/cxx{hello} -> ../hello-gcc/libhello-1.0.0+4/libhello/objs{hello}
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
ld ../hello-gcc/libhello-1.0.0+4/libhello/libs{hello}
ld ../hello-gcc/hello/hello/exe{hello}
ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+ bdep fetch
fetching git:build2.org/hello/libhello (prerequisite of dir:/tmp/hello)
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
fetching git:build2.org/hello/libformat##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libformat.git
-fetching from https://git.build2.org/hello/libformat.git
fetching git:build2.org/hello/libprint##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libprint.git
-fetching from https://git.build2.org/hello/libprint.git
+ bdep status -i
hello configured 0.1.0#1
- libhello ^1.0.0 configured 1.0.0+4 available [1.1.0+5] [1.0.0+5]
+ libhello ^1.0.0 configured 1.0.0+4 available [1.1.0+11] [1.0.0+11]
+ bdep sync libhello
synchronizing:
- new libformat/1.0.0+5 (required by libhello)
- new libprint/1.0.0+5 (required by libhello)
- upgrade libhello/1.1.0+5
+ new libformat/1.0.0+11 (required by libhello)
+ new libprint/1.0.0+11 (required by libhello)
+ upgrade libhello/1.1.0+11
reconfigure hello/0.1.0#1
-distributing libformat/1.0.0+5
-distributing libprint/1.0.0+5
-distributing libhello/1.1.0+5
+ bdep sync libhello/1.0.0
synchronizing:
- drop libprint/1.0.0+5 (unused)
- drop libformat/1.0.0+5 (unused)
- downgrade libhello/1.0.0+5
+ drop libprint/1.0.0+11 (unused)
+ drop libformat/1.0.0+11 (unused)
+ downgrade libhello/1.0.0+11
reconfigure hello/0.1.0#1
-distributing libhello/1.0.0+5
+
+Script done on 2023-06-28 11:17:55+02:00 [COMMAND_EXIT_CODE="0"]
diff --git a/intro2-tour b/intro2-tour
index 4adbac7..8af8fea 100755
--- a/intro2-tour
+++ b/intro2-tour
@@ -18,27 +18,40 @@ tmp=/tmp
show=y
gcc=g++
-clang=clang++-5.0
+clang=clang++-16
msvc=cl-15
repo=https://stage.build2.org/1/
-trust="37:CE:2C:A5:1D:CF:93:81:D7:07:46:AD:66:B3:C3:90:83:B8:96:9E:34:F0:E7:B3:A2:B0:6C:EF:66:A4:BE:65"
+trust="EC:50:13:E2:3D:F7:92:B4:50:0B:BF:2A:1F:7D:31:04:C6:57:6F:BC:BE:04:2E:E0:58:14:FA:66:66:21:1F:14"
+# Keep in sync with *-tldr.
+#
function show () # <cmd> ...
{
if [ $show = "y" ]; then
echo
echo "+ $*"
- "${@}"
- else
- "${@}"
fi
+
+ local p=("$1")
+
+ if [ "$1" = b -o "$1" = bpkg -o "$1" = bdep ]; then
+ p+=(--no-progress)
+ fi
+
+ if [ "$1" = tree ]; then
+ p+=(-n) # No color.
+ fi
+
+ shift
+
+ "${p[@]}" "${@}"
}
cd "$tmp"
function clean ()
{
- rm -rf hello hello-gcc hello-clang hello-vc-* hello-mingw
+ rm -rf hello hello-host hello-build2 hello-base hello-gcc hello-gcc-1 hello-clang hello-vc-* hello-mingw
}
## if false; then
@@ -74,19 +87,19 @@ show b ../hello-clang/hello/
show b test: ../hello-clang/hello/
show ../hello-clang/hello/hello/hello World
-b clean: ../hello-clang/hello/
+b --no-progress clean: ../hello-clang/hello/
show bdep test @clang
show bdep test @gcc @clang
show bdep init -C ../hello-mingw @mingw cc config.cxx=x86_64-w64-mingw32-g++
show bdep update @mingw
show bdep test @mingw
-show ../hello-mingw/hello/hello/hello.exe Windows
+show ../hello-mingw/hello/hello/hello.exe Windows | cat # Strip term junk.
show git add .
show git commit -m "Initial implementation"
show git remote add origin git@github.com:boris-kolpackov/hello.git
-show git push origin master -u --force
+show git push --no-progress origin master -u --force
show bdep ci --simulate success
show bdep deinit @gcc @clang
@@ -160,7 +173,7 @@ show bdep sync
#
sed -i -re 's/^#import/import/' hello/buildfile
sed -i -re 's/^#depends: libhello/depends: libhello/' manifest
-bdep sync
+bdep sync --no-progress
cat <<EOF >>repositories.manifest
:
@@ -221,6 +234,102 @@ show bdep sync ?sys:libsqlite3
cd ..
+# Build-time Dependencies.
+#
+clean
+show bdep new -t exe -l c++ hello
+cd hello
+show bdep init -C @gcc cc config.cxx=$gcc
+show bdep init -C @clang cc config.cxx=$clang
+
+cat <<EOF >>repositories.manifest
+:
+role: prerequisite
+location: https://pkg.cppget.org/1/alpha
+trust: 70:64:FE:E4:E0:F3:60:F1:B4:51:E1:FA:12:5C:E0:B3:DB:DF:96:33:39:B9:2E:E5:C2:68:63:4C:A6:47:39:43
+EOF
+echo 'depends: * xxd >= 8.2.0' >>manifest
+cat <<EOF >hello/buildfile
+import! [metadata] xxd = xxd%exe{xxd}
+
+exe{hello}: {hxx ixx txx cxx}{** -names} cxx{names} $libs testscript
+
+cxx{names}: file{names.txt} \$xxd
+{{
+ i = \$path(\$<[0])
+ env --cwd \$directory(\$i) -- \$xxd -i \$leaf(\$i) >\$path(\$>)
+}}
+EOF
+cat <<EOF >hello/hello.cxx
+#include <iostream>
+#include <string>
+
+extern unsigned char names_txt[];
+extern unsigned int names_txt_len;
+
+int main (int argc, char* argv[])
+{
+ using namespace std;
+
+ if (argc < 2)
+ {
+ cerr << "error: missing name" << endl;
+ return 1;
+ }
+
+ cout << string (reinterpret_cast<const char*> (names_txt), names_txt_len) << ", " << argv[1] << '!' << endl;
+}
+EOF
+echo -n "Hello" >hello/names.txt
+
+show bdep config list
+#show bdep sync --create-host-config # Needed if not terminal.
+show b
+b --no-progress test
+show bdep config list
+show bdep update @clang
+
+echo 'depends: * libbuild2-hello' >>manifest
+echo 'using hello' >>hello/buildfile
+
+#show bdep sync --create-build2-config # Needed if not terminal.
+show b
+show bdep config list
+show bdep update @clang
+
+cd ..
+
+
+# Linked Configurations.
+#
+clean
+show bdep new -t exe -l c++ hello
+cd hello
+
+cat <<EOF >>repositories.manifest
+:
+role: prerequisite
+location: $repo
+trust: $trust
+EOF
+sed -i -re 's/^#depends: libhello/depends: libhello/' manifest # ^1.0.0
+sed -i -re 's/^#import/import/' hello/buildfile
+
+show bdep config create ../hello-base @base --no-default cc config.cxx=$gcc
+show bdep config create ../hello-gcc @gcc --default cc config.cxx=$gcc
+show bdep config create ../hello-clang @clang cc config.cxx=$clang
+
+show bdep config link @gcc @base
+show bdep config link @clang @base
+
+show bdep init @gcc { @base }+ ?libhello
+show bdep init @clang
+
+show bdep update @gcc
+show bdep update @clang
+
+cd ..
+
# Versioning and Release Management.
#
clean
@@ -228,13 +337,13 @@ show bdep new -C hello-gcc @gcc -t exe -l c++ hello cc config.cxx=$gcc
cd hello
git remote add origin git@github.com:boris-kolpackov/hello.git
-git push origin :build2-control || true
-git push -d origin v0.1.0-a.1 || true
-git push -d origin v0.1.0 || true
+git push --no-progress origin :build2-control || true
+git push --no-progress -d origin v0.1.0-a.1 || true
+git push --no-progress -d origin v0.1.0 || true
git add .
git commit -m "Initial implementation"
-git push -f -u
+git push --no-progress -f -u
show bdep status
show b info
@@ -249,7 +358,7 @@ show bdep status
show bdep release --alpha --push
show bdep release --no-open --push
-show bdep publish --simulate success
+show bdep publish --simulate success --repository https://stage.build2.org
show bdep release --open --push
@@ -267,6 +376,7 @@ show bdep init -C ../hello-clang @clang cc config.cxx=$clang
cd ..
show bdep new -t lib -l c++ libhello
+show tree libhello
show cd libhello
show bdep init -A ../hello-gcc @gcc
@@ -330,5 +440,3 @@ show /opt/tools/bin/hello World
show tree /opt/tools
show bpkg uninstall hello
show bpkg drop hello
-
-echo "finished"
diff --git a/intro2-tour.orig b/intro2-tour.orig
index f3b1a52..53015a0 100644
--- a/intro2-tour.orig
+++ b/intro2-tour.orig
@@ -1,3 +1,4 @@
+Script started on 2023-06-28 11:58:39+02:00 [COMMAND="./intro2-tour" TERM="xterm-256color" TTY="/dev/pts/21" COLUMNS="160" LINES="47"]
+ bdep new -t exe -l c++ hello
created new executable project hello in /tmp/hello/
@@ -16,7 +17,7 @@ hello
├── README.md
└── repositories.manifest
-2 directories, 9 files
+3 directories, 9 files
+ cd hello
@@ -59,44 +60,43 @@ EOE
: 1
name: hello
version: 0.1.0-a.0.z
+language: c++
summary: hello C++ executable
-license: proprietary
+license: other: proprietary ; Not free/open source.
description-file: README.md
url: https://example.org/hello
email: boris@codesynthesis.com
-depends: * build2 >= 0.11.0
-depends: * bpkg >= 0.11.0
+#build-error-email: boris@codesynthesis.com
+depends: * build2 >= 0.15.0
+depends: * bpkg >= 0.15.0
#depends: libhello ^1.0.0
+ bdep init -C ../hello-gcc @gcc cc config.cxx=g++
initializing in project /tmp/hello/
-created configuration @gcc /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+created configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
-+ bdep init -C ../hello-clang @clang cc config.cxx=clang++-5.0
++ bdep init -C ../hello-clang @clang cc config.cxx=clang++-16
initializing in project /tmp/hello/
-created configuration @clang /tmp/hello-clang/ 2 auto-synchronized
+created configuration @clang /tmp/hello-clang/ 2 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
-+ ls -d -1 ../hello ../hello1 ../hello-clang ../hello.cxx ../hello-gcc ../hello.o
++ ls -d -1 ../hello ../hello-clang ../hello-gcc
../hello
-../hello1
../hello-clang
-../hello.cxx
../hello-gcc
-../hello.o
+ bdep init -C ../hello-vc-debug @debug cc config.cxx=cl-15 config.cc.coptions=/MDd /Z7 config.cc.loptions=/DEBUG
initializing in project /tmp/hello/
-created configuration @debug /tmp/hello-vc-debug/ 3 auto-synchronized
+created configuration @debug /tmp/hello-vc-debug/ 3 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
+ bdep init -C ../hello-vc-release @release cc config.cxx=cl-15 config.cc.coptions=/O2
initializing in project /tmp/hello/
-created configuration @release /tmp/hello-vc-release/ 4 auto-synchronized
+created configuration @release /tmp/hello-vc-release/ 4 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
@@ -105,12 +105,12 @@ hello configured 0.1.0-a.0.19700101000000
+ b
mkdir ../hello-gcc/hello/fsdir{hello/}
-c++ hello/cxx{hello}@../hello-gcc/hello/hello/
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
ld ../hello-gcc/hello/hello/exe{hello}
ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+ b test
-test hello/testscript{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
+test ../hello-gcc/hello/hello/exe{hello} + hello/testscript{testscript}
+ hello/hello World
Hello, World!
@@ -135,60 +135,61 @@ Hello, World!
├── hello.o
└── hello.o.d
-6 directories, 11 files
+7 directories, 11 files
+ bdep status @clang
hello configured 0.1.0-a.0.19700101000000
+ b ../hello-clang/hello/
mkdir ../hello-clang/hello/fsdir{hello/}
-c++ hello/cxx{hello}@../hello-clang/hello/hello/
+c++ hello/cxx{hello} -> ../hello-clang/hello/hello/obje{hello}
ld ../hello-clang/hello/hello/exe{hello}
+ b test: ../hello-clang/hello/
-test hello/testscript{testscript}@../hello-clang/hello/hello/ ../hello-clang/hello/hello/exe{hello}
+test ../hello-clang/hello/hello/exe{hello} + hello/testscript{testscript}
+ ../hello-clang/hello/hello/hello World
Hello, World!
rm ../hello-clang/hello/hello/exe{hello}
rm ../hello-clang/hello/hello/obje{hello}
-rm ../hello-clang/hello/fsdir{hello/}
+rmdir ../hello-clang/hello/fsdir{hello/}
+ bdep test @clang
mkdir ../hello-clang/hello/fsdir{hello/}
-c++ hello/cxx{hello}@../hello-clang/hello/hello/
+c++ hello/cxx{hello} -> ../hello-clang/hello/hello/obje{hello}
ld ../hello-clang/hello/hello/exe{hello}
-test hello/testscript{testscript}@../hello-clang/hello/hello/ ../hello-clang/hello/hello/exe{hello}
+test ../hello-clang/hello/hello/exe{hello} + hello/testscript{testscript}
+ bdep test @gcc @clang
in configuration @gcc:
-test hello/testscript{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
+test ../hello-gcc/hello/hello/exe{hello} + hello/testscript{testscript}
in configuration @clang:
-test hello/testscript{testscript}@../hello-clang/hello/hello/ ../hello-clang/hello/hello/exe{hello}
+test ../hello-clang/hello/hello/exe{hello} + hello/testscript{testscript}
+ bdep init -C ../hello-mingw @mingw cc config.cxx=x86_64-w64-mingw32-g++
initializing in project /tmp/hello/
-created configuration @mingw /tmp/hello-mingw/ 5 auto-synchronized
+created configuration @mingw /tmp/hello-mingw/ 5 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
+ bdep update @mingw
mkdir ../hello-mingw/hello/fsdir{hello/}
-c++ hello/cxx{hello}@../hello-mingw/hello/hello/
+c++ hello/cxx{hello} -> ../hello-mingw/hello/hello/obje{hello}
ld ../hello-mingw/hello/hello/exe{hello}
+ bdep test @mingw
-test hello/testscript{testscript}@../hello-mingw/hello/hello/ ../hello-mingw/hello/hello/exe{hello}
+test ../hello-mingw/hello/hello/exe{hello} + hello/testscript{testscript}
+ ../hello-mingw/hello/hello/hello.exe Windows
-Hello, Windows!
+Hello, Windows!
+ git add .
+ git commit -m Initial implementation
-[master (root-commit) 83b57ed] Initial implementation
- 12 files changed, 107 insertions(+)
+[master (root-commit) 014a3ac] Initial implementation
+ 13 files changed, 143 insertions(+)
+ create mode 100644 .gitattributes
create mode 100644 .gitignore
create mode 100644 README.md
create mode 100644 build/.gitignore
@@ -204,22 +205,20 @@ Hello, Windows!
+ git remote add origin git@github.com:boris-kolpackov/hello.git
-+ git push origin master -u --force
++ git push --no-progress origin master -u --force
To github.com:boris-kolpackov/hello.git
- + 7f613af...83b57ed master -> master (forced update)
-Branch 'master' set up to track remote branch 'master' from 'origin'.
+ + 943049b...014a3ac master -> master (forced update)
+branch 'master' set up to track 'origin/master'.
+ bdep ci --simulate success
submitting:
to: https://ci.stage.build2.org
- in: https://github.com/boris-kolpackov/hello.git#master@83b57eddde8485a4f4aea49c71f5d4382cb58f85
+ in: https://github.com/boris-kolpackov/hello.git#master@014a3ac5e6132b6951f6bd8c2d759ae881dea3f6
package: hello
- version: 0.1.0-a.0.20191118060612.83b57eddde84
-continue? [y/n] % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 812 100 163 100 649 106 423 0:00:01 0:00:01 --:--:-- 423
-CI request is queued: https://ci.stage.build2.org/@613d3e21-151c-4c22-ae53-bba54f9eb6c4
-reference: 613d3e21-151c-4c22-ae53-bba54f9eb6c4
+ version: 0.1.0-a.0.20230628095907.014a3ac5e613
+continue? [Y/n] y
+CI request is queued: https://ci.stage.build2.org/@8338f18e-8ebf-4def-9520-473748b4d6f4
+reference: 8338f18e-8ebf-4def-9520-473748b4d6f4
+ bdep deinit @gcc @clang
deinitializing in project /tmp/hello/
@@ -233,64 +232,60 @@ synchronizing:
+ bdep new -C hello-gcc @gcc -t exe -l c++ hello cc config.cxx=g++
created new executable project hello in /tmp/hello/
-created configuration @gcc /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+created configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
-+ bdep init -C ../hello-clang @clang cc config.cxx=clang++-5.0
++ bdep init -C ../hello-clang @clang cc config.cxx=clang++-16
initializing in project /tmp/hello/
-created configuration @clang /tmp/hello-clang/ 2 auto-synchronized
+created configuration @clang /tmp/hello-clang/ 2 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
+ bpkg rep-info https://git.build2.org/hello/libhello.git
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
git:build2.org/hello/libhello https://git.build2.org/hello/libhello.git
prerequisite git:build2.org/hello/libprint##HEAD https://git.build2.org/hello/libprint.git##HEAD
prerequisite git:build2.org/hello/libformat##HEAD https://git.build2.org/hello/libformat.git##HEAD
-libhello/1.1.0+5
-libhello/1.0.0+5
+libhello/1.0.0+11
+libhello/1.1.0+11
+ bpkg rep-info https://git.build2.org/hello/libhello.git#HEAD
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
git:build2.org/hello/libhello#HEAD https://git.build2.org/hello/libhello.git#HEAD
prerequisite git:build2.org/hello/libprint##HEAD https://git.build2.org/hello/libprint.git##HEAD
prerequisite git:build2.org/hello/libformat##HEAD https://git.build2.org/hello/libformat.git##HEAD
-libhello/1.1.0+5
+libhello/1.1.0+11
+ bdep status
fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
warning: authenticity of the certificate for repository pkg:stage.build2.org cannot be established
-certificate is for **stage.build2.org, "Code Synthesis" <stage-admin@build2.org>
+certificate is for **build2.org, "Code Synthesis" <admin@build2.org>
certificate SHA256 fingerprint:
-37:CE:2C:A5:1D:CF:93:81:D7:07:46:AD:66:B3:C3:90:83:B8:96:9E:34:F0:E7:B3:A2:B0:6C:EF:66:A4:BE:65
-trust this certificate? [y/n] hello configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.19700101000000#1
+EC:50:13:E2:3D:F7:92:B4:50:0B:BF:2A:1F:7D:31:04:C6:57:6F:BC:BE:04:2E:E0:58:14:FA:66:66:21:1F:14
+trust this certificate? [y/n] y
+hello configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.19700101000000#1
+ bdep sync
synchronizing:
- new libhello/1.0.0+4 (required by hello)
+ new libhello/1.0.0+11 (required by hello)
upgrade hello/0.1.0-a.0.19700101000000#1
- 0K ... 100% 78.7M=0s
+ b
synchronizing /tmp/hello-gcc/:
upgrade hello/0.1.0-a.0.19700101000000#2
+version ../hello-gcc/libhello-1.0.0+11/libhello/in{version} -> ../hello-gcc/libhello-1.0.0+11/libhello/hxx{version}
mkdir ../hello-gcc/hello/fsdir{hello/}
-version.in ../hello-gcc/libhello-1.0.0+4/libhello/version.hxx.in
-c++ ../hello-gcc/libhello-1.0.0+4/libhello/cxx{hello}
-c++ hello/cxx{hello}@../hello-gcc/hello/hello/
-ld ../hello-gcc/libhello-1.0.0+4/libhello/libs{hello}
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
+c++ ../hello-gcc/libhello-1.0.0+11/libhello/cxx{hello} -> ../hello-gcc/libhello-1.0.0+11/libhello/objs{hello}
+ld ../hello-gcc/libhello-1.0.0+11/libhello/libs{hello}
ld ../hello-gcc/hello/hello/exe{hello}
ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+ bdep status -ai
in configuration @gcc:
hello configured 0.1.0-a.0.19700101000000#2
- libhello ^1.0.0 configured 1.0.0+4
+ libhello ^1.0.0 configured 1.0.0+11
in configuration @clang:
fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
@@ -301,109 +296,100 @@ in configuration @gcc:
in configuration @clang:
synchronizing:
- new libhello/1.0.0+4 (required by hello)
+ new libhello/1.0.0+11 (required by hello)
upgrade hello/0.1.0-a.0.19700101000000#1
- 0K ... 100% 81.6M=0s
+ bdep test -ai
in configuration @gcc:
-c++ ../hello-gcc/libhello-1.0.0+4/tests/basics/cxx{driver}
-ld ../hello-gcc/libhello-1.0.0+4/tests/basics/exe{driver}
-test hello/testscript{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
-test ../hello-gcc/libhello-1.0.0+4/tests/basics/exe{driver}
+c++ ../hello-gcc/libhello-1.0.0+11/tests/basics/cxx{driver} -> ../hello-gcc/libhello-1.0.0+11/tests/basics/obje{driver}
+ld ../hello-gcc/libhello-1.0.0+11/tests/basics/exe{driver}
+test ../hello-gcc/libhello-1.0.0+11/tests/basics/exe{driver}
+test ../hello-gcc/hello/hello/exe{hello} + hello/testscript{testscript}
in configuration @clang:
+version ../hello-clang/libhello-1.0.0+11/libhello/in{version} -> ../hello-clang/libhello-1.0.0+11/libhello/hxx{version}
mkdir ../hello-clang/hello/fsdir{hello/}
-version.in ../hello-clang/libhello-1.0.0+4/libhello/version.hxx.in
-c++ ../hello-clang/libhello-1.0.0+4/libhello/cxx{hello}
-c++ ../hello-clang/libhello-1.0.0+4/tests/basics/cxx{driver}
-c++ hello/cxx{hello}@../hello-clang/hello/hello/
-ld ../hello-clang/libhello-1.0.0+4/libhello/libs{hello}
-ld ../hello-clang/libhello-1.0.0+4/tests/basics/exe{driver}
+c++ ../hello-clang/libhello-1.0.0+11/libhello/cxx{hello} -> ../hello-clang/libhello-1.0.0+11/libhello/objs{hello}
+c++ ../hello-clang/libhello-1.0.0+11/tests/basics/cxx{driver} -> ../hello-clang/libhello-1.0.0+11/tests/basics/obje{driver}
+c++ hello/cxx{hello} -> ../hello-clang/hello/hello/obje{hello}
+ld ../hello-clang/libhello-1.0.0+11/libhello/libs{hello}
ld ../hello-clang/hello/hello/exe{hello}
-test hello/testscript{testscript}@../hello-clang/hello/hello/ ../hello-clang/hello/hello/exe{hello}
-test ../hello-clang/libhello-1.0.0+4/tests/basics/exe{driver}
+ld ../hello-clang/libhello-1.0.0+11/tests/basics/exe{driver}
+test ../hello-clang/hello/hello/exe{hello} + hello/testscript{testscript}
+test ../hello-clang/libhello-1.0.0+11/tests/basics/exe{driver}
+ bdep status
hello configured 0.1.0-a.0.19700101000000#2 available 0.1.0-a.0.19700101000000#3
+ bdep sync
synchronizing:
- drop libhello/1.0.0+4 (unused)
+ drop libhello/1.0.0+11 (unused)
upgrade hello/0.1.0-a.0.19700101000000#3
synchronizing:
- new libhello/1.0.0+4 (required by hello)
+ new libhello/1.0.0+11 (required by hello)
upgrade hello/0.1.0-a.0.19700101000000#4
- 0K ... 100% 89.3M=0s
+ bdep fetch
fetching git:build2.org/hello/libhello (prerequisite of dir:/tmp/hello)
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
fetching git:build2.org/hello/libformat##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libformat.git
-fetching from https://git.build2.org/hello/libformat.git
fetching git:build2.org/hello/libprint##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libprint.git
-fetching from https://git.build2.org/hello/libprint.git
fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
+ bdep status libhello
-libhello configured 1.0.0+4 available [1.1.0+5] [1.0.0+5]
+libhello configured 1.0.0+11 available [1.1.0+11]
+ bdep sync libhello
synchronizing:
- new libformat/1.0.0+5 (required by libhello)
- new libprint/1.0.0+5 (required by libhello)
- upgrade libhello/1.1.0+5
+ new libformat/1.0.0+11 (required by libhello)
+ new libprint/1.0.0+11 (required by libhello)
+ upgrade libhello/1.1.0+11
reconfigure hello/0.1.0-a.0.19700101000000#4
-distributing libformat/1.0.0+5
-distributing libprint/1.0.0+5
-distributing libhello/1.1.0+5
+ bdep status -r
hello configured 0.1.0-a.0.19700101000000#4
- libhello ^1.0.0 configured 1.1.0+5
- libformat ^1.0.0 configured 1.0.0+5
- libprint ^1.0.0 configured 1.0.0+5
+ libhello ^1.0.0 configured 1.1.0+11
+ libformat ^1.0.0 configured 1.0.0+11
+ libprint ^1.0.0 configured 1.0.0+11
+ bdep status -o libhello
-libhello configured 1.1.0+5 available (1.1.0+5) [1.0.0+5] [1.0.0+4]
+libhello configured 1.1.0+11 available (1.1.0+11) [1.0.0+11]
+ bdep sync libhello/1.0.0
synchronizing:
- drop libprint/1.0.0+5 (unused)
- drop libformat/1.0.0+5 (unused)
- downgrade libhello/1.0.0+5
+ drop libprint/1.0.0+11 (unused)
+ drop libformat/1.0.0+11 (unused)
+ downgrade libhello/1.0.0+11
reconfigure hello/0.1.0-a.0.19700101000000#4
-distributing libhello/1.0.0+5
+ bdep new -C libextra-gcc -t lib -l c++ libextra cc config.cxx=g++
created new library project libextra in /tmp/libextra/
-created configuration /tmp/libextra-gcc/ 1 default,forwarded,auto-synchronized
+created configuration /tmp/libextra-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new libextra/0.1.0-a.0.19700101000000
+ b install: libextra/ config.install.root=/tmp/unpkg-gcc
mkdir libextra-gcc/libextra/fsdir{libextra/}
-version.in libextra/libextra/version.hxx.in
-c++ libextra/libextra/cxx{extra}@libextra-gcc/libextra/libextra/
-c++ libextra/libextra/cxx{extra}@libextra-gcc/libextra/libextra/
-ar libextra-gcc/libextra/libextra/liba{extra}
+version libextra/libextra/in{version} -> libextra-gcc/libextra/libextra/hxx{version}
+c++ libextra/libextra/cxx{extra} -> libextra-gcc/libextra/libextra/objs{extra}
+c++ libextra/libextra/cxx{extra} -> libextra-gcc/libextra/libextra/obja{extra}
+pc libextra-gcc/libextra/libextra/libs{extra} -> libextra-gcc/libextra/libextra/pcs{extra}
+pc libextra-gcc/libextra/libextra/liba{extra} -> libextra-gcc/libextra/libextra/pca{extra}
+pc libextra-gcc/libextra/libextra/lib{extra} -> libextra-gcc/libextra/libextra/pc{extra}
ld libextra-gcc/libextra/libextra/libs{extra}
-install unpkg-gcc/
-install unpkg-gcc/include/
-install unpkg-gcc/include/libextra/
-install libextra/libextra/hxx{export}@libextra-gcc/libextra/libextra/
-install libextra/libextra/hxx{extra}@libextra-gcc/libextra/libextra/
-install unpkg-gcc/share/
-install unpkg-gcc/share/doc/
-install unpkg-gcc/share/doc/libextra/
-install libextra/manifest{manifest}@libextra-gcc/libextra/
-install libextra-gcc/libextra/libextra/hxx{version}
-install libextra-gcc/libextra/libextra/liba{extra}
-install libextra-gcc/libextra/libextra/libs{extra}
-install libextra/doc{README.md}@libextra-gcc/libextra/
+ar libextra-gcc/libextra/libextra/liba{extra}
+install -d unpkg-gcc/
+install -d unpkg-gcc/include/
+install -d unpkg-gcc/include/libextra/
+install libextra/libextra/hxx{export}@libextra-gcc/libextra/libextra/ -> unpkg-gcc/include/libextra/
+install libextra/libextra/hxx{extra}@libextra-gcc/libextra/libextra/ -> unpkg-gcc/include/libextra/
+install -d unpkg-gcc/share/
+install -d unpkg-gcc/share/doc/
+install -d unpkg-gcc/share/doc/libextra/
+install libextra/manifest{manifest}@libextra-gcc/libextra/ -> unpkg-gcc/share/doc/libextra/manifest
+install libextra-gcc/libextra/libextra/hxx{version} -> unpkg-gcc/include/libextra/
+install libextra-gcc/libextra/libextra/liba{extra} -> unpkg-gcc/lib/
+install libextra-gcc/libextra/libextra/libs{extra} -> unpkg-gcc/lib/
+install libextra/doc{README.md}@libextra-gcc/libextra/ -> unpkg-gcc/share/doc/libextra/
+ tree unpkg-gcc
unpkg-gcc
@@ -417,6 +403,7 @@ unpkg-gcc
│   ├── libextra.a
│   ├── libextra.so -> libextra-0.1.0-a.0.19700101000000.so
│   └── pkgconfig
+│   ├── libextra.pc
│   ├── libextra.shared.pc
│   └── libextra.static.pc
└── share
@@ -425,76 +412,208 @@ unpkg-gcc
├── manifest
└── README.md
-7 directories, 10 files
+8 directories, 11 files
+ bdep init -C ../hello-gcc-1 @gcc1 cc config.cxx=g++ config.cc.poptions=-I/tmp/unpkg-gcc/include config.cc.loptions=-L/tmp/unpkg-gcc/lib
initializing in project /tmp/hello/
-created configuration @gcc1 /tmp/hello-gcc-1/ 3 auto-synchronized
+created configuration @gcc1 /tmp/hello-gcc-1/ 3 target auto-synchronized
fetching git:build2.org/hello/libhello (prerequisite of dir:/tmp/hello)
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
fetching git:build2.org/hello/libformat##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libformat.git
-fetching from https://git.build2.org/hello/libformat.git
fetching git:build2.org/hello/libprint##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libprint.git
-fetching from https://git.build2.org/hello/libprint.git
fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
synchronizing:
- new libformat/1.0.0+5 (required by libhello)
- new libprint/1.0.0+5 (required by libhello)
- new libhello/1.1.0+5 (required by hello)
+ new libformat/1.0.0+11 (required by libhello)
+ new libprint/1.0.0+11 (required by libhello)
+ new libhello/1.1.0+11 (required by hello)
new hello/0.1.0-a.0.19700101000000
-distributing libformat/1.0.0+5
-distributing libprint/1.0.0+5
-distributing libhello/1.1.0+5
+ b test: ../hello-gcc-1/
-version.in ../hello-gcc-1/libprint-1.0.0+5/libprint/version.hxx.in
+version ../hello-gcc-1/libprint-1.0.0+11/libprint/in{version} -> ../hello-gcc-1/libprint-1.0.0+11/libprint/hxx{version}
+version ../hello-gcc-1/libformat-1.0.0+11/libformat/in{version} -> ../hello-gcc-1/libformat-1.0.0+11/libformat/hxx{version}
+version ../hello-gcc-1/libhello-1.1.0+11/libhello/in{version} -> ../hello-gcc-1/libhello-1.1.0+11/libhello/hxx{version}
mkdir ../hello-gcc-1/hello/fsdir{hello/}
-version.in ../hello-gcc-1/libformat-1.0.0+5/libformat/version.hxx.in
-version.in ../hello-gcc-1/libhello-1.1.0+5/libhello/version.hxx.in
-c++ ../hello-gcc-1/libprint-1.0.0+5/tests/basics/cxx{driver}
-c++ ../hello-gcc-1/libprint-1.0.0+5/libprint/cxx{print}
-c++ ../hello-gcc-1/libformat-1.0.0+5/tests/basics/cxx{driver}
-c++ ../hello-gcc-1/libhello-1.1.0+5/libhello/cxx{hello}
-c++ ../hello-gcc-1/libhello-1.1.0+5/tests/basics/cxx{driver}
-c++ hello/cxx{hello}@../hello-gcc-1/hello/hello/
-c++ ../hello-gcc-1/libformat-1.0.0+5/libformat/cxx{format}
-ld ../hello-gcc-1/libprint-1.0.0+5/libprint/libs{print}
-ld ../hello-gcc-1/libprint-1.0.0+5/tests/basics/exe{driver}
-ld ../hello-gcc-1/libformat-1.0.0+5/libformat/libs{format}
-ld ../hello-gcc-1/libformat-1.0.0+5/tests/basics/exe{driver}
-ld ../hello-gcc-1/libhello-1.1.0+5/libhello/libs{hello}
-ld ../hello-gcc-1/libhello-1.1.0+5/tests/basics/exe{driver}
+c++ ../hello-gcc-1/libformat-1.0.0+11/tests/basics/cxx{driver} -> ../hello-gcc-1/libformat-1.0.0+11/tests/basics/obje{driver}
+c++ ../hello-gcc-1/libformat-1.0.0+11/libformat/cxx{format} -> ../hello-gcc-1/libformat-1.0.0+11/libformat/objs{format}
+c++ ../hello-gcc-1/libprint-1.0.0+11/tests/basics/cxx{driver} -> ../hello-gcc-1/libprint-1.0.0+11/tests/basics/obje{driver}
+c++ ../hello-gcc-1/libhello-1.1.0+11/libhello/cxx{hello} -> ../hello-gcc-1/libhello-1.1.0+11/libhello/objs{hello}
+c++ ../hello-gcc-1/libprint-1.0.0+11/libprint/cxx{print} -> ../hello-gcc-1/libprint-1.0.0+11/libprint/objs{print}
+c++ hello/cxx{hello} -> ../hello-gcc-1/hello/hello/obje{hello}
+c++ ../hello-gcc-1/libhello-1.1.0+11/tests/basics/cxx{driver} -> ../hello-gcc-1/libhello-1.1.0+11/tests/basics/obje{driver}
+ld ../hello-gcc-1/libprint-1.0.0+11/libprint/libs{print}
+ld ../hello-gcc-1/libformat-1.0.0+11/libformat/libs{format}
+ld ../hello-gcc-1/libprint-1.0.0+11/tests/basics/exe{driver}
+ld ../hello-gcc-1/libformat-1.0.0+11/tests/basics/exe{driver}
+ld ../hello-gcc-1/libhello-1.1.0+11/libhello/libs{hello}
ld ../hello-gcc-1/hello/hello/exe{hello}
-test ../hello-gcc-1/libprint-1.0.0+5/tests/basics/exe{driver}
-test hello/testscript{testscript}@../hello-gcc-1/hello/hello/ ../hello-gcc-1/hello/hello/exe{hello}
-test ../hello-gcc-1/libhello-1.1.0+5/tests/basics/exe{driver}
-test ../hello-gcc-1/libformat-1.0.0+5/tests/basics/exe{driver}
+ld ../hello-gcc-1/libhello-1.1.0+11/tests/basics/exe{driver}
+test ../hello-gcc-1/libhello-1.1.0+11/tests/basics/exe{driver}
+test ../hello-gcc-1/libformat-1.0.0+11/tests/basics/exe{driver}
+test ../hello-gcc-1/hello/hello/exe{hello} + hello/testscript{testscript}
+test ../hello-gcc-1/libprint-1.0.0+11/tests/basics/exe{driver}
+ b configure: ../hello-gcc/ config.cc.poptions+=-I/tmp/unpkg-gcc/include config.cc.loptions+=-L/tmp/unpkg-gcc/lib
save ../hello-gcc/build/config.build
save ../hello-gcc/hello/build/config.build
-save ../hello-gcc/libhello-1.0.0+5/build/config.build
-save ../hello-gcc/libhello-1.0.0+5/tests/build/config.build
+save ../hello-gcc/libhello-1.0.0+11/build/config.build
+save ../hello-gcc/libhello-1.0.0+11/tests/build/config.build
+ b test
-c++ ../hello-gcc/libhello-1.0.0+5/libhello/cxx{hello}
-c++ hello/cxx{hello}@../hello-gcc/hello/hello/
-ld ../hello-gcc/libhello-1.0.0+5/libhello/libs{hello}
+version ../hello-gcc/libhello-1.0.0+11/libhello/in{version} -> ../hello-gcc/libhello-1.0.0+11/libhello/hxx{version}
+c++ ../hello-gcc/libhello-1.0.0+11/libhello/cxx{hello} -> ../hello-gcc/libhello-1.0.0+11/libhello/objs{hello}
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
+ld ../hello-gcc/libhello-1.0.0+11/libhello/libs{hello}
ld ../hello-gcc/hello/hello/exe{hello}
ln ../hello-gcc/hello/hello/exe{hello} -> hello/
-test hello/testscript{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
+test ../hello-gcc/hello/hello/exe{hello} + hello/testscript{testscript}
+ bdep sync ?sys:libsqlite3
synchronizing:
- configure sys:libsqlite3/*
+ configure sys:libsqlite3/3.40.1 (required by hello)
upgrade hello/0.1.0-a.0.19700101000000#5
++ bdep new -t exe -l c++ hello
+created new executable project hello in /tmp/hello/
+
++ bdep init -C @gcc cc config.cxx=g++
+initializing in project /tmp/hello/
+created configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep init -C @clang cc config.cxx=clang++-16
+initializing in project /tmp/hello/
+created configuration @clang /tmp/hello-clang/ 2 target auto-synchronized
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep config list
+@gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
+@clang /tmp/hello-clang/ 2 target auto-synchronized
+
++ b
+fetching pkg:cppget.org/alpha (prerequisite of dir:/tmp/hello)
+fetching pkg:cppget.org/beta (complements pkg:cppget.org/alpha)
+fetching pkg:cppget.org/testing (complements pkg:cppget.org/beta)
+fetching pkg:cppget.org/stable (complements pkg:cppget.org/testing)
+
+creating configuration of host type in /tmp/hello-host/ and associating it with project(s):
+ /tmp/hello/
+as if by executing command(s):
+ bdep config create -d /tmp/hello @host --type host --no-default --forward /tmp/hello-host cc config.config.load=~host
+while searching for configuration for build-time dependency xxd of package hello/0.1.0-a.0.19700101000000#1 [/tmp/hello-gcc/]
+while synchronizing configuration /tmp/hello-gcc/
+continue? [Y/n] y
+synchronizing /tmp/hello-gcc/:
+ new xxd/8.2.3075+1 [/tmp/hello-host/] (required by hello)
+ upgrade hello/0.1.0-a.0.19700101000000#1
+mkdir ../hello-gcc/hello/fsdir{hello/}
+c ../hello-host/xxd-8.2.3075+1/c{xxd} -> ../hello-host/xxd-8.2.3075+1/obje{xxd}
+ld ../hello-host/xxd-8.2.3075+1/exe{xxd}
+xxd hello/file{names.txt} -> ../hello-gcc/hello/hello/cxx{names}
+c++ ../hello-gcc/hello/hello/cxx{names} -> ../hello-gcc/hello/hello/obje{names}
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
+ld ../hello-gcc/hello/hello/exe{hello}
+ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+test ../hello-gcc/hello/hello/exe{hello} + hello/testscript{testscript}
+
++ bdep config list
+@gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
+@clang /tmp/hello-clang/ 2 target auto-synchronized
+@host /tmp/hello-host/ 3 host forwarded,auto-synchronized
+
++ bdep update @clang
+fetching pkg:cppget.org/alpha (prerequisite of dir:/tmp/hello)
+fetching pkg:cppget.org/beta (complements pkg:cppget.org/alpha)
+fetching pkg:cppget.org/testing (complements pkg:cppget.org/beta)
+fetching pkg:cppget.org/stable (complements pkg:cppget.org/testing)
+synchronizing:
+ upgrade hello/0.1.0-a.0.19700101000000#1
+mkdir ../hello-clang/hello/fsdir{hello/}
+xxd hello/file{names.txt} -> ../hello-clang/hello/hello/cxx{names}
+c++ ../hello-clang/hello/hello/cxx{names} -> ../hello-clang/hello/hello/obje{names}
+c++ hello/cxx{hello} -> ../hello-clang/hello/hello/obje{hello}
+ld ../hello-clang/hello/hello/exe{hello}
+
++ b
+
+creating configuration of build2 type in /tmp/hello-build2/ and associating it with project(s):
+ /tmp/hello/
+as if by executing command(s):
+ bdep config create -d /tmp/hello @build2 --type build2 --no-default --forward /tmp/hello-build2 cc config.config.load=~build2
+while searching for configuration for build-time dependency libbuild2-hello of package hello/0.1.0-a.0.19700101000000#2 [/tmp/hello-gcc/]
+while synchronizing configuration /tmp/hello-gcc/
+continue? [Y/n] y
+synchronizing /tmp/hello-gcc/:
+ new libbuild2-hello/0.1.0 [/tmp/hello-build2/] (required by hello [/tmp/hello-clang/], hello [/tmp/hello-gcc/])
+ upgrade hello/0.1.0-a.0.19700101000000#2 [/tmp/hello-gcc/]
+ upgrade hello/0.1.0-a.0.19700101000000#2 [/tmp/hello-clang/]
+c++ ../hello-build2/libbuild2-hello-0.1.0/libbuild2/hello/cxx{init} -> ../hello-build2/libbuild2-hello-0.1.0/libbuild2/hello/objs{init}
+ld ../hello-build2/libbuild2-hello-0.1.0/libbuild2/hello/libs{build2-hello}
+hello/buildfile:10:7: info: module hello initialized
+hello/buildfile:10:7: info: module hello initialized
+hello/buildfile:10:7: info: module hello initialized
+ info: while applying rule build.alias to update ../hello-gcc/dir{hello/}
+info: ../hello-gcc/dir{hello/} is up to date
+
++ bdep config list
+@gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
+@build2 /tmp/hello-build2/ 4 build2 forwarded,auto-synchronized
+@clang /tmp/hello-clang/ 2 target auto-synchronized
+@host /tmp/hello-host/ 3 host forwarded,auto-synchronized
+
++ bdep update @clang
+hello/buildfile:10:7: info: module hello initialized
+ info: while applying rule build.alias to update ../hello-clang/dir{hello/}
+info: ../hello-clang/dir{hello/} is up to date
+
++ bdep new -t exe -l c++ hello
+created new executable project hello in /tmp/hello/
+
++ bdep config create ../hello-base @base --no-default cc config.cxx=g++
+created configuration @base /tmp/hello-base/ 1 target auto-synchronized
+
++ bdep config create ../hello-gcc @gcc --default cc config.cxx=g++
+created configuration @gcc /tmp/hello-gcc/ 2 target default,forwarded,auto-synchronized
+
++ bdep config create ../hello-clang @clang cc config.cxx=clang++-16
+created configuration @clang /tmp/hello-clang/ 3 target auto-synchronized
+
++ bdep config link @gcc @base
+linked configuration @gcc (target) with configuration @base (target)
+
++ bdep config link @clang @base
+linked configuration @clang (target) with configuration @base (target)
+
++ bdep init @gcc { @base }+ ?libhello
+initializing in project /tmp/hello/
+fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
+synchronizing:
+ new libhello/1.0.0+11 [/tmp/hello-base/] (required by hello)
+ new hello/0.1.0-a.0.19700101000000
+
++ bdep init @clang
+initializing in project /tmp/hello/
+fetching pkg:stage.build2.org (prerequisite of dir:/tmp/hello)
+synchronizing:
+ new hello/0.1.0-a.0.19700101000000 [/tmp/hello-clang/]
+
++ bdep update @gcc
+version ../hello-base/libhello-1.0.0+11/libhello/in{version} -> ../hello-base/libhello-1.0.0+11/libhello/hxx{version}
+mkdir ../hello-gcc/hello/fsdir{hello/}
+c++ ../hello-base/libhello-1.0.0+11/libhello/cxx{hello} -> ../hello-base/libhello-1.0.0+11/libhello/objs{hello}
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
+ld ../hello-base/libhello-1.0.0+11/libhello/libs{hello}
+ld ../hello-gcc/hello/hello/exe{hello}
+ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+
++ bdep update @clang
+mkdir ../hello-clang/hello/fsdir{hello/}
+c++ hello/cxx{hello} -> ../hello-clang/hello/hello/obje{hello}
+ld ../hello-clang/hello/hello/exe{hello}
+
+ bdep new -C hello-gcc @gcc -t exe -l c++ hello cc config.cxx=g++
created new executable project hello in /tmp/hello/
-created configuration @gcc /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+created configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
To github.com:boris-kolpackov/hello.git
@@ -503,8 +622,9 @@ To github.com:boris-kolpackov/hello.git
- [deleted] v0.1.0-a.1
To github.com:boris-kolpackov/hello.git
- [deleted] v0.1.0
-[master (root-commit) e92103a] Initial implementation
- 12 files changed, 107 insertions(+)
+[master (root-commit) ba9d966] Initial implementation
+ 13 files changed, 143 insertions(+)
+ create mode 100644 .gitattributes
create mode 100644 .gitignore
create mode 100644 README.md
create mode 100644 build/.gitignore
@@ -518,35 +638,36 @@ To github.com:boris-kolpackov/hello.git
create mode 100644 manifest
create mode 100644 repositories.manifest
To github.com:boris-kolpackov/hello.git
- + 83b57ed...e92103a master -> master (forced update)
-Branch 'master' set up to track remote branch 'master' from 'origin'.
+ + 014a3ac...ba9d966 master -> master (forced update)
+branch 'master' set up to track 'origin/master'.
+ bdep status
-hello configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.20191118060910.e92103a6ea2d
+hello configured 0.1.0-a.0.19700101000000 available 0.1.0-a.0.20230628100234.ba9d966a610f
+ b info
project: hello
-version: 0.1.0-a.0.20191118060910.e92103a6ea2d
+version: 0.1.0-a.0.20230628100234.ba9d966a610f
summary: hello C++ executable
url: https://example.org/hello
-src_root: /tmp/hello/
-out_root: /tmp/hello-gcc/hello/
-amalgamation: ../
-subprojects:
+src_root: /tmp/hello
+out_root: /tmp/hello-gcc/hello
+amalgamation: ..
+subprojects:
operations: update clean test update-for-test install uninstall update-for-install
meta-operations: perform configure disfigure dist info
+modules: version config test install dist
+ bdep sync
synchronizing:
- upgrade hello/0.1.0-a.0.20191118060910.e92103a6ea2d
+ upgrade hello/0.1.0-a.0.20230628100234.ba9d966a610f
+ bdep status
-hello configured 0.1.0-a.0.20191118060910.e92103a6ea2d
-[master f720ebb] Another commit
+hello configured 0.1.0-a.0.20230628100234.ba9d966a610f
+[master be5bffa] Another commit
1 file changed, 1 insertion(+)
+ bdep status
-hello configured 0.1.0-a.0.20191118060910.e92103a6ea2d available 0.1.0-a.0.20191118060914.f720ebb7ae8e
+hello configured 0.1.0-a.0.20230628100234.ba9d966a610f available 0.1.0-a.0.20230628100238.be5bffafe2fe
+ bdep release --alpha --push
releasing:
@@ -557,11 +678,11 @@ releasing:
commit: yes
tag: v0.1.0-a.1
push: origin/master
-continue? [y/n] [master b7765c6] Release version 0.1.0-a.1
+continue? [y/n] y
+[master ed894b0] Release version 0.1.0-a.1
1 file changed, 1 insertion(+), 1 deletion(-)
-[master 0833250] Change version to 0.1.0-a.1.z
+[master 2bd66ae] Change version to 0.1.0-a.1.z
1 file changed, 1 insertion(+), 1 deletion(-)
-pushing branch master, tag v0.1.0-a.1
+ bdep release --no-open --push
releasing:
@@ -571,15 +692,15 @@ releasing:
commit: yes
tag: v0.1.0
push: origin/master
-continue? [y/n] [master 0fadfca] Release version 0.1.0
+continue? [y/n] y
+[master 2cc1068] Release version 0.1.0
1 file changed, 1 insertion(+), 1 deletion(-)
-pushing branch master, tag v0.1.0
-+ bdep publish --simulate success
++ bdep publish --simulate success --repository https://stage.build2.org
synchronizing:
upgrade hello/0.1.0
publishing:
- to: https://cppget.org
+ to: https://stage.build2.org
as: Boris Kolpackov <boris@codesynthesis.com>
package: hello
version: 0.1.0
@@ -587,18 +708,13 @@ publishing:
section: alpha
control: https://github.com/boris-kolpackov/hello.git
warning: publishing using staged build2 toolchain
-continue? [y/n] pushing branch build2-control
+continue? [y/n] y
remote:
-remote: Create a pull request for 'build2-control' on GitHub by visiting:
-remote: https://github.com/boris-kolpackov/hello/pull/new/build2-control
+remote: Create a pull request for 'build2-control' on GitHub by visiting:
+remote: https://github.com/boris-kolpackov/hello/pull/new/build2-control
remote:
-Branch 'build2-control' set up to track remote branch 'build2-control' from 'origin'.
-submitting hello-0.1.0.tar.gz
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 1947 0 0 100 1947 0 876 0:00:02 0:00:02 --:--:-- 876 100 2063 100 116 100 1947 50 853 0:00:02 0:00:02 --:--:-- 853
-package submission is queued: https://queue.cppget.org/hello/0.1.0
-reference: 2f3bfe0b35f3
+package submission is queued: https://queue.stage.build2.org/hello/0.1.0
+reference: 75d918f69585
+ bdep release --open --push
opening:
@@ -607,36 +723,63 @@ opening:
open: 0.2.0-a.0.z
commit: yes
push: origin/master
-continue? [y/n] [master d8fce33] Change version to 0.2.0-a.0.z
+continue? [y/n] y
+[master 1b709b0] Change version to 0.2.0-a.0.z
1 file changed, 1 insertion(+), 1 deletion(-)
-pushing branch master
+ bdep new -C hello-gcc @gcc -t exe -l c++ hello cc config.cxx=g++
created new executable project hello in /tmp/hello/
-created configuration @gcc /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+created configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
-+ bdep init -C ../hello-clang @clang cc config.cxx=clang++-5.0
++ bdep init -C ../hello-clang @clang cc config.cxx=clang++-16
initializing in project /tmp/hello/
-created configuration @clang /tmp/hello-clang/ 2 auto-synchronized
+created configuration @clang /tmp/hello-clang/ 2 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
+ bdep new -t lib -l c++ libhello
created new library project libhello in /tmp/libhello/
++ tree libhello
+libhello
+├── build
+│   ├── bootstrap.build
+│   ├── export.build
+│   └── root.build
+├── buildfile
+├── libhello
+│   ├── buildfile
+│   ├── export.hxx
+│   ├── hello.cxx
+│   ├── hello.hxx
+│   └── version.hxx.in
+├── manifest
+├── README.md
+├── repositories.manifest
+└── tests
+ ├── basics
+ │   ├── buildfile
+ │   └── driver.cxx
+ ├── build
+ │   ├── bootstrap.build
+ │   └── root.build
+ └── buildfile
+
+6 directories, 17 files
+
+ cd libhello
+ bdep init -A ../hello-gcc @gcc
initializing in project /tmp/libhello/
-added configuration @gcc /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+added configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new libhello/0.1.0-a.0.19700101000000
+ bdep init -A ../hello-clang @clang
initializing in project /tmp/libhello/
-added configuration @clang /tmp/hello-clang/ 2 auto-synchronized
+added configuration @clang /tmp/hello-clang/ 2 target auto-synchronized
synchronizing:
new libhello/0.1.0-a.0.19700101000000
@@ -646,29 +789,31 @@ synchronizing:
synchronizing:
upgrade hello/0.1.0-a.0.19700101000000#1
mkdir ../hello-gcc/libhello/fsdir{libhello/}
+version ../libhello/libhello/in{version} -> ../hello-gcc/libhello/libhello/hxx{version}
mkdir ../hello-gcc/hello/fsdir{hello/}
mkdir ../hello-gcc/libhello/tests/fsdir{basics/}
-version.in ../libhello/libhello/version.hxx.in
-c++ hello/cxx{hello}@../hello-gcc/hello/hello/
-c++ ../libhello/libhello/cxx{hello}@../hello-gcc/libhello/libhello/
-c++ ../libhello/tests/basics/cxx{driver}@../hello-gcc/libhello/tests/basics/
+c++ ../libhello/tests/basics/cxx{driver} -> ../hello-gcc/libhello/tests/basics/obje{driver}
+c++ ../libhello/libhello/cxx{hello} -> ../hello-gcc/libhello/libhello/objs{hello}
+c++ hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
ld ../hello-gcc/libhello/libhello/libs{hello}
ld ../hello-gcc/hello/hello/exe{hello}
ld ../hello-gcc/libhello/tests/basics/exe{driver}
-test hello/testscript{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
+ln ../hello-gcc/hello/hello/exe{hello} -> hello/
+ln ../hello-gcc/libhello/tests/basics/exe{driver} -> ../libhello/tests/basics/
test ../hello-gcc/libhello/tests/basics/exe{driver}
+test ../hello-gcc/hello/hello/exe{hello} + hello/testscript{testscript}
+ bdep new -C hello-gcc @gcc -t exe -l c++ hello cc config.cxx=g++
created new executable project hello in /tmp/hello/
-created configuration @gcc /tmp/hello-gcc/ 1 default,forwarded,auto-synchronized
+created configuration @gcc /tmp/hello-gcc/ 1 target default,forwarded,auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
+ cd hello
-+ bdep init -C ../hello-clang @clang cc config.cxx=clang++-5.0
++ bdep init -C ../hello-clang @clang cc config.cxx=clang++-16
initializing in project /tmp/hello/
-created configuration @clang /tmp/hello-clang/ 2 auto-synchronized
+created configuration @clang /tmp/hello-clang/ 2 target auto-synchronized
synchronizing:
new hello/0.1.0-a.0.19700101000000
@@ -699,99 +844,96 @@ synchronizing:
synchronizing:
upgrade hello/0.1.0-a.0.19700101000000#2
mkdir ../hello-gcc/libhello/fsdir{libhello/}
-mkdir ../hello-gcc/libhello/tests/fsdir{basics/}
+version libhello/libhello/in{version} -> ../hello-gcc/libhello/libhello/hxx{version}
mkdir ../hello-gcc/hello/fsdir{hello/}
-version.in libhello/libhello/version.hxx.in
-c++ hello/hello/cxx{hello}@../hello-gcc/hello/hello/
-c++ libhello/libhello/cxx{hello}@../hello-gcc/libhello/libhello/
-c++ libhello/tests/basics/cxx{driver}@../hello-gcc/libhello/tests/basics/
+mkdir ../hello-gcc/libhello/tests/fsdir{basics/}
+c++ hello/hello/cxx{hello} -> ../hello-gcc/hello/hello/obje{hello}
+c++ libhello/libhello/cxx{hello} -> ../hello-gcc/libhello/libhello/objs{hello}
+c++ libhello/tests/basics/cxx{driver} -> ../hello-gcc/libhello/tests/basics/obje{driver}
ld ../hello-gcc/libhello/libhello/libs{hello}
-ld ../hello-gcc/libhello/tests/basics/exe{driver}
ld ../hello-gcc/hello/hello/exe{hello}
+ld ../hello-gcc/libhello/tests/basics/exe{driver}
+ln ../hello-gcc/hello/hello/exe{hello} -> hello/hello/
+ln ../hello-gcc/libhello/tests/basics/exe{driver} -> libhello/tests/basics/
+test ../hello-gcc/hello/hello/exe{hello} + hello/hello/testscript{testscript}
test ../hello-gcc/libhello/tests/basics/exe{driver}
-test hello/hello/testscript{testscript}@../hello-gcc/hello/hello/ ../hello-gcc/hello/hello/exe{hello}
+ bpkg create -d tools cc config.cxx=g++ config.cc.coptions=-O3 config.install.root=/opt/tools config.install.sudo=sudo config.bin.rpath=/opt/tools/lib
created new configuration in /tmp/tools/
+ uuid: c835ee18-540c-40ca-a727-977c2cb1fd2d
+ type: target
+ cd tools
+ bpkg build hello@https://git.build2.org/hello/hello.git
added git:build2.org/hello/hello
fetching git:build2.org/hello/hello
-querying https://git.build2.org/hello/hello.git
-fetching from https://git.build2.org/hello/hello.git
fetching git:build2.org/hello/libhello (prerequisite of git:build2.org/hello/hello)
-querying https://git.build2.org/hello/libhello.git
-fetching from https://git.build2.org/hello/libhello.git
fetching git:build2.org/hello/libformat##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libformat.git
-fetching from https://git.build2.org/hello/libformat.git
fetching git:build2.org/hello/libprint##HEAD (prerequisite of git:build2.org/hello/libhello)
-querying https://git.build2.org/hello/libprint.git
-fetching from https://git.build2.org/hello/libprint.git
- new libformat/1.0.0+5 (required by libhello)
- new libprint/1.0.0+5 (required by libhello)
- new libhello/1.1.0+5 (required by hello)
- new hello/1.0.0+4
-continue? [Y/n] distributing libformat/1.0.0+5
-checked out libformat/1.0.0+5
-configured libformat/1.0.0+5
-distributing libprint/1.0.0+5
-checked out libprint/1.0.0+5
-configured libprint/1.0.0+5
-distributing libhello/1.1.0+5
-checked out libhello/1.1.0+5
-configured libhello/1.1.0+5
-distributing hello/1.0.0+4
-checked out hello/1.0.0+4
-configured hello/1.0.0+4
-version.in libhello-1.1.0+5/libhello/version.hxx.in
-version.in libprint-1.0.0+5/libprint/version.hxx.in
-version.in libformat-1.0.0+5/libformat/version.hxx.in
-c++ libprint-1.0.0+5/libprint/cxx{print}
-c++ libhello-1.1.0+5/libhello/cxx{hello}
-c++ hello-1.0.0+4/hello/cxx{hello}
-c++ libformat-1.0.0+5/libformat/cxx{format}
-ld libprint-1.0.0+5/libprint/libs{print}
-ld libformat-1.0.0+5/libformat/libs{format}
-ld libhello-1.1.0+5/libhello/libs{hello}
-ld hello-1.0.0+4/hello/exe{hello}
-updated hello/1.0.0+4
+ new libformat/1.0.0+11 (required by libhello)
+ new libprint/1.0.0+11 (required by libhello)
+ new libhello/1.1.0+11 (required by hello)
+ new hello/1.0.0+10
+continue? [Y/n] y
+checked out libformat/1.0.0+11
+checked out libprint/1.0.0+11
+checked out libhello/1.1.0+11
+checked out hello/1.0.0+10
+configured libformat/1.0.0+11
+configured libprint/1.0.0+11
+configured libhello/1.1.0+11
+configured hello/1.0.0+10
+version libprint-1.0.0+11/libprint/in{version} -> libprint-1.0.0+11/libprint/hxx{version}
+version libformat-1.0.0+11/libformat/in{version} -> libformat-1.0.0+11/libformat/hxx{version}
+version libhello-1.1.0+11/libhello/in{version} -> libhello-1.1.0+11/libhello/hxx{version}
+c++ libprint-1.0.0+11/libprint/cxx{print} -> libprint-1.0.0+11/libprint/objs{print}
+c++ libformat-1.0.0+11/libformat/cxx{format} -> libformat-1.0.0+11/libformat/objs{format}
+c++ libhello-1.1.0+11/libhello/cxx{hello} -> libhello-1.1.0+11/libhello/objs{hello}
+c++ hello-1.0.0+10/hello/cxx{hello} -> hello-1.0.0+10/hello/obje{hello}
+ld libprint-1.0.0+11/libprint/libs{print}
+ld libformat-1.0.0+11/libformat/libs{format}
+ld libhello-1.1.0+11/libhello/libs{hello}
+ld hello-1.0.0+10/hello/exe{hello}
+updated hello/1.0.0+10
+ bpkg install hello
-ld libhello-1.1.0+5/libhello/libs{hello}
-ld hello-1.0.0+4/hello/exe{hello}
-install /opt/tools/
-install /opt/tools/include/
-install /opt/tools/include/libhello/
-install libhello-1.1.0+5/libhello/hxx{export}
-install libhello-1.1.0+5/libhello/hxx{hello}
-install /opt/tools/share/
-install /opt/tools/share/doc/
-install /opt/tools/share/doc/libhello/
-install libhello-1.1.0+5/manifest{manifest}
-install libhello-1.1.0+5/libhello/hxx{version}
-install /opt/tools/include/libprint/
-install libprint-1.0.0+5/libprint/hxx{print}
-install libprint-1.0.0+5/libprint/hxx{export}
-install /opt/tools/share/doc/libprint/
-install libprint-1.0.0+5/manifest{manifest}
-install libprint-1.0.0+5/libprint/hxx{version}
-install libprint-1.0.0+5/libprint/libs{print}
-install /opt/tools/include/libformat/
-install libformat-1.0.0+5/libformat/hxx{export}
-install libformat-1.0.0+5/libformat/hxx{format}
-install /opt/tools/share/doc/libformat/
-install libformat-1.0.0+5/manifest{manifest}
-install libformat-1.0.0+5/libformat/hxx{version}
-install libformat-1.0.0+5/libformat/libs{format}
-install libhello-1.1.0+5/libhello/libs{hello}
-install /opt/tools/bin/
-install hello-1.0.0+4/hello/exe{hello}
-install /opt/tools/share/doc/hello/
-install hello-1.0.0+4/manifest{manifest}
-installed hello/1.0.0+4
+pc libformat-1.0.0+11/libformat/libs{format} -> libformat-1.0.0+11/libformat/pcs{format}
+pc libprint-1.0.0+11/libprint/libs{print} -> libprint-1.0.0+11/libprint/pcs{print}
+pc libhello-1.1.0+11/libhello/libs{hello} -> libhello-1.1.0+11/libhello/pcs{hello}
+ld libhello-1.1.0+11/libhello/libs{hello}
+ld hello-1.0.0+10/hello/exe{hello}
+install -d /opt/tools/
+install -d /opt/tools/include/
+install -d /opt/tools/include/libhello/
+install libhello-1.1.0+11/libhello/hxx{export} -> /opt/tools/include/libhello/
+install libhello-1.1.0+11/libhello/hxx{hello} -> /opt/tools/include/libhello/
+install -d /opt/tools/share/
+install -d /opt/tools/share/doc/
+install -d /opt/tools/share/doc/libhello/
+install libhello-1.1.0+11/manifest{manifest} -> /opt/tools/share/doc/libhello/
+install libhello-1.1.0+11/libhello/hxx{version} -> /opt/tools/include/libhello/
+install -d /opt/tools/include/libprint/
+install libprint-1.0.0+11/libprint/hxx{export} -> /opt/tools/include/libprint/
+install libprint-1.0.0+11/libprint/hxx{print} -> /opt/tools/include/libprint/
+install -d /opt/tools/share/doc/libprint/
+install libprint-1.0.0+11/manifest{manifest} -> /opt/tools/share/doc/libprint/
+install libprint-1.0.0+11/libprint/hxx{version} -> /opt/tools/include/libprint/
+install libprint-1.0.0+11/libprint/libs{print} -> /opt/tools/lib/
+install -d /opt/tools/include/libformat/
+install libformat-1.0.0+11/libformat/hxx{export} -> /opt/tools/include/libformat/
+install libformat-1.0.0+11/libformat/hxx{format} -> /opt/tools/include/libformat/
+install -d /opt/tools/share/doc/libformat/
+install libformat-1.0.0+11/manifest{manifest} -> /opt/tools/share/doc/libformat/
+install libformat-1.0.0+11/libformat/hxx{version} -> /opt/tools/include/libformat/
+install libformat-1.0.0+11/libformat/libs{format} -> /opt/tools/lib/
+install libhello-1.1.0+11/libhello/libs{hello} -> /opt/tools/lib/
+install -d /opt/tools/bin/
+install hello-1.0.0+10/hello/exe{hello} -> /opt/tools/bin/
+install -d /opt/tools/share/doc/hello/
+install hello-1.0.0+10/doc{README.md} -> /opt/tools/share/doc/hello/
+install hello-1.0.0+10/manifest{manifest} -> /opt/tools/share/doc/hello/
+installed hello/1.0.0+10
+ /opt/tools/bin/hello World
Hello, World!
@@ -827,7 +969,8 @@ Hello, World!
└── share
└── doc
├── hello
- │   └── manifest
+ │   ├── manifest
+ │   └── README.md
├── libformat
│   └── manifest
├── libhello
@@ -835,50 +978,53 @@ Hello, World!
└── libprint
└── manifest
-13 directories, 23 files
+14 directories, 24 files
+ bpkg uninstall hello
-uninstall hello-1.0.0+4/manifest{manifest}
-uninstall /opt/tools/share/doc/hello/
-uninstall hello-1.0.0+4/hello/exe{hello}
-uninstall /opt/tools/bin/
-uninstall libhello-1.1.0+5/libhello/libs{hello}
-uninstall libformat-1.0.0+5/libformat/libs{format}
-uninstall libformat-1.0.0+5/libformat/hxx{version}
-uninstall libformat-1.0.0+5/manifest{manifest}
-uninstall /opt/tools/share/doc/libformat/
-uninstall libformat-1.0.0+5/libformat/hxx{format}
-uninstall libformat-1.0.0+5/libformat/hxx{export}
-uninstall /opt/tools/include/libformat/
-uninstall libprint-1.0.0+5/libprint/libs{print}
-uninstall libprint-1.0.0+5/libprint/hxx{version}
-uninstall libprint-1.0.0+5/manifest{manifest}
-uninstall /opt/tools/share/doc/libprint/
-uninstall libprint-1.0.0+5/libprint/hxx{export}
-uninstall libprint-1.0.0+5/libprint/hxx{print}
-uninstall /opt/tools/include/libprint/
-uninstall libhello-1.1.0+5/libhello/hxx{version}
-uninstall libhello-1.1.0+5/manifest{manifest}
-uninstall /opt/tools/share/doc/libhello/
-uninstall /opt/tools/share/doc/
-uninstall /opt/tools/share/
-uninstall libhello-1.1.0+5/libhello/hxx{hello}
-uninstall libhello-1.1.0+5/libhello/hxx{export}
-uninstall /opt/tools/include/libhello/
-uninstall /opt/tools/include/
-uninstall /opt/tools/
-uninstalled hello/1.0.0+4
+uninstall hello-1.0.0+10/manifest{manifest} <- /opt/tools/share/doc/hello/
+uninstall hello-1.0.0+10/doc{README.md} <- /opt/tools/share/doc/hello/
+uninstall -d /opt/tools/share/doc/hello/
+uninstall hello-1.0.0+10/hello/exe{hello} <- /opt/tools/bin/
+uninstall -d /opt/tools/bin/
+uninstall libhello-1.1.0+11/libhello/libs{hello} <- /opt/tools/lib/
+uninstall libformat-1.0.0+11/libformat/libs{format} <- /opt/tools/lib/
+uninstall libformat-1.0.0+11/libformat/hxx{version} <- /opt/tools/include/libformat/
+uninstall libformat-1.0.0+11/manifest{manifest} <- /opt/tools/share/doc/libformat/
+uninstall -d /opt/tools/share/doc/libformat/
+uninstall libformat-1.0.0+11/libformat/hxx{format} <- /opt/tools/include/libformat/
+uninstall libformat-1.0.0+11/libformat/hxx{export} <- /opt/tools/include/libformat/
+uninstall -d /opt/tools/include/libformat/
+uninstall libprint-1.0.0+11/libprint/libs{print} <- /opt/tools/lib/
+uninstall libprint-1.0.0+11/libprint/hxx{version} <- /opt/tools/include/libprint/
+uninstall libprint-1.0.0+11/manifest{manifest} <- /opt/tools/share/doc/libprint/
+uninstall -d /opt/tools/share/doc/libprint/
+uninstall libprint-1.0.0+11/libprint/hxx{print} <- /opt/tools/include/libprint/
+uninstall libprint-1.0.0+11/libprint/hxx{export} <- /opt/tools/include/libprint/
+uninstall -d /opt/tools/include/libprint/
+uninstall libhello-1.1.0+11/libhello/hxx{version} <- /opt/tools/include/libhello/
+uninstall libhello-1.1.0+11/manifest{manifest} <- /opt/tools/share/doc/libhello/
+uninstall -d /opt/tools/share/doc/libhello/
+uninstall -d /opt/tools/share/doc/
+uninstall -d /opt/tools/share/
+uninstall libhello-1.1.0+11/libhello/hxx{hello} <- /opt/tools/include/libhello/
+uninstall libhello-1.1.0+11/libhello/hxx{export} <- /opt/tools/include/libhello/
+uninstall -d /opt/tools/include/libhello/
+uninstall -d /opt/tools/include/
+uninstall -d /opt/tools/
+uninstalled hello/1.0.0+10
+ bpkg drop hello
following dependencies were automatically built but will no longer be used:
libhello
libformat
libprint
-drop unused packages? [Y/n] drop hello
+drop unused packages? [Y/n] y
+ drop hello
drop libhello
drop libformat
drop libprint
-continue? [Y/n] disfigured hello
+continue? [Y/n] y
+disfigured hello
disfigured libhello
disfigured libformat
disfigured libprint
@@ -886,3 +1032,5 @@ purged hello
purged libhello
purged libformat
purged libprint
+
+Script done on 2023-06-28 12:03:39+02:00 [COMMAND_EXIT_CODE="0"]
diff --git a/review b/review
index 8a46b4e..6d72827 100755
--- a/review
+++ b/review
@@ -6,7 +6,7 @@
#
usage="usage: $0"
-modules="libbutl libbutl.bash build2 libbpkg bpkg bpkg-rep bdep brep libbbot bbot libstd-modules build2-toolchain"
+modules="libbutl libbutl.bash build2 libbpkg bpkg bpkg-util bdep bdep-util brep libbbot bbot build2-toolchain libbuild2-kconfig libbuild2-autoconf"
owd=`pwd`
trap "{ cd $owd; exit 1; }" ERR
@@ -23,7 +23,7 @@ for m in $modules; do
# Exclude submodules in build2-toolchain.
#
if [ $m = "build2-toolchain" ]; then
- exclude="$exclude bdep bpkg build2 libbutl libbpkg libodb libodb-sqlite libsqlite3 libpkgconf"
+ exclude="$exclude submodules bdep bpkg build2 libbutl libbpkg libodb libodb-sqlite libsqlite3 libpkg-config libbuild2-kconfig libbuild2-autoconf"
fi
fo=
diff --git a/stage b/stage
index 49a65ab..d9d3df4 100755
--- a/stage
+++ b/stage
@@ -33,10 +33,14 @@ bpkg --version >/dev/null
bdep --version >/dev/null
# Make sure the build system if up to date (otherwise update will be triggered
-# by libbuild2-hello distribution).
+# by libbuild2-* module distribution). Also make sure the package manager is
+# up to date since it depend on libbuild2. Update project manager for good
+# measure.
#
-b build2/build2/
-b --version >/dev/null
+b build2/build2/ bpkg/bpkg/ bdep/bdep/
+b --version >/dev/null
+bpkg --version >/dev/null
+bdep --version >/dev/null
v="$(sed -n -re 's/^version: ([^.]+\.[^.]+\.[^-]+(-[ab]\.[^.+]+)?).*$/\1/p' build2-toolchain/manifest)"
vf="$(echo $v | sed -re 's/^([^.]*)\.([^.]*)\.([^-]*).*$/\1.\2.\3/')" # Final.
@@ -167,6 +171,7 @@ if [ "$script_only" != true ]; then
XZ_OPT=-9 \
GZIP_OPT=-9 \
b dist: build2-toolchain-default/ \
+ config.dist.root=/tmp/dist \
"config.dist.archives=$owd/$dist_src/$v/tar.xz $owd/$dist_src/$v/tar.gz" \
config.dist.checksums=sha256
fi
@@ -203,6 +208,9 @@ for f in "${scripts[@]}"; do
checksum_line "$f"
done
+##fi
+##
+
# Sync the distribution.
#
# Note that we do the distribution first so that the toolchain changes are
@@ -225,53 +233,69 @@ function sync_dist () # <dist-src> <dist-dst> [<rsync-options>]
--prune-empty-dirs $rsync_ops "$@" "$s/" "$d/"
}
-sync_dist "$dist_src" "$dist_dst" $rsync_del
+###
+###if false; then
-# Also sync (disable) queue.
+# If we are not preparing packages, publish the distribution now. Otherwise,
+# wait until we have prepared all the packages (which can take a considerable
+# time).
#
-if [ "$mode" = "-p" ]; then
- sync_dist "$queue_dist_src" "$queue_dist_dst" --delete-after
-fi
+if [ "$script_only" -o "$mode" = "-p" ]; then
-##fi
-##
+ sync_dist "$dist_src" "$dist_dst" $rsync_del
-if [ "$script_only" = true ]; then
- exit 0
-fi
+ # Also sync (disable) queue.
+ #
+ if [ "$mode" = "-p" ]; then
+ sync_dist "$queue_dist_src" "$queue_dist_dst" --delete-after
+ fi
-if [ "$mode" = "-p" ]; then
exit 0
fi
# Distribute packages, regenerate and sync the repository.
#
+# Note: $mode is either empty or -q (which implies -d).
-# These are just for testing (though libodb-mysql needs libmysqlclient).
+# Extra packages for testing.
#
+if false; then
+etc/stage-pkg -c $mode -d curl packaging/curl/curl/libcurl
+etc/stage-pkg -c $mode -d curl packaging/curl/curl/curl
+etc/stage-pkg -c $mode -d curl packaging/curl/ca-certificates-curl/libca-certificates-curl
+
+etc/stage-pkg -c $mode -d icu packaging/icu/icu/libicuuc
+etc/stage-pkg -c $mode -d icu packaging/icu/icu/libicui18n
+etc/stage-pkg -c $mode -d icu packaging/icu/icu/libicuio
+fi
+
etc/stage-pkg -c $mode -d zlib packaging/zlib/zlib/libz
-etc/stage-pkg -c $mode -d openssl packaging/openssl/openssl/libcrypto
-etc/stage-pkg -c $mode -d openssl packaging/openssl/openssl/libssl
-etc/stage-pkg -c $mode -d openssl packaging/openssl/openssl/openssl
+etc/stage-pkg -c $mode -d openssl packaging/openssl/openssl/libcrypto \
+ packaging/openssl/openssl/libssl \
+ packaging/openssl/openssl/openssl
etc/stage-pkg -c $mode -d mariadb packaging/mariadb/libmariadb
etc/stage-pkg -c $mode -d mysql packaging/mysql/mysql/libmysqlclient
etc/stage-pkg -c $mode -d libcutl ../cutl/libcutl
-etc/stage-pkg -c $mode -d cli ../cli/cli
+
+etc/stage-pkg -c $mode -d cli ../cli/cli/cli
+etc/stage-pkg -c $mode -d cli ../cli/cli/cli-tests
+etc/stage-pkg -c $mode -d cli ../cli/cli/cli-examples
#
#
etc/stage-pkg -c $mode -d libapr packaging/libapr/libapr1
etc/stage-pkg -c $mode -d libapreq packaging/libapreq/libapreq2
-etc/stage-pkg -c $mode -d postgresql packaging/postgresql/libpq
+
+etc/stage-pkg -c $mode -d postgresql packaging/postgresql/postgresql/libpq
etc/stage-pkg -c $mode -d sqlite \
packaging/sqlite/sqlite/libsqlite3 \
packaging/sqlite/sqlite/sqlite3
-etc/stage-pkg -c $mode -d pkgconf packaging/pkgconf/pkgconf/libpkgconf
+etc/stage-pkg -c $mode -d libpkg-config libpkg-config/libpkg-config
etc/stage-pkg -c $mode -d cmark-gfm \
packaging/cmark-gfm/cmark-gfm/libcmark-gfm \
@@ -294,22 +318,34 @@ etc/stage-pkg -c $mode -d odb \
../odb/builds/default/libodb-boost \
../odb/builds/default/libodb-qt
-etc/stage-pkg -c $mode build2 \
+# Regenerate the repository (unless $mode is -q) but do not publish.
+#
+etc/stage-pkg -c $mode -g build2 \
libbutl \
libbutl.bash \
build2 \
libbpkg \
bpkg \
- bpkg-rep \
+ bpkg-util \
bdep \
+ bdep-util \
libbbot \
brep \
bbot \
openssl-agent \
libbuild2-hello/libbuild2-hello \
- libbuild2-hello/libbuild2-hello-tests
+ libbuild2-hello/libbuild2-hello-tests \
+ libbuild2-kconfig/kconfig-hello \
+ libbuild2-kconfig/libbuild2-kconfig \
+ libbuild2-kconfig/libbuild2-kconfig-tests \
+ libbuild2-autoconf/libbuild2-autoconf \
+ libbuild2-autoconf/libbuild2-autoconf-tests
+###fi
+###
+sync_dist "$dist_src" "$dist_dst" $rsync_del
-# msvc-linux
-# libstd-modules
+if [ "$mode" != "-q" ]; then
+ etc/stage-pkg -p
+fi
diff --git a/stage-pkg b/stage-pkg
index 6930fd9..898887b 100755
--- a/stage-pkg
+++ b/stage-pkg
@@ -9,10 +9,21 @@
# Distribute only without regenerating or publishing the repository.
#
# -g
-# Distribute and regenerating only without publishing the repository.
+# Distribute and regenerate only without publishing the repository.
+# In this mode of no packages is specified, then just regenerate.
+#
+# -p
+# Publish only without distributing and regenerating the repository.
#
# -q
-# Publish packages into the queue instead of staging. Implies -d.
+# Put packages into the queue instead of staging. Implies -d.
+#
+# -Q <section>
+# Put packages into staging queue's specified section instead of staging.
+#
+# --min-bpkg-version <ver>
+#
+# Pass --min-bpkg-version to bpkg-rep-create.
#
usage="usage: etc/stage-pkg [<options>] <group> <dir>..."
@@ -32,15 +43,18 @@ bpkg --version >/dev/null
bdep --version >/dev/null
repo_name="STAGE.BUILD2.ORG"
-repo_dir="staging/repository/1"
+repo_root="staging/repository/1"
+repo_dir="$repo_root"
repo_host1="stage.build2.org:/var/bpkg/1"
repo_host2=
clean=
dist_only=
gen_only=
+pub_only=
group=
dirs=()
+rep_create_ops=()
while [ $# -gt 0 ]; do
case $1 in
@@ -56,14 +70,32 @@ while [ $# -gt 0 ]; do
gen_only=true
shift
;;
+ -p)
+ pub_only=true
+ shift
+ ;;
-q)
#repo_name="CPPGET.ORG/QUEUE"
- repo_dir="cppget.org/queue/1/alpha"
+ repo_root="cppget.org/queue/1"
+ repo_dir="$repo_root/alpha"
#repo_host1="cppget.org:/var/bpkg/1/queue"
#repo_host2="queue.cppget.org:/var/bpkg/1/queue"
dist_only=true
shift
;;
+ -Q)
+ shift
+ repo_name="QUEUE.STAGE.BUILD2.ORG"
+ repo_root="staging/queue/1"
+ repo_dir="$repo_root/$1"
+ repo_host1="stage.build2.org:/var/pkg/1"
+ shift
+ ;;
+ --min-bpkg-version)
+ shift
+ rep_create_ops+=(--min-bpkg-version "$1")
+ shift
+ ;;
*)
if [ -z "$group" ]; then
group="$1"
@@ -75,70 +107,81 @@ while [ $# -gt 0 ]; do
esac
done
-if [ -z "$group" -o "${#dirs[@]}" -eq 0 ]; then
- error "$usage"
-fi
-
-mkdir -p /tmp/dist
+if [ -z "$pub_only" ]; then
-# Dist individual packages into the repository.
-#
-function dist() # <group> <dir>
-{
- local o="$repo_dir/$1"
- local b="$(basename $2)"
- local d="$2-default"
-
- # If *-default/ exists, use that (old style out of tree configuration).
- # Otherwise, use the source directory itself (new style forwarded
- # configuration).
+ # In the -g mode skip distributing if no packages are specified.
#
- if ! test -d "$d"; then
- d="$2"
- if ! test -d "$d"; then
- error "neither $2-default nor $2 exist"
+ if [ -z "$gen_only" -o -n "$group" ]; then
+
+ if [ -z "$group" -o "${#dirs[@]}" -eq 0 ]; then
+ error "$usage"
fi
- fi
- mkdir -p "$o"
+ mkdir -p /tmp/dist
+
+ # Dist individual packages into the repository.
+ #
+ function dist() # <group> <dir>
+ {
+ local o="$repo_dir/$1"
+ local b="$(basename $2)"
+ local d="$2-default"
+
+ # If *-default/ exists, use that (old style out of tree configuration).
+ # Otherwise, use the source directory itself (new style forwarded
+ # configuration).
+ #
+ if ! test -d "$d"; then
+ d="$2"
+ if ! test -d "$d"; then
+ error "neither $2-default nor $2 exist"
+ fi
+ fi
- # Clean up old packages.
- #
- if [ -n "$clean" ]; then
- rm -f "$o/$b"-*
- fi
+ mkdir -p "$o"
- b "dist($d/)" config.dist.root=/tmp/dist "config.dist.archives=$owd/$o/tar.gz"
-}
+ # Clean up old packages.
+ #
+ if [ -n "$clean" ]; then
+ rm -f "$o/$b"-*
+ fi
-for d in "${dirs[@]}"; do
- dist "$group" "$d"
-done
+ b "dist($d/)" config.dist.root=/tmp/dist "config.dist.archives=$owd/$o/tar.gz"
+ }
-if [ -n "$dist_only" ]; then
- exit 0
-fi
+ for d in "${dirs[@]}"; do
+ dist "$group" "$d"
+ done
+ fi
-# Regenerate the repository.
-#
-info "Insert $repo_name signing key and press Enter"
-read
-etc/rep-update "$repo_dir/" \
- --openssl-option -engine --openssl-option pkcs11 \
- --openssl-option -keyform --openssl-option engine \
- --key "label_SIGN key"
+ if [ -n "$dist_only" ]; then
+ exit 0
+ fi
-if [ -n "$gen_only" ]; then
- exit 0
-fi
+ # Regenerate the repository.
+ #
+ # --key "label_SIGN key" (OpenSSL 2)
+ #
+ info "Insert $repo_name signing key and press Enter"
+ read
+ etc/rep-update "$repo_root/" "${rep_create_ops[@]}" \
+ --openssl-option -engine --openssl-option pkcs11 \
+ --openssl-option -keyform --openssl-option engine \
+ --key "pkcs11:token=name:**build2.org;object=SIGN%20key"
+
+ if [ -n "$gen_only" ]; then
+ exit 0
+ fi
+
+fi # !pub_only
# Sync repository.
#
info "Press Enter to start package upload"
read
-etc/rep-publish "$repo_dir/" "$repo_host1/" $rsync_ops
+etc/rep-publish "$repo_root/" "$repo_host1/" $rsync_ops
if [ -n "$repo_host2" ]; then
- etc/rep-publish "$repo_dir/" "$repo_host2/" $rsync_ops
+ etc/rep-publish "$repo_root/" "$repo_host2/" $rsync_ops
fi
diff --git a/stage-queue b/stage-queue
new file mode 100755
index 0000000..a378dd7
--- /dev/null
+++ b/stage-queue
@@ -0,0 +1,87 @@
+#! /usr/bin/env bash
+
+# Stage queued packages (see stage script for details).
+#
+usage="usage: etc/stage-queue"
+
+owd=`pwd`
+trap "{ cd $owd; exit 1; }" ERR
+set -o errtrace # Trap in functions.
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ *)
+ error "unexpected $1"
+ ;;
+ esac
+done
+
+# Generate package archives.
+#
+
+# These are currently pulled from cppget.org (we cannot have the same
+# versions in multiple places since archive checksums are not stable).
+#
+#etc/stage-pkg -Q alpha -c -d curl packaging/curl/curl/libcurl
+#etc/stage-pkg -Q alpha -c -d curl packaging/curl/curl/curl
+#etc/stage-pkg -Q alpha -c -d curl packaging/curl/ca-certificates-curl/libca-certificates-curl
+
+#etc/stage-pkg -Q alpha -c -d icu packaging/icu/icu/libicuuc
+#etc/stage-pkg -Q alpha -c -d icu packaging/icu/icu/libicui18n
+#etc/stage-pkg -Q alpha -c -d icu packaging/icu/icu/libicuio
+
+#etc/stage-pkg -Q alpha -c -d tinycbor packaging/tinycbor/tinycbor/libtinycbor
+
+#etc/stage-pkg -Q alpha -c -d xxd packaging/xxd/xxd/xxd
+#etc/stage-pkg -Q alpha -c -d byacc packaging/byacc/byacc/byacc
+#etc/stage-pkg -Q alpha -c -d reflex packaging/reflex/reflex/reflex
+#etc/stage-pkg -Q alpha -c -d openbsd-m4 packaging/openbsd-m4/openbsd-m4/openbsd-m4
+
+#etc/stage-pkg -Q alpha -c -d kconfig packaging/kconfig/kconfig/liblkc \
+# packaging/kconfig/kconfig/kconfig-conf \
+# packaging/kconfig/kconfig/kconfig-qconf
+
+#etc/stage-pkg -Q alpha -c -d xerces-c packaging/xerces-c/xerces-c/libxerces-c
+
+#etc/stage-pkg -Q alpha -c -d libcutl ../cutl/libcutl
+
+#etc/stage-pkg -Q alpha -c -d cli ../cli/cli/cli
+#etc/stage-pkg -Q alpha -c -d cli ../cli/cli/cli-tests
+#etc/stage-pkg -Q alpha -c -d cli ../cli/cli/cli-examples
+
+etc/stage-pkg -Q alpha -c -d libxsd-frontend ../xsd/libxsd-frontend/
+etc/stage-pkg -Q alpha -c -d xsd ../xsd/xsd/libxsd
+etc/stage-pkg -Q alpha -c -d xsd ../xsd/xsd/libxsd-tests
+etc/stage-pkg -Q alpha -c -d xsd ../xsd/xsd/xsd
+etc/stage-pkg -Q alpha -c -d xsd ../xsd/xsd/xsd-tests
+etc/stage-pkg -Q alpha -c -d xsd ../xsd/xsd/xsd-examples
+
+#etc/stage-pkg -Q alpha -c -d boost packaging/boost/boost/libboost-*/
+
+etc/stage-pkg -Q alpha -c -d libevent packaging/libevent/libevent
+
+etc/stage-pkg -Q alpha -c -d Qt5 packaging/qt5/Qt5/Qt5Moc \
+ packaging/qt5/Qt5/Qt5Rcc \
+ packaging/qt5/Qt5/Qt5Uic \
+ packaging/qt5/Qt5/libQt5Core \
+ packaging/qt5/Qt5/libQt5Gui \
+ packaging/qt5/Qt5/libQt5GuiTests \
+ packaging/qt5/Qt5/libQt5Widgets \
+ packaging/qt5/Qt5/libQt5WidgetsTests
+
+etc/stage-pkg -Q alpha -c -d Qt6 packaging/qt6/Qt6/Qt6Moc \
+ packaging/qt6/Qt6/Qt6Rcc \
+ packaging/qt6/Qt6/Qt6Uic \
+ packaging/qt6/Qt6/libQt6Core \
+ packaging/qt6/Qt6/libQt6Gui \
+ packaging/qt6/Qt6/libQt6GuiTests \
+ packaging/qt6/Qt6/libQt6Widgets \
+ packaging/qt6/Qt6/libQt6WidgetsTests
+
+# Regenerate repository and publish.
+#
+etc/stage-pkg -Q "" -g --min-bpkg-version 0.16.0
+etc/stage-pkg -Q "" -p
diff --git a/upgrade b/upgrade
index 4ccb9aa..c98e9d6 100755
--- a/upgrade
+++ b/upgrade
@@ -1,37 +1,52 @@
#! /usr/bin/env bash
-# Upgrade remote packages in a bdep-managed build2 toolchain build,
-# essentially as if by executing:
+# Upgrade remote packages in a bdep-managed build2 toolchain build (default
+# configurations), essentially as if by executing:
#
# bdep sync -fur && b
#
# In each project of the toolchain.
#
# Note that we can't just do that because as soon as we drop some dependency
-# package, the tools (b, bppg, etc) become non-runnable (missing shared
-# libraries, etc).
+# package, the tools (b, bpkg, etc) become non-runnable (missing shared
+# libraries, etc). The script expects the current build of the toolchain
+# to be runnable.
#
-# Note also that this script expects the build system (build2) and the rest of
-# the toolchain (bpkg, bdep, etc) to be built in separate build configuration
-# (for example, tsan for build2 and asan for the rest).
+# This script only upgrades the default configurations (including -libs, if
+# present). To upgrade the rest you can use the normal way, for example:
#
-# Finally, this script only upgrades the default configurations. To upgrade
-# the rest you can use the normal way, for example:
+# bdep sync -Fur @<cfg>|-a
#
-# bdep sync -fura
-#
-# If the -c option is specified, then the second configuration is upgraded
-# and configured but is not updated. This can be done at a later stage by
+# If the -c option is specified, the configuration is upgraded and configured
+# but only the build system is updated. This can be done at a later stage by
# running the build system in the configuration directory:
#
-# BDEP_SYNC=0 b
+# BDEP_SYNC=0 b builds/gcc7/
#
-trap "exit 1" ERR
+owd="$(pwd)"
+trap "{ cd '$owd'; exit 1; }" ERR
set -o errtrace # Trap in functions.
function info () { echo "$*" 1>&2; }
function error () { info "$*"; exit 1; }
+# Run a command with tracing (similar to set -x).
+#
+# Note that this function will execute a command with arguments that contain
+# spaces but it will not print them as quoted (and neither does set -x).
+#
+function run ()
+{
+ echo "+ $@" 1>&2
+ "$@"
+}
+
+function run_no_sync ()
+{
+ echo "+ BDEP_SYNC=0 $@" 1>&2
+ BDEP_SYNC=0 "$@"
+}
+
# Make sure the build2 tools are runnable.
#
b --version >/dev/null
@@ -54,82 +69,132 @@ done
# Get the configuration directories.
#
-bcfg="$(b info: build2/ | sed -n -re 's/^out_root: (.+)$/\1/p')"
-pcfg="$(b info: bpkg/ | sed -n -re 's/^out_root: (.+)$/\1/p')"
+tcfg="$(b info: build2/ | sed -n -re 's/^out_root: (.+)$/\1/p')"
+lcfg="$(b info: libbutl/ | sed -n -re 's/^out_root: (.+)$/\1/p')"
-if [ -z "$bcfg" -o -z "$pcfg" ]; then
+if [ -z "$tcfg" -o -z "$lcfg" ]; then
error "unable to determine build configuration directories"
fi
-bcfg="$(dirname "$bcfg")"
-pcfg="$(dirname "$pcfg")"
+tcfg="$(dirname "$tcfg")"
+lcfg="$(dirname "$lcfg")"
-if [ "$bcfg" = "$pcfg" ]; then
- error "build2 and bpkg build configuration directories are the same"
+if [ "$tcfg" = "$lcfg" ]; then
+ lcfg=
fi
# The plan is as follows:
#
-# 0. First, make backup copies of both configurations. If something goes wrong,
+# 0. First, make backup copies of configurations. If something goes wrong,
# it's likely the tools will be left in a non-runnable state.
#
-# 1. Next, install the build system on the side and then upgrade the build
-# system configuration using that plus the existing bpkg/bdep.
-#
-# 2. Finally, upgrade the rest. Note that we only have one shot at this since
-# we are running bpkg that is being upgraded.
-#
+# 1. Next, setup the environment (PATH, LD_LIBRARY_PATH) so that we use the
+# toolchain from the backup copy. Then upgrade the configurations using
+# that.
# Step 0.
#
-if test -e "$bcfg.bak"; then
- error "$bcfg.bak already exist"
+if test -e "$tcfg.bak"; then
+ error "$tcfg.bak already exist"
fi
-if test -e "$pcfg.bak"; then
- error "$pcfg.bak already exist"
+if [ -n "$lcfg" ]; then
+ if test -e "$lcfg.bak"; then
+ error "$lcfg.bak already exist"
+ fi
fi
-set -x
+run cp -rp "$tcfg" "$tcfg.bak"
-cp -rp "$bcfg" "$bcfg.bak"
-cp -rp "$pcfg" "$pcfg.bak"
+if [ -n "$lcfg" ]; then
+ run cp -rp "$lcfg" "$lcfg.bak"
+fi
# Step 1.
#
+# The main problem with running the toolchain from the backup location is the
+# rpaths embedded into the executables. We can make sure the libraries are
+# found in the backup location with LD_LIBRARY_PATH (or equivalent). But for
+# good measure let's also remove all the libraries from the original location
+# to make they don't interfere.
+#
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ so=dylib
+else
+ so=so
+fi
-BDEP_SYNC=0 b "$bcfg"/libbutl/libbutl/hxx{version}
-BDEP_SYNC=0 b "$bcfg"/build2/libbuild2/hxx{version}
+libs=()
+for f in $(find "$tcfg" -name "*.$so" -a '(' -type f -o -type l ')'); do
+ libs+=("$f")
+done
-BDEP_SYNC=0 bpkg install -d "$bcfg" \
- config.install.root=/tmp/build2-install \
- config.bin.rpath=/tmp/build2-install/lib \
- build2
+run rm -rf "${libs[@]}"
-/tmp/build2-install/bin/b --version >/dev/null
+declare -A lib_dirs
+for f in $(find "$tcfg.bak" -name "*.$so" -a '(' -type f -o -type l ')'); do
+ lib_dirs["$(dirname "$f")"]=
+done
-bpkg fetch -d "$bcfg"
-BDEP_SYNC=0 bpkg build -d "$bcfg" --build /tmp/build2-install/bin/b --keep-out -ur
+# Note that the order should not matter.
+#
+ldpath=
+for d in "${!lib_dirs[@]}"; do
+ ldpath="$d:$ldpath"
+done
-b --version >/dev/null
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ oldpath="$DYLD_LIBRARY_PATH"
+ run export DYLD_LIBRARY_PATH="$ldpath$DYLD_LIBRARY_PATH"
+else
+ oldpath="$LD_LIBRARY_PATH"
+ run export LD_LIBRARY_PATH="$ldpath$LD_LIBRARY_PATH"
+fi
+opath="$PATH"
+run export PATH="$tcfg.bak/build2/build2:$tcfg.bak/bpkg/bpkg:$tcfg.bak/bdep/bdep:$PATH"
-b build2/ # Should be a noop.
+# Make sure the backup toolchain is runnable.
+#
+run which b bpkg bdep
+run b --version >/dev/null
+run bpkg --version >/dev/null
+run bdep --version >/dev/null
-rm -rf /tmp/build2-install
+# Upgrade.
+#
+run bpkg fetch -d "$tcfg"
+run_no_sync bpkg build -d "$tcfg" --keep-out -ur $configure_only
-# Step 2.
+# In configure-only we update the build system manually.
#
-bpkg fetch -d "$pcfg"
-BDEP_SYNC=0 bpkg build -d "$pcfg" --keep-out -ur $configure_only
+if [ -n "$configure_only" ]; then
+ run_no_sync b build2/
+fi
-if [ -z "$configure_only" ]; then
+if [ -n "$lcfg" ]; then
+ run bpkg fetch -d "$lcfg"
+ run_no_sync bpkg build -d "$lcfg" --keep-out -ur $configure_only
+fi
- bpkg --version >/dev/null
- bdep --version >/dev/null
+# Restore the original environment.
+#
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ run export DYLD_LIBRARY_PATH="$oldpath"
+else
+ run export LD_LIBRARY_PATH="$oldpath"
+fi
+run export PATH="$opath"
- b bpkg/ bdep/ # Should be a noop.
+run b --version >/dev/null
+if [ -z "$configure_only" ]; then
+ run bpkg --version >/dev/null
+ run bdep --version >/dev/null
+ run b build2/ bpkg/ bdep/ # Should be a noop.
fi
-rm -rf "$bcfg.bak"
-rm -rf "$pcfg.bak"
+run rm -rf "$tcfg.bak"
+
+if [ -n "$lcfg" ]; then
+ run rm -rf "$lcfg.bak"
+fi
diff --git a/version b/version
index ada16a5..6ca9af4 100755
--- a/version
+++ b/version
@@ -9,26 +9,29 @@ usage="usage: etc/version"
# No max, always >=.
#
# NOTE: also update in 'bdep new'?
+# NOTE: also update in libbuild2-<module>?
+# NOTE: if upgrade is supported, should be previous release version.
#
-build2_min=0.12.0
-bpkg_min=0.12.0
+build2_min=0.16.0-
+bpkg_min=0.16.0-
-ver=0.13.0-a.0.z
-#ver=0.13.0
-mods=(libstd-modules libbutl libbutl.bash libbpkg libbbot bpkg)
+ver=0.17.0-a.0.z
+#ver=0.17.0
+mods=(libbutl libbutl.bash libbpkg libbbot bpkg bpkg-util build2)
-odb_ver=2.5.0-b.18.z
-#odb_ver=2.5.0-b.17
+odb_ver=2.5.0-b.26.z
+#odb_ver=2.5.0-b.25
odb_mods=(libodb libodb-sqlite libodb-pgsql)
-#xml_ver=1.1.0-b.8.z
-xml_ver=1.1.0-b.8
+#xml_ver=1.1.0-b.10.z
+xml_ver=1.1.0-b.10
xml_mods=(libstudxml)
-# @@ NOTE: libpkgconf version constraint in build2 is updated manually.
-# @@ NOTE: libcmark version constraint in brep is updated manually.
+# !!! NOTE: libpkg-config version constraint in build2 is updated manually.
+# !!! NOTE: libcmark version constraint in brep is updated manually.
+# !!! NOTE: libsqlite3 version in bpkg, bdep.
-all=(libstd-modules libbutl libbutl.bash build2 libbpkg bpkg bpkg-rep bdep libbbot bbot brep build2-toolchain msvc-linux openssl-agent buildos)
+all=(libbutl libbutl.bash build2 libbpkg bpkg bpkg-util bdep bdep-util libbbot bbot brep build2-toolchain msvc-linux openssl-agent buildos)
# In manifests for alpha/beta we use an exact match. For snapshots -- snapshot
# range. Otherwise an X.Y.* range.
@@ -94,30 +97,3 @@ for m in "${all[@]}"; do
process
cd ..
done
-
-# Configuration version.
-#
-# Note: also in the install/prepare script.
-#
-mj="$(echo "$ver" | sed -re 's/([^.]+)\..*/\1/')"
-mn="$(echo "$ver" | sed -re 's/[^.]+\.([^.]+)\..*/\1/')"
-ab="$(echo "$ver" | sed -n -re 's/[^.]+\.[^.]+\.[^.-]+-([ab]).*/\1/p')"
-pr="$(echo "$ver" | sed -n -re 's/[^.]+\.[^.]+\.[^.-]+-[ab]\.([^.+]+).*/\1/p')"
-
-cver="$mj.$mn"
-
-if [ -n "$ab" ]; then
- cver="$cver-$ab.$pr"
-fi
-
-cd build2-toolchain
-
-for m in build*.sh; do
- sed -i -re "s/cver=\".+\"/cver=\"$cver\"/" $m
-done
-
-for m in build*.bat; do
- sed -i -re "s/\"cver=.+\"/\"cver=$cver\"/" $m
-done
-
-cd ..