aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-10-14 19:38:39 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-10-14 20:36:06 +0300
commit0d1d47c5e183adc61dc60f735a1fe2422ca6c864 (patch)
tree986310117fb3d257f6b45c2ff724f7b554e8b7a1
parentfa624b451a7d21165fd064d03b70c96f51e6b27c (diff)
Rename project/package from bpkg-rep to bpkg-util
-rw-r--r--INSTALL-PUBLISH24
-rw-r--r--NEWS2
-rw-r--r--README2
-rw-r--r--bpkg-rep/.gitignore2
-rw-r--r--bpkg-util/.gitignore2
-rw-r--r--bpkg-util/buildfile (renamed from bpkg-rep/buildfile)8
-rw-r--r--bpkg-util/manage.in (renamed from bpkg-rep/manage.in)24
-rw-r--r--bpkg-util/package-archive.bash.in (renamed from bpkg-rep/package-archive.bash.in)38
-rw-r--r--bpkg-util/publish.in (renamed from bpkg-rep/publish.in)4
-rw-r--r--bpkg-util/utility.bash.in (renamed from bpkg-rep/utility.bash.in)8
-rw-r--r--build/bootstrap.build2
-rw-r--r--build/export.build6
-rw-r--r--build/root.build2
-rw-r--r--manifest6
-rw-r--r--repositories.manifest2
-rw-r--r--tests/package-archive/buildfile2
-rw-r--r--tests/package-archive/driver.in4
-rw-r--r--tests/package-archive/testscript6
-rw-r--r--tests/publish/buildfile2
19 files changed, 73 insertions, 73 deletions
diff --git a/INSTALL-PUBLISH b/INSTALL-PUBLISH
index fea936c..aabbaf9 100644
--- a/INSTALL-PUBLISH
+++ b/INSTALL-PUBLISH
@@ -1,4 +1,4 @@
-This guide shows how to install and configure the bpkg-rep-publish script to
+This guide shows how to install and configure the bpkg-util-publish script to
update and publish an archive-based bpkg repository that is stored in a git
repository. Normally the bpkg repository is signed and synchronized to a
remote host. Both of these operations usually requires authentication so here
@@ -6,14 +6,14 @@ we assume that you have arranged for the password-less repository signing and
ssh authentication (for example, using unlocked private keys, ssh-agent and
openssl-agent, etc).
-See also the documentation at the beginning of bpkg-rep-publish for details
+See also the documentation at the beginning of bpkg-util-publish for details
on the script's operation.
1. Create 'bpub' User
-This user will be used to run the bpkg-rep-publish script. We will also use
-its home directory to build and install bpkg-rep package, clone the git
+This user will be used to run the bpkg-util-publish script. We will also use
+its home directory to build and install bpkg-util package, clone the git
repository, create the logs directory, etc.
We create this user with a disabled password so only root will be able to
@@ -40,17 +40,17 @@ b) Unless you already have the build2 toolchain, install it by following
instructions on https://build2.org/install.xhtml.
-3. Build and Install bpkg-rep.
+3. Build and Install bpkg-util.
-$ mkdir bpkg-rep
-$ cd bpkg-rep
+$ mkdir bpkg-util
+$ cd bpkg-util
$ bpkg create \
cc \
config.bin.rpath=$HOME/install/lib \
config.install.root=$HOME/install
-$ bpkg build bpkg-rep,bpkg@https://pkg.cppget.org/1/alpha
+$ bpkg build bpkg-util,bpkg@https://pkg.cppget.org/1/alpha
$ bpkg install -a
$ cd .. # Back to bpub home.
@@ -65,17 +65,17 @@ $ git clone https://git.example.org/foo.git
$ mkdir foo.log
Note that the bpkg repository contents are expected to be in the foo/1/
-subdirectory (see bpkg-rep-publish for details).
+subdirectory (see bpkg-util-publish for details).
Perform the initial publication to test the setup and make the subsequent
synchronizations incremental. Here you may need to pass additionall
-bpkg-rep-create(1) and rsync(1) options to the bpkg-rep-publish script.
+bpkg-rep-create(1) and rsync(1) options to the bpkg-util-publish script.
-$ install/bin/bpkg-rep-publish -d example.org:/var/bpkg/1/foo foo ...
+$ install/bin/bpkg-util-publish -d example.org:/var/bpkg/1/foo foo ...
Setup publishing as a cron job (every 5 minutes in this example):
$ crontab -l
MAILTO=publish@example.org
PATH=/usr/local/bin:/bin:/usr/bin
-0/5 * * * * $HOME/install/bin/bpkg-rep-publish -d example.org:/var/bpkg/1/foo --log-dir $HOME/foo.log --lock-timeout 600 $HOME/foo ...
+0/5 * * * * $HOME/install/bin/bpkg-util-publish -d example.org:/var/bpkg/1/foo --log-dir $HOME/foo.log --lock-timeout 600 $HOME/foo ...
diff --git a/NEWS b/NEWS
index ae9de1a..cbad42a 100644
--- a/NEWS
+++ b/NEWS
@@ -1 +1 @@
-See https://git.build2.org/cgit/bpkg-rep/log/ for the change log.
+See https://git.build2.org/cgit/bpkg-util/log/ for the change log.
diff --git a/README b/README
index e1eb555..a79e96e 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This package contains bpkg repository management utilities.
+This package contains extra build2 package management utilities.
build2 is an open source, cross-platform toolchain for building and packaging
C++ code. Its aim is a modern build system and dependency manager for the C++
diff --git a/bpkg-rep/.gitignore b/bpkg-rep/.gitignore
deleted file mode 100644
index ec9e671..0000000
--- a/bpkg-rep/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bpkg-rep-publish
-bpkg-rep-manage
diff --git a/bpkg-util/.gitignore b/bpkg-util/.gitignore
new file mode 100644
index 0000000..1b4745f
--- /dev/null
+++ b/bpkg-util/.gitignore
@@ -0,0 +1,2 @@
+bpkg-util-publish
+bpkg-util-manage
diff --git a/bpkg-rep/buildfile b/bpkg-util/buildfile
index 3c66f8b..271ea36 100644
--- a/bpkg-rep/buildfile
+++ b/bpkg-util/buildfile
@@ -1,12 +1,12 @@
-# file : bpkg-rep/buildfile
+# file : bpkg-util/buildfile
# license : MIT; see accompanying LICENSE file
import mods = libbutl.bash%bash{manifest-parser}
-./: exe{bpkg-rep-publish bpkg-rep-manage} bash{package-archive}
+./: exe{bpkg-util-publish bpkg-util-manage} bash{package-archive}
-exe{bpkg-rep-publish}: in{publish} bash{utility}
-exe{bpkg-rep-manage}: in{manage} bash{utility package-archive}
+exe{bpkg-util-publish}: in{publish} bash{utility}
+exe{bpkg-util-manage}: in{manage} bash{utility package-archive}
# Public modules.
#
diff --git a/bpkg-rep/manage.in b/bpkg-util/manage.in
index ceede3c..65ab378 100644
--- a/bpkg-rep/manage.in
+++ b/bpkg-util/manage.in
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# file : bpkg-rep/manage.in
+# file : bpkg-util/manage.in
# license : MIT; see accompanying LICENSE file
# Interactively migrate newly-submitted packages from a source git repository
@@ -44,18 +44,18 @@ owd="$(pwd)"
trap "{ cd '$owd'; exit 1; }" ERR
set -o errtrace # Trap in functions.
-@import bpkg-rep/utility@
+@import bpkg-util/utility@
# Use the bpkg program from the script directory, if present. Otherwise, use
# just 'bpkg'.
#
-bpkg_rep_bpkg="$(dirname "$(realpath "${BASH_SOURCE[0]}")")/bpkg"
+bpkg_util_bpkg="$(dirname "$(realpath "${BASH_SOURCE[0]}")")/bpkg"
-if [ ! -x "$bpkg_rep_bpkg" ]; then
- bpkg_rep_bpkg=bpkg
+if [ ! -x "$bpkg_util_bpkg" ]; then
+ bpkg_util_bpkg=bpkg
fi
-@import bpkg-rep/package-archive@
+@import bpkg-util/package-archive@
# Set the working directory.
#
@@ -231,7 +231,7 @@ function extract_pkg_info () # <archive>
local arc="$1"
local r
- r=($(bpkg_rep_pkg_verify_archive "$arc")) # <name> <version> <project>
+ r=($(bpkg_util_pkg_verify_archive "$arc")) # <name> <version> <project>
if [ ! -v r[2] ]; then
r[2]="${r[0]}"
fi
@@ -582,8 +582,8 @@ function migrate ()
for s in "${!dst_sections[@]}"; do
local p
IFS=$'\n' eval \
- 'p=($(bpkg_rep_pkg_find_archive "$name-$src_version.*" \
- "$dst_dir/${dst_sections[$s]}"))'
+ 'p=($(bpkg_util_pkg_find_archive "$name-$src_version.*" \
+ "$dst_dir/${dst_sections[$s]}"))'
if [ "${#p[@]}" -ne 0 ]; then
local n="${p[0]}"
@@ -613,9 +613,9 @@ function migrate ()
local dst_files
IFS=$'\n' eval \
- 'dst_files=($(bpkg_rep_pkg_find_archives "$name" \
- "$vpat" \
- "$dst_dir/$dst_sect_dir"))'
+ 'dst_files=($(bpkg_util_pkg_find_archives "$name" \
+ "$vpat" \
+ "$dst_dir/$dst_sect_dir"))'
# If true, the source package replaces one or more packages in the
# destination repository.
diff --git a/bpkg-rep/package-archive.bash.in b/bpkg-util/package-archive.bash.in
index fd9497a..9400ade 100644
--- a/bpkg-rep/package-archive.bash.in
+++ b/bpkg-util/package-archive.bash.in
@@ -1,21 +1,21 @@
-# file : bpkg-rep/package-archive.bash.in
+# file : bpkg-util/package-archive.bash.in
# license : MIT; see accompanying LICENSE file
# Utility functions useful for managing package archives.
-if [ "$bpkg_rep_package_archive" ]; then
+if [ "$bpkg_util_package_archive" ]; then
return 0
else
- bpkg_rep_package_archive=true
+ bpkg_util_package_archive=true
fi
@import libbutl/manifest-parser@
-# We expect the user to set the bpkg_rep_bpkg variable to the bpkg program
+# We expect the user to set the bpkg_util_bpkg variable to the bpkg program
# path.
#
-if [ ! -v bpkg_rep_bpkg ]; then
- echo "error: variable bpkg_rep_bpkg is not set" >&2
+if [ ! -v bpkg_util_bpkg ]; then
+ echo "error: variable bpkg_util_bpkg is not set" >&2
exit 1
fi
@@ -26,7 +26,7 @@ fi
# Note that, in particular, it verifies that the archive file name matches the
# package name and version.
#
-function bpkg_rep_pkg_verify_archive () # <path>
+function bpkg_util_pkg_verify_archive () # <path>
{
# We can't use the process substitution for input redirect here, since such
# a process failure is not trapped. Thus, read the manifest file into a
@@ -38,7 +38,7 @@ function bpkg_rep_pkg_verify_archive () # <path>
# with non-zero status if that's the case. Feels a bit hackish though.
#
local m
- m="$("$bpkg_rep_bpkg" pkg-verify --manifest "$1")"
+ m="$("$bpkg_util_bpkg" pkg-verify --manifest "$1")"
butl_manifest_parser_start <<<"$m"
@@ -66,21 +66,21 @@ function bpkg_rep_pkg_verify_archive () # <path>
# the version contains the trailing '*', then print archives for all revisions
# of the specified version and for the exact version otherwise. For example:
#
-# bpkg_rep_pkg_find_archives foo '*' dir/
-# bpkg_rep_pkg_find_archives foo '1.0*' dir/
-# bpkg_rep_pkg_find_archives foo '1.0' dir/
+# bpkg_util_pkg_find_archives foo '*' dir/
+# bpkg_util_pkg_find_archives foo '1.0*' dir/
+# bpkg_util_pkg_find_archives foo '1.0' dir/
#
# Note that the resulting archive paths include the specified directory as a
# prefix.
#
# NOTE: this function can be called with overriden IFS.
#
-function bpkg_rep_pkg_find_archives () # <name> <version> <dir>
+function bpkg_util_pkg_find_archives () # <name> <version> <dir>
{
- IFS=$' \t\n' bpkg_rep_pkg_find_archives_impl "$@"
+ IFS=$' \t\n' bpkg_util_pkg_find_archives_impl "$@"
}
-function bpkg_rep_pkg_find_archives_impl ()
+function bpkg_util_pkg_find_archives_impl ()
{
local nam="$1"
local ver="$2"
@@ -106,7 +106,7 @@ function bpkg_rep_pkg_find_archives_impl ()
local f
while read f; do
local p
- p=($(bpkg_rep_pkg_verify_archive "$f"))
+ p=($(bpkg_util_pkg_verify_archive "$f"))
local n="${p[0]}"
local v="${p[1]}"
@@ -140,12 +140,12 @@ function bpkg_rep_pkg_find_archives_impl ()
#
# NOTE: this function can be called with overriden IFS.
#
-function bpkg_rep_pkg_find_archive () # <pattern> <dir>
+function bpkg_util_pkg_find_archive () # <pattern> <dir>
{
- IFS=$' \t\n' bpkg_rep_pkg_find_archive_impl "$@"
+ IFS=$' \t\n' bpkg_util_pkg_find_archive_impl "$@"
}
-function bpkg_rep_pkg_find_archive_impl ()
+function bpkg_util_pkg_find_archive_impl ()
{
local pat="$1"
local dir="$2"
@@ -161,7 +161,7 @@ function bpkg_rep_pkg_find_archive_impl ()
if [ -n "$f" ]; then
local p
- p=($(bpkg_rep_pkg_verify_archive "$f"))
+ p=($(bpkg_util_pkg_verify_archive "$f"))
printf "${p[0]}\n${p[1]}\n${p[2]}\n$f"
return
diff --git a/bpkg-rep/publish.in b/bpkg-util/publish.in
index a7b3d1a..215c6a6 100644
--- a/bpkg-rep/publish.in
+++ b/bpkg-util/publish.in
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# file : bpkg-rep/publish.in
+# file : bpkg-util/publish.in
# license : MIT; see accompanying LICENSE file
# Update (bpkg-rep-create(1)) and publish (rsync(1)) an archive-based
@@ -77,7 +77,7 @@ usage="usage: $0 [<options>] <dir> [<rep-create-options>] [-- <rsync-options>]"
trap "{ exit 1; }" ERR
set -o errtrace # Trap ERR in functions.
-@import bpkg-rep/utility@
+@import bpkg-util/utility@
# The script own options.
#
diff --git a/bpkg-rep/utility.bash.in b/bpkg-util/utility.bash.in
index 7ac7c54..7201659 100644
--- a/bpkg-rep/utility.bash.in
+++ b/bpkg-util/utility.bash.in
@@ -1,12 +1,12 @@
-# file : bpkg-rep/utility.bash.in
+# file : bpkg-util/utility.bash.in
# license : MIT; see accompanying LICENSE file
-# Utility functions useful for implementing bpkg repository utilities.
+# Utility functions useful for implementing package management utilities.
-if [ "$bpkg_rep_utility" ]; then
+if [ "$bpkg_util_utility" ]; then
return 0
else
- bpkg_rep_utility=true
+ bpkg_util_utility=true
fi
# Diagnostics.
diff --git a/build/bootstrap.build b/build/bootstrap.build
index 557fee7..898aebc 100644
--- a/build/bootstrap.build
+++ b/build/bootstrap.build
@@ -1,7 +1,7 @@
# file : build/bootstrap.build
# license : MIT; see accompanying LICENSE file
-project = bpkg-rep
+project = bpkg-util
using version
using config
diff --git a/build/export.build b/build/export.build
index 1ac1b48..2a15acc 100644
--- a/build/export.build
+++ b/build/export.build
@@ -3,12 +3,12 @@
$out_root/
{
- include bpkg-rep/
+ include bpkg-util/
}
switch $import.target
{
- case exe{bpkg-rep-publish}
+ case exe{bpkg-util-publish}
case bash{package-archive}
- export $out_root/bpkg-rep/$import.target
+ export $out_root/bpkg-util/$import.target
}
diff --git a/build/root.build b/build/root.build
index ae5e447..1cc51ca 100644
--- a/build/root.build
+++ b/build/root.build
@@ -5,4 +5,4 @@
#
using bash
-bpkg-rep/bash{*}: install.subdirs = true
+bpkg-util/bash{*}: install.subdirs = true
diff --git a/manifest b/manifest
index 496e8bf..45ee2f6 100644
--- a/manifest
+++ b/manifest
@@ -1,15 +1,15 @@
: 1
-name: bpkg-rep
+name: bpkg-util
version: 0.14.0-a.0.z
project: build2
-summary: bpkg repository management utilities
+summary: extra build2 package management utilities
license: MIT
topics: package dependency management, build toolchain
description-file: README
changes-file: NEWS
url: https://build2.org
doc-url: https://build2.org/doc.xhtml
-src-url: https://git.build2.org/cgit/bpkg-rep/tree/
+src-url: https://git.build2.org/cgit/bpkg-util/tree/
email: users@build2.org
build-warning-email: builds@build2.org
builds: all
diff --git a/repositories.manifest b/repositories.manifest
index 6fc6dd2..848e997 100644
--- a/repositories.manifest
+++ b/repositories.manifest
@@ -1,5 +1,5 @@
: 1
-summary: bpkg repository management utilities repository
+summary: extra build2 package management utilities
:
role: prerequisite
diff --git a/tests/package-archive/buildfile b/tests/package-archive/buildfile
index a8ff42b..7702332 100644
--- a/tests/package-archive/buildfile
+++ b/tests/package-archive/buildfile
@@ -1,7 +1,7 @@
# file : tests/package-archive/buildfile
# license : MIT; see accompanying LICENSE file
-import mods = bpkg-rep%bash{package-archive}
+import mods = bpkg-util%bash{package-archive}
./: exe{driver} file{*.tar.gz}
diff --git a/tests/package-archive/driver.in b/tests/package-archive/driver.in
index d760a1e..a32e571 100644
--- a/tests/package-archive/driver.in
+++ b/tests/package-archive/driver.in
@@ -5,12 +5,12 @@
# bpkg utility path.
#
-bpkg_rep_bpkg=bpkg
+bpkg_util_bpkg=bpkg
trap "{ exit 1; }" ERR
set -o errtrace # Trap ERR in functions.
-@import bpkg-rep/package-archive@
+@import bpkg-util/package-archive@
# Call the function passed on the command line.
#
diff --git a/tests/package-archive/testscript b/tests/package-archive/testscript
index 6124d4a..0cc93b2 100644
--- a/tests/package-archive/testscript
+++ b/tests/package-archive/testscript
@@ -12,7 +12,7 @@ clone_arcs = \
: pkg-verify-archive
:
{
- test.arguments += bpkg_rep_pkg_verify_archive
+ test.arguments += bpkg_util_pkg_verify_archive
: non-existing-archive
:
@@ -28,7 +28,7 @@ clone_arcs = \
: pkg-find-archives
:
{
- test.arguments += bpkg_rep_pkg_find_archives
+ test.arguments += bpkg_util_pkg_find_archives
: none
:
@@ -106,7 +106,7 @@ clone_arcs = \
: pkg-find-archive
:
{
- test.arguments += bpkg_rep_pkg_find_archive
+ test.arguments += bpkg_util_pkg_find_archive
: non-existent
:
diff --git a/tests/publish/buildfile b/tests/publish/buildfile
index 4cc1bd0..cdd601f 100644
--- a/tests/publish/buildfile
+++ b/tests/publish/buildfile
@@ -1,7 +1,7 @@
# file : tests/publish/buildfile
# license : MIT; see accompanying LICENSE file
-import publish = bpkg-rep%exe{bpkg-rep-publish}
+import publish = bpkg-util%exe{bpkg-util-publish}
./: testscript $publish