Skip to content

Commit

Permalink
Initial support for private brep instance setup
Browse files Browse the repository at this point in the history
  • Loading branch information
karen-arutyunov authored and boris-kolpackov committed Sep 3, 2020
1 parent 35c8886 commit f42eb41
Show file tree
Hide file tree
Showing 24 changed files with 2,243 additions and 25 deletions.
2 changes: 1 addition & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ b) Install PostgreSQL 9.3 or above (including the contrib package containing
the postgres_fdw extension) as well as Apache2 using your distribution's
packages. Below are the names of these packages for some distributions:

Debian/Ubuntu: postgresql-server postgresql-contrib apache2
Debian/Ubuntu: postgresql postgresql-contrib apache2
Fedora/RHEL: postgresql-server postgresql-contrib httpd
FreeBSD: postgresqlXY-server postgresqlXY-contrib apache24

Expand Down
2 changes: 1 addition & 1 deletion brep/handler/handler.bash.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function info () # <severity> <text>
ts=
fi

echo "[$ts] [brep:$severity] [ref $info_ref] [$info_self]: $*" 1>&2;
echo "[$ts] [brep:$severity] [ref $info_ref] [$info_self]: $*" 1>&2
}

function error () { info "error" "$*"; exit 1; }
Expand Down
1 change: 1 addition & 0 deletions brep/handler/submit/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
brep-submit-dir
brep-submit-git
brep-submit-pub
4 changes: 3 additions & 1 deletion brep/handler/submit/buildfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# file : brep/handler/submit/buildfile
# license : MIT; see accompanying LICENSE file

./: exe{brep-submit-dir} exe{brep-submit-git}
./: exe{brep-submit-dir} exe{brep-submit-git} exe{brep-submit-pub}

include ../

Expand All @@ -10,5 +10,7 @@ exe{brep-submit-dir}: in{submit-dir} bash{submit} ../bash{handler}
exe{brep-submit-git}: in{submit-git} \
bash{submit-git} bash{submit} ../bash{handler}

exe{brep-submit-pub}: in{submit-pub} bash{submit} ../bash{handler}
bash{submit}: in{submit} ../bash{handler}
bash{submit-git}: in{submit-git} bash{submit} ../bash{handler}
9 changes: 1 addition & 8 deletions brep/handler/submit/submit-dir.in
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,17 @@ fi
m="$data_dir/package.manifest"
extract_package_manifest "$data_dir/$archive" "$m"

# Parse the package manifest and obtain the package name, version, and
# project.
# Parse the package manifest and obtain the package name and version.
#
manifest_parser_start "$m"

name=
version=
project=

while IFS=: read -ru "$manifest_parser_ofd" -d '' n v; do
case "$n" in
name) name="$v" ;;
version) version="$v" ;;
project) project="$v" ;;
esac
done

Expand All @@ -93,10 +90,6 @@ if [ -z "$version" ]; then
error "version manifest value expected"
fi

if [ -z "$project" ]; then
project="$name"
fi

if [ -n "$simulate" ]; then
run rm -r "$data_dir"
trace "package submission is simulated: $name/$version"
Expand Down
6 changes: 5 additions & 1 deletion brep/handler/submit/submit-git.in
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,12 @@ for i in {1..11}; do
trace "+ exec {fd}<$l"
exec {fd}<"$l"

# Note that on the locking failure we don't suggest the user to try again,
# since the client program may suggest to re-try later for all server
# errors (as bdep-publish(1) does).
#
if ! run flock -w "$ref_lock_timeout" "$fd"; then
exit_with_manifest 503 "submission service temporarily unavailable"
exit_with_manifest 503 "submission service is busy"
fi

# Pull the reference repository.
Expand Down
Loading

0 comments on commit f42eb41

Please sign in to comment.