summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-07-31 14:41:36 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2018-07-31 14:41:36 -0400
commit12a6aad73c4d48a89e020899b643ea495143e298 (patch)
treedcce42b77a3f6ede208b30fd476ede7938124ed7
parent64a2d1c9fb7900c2002ce3871444d06d93854538 (diff)
Begone with XBS
-rw-r--r--INSTALL6
-rw-r--r--build-aux/Makefile.once.head/00-libretools.mk2
-rw-r--r--po/HACKING1
-rw-r--r--po/es/xbs.po227
-rw-r--r--src/Makefile3
-rwxr-xr-xsrc/abslibre-tools/createworkdir4
-rwxr-xr-xsrc/abslibre-tools/librerelease6
-rw-r--r--src/lib/conf.sh.3.ronn4
-rw-r--r--src/lib/conf.sh.in7
-rw-r--r--src/libretools.conf5
-rw-r--r--src/xbs-abs/.gitignore3
l---------src/xbs-abs/GNUmakefile1
-rw-r--r--src/xbs-abs/Makefile33
-rwxr-xr-xsrc/xbs-abs/helper-abs203
-rw-r--r--src/xbs-abs/xbs-abs.conf16
l---------src/xbs-abslibre/GNUmakefile1
-rw-r--r--src/xbs-abslibre/Makefile10
-rwxr-xr-xsrc/xbs-abslibre/helper-abslibre203
l---------src/xbs/GNUmakefile1
-rw-r--r--src/xbs/Makefile7
-rwxr-xr-xsrc/xbs/xbs182
-rw-r--r--src/xbs/xbs.conf4
-rwxr-xr-xtest/testenv1
23 files changed, 8 insertions, 922 deletions
diff --git a/INSTALL b/INSTALL
index e91f1ea..a74a376 100644
--- a/INSTALL
+++ b/INSTALL
@@ -64,13 +64,8 @@ librelib subpackage:
gitget subpackage:
- librelib (provided)
- git
-xbs subpackage:
- - gitget (provided)
- - librelib (provided)
- - subversion (only for the 'abs' module)
main libretools subpackage:
- librelib (provided)
- - xbs (provided)
- pacman 5.0
- arch-install-scripts
- GNU Make (only needed for `librefetch`)
@@ -114,4 +109,3 @@ The subpackages you can run these on are:
- libretools -- The main libretools package
- librelib -- Generic libraries included
- gitget -- A git downloader
- - xbs -- Tools for dealing with differences between ABS/ABSLibre/PBS
diff --git a/build-aux/Makefile.once.head/00-libretools.mk b/build-aux/Makefile.once.head/00-libretools.mk
index eb73476..b4d7848 100644
--- a/build-aux/Makefile.once.head/00-libretools.mk
+++ b/build-aux/Makefile.once.head/00-libretools.mk
@@ -80,7 +80,7 @@ mod.quote.doc := $(value mod.quote.doc)
# Configure how Autothing modules work ###############################
gitfiles.file = .srcfiles.mk
-files.groups = all libretools librelib gitget xbs
+files.groups = all libretools librelib gitget
# Boilerplate ########################################################
.PHONY: FORCE
diff --git a/po/HACKING b/po/HACKING
index 5dd207c..074e8bb 100644
--- a/po/HACKING
+++ b/po/HACKING
@@ -27,7 +27,6 @@ them in.
gitget.pot
librelib.pot
libretools.pot
- xbs.pot
...
# 2. Create `.po` files from them
diff --git a/po/es/xbs.po b/po/es/xbs.po
deleted file mode 100644
index 8596ad0..0000000
--- a/po/es/xbs.po
+++ /dev/null
@@ -1,227 +0,0 @@
-# Copyright (C) 2017 David P <megver83@parabola.nu>
-# This file is distributed under the same license as the libretools package.
-#
-# Megver83 <megver83@parabola.nu>, 2018.
-msgid ""
-msgstr ""
-"Project-Id-Version: libretools 20170705\n"
-"Report-Msgid-Bugs-To: Parabola Hackers <dev@lists.parabola.nu>\n"
-"PO-Revision-Date: 2018-03-29 14:38-0400\n"
-"Last-Translator: Megver83 <megver83@parabola.nu>\n"
-"Language-Team: Spanish <megver83@parabola.nu>\n"
-"Language: es\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Lokalize 2.0\n"
-
-#: src/xbs-abs/archrelease:12
-msgid "Option requires an argument -- '%s'"
-msgstr "Las opciones requieren un argumento -- '%s'"
-
-#: src/xbs-abs/archrelease:13
-msgid "Invalid option -- '%s'"
-msgstr "Opción inválida -- '%s'"
-
-#: src/xbs-abs/archrelease:27
-msgid "archrelease: Invalid tag: '%s' (use -f to force release)"
-msgstr "archrelease: Tag inválido: '%s' (use -f para forzar la publicación)"
-
-#: src/xbs-abs/archrelease:33
-msgid "archrelease: PKGBUILD not found"
-msgstr "archrelease: PKGBUILD no encontrado"
-
-#: src/xbs-abs/archrelease:42
-msgid "archrelease: Should not be in repos dir (try from trunk/)"
-msgstr ""
-"archrelease: No debiera estar en el directorio de los repos (intente desde"
-" trunk/)"
-
-#: src/xbs-abs/archrelease:47
-msgid "archrelease: You have not committed your changes yet!"
-msgstr "archrelease: ¡No has hecho un commit de tus cambios aún!"
-
-#: src/xbs-abs/archrelease:54
-msgid "archrelease: subdirectories are not supported in package directories!"
-msgstr ""
-"archrelease: los subdirectorios no están soportados en los direcorios de los"
-" paquetes"
-
-#: src/xbs-abs/archrelease:65
-msgid "Copying %s to %s"
-msgstr "Copiando %s a %s"
-
-#: src/xbs-abs/archrelease:85
-msgid "Releasing package"
-msgstr "Publicando paquete"
-
-#: src/xbs-abs/commitpkg:8 src/xbs-abs/commitpkg:17
-msgid "Removing %s"
-msgstr "Eliminando %s"
-
-#: src/xbs-abslibre/helper-abslibre:27
-msgid "Waiting for a lock on the ABSLibre release directory for %s"
-msgstr ""
-"Esperando un bloqueo en el directorio de publicación de ABSLibre para %s"
-
-#: src/xbs-abslibre/helper-abslibre:36
-msgid "Not a git repository: %s"
-msgstr "No es un repositorio git: %s"
-
-#: src/xbs/xbs:34
-msgid "Usage: %s [-b BUILDSYSTEM|-h] COMMAND [ARGUMENTS]"
-msgstr "Uso: %s [-b BUILDSYSTEM|-h] COMANDO [ARGUMENTOS]"
-
-#: src/xbs/xbs:35
-msgid "Tool for working with arbitrary ABS-like build systems"
-msgstr ""
-"Herramienta para trabajar con sistemas arbitrarios de construcción tipo ABS"
-
-#: src/xbs/xbs:37
-msgid "This is a pluggable tool. The BUILDSYSTEM it uses is configured in:"
-msgstr ""
-"Esta es una herramienta conectable. El BUILDSYSTEM que utiliza está"
-" configurado en:"
-
-#: src/xbs/xbs:39 src/xbs/xbs:40
-msgid "%s"
-msgstr "%s"
-
-#: src/xbs/xbs:41
-msgid "with the `-b` flag"
-msgstr "con la opción `-b`"
-
-#: src/xbs/xbs:42
-msgid "Later items take precedence over earlier ones."
-msgstr "Los ítemes posteriores tienen precedencia sobre los anteriores."
-
-#: src/xbs/xbs:44
-msgid ""
-"It looks for a helper programs named helper-${BUILDSYSTEM}, in the "
-"directory `%q` by default, but this directory can be changed with "
-"the environmental variable XBS_LIBDIR."
-msgstr ""
-"Busca programas auxiliares llamados helper-${BUILDSYSTEM}, en el "
-"directorio `%q` de forma predeterminada, pero este directorio puede cambiarse"
-" con "
-"la variable ambiental XBS_LIBDIR."
-
-#: src/xbs/xbs:48
-msgid "Options:"
-msgstr "Opciones:"
-
-#: src/xbs/xbs:49
-msgid "BUILDSYSTEM"
-msgstr "BUILDSYSTEM"
-
-#: src/xbs/xbs:49
-msgid "Use BUILDSYSTEM instead of the one configured in xbs.conf"
-msgstr "Use BUILDSYSTEM en vez del que está configurado en xbs.conf"
-
-#: src/xbs/xbs:51 src/xbs/xbs:76
-msgid "Show this message"
-msgstr "Muestra este mensaje"
-
-#: src/xbs/xbs:53
-msgid ""
-"Whether a command is intended for use on a developer's box or on the "
-"server is indicated by (dev), (srv), or (any) before the command"
-msgstr ""
-"Si un comando está destinado para su uso en la caja de un desarrollador o en"
-" el "
-"servidor está indicado por (dev), (srv), o (any) antes de la orden"
-
-#: src/xbs/xbs:57
-msgid "Commands:"
-msgstr "Órdenes:"
-
-#: src/xbs/xbs:58
-msgid "(dev) status"
-msgstr "(dev) estado"
-
-#: src/xbs/xbs:59
-msgid "Are there uncommitted changes in `.`?"
-msgstr "¿Hay cambios sin commit en `.`?"
-
-#: src/xbs/xbs:60
-msgid "(dev) download"
-msgstr "(dev) descarga"
-
-#: src/xbs/xbs:61
-msgid "Download or update the tree"
-msgstr "Descarga o actualiza el árbol"
-
-#: src/xbs/xbs:62
-msgid "(dev) release-client REPO ARCH"
-msgstr "(dev) release-client REPO ARCQUITECTURA"
-
-#: src/xbs/xbs:63
-msgid "Release `.` (for developer boxes)"
-msgstr "Publica `.` (para las cajas de los desarrolladores)"
-
-#: src/xbs/xbs:64
-msgid "(srv) release-server REPO ARCH"
-msgstr "(srv) release-client REPO ARCQUITECTURA"
-
-#: src/xbs/xbs:65
-msgid "Release `.` (for server boxes)"
-msgstr "Publica `.` (para las cajas del servidor)"
-
-#: src/xbs/xbs:66
-msgid "(srv) unrelease PKGBASE REPO ARCH"
-msgstr "(srv) unrelease PKGBASE REPO ARCQUITECTURA"
-
-#: src/xbs/xbs:67
-msgid "Unrelease a pkgbase"
-msgstr "Libera un pkgbase"
-
-#: src/xbs/xbs:68
-msgid "(srv) move FROMREPO TOREPO PKGBASE"
-msgstr "(srv) mover DESDEREPO AREPO PKGBASE"
-
-#: src/xbs/xbs:69
-msgid "Move a pkgbase from one repo to another"
-msgstr "Mueve un pkgbase desde un repo a otro"
-
-#: src/xbs/xbs:70
-msgid "(srv) releasepath PKGBASE REPO ARCH"
-msgstr "(srv) rutadepublicación PKGBASE REPO ARQUITECTURA"
-
-#: src/xbs/xbs:71
-msgid ""
-"Print the path to the staged version of pkgbase, or exit with non-"
-"zero if not released"
-msgstr ""
-"Imprima la ruta de la versión por publicarse de pkgbase, o salga con no-"
-"cero si no se publicó"
-
-#: src/xbs/xbs:73
-msgid "(any) name"
-msgstr "(any) nombre"
-
-#: src/xbs/xbs:74
-msgid "Print a human-friendly version of the BUILDSYSTEM name"
-msgstr ""
-"Imprima una versión entendible para los humanos del nombre del BUILDSYSTEM"
-
-#: src/xbs/xbs:75
-msgid "(any) help"
-msgstr "(any) ayuda"
-
-#: src/xbs/xbs:81 src/xbs/xbs:105
-msgid "PKGBUILD not found"
-msgstr "PKGBUILD no encontrado"
-
-#: src/xbs/xbs:97
-msgid "You have not committed your changes yet!"
-msgstr "¡No has hecho un commit de tus cambios aún!"
-
-#: src/xbs/xbs:152
-msgid "No helper for build system found: %s"
-msgstr "Ningún auxiliar para el sistema de compilación encontrado: %s"
-
-#: src/xbs/xbs:161
-msgid "Run as a normal user"
-msgstr "Ejecutar como usuario normal"
-
diff --git a/src/Makefile b/src/Makefile
index e148732..397a9bb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -10,8 +10,5 @@ nested.subdirs += gitget
nested.subdirs += lib
nested.subdirs += librefetch
nested.subdirs += toru
-nested.subdirs += xbs
-nested.subdirs += xbs-abs
-nested.subdirs += xbs-abslibre
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/abslibre-tools/createworkdir b/src/abslibre-tools/createworkdir
index a3fae88..0cf4a7a 100755
--- a/src/abslibre-tools/createworkdir
+++ b/src/abslibre-tools/createworkdir
@@ -29,7 +29,7 @@ set -euE
. "$(librelib conf)"
main() {
- load_conf libretools.conf WORKDIR ABSLIBRERECV ABSLIBRESEND || exit # these are asked for by `xbs download`
+ load_conf libretools.conf WORKDIR ABSLIBRERECV ABSLIBRESEND
trap 'error "Aborting..."' EXIT
@@ -39,7 +39,7 @@ main() {
msg "Creating staging directory in WORKDIR..."
mkdir -p "$WORKDIR/staging"
- cmd=(xbs -b abslibre download)
+ cmd=(gitget -f -p "$ABSLIBRESEND" checkout "$ABSLIBRERECV" "$WORKDIR/abslibre")
if ! "${cmd[@]}"; then
error "Could not clone ABSLibre"
plain "Try running this command:"
diff --git a/src/abslibre-tools/librerelease b/src/abslibre-tools/librerelease
index d7dbbe4..705efc5 100755
--- a/src/abslibre-tools/librerelease
+++ b/src/abslibre-tools/librerelease
@@ -84,9 +84,7 @@ create_signature() {
sign_packages() {
IFS=$'\n'
- local files=($(find "${WORKDIR}/staging/" \
- \( -type d -name "${ABSLIBREDEST##*/}" \) -prune \
- -o \( -type f -not -iname '*.sig' \) -print))
+ local files=($(find "${WORKDIR}/staging/" -type f -not -iname '*.sig' -print))
local file
for file in "${files[@]}"; do
if [[ -f "${file}.sig" ]]; then
@@ -167,7 +165,7 @@ main() {
declare -i ret=0
load_conf makepkg.conf GPGKEY || ret=$?
- load_conf libretools.conf WORKDIR REPODEST ABSLIBREDEST || ret=$? # and HOOK{PRE,POST}RELEASE, which are optional
+ load_conf libretools.conf WORKDIR REPODEST || ret=$? # and HOOK{PRE,POST}RELEASE, which are optional
[[ $ret = 0 ]] || exit $ret
local re_url='^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$'
diff --git a/src/lib/conf.sh.3.ronn b/src/lib/conf.sh.3.ronn
index 92267fb..ad146da 100644
--- a/src/lib/conf.sh.3.ronn
+++ b/src/lib/conf.sh.3.ronn
@@ -105,8 +105,8 @@ These two routines deal with loading `PKGBUILD`(5) files.
The differences in behavior for anything that takes a slug comes down
to the differences in the output for `list_files` and `list_envvars`.
-The "known" slugs are "abs", "makepkg", "libretools", and anything
-beginning with "xbs". If anything else is given, then:
+The "known" slugs are "abs", "makepkg", and "libretools". If anything
+else is given, then:
* `list_files` will give back "/etc/libretools.d/<SLUG>.conf" and
"$<XDG_CONFIG_HOME>/libretools/<SLUG>.conf"
diff --git a/src/lib/conf.sh.in b/src/lib/conf.sh.in
index 36efe21..0cd0a03 100644
--- a/src/lib/conf.sh.in
+++ b/src/lib/conf.sh.in
@@ -66,10 +66,6 @@ list_files() {
fi
fi
;;
- xbs*)
- echo "${sysconfdir}/xbs/$slug.conf"
- echo "$XDG_CONFIG_HOME/xbs/$slug.conf"
- ;;
libretools)
echo "${sysconfdir}/$slug.conf"
echo "$XDG_CONFIG_HOME/libretools/$slug.conf"
@@ -98,9 +94,6 @@ list_envvars() {
libretools)
printf '%s\n' DIFFPROG
;;
- xbs)
- printf '%s\n' BUILDSYSTEM
- ;;
*) :;;
esac
}
diff --git a/src/libretools.conf b/src/libretools.conf
index 3ba13bf..e0789bb 100644
--- a/src/libretools.conf
+++ b/src/libretools.conf
@@ -17,12 +17,9 @@ BLACKLIST=https://git.parabola.nu/blacklist.git/plain/blacklist.txt
DIFFPROG=$(which $([ -z "${DISPLAY:-}" ]||echo kdiff3 meld gvimdiff) vimdiff colordiff diff 2>/dev/null|sed 's/\s.*//;1q')
## ABSLibre
-## Used by xbs-abslibre
+## Used by: `createworkdir`
ABSLIBRERECV=git://git.parabola.nu/abslibre/abslibre.git
ABSLIBRESEND=ssh://git@git.parabola.nu:1863/~git/abslibre/abslibre.git
-ABSLIBREDEST="$WORKDIR/staging/abslibre"
-## ARCHES is the list of ARCHES to look for under ABSLIBREDEST
-ARCHES=($(printf '%s\n' /usr/share/pacman/defaults/pacman.conf.*|sed 's|.*\.||'))
################################################################################
# librerelease #
diff --git a/src/xbs-abs/.gitignore b/src/xbs-abs/.gitignore
deleted file mode 100644
index 86e1bff..0000000
--- a/src/xbs-abs/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-commitpkg*
-archrelease*
-valid-tags.sh*
diff --git a/src/xbs-abs/GNUmakefile b/src/xbs-abs/GNUmakefile
deleted file mode 120000
index 54fdd42..0000000
--- a/src/xbs-abs/GNUmakefile
+++ /dev/null
@@ -1 +0,0 @@
-../../GNUmakefile \ No newline at end of file
diff --git a/src/xbs-abs/Makefile b/src/xbs-abs/Makefile
deleted file mode 100644
index 907b3d0..0000000
--- a/src/xbs-abs/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
-include $(topsrcdir)/build-aux/Makefile.head.mk
-
-libretools.pkg = xbs
-pkgconfdir = $(sysconfdir)/xbs
-pkglibexecdir = $(libexecdir)/xbs
-
-_helpers = archrelease commitpkg
-
-libretools.pots += $(_helpers)
-libretools.src.devtools += $(addsuffix .in,$(_helpers)) valid-tags.sh
-
-libretools.out.bins =
-libretools.out.libexecs = helper-abs
-libretools.out.libs = valid-tags.sh
-
-files.out.xbs += $(_helpers)
-files.sys.xbs += $(addprefix $(pkglibexecdir)/helper-abs.d/,$(_helpers))
-
-$(outdir)/commitpkg: $(srcdir)/commitpkg.in
- @echo "OUT $@"
- @{ \
- echo '#!/usr/bin/env bash'; \
- echo '. "$$(librelib common)"'; \
- echo '. ./PKGBUILD'; \
- echo 'repo=$$1; arch=$$2;'; \
- sed -n "/== 'any'/,\$$p" $<; \
- } | install -Dm755 /dev/stdin $@
-
-$(DESTDIR)$(pkglibexecdir)/helper-abs.d/%: $(srcdir)/%
- install -Dm755 '$<' '$@'
-
-include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/xbs-abs/helper-abs b/src/xbs-abs/helper-abs
deleted file mode 100755
index b410559..0000000
--- a/src/xbs-abs/helper-abs
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2013-2014, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
-#
-# For code from db-functions (arch_svn):
-# Copyright (C) 2012 Pierre Schmitz <pierre@archlinux.de>
-# For code from db-move+db-remove (move+unrelease):
-# Copyright (C) 2008-2009 Aaron Griffin <aaronmgriffin@gmail.com>
-# Copyright (C) 2009 Abhishek Dasgupta <abhidg@gmail.com>
-# Copyright (C) 2009, 2011 Dan McGee <dan@archlinux.org>
-# Copyright (C) 2009-2012 Pierre Schmitz <pierre@archlinux.de>
-# For code just from db-move (move):
-# Copyright (C) 2011 Rémy Oudompheng <remyoudompheng@gmail.com>
-# Copyright (C) 2012 Florian Pritz <bluewind@xinu.at>
-# For code just from db-remove (unrelease):
-# Copyright (C) 2009 Eric Bélanger <snowmaniscool@gmail.com>
-# Copyright (C) 2011 Florian Pritz <bluewind@xinu.at>
-#
-# License: GNU GPLv2+
-#
-# 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, see <http://www.gnu.org/licenses/>.
-
-. "$(librelib common)"
-
-load_config() {
- . "$(librelib conf)"
- # SVNUSER is optional
- load_conf xbs-abs.conf SVNDIR SVNREPOS ARCHES || exit
-}
-
-# This is taken from dbscripts:db-fuctions
-arch_svn() {
- if [[ -z "${SVNUSER}" ]]; then
- /usr/bin/svn "${@}"
- else
- sudo -u "${SVNUSER}" -- /usr/bin/svn --username "${USER}" "${@}"
- fi
-}
-
-pac2svn() {
- local pacrepo=$1
-
- # Figure out which svn repo we need
- local repo_spec repo_name repo_svnurl repo_pacrepos
- for repo_spec in "${SVNREPOS[@]}"; do
- read -r repo_name repo_svnurl repo_pacrepos <<<"$repo_spec"
- read -ra repo_pacrepos <<<"$repo_pacrepos"
-
- if in_array "$pacrepo" "${repo_pacrepos[@]}"; then
- echo "$repo_name"
- return 0 # $EXIT_SUCCESS
- fi
- done
- return 1 # $EXIT_FAILURE
-}
-
-status() {
- load_config
- [[ -z $(arch_svn status -q) ]]
-}
-
-download() {
- load_config
-
- local svnrepoStr
- for svnrepoStr in "${SVNREPOS[@]}"; do
- local svnrepoAry=($svnrepoStr)
- local svnrepo=${svnrepoAry[0]}
- local svnurl=${svnrepoAry[1]}
- local pacrepos=("${svnrepoAry[@]:2}")
-
- if [[ -d "$SVNDIR/$svnrepo/.svn" ]]; then
- arch_svn -q up "$SVNDIR/$svnrepo"/*
- else
- # checkout non-recursive, then lazy load
- # necessary because:
- # > DO NOT CHECK OUT THE ENTIRE SVN REPO. Your address
- # > may be blocked.
- arch_svn -q checkout -N "$svnurl" "$SVNDIR/$svnrepo"
- fi
- done
-}
-
-release-client() {
- local repo=$1
- local arch=$2
-
- # Hack to use arch_svn as 'svn' in external scripts
- local tmpdir; tmpdir="$(mktemp -dt "xbs-abs-release.XXXXXXXXXX")"
- trap "$(printf 'rm -rf -- %q' "$tmpdir")" EXIT
- printf '%s\n' \
- '#!/bin/bash' \
- "$(declare -p SVNUSER 2>/dev/null)" \
- "$(declare -f arch_svn)" \
- 'arch_svn "$@"' \
- > "$tmpdir/svn"
- chmod 755 "$tmpdir/svn"
- export PATH="$tmpdir:$PATH"
-
- "${0}.d/archrelease" -f "${repo}-${arch}"
- "${0}.d/commitpkg" "${repo}" "${arch}"
-}
-
-release-server() {
- # Do nothing
- :
-}
-
-unrelease() {
- local pkgbase=$1
- local repo=$2
- local arch=$3
-
- local tag="$repo-$arch"
-
- load_config
- local svndir
- svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}"
- arch_svn up -q "$svndir"
-
- # This is based off code from dbscripts:db-remove
- arch_svn rm --force -q "${svndir}/repos/${tag}"
- arch_svn commit -q "${svndir}" -m "${0##*/}: $pkgbase removed by $(id -un)"
-}
-
-move() {
- local repo_from=$1
- local repo_to=$2
- local pkgbase=$3
-
- load_config
- local svndir
- svndir="${SVNDIR}/$(pac2svn "$repo_from")/${pkgbase}"
- arch_svn up -q "$svndir"
-
- local tag_list=""
- local pkgarch
- local arches=()
- # this is based off code from dbscripts:db-move
- for pkgarch in "${ARCHES[@]}" 'any'; do
- local dir_from="${svndir}/repos/${repo_from}-${pkgarch}"
- local dir_to="${svndir}/repos/${repo_to}-${pkgarch}"
-
- if [ -f "${dir_from}/PKGBUILD" ]; then
- if [ -d "${dir_to}" ]; then
- for file in $(arch_svn ls "${dir_to}"); do
- arch_svn rm -q "${dir_to}/$file@"
- done
- else
- mkdir "${dir_to}"
- arch_svn add -q "${dir_to}"
- fi
-
- local file
- for file in $(arch_svn ls "${dir_from}"); do
- arch_svn mv -q -r HEAD "${dir_from}/$file@" "${dir_to}/"
- done
- arch_svn rm --force -q "${dir_from}"
- tag_list="$tag_list, $pkgarch"
- arches+=("$pkgarch")
- fi
- done
- tag_list="${tag_list#, }"
- arch_svn commit -q "${svndir}" -m "${0##*/}: moved ${pkgbase} from [${repo_from}] to [${repo_to}] (${tag_list})"
- echo "${arches[*]}"
-}
-
-releasepath() {
- local pkgbase=$1
- local repo=$2
- local arch=$3
-
- load_config
- local svndir releasepath
- svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}"
- arch_svn up -q "${svndir}"
- releasepath="${svndir}/repos/${repo}-${arch}"
- if [[ -f "${releasepath}/PKGBUILD" ]]; then
- printf '%s\n' "$releasepath"
- return 0 # $EXIT_SUCCESS
- fi
- return 1 # $EXIT_FAILURE
-}
-
-name() {
- echo SVN
-}
-
-case "$1" in
- status|download|release-client|release-server|unrelease|move|releasepath|name) "$@";;
- *) exit 127;;
-esac
diff --git a/src/xbs-abs/xbs-abs.conf b/src/xbs-abs/xbs-abs.conf
deleted file mode 100644
index f8a5bf9..0000000
--- a/src/xbs-abs/xbs-abs.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/hint/bash
-# shellcheck disable=2034
-
-SVNDIR=/var/lib/xbs-abs
-#SVNUSER=
-
-_packages_repos=(core extra testing staging {gnome,kde}-unstable)
-_community_repos=({community,multilib}{,-testing,-staging})
-
-# name url repos...
-SVNREPOS=(
- "packages svn://svn.archlinux.org/packages ${_packages_repos[*]}"
- "community svn://svn.archlinux.org/community ${_community_repos[*]}"
-)
-
-ARCHES=(i686 x86_64)
diff --git a/src/xbs-abslibre/GNUmakefile b/src/xbs-abslibre/GNUmakefile
deleted file mode 120000
index 54fdd42..0000000
--- a/src/xbs-abslibre/GNUmakefile
+++ /dev/null
@@ -1 +0,0 @@
-../../GNUmakefile \ No newline at end of file
diff --git a/src/xbs-abslibre/Makefile b/src/xbs-abslibre/Makefile
deleted file mode 100644
index 068e6e4..0000000
--- a/src/xbs-abslibre/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
-include $(topsrcdir)/build-aux/Makefile.head.mk
-
-libretools.pkg = xbs
-pkglibexecdir = $(libexecdir)/xbs
-
-libretools.out.bins =
-libretools.out.libexecs = helper-abslibre
-
-include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/xbs-abslibre/helper-abslibre b/src/xbs-abslibre/helper-abslibre
deleted file mode 100755
index eeef4bf..0000000
--- a/src/xbs-abslibre/helper-abslibre
+++ /dev/null
@@ -1,203 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2012-2017 Luke Shumaker <lukeshu@parabola.nu>
-#
-# License: GNU GPLv2+
-#
-# 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, see <http://www.gnu.org/licenses/>.
-
-. "$(librelib messages)"
-setup_traps
-set -u
-
-lockarch() {
- local arch=$1
- lock 9 "${ABSLIBREDEST}/${arch}.lock" \
- "Waiting for a lock on the ABSLibre release directory for %s" "${arch}"
-}
-
-unlockarch() {
- lock_close 9
-}
-
-checkgit() {
- if [[ ! -d "${ABSLIBREDEST}/${arch}/.git" ]]; then
- error 'Not a git repository: %s' "${ABSLIBREDEST}/${arch}"
- exit $EXIT_FAILURE
- fi
-}
-
-conf() {
- . "$(librelib conf)"
- load_conf libretools.conf || exit
-}
-
-################################################################################
-
-# Operates on the `abslibre` format[0]. On the client/developer side,
-# release-client *copies* files from the `abslibre` tree to an
-# `abstree`[1] tree located at `devbox:${ABSLIBREDEST}/${arch}`. On
-# the server side, after those `abstree`s have been uploaded
-# (ssh/rsync), release-server *copies* them out of the `abstree` into
-# a different `abslibre` on the server, similarly located at
-# `repobox:${ABSLIBREDEST}/${arch}`.
-#
-# [0]: https://projects.parabola.nu/packages/pbs-tools.git/tree/docs/format-abslibre.md
-# [1]: https://projects.parabola.nu/packages/pbs-tools.git/tree/docs/format-abstree.md
-
-# The number of arguments and CWD constraints are enforced by the main
-# XBS program, no need to check those things here!
-
-# Args: none
-# CWD: a directory with a PKGBUILD, in an 'abslibre' tree.
-status() {
- [[ -z $(git status -s .) ]]
-}
-
-# Args: none
-# CWD: anywhere
-# Host: developer box
-download() {
- conf WORKDIR ABSLIBRERECV ABSLIBRESEND
-
- gitget -f -p "$ABSLIBRESEND" checkout "$ABSLIBRERECV" "$WORKDIR/abslibre"
-}
-
-# Args: REPO ARCH
-# CWD: a directory with a PKGBUILD, in an 'abslibre' tree.
-# Host: developer box
-release-client() {
- local repo=$1
- local arch=$2
-
- conf ABSLIBREDEST
- local pkgbase pkgdir
- pkgbase="$(load_PKGBUILD >/dev/null; printf '%s\n' "${pkgbase:-${pkgname}}")"
- pkgdir="${ABSLIBREDEST}/${arch}/${repo}/${pkgbase}"
- lockarch "$arch"
-
- if [[ -e $pkgdir ]]; then
- rm -rf -- "$pkgdir"
- fi
-
- mkdir -p -- "$pkgdir"
- git ls-files -z | xargs -0 -I{} cp -- {} "$pkgdir"
-}
-
-# Args: REPO ARCH
-# CWD: a directory with a PKGBUILD, outside of ${ABSLIBREDEST}
-# Host: repo
-release-server() {
- local repo=$1
- local arch=$2
-
- conf ABSLIBREDEST
- local pkgbase pkgdir
- pkgbase="$(load_PKGBUILD >/dev/null; printf '%s\n' "${pkgbase:-${pkgname}}")"
- pkgdir="${ABSLIBREDEST}/${arch}/${repo}/${pkgbase}"
- lockarch "$arch"
- checkgit
-
- if [[ -e $pkgdir ]]; then
- rm -rf -- "$pkgdir"
- fi
-
- mkdir -p -- "$pkgdir"
- cp -- * "$pkgdir"
-
- cd "$pkgdir"
- git add .
- git commit -q -m "xbs-abslibre: Release ${repo}/${pkgbase} for ${arch} (by $(id -un))"
-}
-
-# Args: PKGBASE REPO ARCH
-# CWD: anywhere
-# Host: repo
-unrelease() {
- local pkgbase=$1
- local repo=$2
- local arch=$3
-
- conf ABSLIBREDEST
- local pkgdir="${ABSLIBREDEST}/${arch}/${repo}/${pkgbase}"
- lockarch "$arch"
- checkgit
-
- if [[ -f "${pkgdir}/PKGBUILD" ]]; then
- git rm -qrf -- "$pkgdir"
- git commit -q -m "xbs-abslibre: Remove ${repo}/${pkgbase} from ${arch} (by $(id -un))"
- fi
-}
-
-# Args: FROMREPO TOREPO PKGBASE
-# CWD: anywhere
-# Host: repo
-move() {
- local repo_from=$1
- local repo_to=$2
- local pkgbase=$3
-
- conf ABSLIBREDEST ARCHES
-
- # Execute each iteration in a subshell so that 'checkgit'
- # bailing for an architecture doesn't abort the entire thing.
- local arch
- for arch in "${ARCHES[@]}" any; do (
- lockarch "$arch"
- checkgit
-
- local dir_from="${ABSLIBREDEST}/${arch}/${repo_from}/${pkgbase}"
- local dir_to="${ABSLIBREDEST}/${arch}/${repo_to}/${pkgbase}"
-
- if [[ -f "${dir_from}/PKGBUILD" ]]; then
- if [[ -e "${dir_to}" ]]; then
- git rm -qrf -- "$dir_to"
- fi
- mkdir -p -- "${dir_to%/*}"
- git mv -- "$dir_from" "$dir_to"
- git commit -q -m "xbs-abslibre: Move ${pkgbase} from ${repo_from} to ${repo_to} on ${arch} (by $(id -un))"
- fi
- unlock arch
- ) done
-}
-
-# Args: PKGBASE REPO ARCH
-# CWD: anywhere
-# Host: repo
-releasepath() {
- local pkgbase=$1
- local repo=$2
- local arch=$3
-
- conf ABSLIBREDEST
- local pkgdir="${ABSLIBREDEST}/${arch}/${repo}/${pkgbase}"
-
- lockarch "$arch"
-
- if [[ -f "${pkgdir}/PKGBUILD" ]]; then
- printf '%s\n' "$pkgdir"
- return $EXIT_SUCCESS
- fi
-
- return $EXIT_FAILURE
-}
-
-name() {
- echo ABSLibre
-}
-
-case "$1" in
- status|download|release-client|release-server|unrelease|move|releasepath|name) "$@" || exit;;
- *) exit 127;;
-esac
diff --git a/src/xbs/GNUmakefile b/src/xbs/GNUmakefile
deleted file mode 120000
index 54fdd42..0000000
--- a/src/xbs/GNUmakefile
+++ /dev/null
@@ -1 +0,0 @@
-../../GNUmakefile \ No newline at end of file
diff --git a/src/xbs/Makefile b/src/xbs/Makefile
deleted file mode 100644
index 6a39658..0000000
--- a/src/xbs/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
-include $(topsrcdir)/build-aux/Makefile.head.mk
-
-libretools.pkg = xbs
-pkgconfdir = $(sysconfdir)/xbs
-
-include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/xbs/xbs b/src/xbs/xbs
deleted file mode 100755
index cb02a99..0000000
--- a/src/xbs/xbs
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2013-2015, 2017-2018 Luke Shumaker <lukeshu@parabola.nu>
-#
-# License: GNU GPLv2+
-#
-# 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, see <http://www.gnu.org/licenses/>.
-
-default_libdir=/usr/lib/xbs
-
-. "$(librelib messages)"
-. "$(librelib conf)"
-
-errusage() {
- if [[ $# -gt 0 ]]; then
- error "$@"
- fi
- usage >&2
- exit $EXIT_INVALIDARGUMENT
-}
-
-usage() {
- print 'Usage: %s [-b BUILDSYSTEM|-h] COMMAND [ARGUMENTS]' "${0##*/}"
- print 'Tool for working with arbitrary ABS-like build systems'
- echo
- prose 'This is a pluggable tool. The BUILDSYSTEM it uses is
- configured in:'
- bullet '%s' '/etc/xbs/xbs.conf'
- bullet '%s' '${XDG_CONFIG_HOME}/xbs/xbs.conf'
- bullet 'with the `-b` flag'
- prose 'Later items take precedence over earlier ones.'
- echo
- prose 'It looks for a helper programs named helper-${BUILDSYSTEM}, in
- the directory `%q` by default, but this directory can be changed
- with the environmental variable XBS_LIBDIR.' "$default_libdir"
- echo
- print 'Options:'
- flag "-b $(_ BUILDSYSTEM)" 'Use BUILDSYSTEM instead of the one
- configured in xbs.conf' \
- '-h' 'Show this message'
- echo
- prose "Whether a command is intended for use on a developer's box or on
- the server is indicated by (dev), (srv), or (any) before the
- command"
- echo
- print 'Commands:'
- flag "$(_ '(dev) status')" \
- 'Are there uncommitted changes in `.`?' \
- "$(_ '(dev) download')" \
- 'Download or update the tree' \
- "$(_ '(dev) release-client REPO ARCH')" \
- 'Release `.` (for developer boxes)' \
- "$(_ '(srv) release-server REPO ARCH')" \
- 'Release `.` (for server boxes)' \
- "$(_ '(srv) unrelease PKGBASE REPO ARCH')" \
- 'Unrelease a pkgbase' \
- "$(_ '(srv) move FROMREPO TOREPO PKGBASE')" \
- 'Move a pkgbase from one repo to another' \
- "$(_ '(srv) releasepath PKGBASE REPO ARCH')" \
- 'Print the path to the staged version of pkgbase, or exit with
- non-zero if not released' \
- "$(_ '(any) name')" \
- 'Print a human-friendly version of the BUILDSYSTEM name' \
- "$(_ '(any) help')" \
- 'Show this message'
-}
-
-status() {
- if [[ ! -f PKGBUILD ]]; then
- error 'PKGBUILD not found'
- # Though in this file in general it doesn't matter, in
- # this case it does: Using "exit" instead of "return"
- # is imporant because it prevents flow returning to
- # release-client.
- exit $EXIT_FAILURE
- fi
- "$HELPER" status "$@"
-}
-
-download() {
- "$HELPER" download "$@"
-}
-
-release-client() {
- if ! status; then
- error 'You have not committed your changes yet!'
- exit $EXIT_FAILURE
- fi
- "$HELPER" release-client "$@"
-}
-
-release-server() {
- if [[ ! -f PKGBUILD ]]; then
- error 'PKGBUILD not found'
- exit $EXIT_FAILURE
- fi
- "$HELPER" release-server "$@"
-}
-
-unrelease() {
- "$HELPER" unrelease "$@"
-}
-
-move() {
- "$HELPER" move "$@"
-}
-
-releasepath() {
- "$HELPER" releasepath "$@"
-}
-
-help() {
- usage
-}
-
-name() {
- "$HELPER" name "$@"
-}
-
-main() {
- BUILDSYSTEM=''
- while getopts 'b:h' arg; do
- case $arg in
- b) BUILDSYSTEM=$OPTARG;;
- h) usage; return $EXIT_SUCCESS;;
- *) errusage;;
- esac
- done
- shift $((OPTIND - 1))
-
- if [[ -z $BUILDSYSTEM ]]; then
- load_conf xbs.conf BUILDSYSTEM || exit
- fi
-
- if [[ -z $XBS_LIBDIR ]]; then
- export XBS_LIBDIR=$default_libdir
- fi
-
- HELPER="${XBS_LIBDIR}/helper-${BUILDSYSTEM}"
- if [[ ! -x "$HELPER" ]]; then
- error 'No helper for build system found: %s' "$BUILDSYSTEM"
- return $EXIT_NOTCONFIGURED;
- fi
-
- if [[ $# -lt 1 ]]; then
- errusage "Must specify a command"
- fi
-
- if [[ -w / ]]; then
- error 'Run as a normal user'
- fi
-
- local cmd=$1; shift
- case "$cmd" in
- status|download|name|help)
- [[ $# -eq 0 ]] || errusage 'bad number of argments'
- "$cmd" "$@"
- ;;
- release-client|release-server)
- [[ $# -eq 2 ]] || errusage 'bad number of argments'
- "$cmd" "$@"
- ;;
- move|unrelease|releasepath)
- [[ $# -eq 3 ]] || errusage 'bad number of argments'
- "$cmd" "$@"
- ;;
- *) errusage 'unknown command: %s' "$cmd";;
- esac
-}
-
-main "$@"
diff --git a/src/xbs/xbs.conf b/src/xbs/xbs.conf
deleted file mode 100644
index 2c94ca8..0000000
--- a/src/xbs/xbs.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/hint/bash
-# shellcheck disable=2034
-
-BUILDSYSTEM=abslibre
diff --git a/test/testenv b/test/testenv
index 9357269..faad4e1 100755
--- a/test/testenv
+++ b/test/testenv
@@ -43,7 +43,6 @@
# Set up the environment
export PATH="$destdir/usr/bin:$PATH"
export LIBRETOOLS_LIBDIR="$destdir/usr/lib/libretools"
- export XBS_LIBDIR="$destdir/usr/lib/xbs"
export HOME=$TMPDIR/home
export GNUPGHOME="$HOME/.gnupg"
export XDG_CACHE_HOME="$HOME/.cache"