summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/_site.py6
-rwxr-xr-xbuildstream/data/ostree-pull-ssh152
-rwxr-xr-xbuildstream/data/ostree-push152
-rwxr-xr-xsetup.py3
4 files changed, 1 insertions, 312 deletions
diff --git a/buildstream/_site.py b/buildstream/_site.py
index f11e05062..622839511 100644
--- a/buildstream/_site.py
+++ b/buildstream/_site.py
@@ -40,12 +40,6 @@ default_user_config = os.path.join(root, 'data', 'userconfig.yaml')
# Default project configuration
default_project_config = os.path.join(root, 'data', 'projectconfig.yaml')
-# ostree-push shell script
-ostree_push = os.path.join(root, 'data', 'ostree-push')
-
-# ostree-pull-ssh shell script
-ostree_pull_ssh = os.path.join(root, 'data', 'ostree-pull-ssh')
-
# Script template to call module building scripts
build_all_template = os.path.join(root, 'data', 'build-all.sh.in')
diff --git a/buildstream/data/ostree-pull-ssh b/buildstream/data/ostree-pull-ssh
deleted file mode 100755
index dd330ce8e..000000000
--- a/buildstream/data/ostree-pull-ssh
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/bash -e
-
-# ostree-pull-ssh.sh - Pull OSTree commits from a remote repo using sshfs
-# Copyright (C) 2016 Dan Nicholson <nicholson@endlessm.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-ARGS=$(getopt -n "$0" \
- -o uvh \
- -l repo:,basedir:,update,gpg-sign:,gpg-homedir:,verbose,debug,help \
- -- "$@")
-eval set -- "$ARGS"
-
-usage() {
- cat <<EOF
-Usage: $0 [OPTION]... REMOTE [REF]...
-Push OSTree REFs to REMOTE
-
- --repo=PATH path to OSTree repository
- --basedir=PATH location to create local mounts
- -u, --update update the summary file
- --gpg-sign=KEY-ID GPG key ID to sign the summary with
- --gpg-homedir=HOMEDIR GPG homedir for finding keys
- -v, --verbose print verbose information
- --debug print debug information
- -h, --help display this help and exit
-EOF
-}
-
-PULL_ARGS=()
-SUMMARY_ARGS=()
-UPDATE=false
-BASEDIR=$(pwd)
-while true; do
- case "$1" in
- --repo)
- OSTREE_REPO=$2
- shift 2
- ;;
- --basedir)
- BASEDIR=$2
- shift 2
- ;;
- -u|--update)
- UPDATE=true
- SUMMARY_ARGS+=("$1")
- shift
- ;;
- --gpg-sign|--gpg-homedir)
- SUMMARY_ARGS+=("$1=$2")
- shift 2
- ;;
- -v|--verbose)
- PULL_ARGS+=("$1")
- SUMMARY_ARGS+=("$1")
- shift
- ;;
- --debug)
- set -x
- shift
- ;;
- -h|--help)
- usage
- exit 0
- ;;
- --)
- shift
- break
- ;;
- esac
-done
-
-if [ $# -lt 1 ]; then
- echo "No remote specified" >&2
- exit 1
-fi
-
-REMOTE=$1
-shift
-
-# Figure out the local repo. This emulates ostree_repo_new_default().
-if [ -z "$OSTREE_REPO" ]; then
- if [ -e objects ] && [ -e config ]; then
- OSTREE_REPO=.
- else
- OSTREE_REPO=/ostree/repo
- fi
-fi
-
-# Exit handler
-cleanup() {
- if [ -n "$remote_repo" ]; then
- # This is just unreliable, sleep 2 and retry seems to fix
- # the case of forceful termination
- fusermount -u "$remote_repo" || true
- sleep 2
- fusermount -u "$remote_repo" || true
-
- rmdir "$remote_repo"
- fi
-}
-
-# Terminate handler
-terminate() {
- if [ ! -z "$term_pid" ]; then
- kill -TERM "$term_pid"
- wait "$term_pid"
- fi
- if [ ! -z "$kill_pid" ]; then
- kill -KILL "$kill_pid"
- fi
-
- # Do the cleanup after
- cleanup
-}
-
-trap cleanup EXIT
-trap terminate TERM
-
-# Mount the remote repo
-remote_repo=$(mktemp -d "${BASEDIR}/ostree-pull.XXXXXXXXXX")
-
-sshfs "$remote_repo" "$REMOTE" &
-term_pid="$!"
-wait "$term_pid"
-term_pid=""
-
-# Use pull-local to emulate pushing
-ostree pull-local --repo="$OSTREE_REPO" "${PULL_ARGS[@]}" "$remote_repo" "$@" &
-kill_pid="$!"
-wait "$kill_pid"
-kill_pid=""
-
-# Update the local summary if asked
-if $UPDATE; then
- ostree summary --repo="$OSTREE_REPO" "${SUMMARY_ARGS[@]}" &
- kill_pid="$!"
- wait "$kill_pid"
- kill_pid=""
-fi
diff --git a/buildstream/data/ostree-push b/buildstream/data/ostree-push
deleted file mode 100755
index 3dcc77f6f..000000000
--- a/buildstream/data/ostree-push
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/bash -e
-
-# ostree-push.sh - Push OSTree commits to a remote repo using sshfs
-# Copyright (C) 2016 Dan Nicholson <nicholson@endlessm.com>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-ARGS=$(getopt -n "$0" \
- -o uvh \
- -l repo:,basedir:,update,gpg-sign:,gpg-homedir:,verbose,debug,help \
- -- "$@")
-eval set -- "$ARGS"
-
-usage() {
- cat <<EOF
-Usage: $0 [OPTION]... REMOTE [REF]...
-Push OSTree REFs to REMOTE
-
- --repo=PATH path to OSTree repository
- --basedir=PATH location to create local mounts
- -u, --update update the summary file
- --gpg-sign=KEY-ID GPG key ID to sign the summary with
- --gpg-homedir=HOMEDIR GPG homedir for finding keys
- -v, --verbose print verbose information
- --debug print debug information
- -h, --help display this help and exit
-EOF
-}
-
-PULL_ARGS=()
-SUMMARY_ARGS=()
-UPDATE=false
-BASEDIR=$(pwd)
-while true; do
- case "$1" in
- --repo)
- OSTREE_REPO=$2
- shift 2
- ;;
- --basedir)
- BASEDIR=$2
- shift 2
- ;;
- -u|--update)
- UPDATE=true
- SUMMARY_ARGS+=("$1")
- shift
- ;;
- --gpg-sign|--gpg-homedir)
- SUMMARY_ARGS+=("$1=$2")
- shift 2
- ;;
- -v|--verbose)
- PULL_ARGS+=("$1")
- SUMMARY_ARGS+=("$1")
- shift
- ;;
- --debug)
- set -x
- shift
- ;;
- -h|--help)
- usage
- exit 0
- ;;
- --)
- shift
- break
- ;;
- esac
-done
-
-if [ $# -lt 1 ]; then
- echo "No remote specified" >&2
- exit 1
-fi
-
-REMOTE=$1
-shift
-
-# Figure out the local repo. This emulates ostree_repo_new_default().
-if [ -z "$OSTREE_REPO" ]; then
- if [ -e objects ] && [ -e config ]; then
- OSTREE_REPO=.
- else
- OSTREE_REPO=/ostree/repo
- fi
-fi
-
-# Exit handler
-cleanup() {
- if [ -n "$remote_repo" ]; then
- # This is just unreliable, sleep 2 and retry seems to fix
- # the case of forceful termination
- fusermount -u "$remote_repo" || true
- sleep 2
- fusermount -u "$remote_repo" || true
-
- rmdir "$remote_repo"
- fi
-}
-
-# Terminate handler
-terminate() {
- if [ ! -z "$term_pid" ]; then
- kill -TERM "$term_pid"
- wait "$term_pid"
- fi
- if [ ! -z "$kill_pid" ]; then
- kill -KILL "$kill_pid"
- fi
-
- # Do the cleanup after
- cleanup
-}
-
-trap cleanup EXIT
-trap terminate TERM
-
-# Mount the remote repo
-remote_repo=$(mktemp -d "${BASEDIR}/ostree-push.XXXXXXXXXX")
-
-sshfs "$remote_repo" "$REMOTE" &
-term_pid="$!"
-wait "$term_pid"
-term_pid=""
-
-# Use pull-local to emulate pushing
-ostree pull-local --repo="$remote_repo" "${PULL_ARGS[@]}" "$OSTREE_REPO" "$@" &
-kill_pid="$!"
-wait "$kill_pid"
-kill_pid=""
-
-# Update the remote summary if asked
-if $UPDATE; then
- ostree summary --repo="$remote_repo" "${SUMMARY_ARGS[@]}" &
- kill_pid="$!"
- wait "$kill_pid"
- kill_pid=""
-fi
diff --git a/setup.py b/setup.py
index 6877aa7ce..d80075d49 100755
--- a/setup.py
+++ b/setup.py
@@ -106,8 +106,7 @@ setup(name='BuildStream',
use_scm_version=True,
packages=find_packages(),
package_data={'buildstream': ['plugins/*/*.py', 'plugins/*/*.yaml',
- 'data/*.yaml', 'data/*.sh.in',
- 'data/ostree-push', 'data/ostree-pull-ssh']},
+ 'data/*.yaml', 'data/*.sh.in']},
data_files=[('share/man/man1', list_man_pages())],
install_requires=[
'setuptools',