diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 14 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | asp32.in (renamed from asp.in) | 18 | ||||
-rw-r--r-- | man/asp32.1.txt (renamed from man/asp.1.txt) | 27 | ||||
-rw-r--r-- | package.inc.sh | 6 | ||||
-rw-r--r-- | shell/bash-completion | 8 |
7 files changed, 60 insertions, 32 deletions
@@ -1,2 +1,3 @@ asp asp.1 +asp32-*.tar.gz* @@ -1,14 +1,14 @@ -PACKAGE_NAME = asp +PACKAGE_NAME = asp32 VERSION := $(shell git describe --dirty 2>/dev/null) PREFIX = /usr/local BINPROGS = \ - asp + asp32 MANPAGES = \ - man/asp.1 + man/asp32.1 BASH_COMPLETION = \ shell/bash-completion @@ -38,8 +38,8 @@ man/%: man/%.txt Makefile $(V_GEN) a2x \ -d manpage \ -f manpage \ - -a manversion="$(PACKAGE_NAME) $(VERSION)" \ - -a manmanual="$(PACKAGE_NAME) manual" $< + -a manversion="asp32 $(VERSION)" \ + -a manmanual="asp32 manual" $< check: $(BINPROGS) @for f in $(BINPROGS); do bash -O extglob -n $$f; done @@ -51,7 +51,7 @@ install: all install -dm755 $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/share/man/man1 install -m755 $(BINPROGS) $(DESTDIR)$(PREFIX)/bin install -m644 $(MANPAGES) $(DESTDIR)$(PREFIX)/share/man/man1 - install -Dm644 $(BASH_COMPLETION) $(DESTDIR)$(PREFIX)/share/bash-completion/completions/asp - install -Dm644 $(ZSH_COMPLETION) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_asp + install -Dm644 $(BASH_COMPLETION) $(DESTDIR)$(PREFIX)/share/bash-completion/completions/asp32 + install -Dm644 $(ZSH_COMPLETION) $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_asp32 .PHONY: all clean install uninstall dist @@ -1,6 +1,10 @@ -# asp +# asp32 -`asp` is a tool to manage the build source files used to create Arch Linux +asp32 is a fork of `asp` to work with the Archlinux32 packages. +It is currently hosted on https://git.archlinux32.org/archlinux32/asp32. +The original for Archlinux can be found at https://github.com/falconindy/asp. + +`asp32` is a tool to manage the build source files used to create Arch Linux packages. It replaces the `abs` tool, offering more up to date sources (via the svntogit repositories) and uses a sparse checkout model to conserve diskspace. This probably won't be interesting to users who want a full checkout (for @@ -9,26 +13,26 @@ whatever reason that may be). # Setup None! Though, it should be noted that the `ASPROOT` environment variable -will control where `asp` keeps its local git repo. By default, this is -`${XDG_CACHE_HOME:-$HOME/.cache}/asp`. +will control where `asp32` keeps its local git repo. By default, this is +`${XDG_CACHE_HOME:-$HOME/.cache}/asp32`. # Examples Get the source files for some packages: ~~~ -asp export pacman testing/systemd extra/pkgfile +asp32 export pacman testing/systemd extra/pkgfile ~~~ Get a fully functional git checkout of a single package: ~~~ -asp checkout pkgfile +asp32 checkout pkgfile ~~~ List the repositories a package has been pushed to: ~~~ -asp list-repos pacman +asp32 list-repos pacman ~~~ @@ -1,11 +1,11 @@ #!/bin/bash ASP_VERSION=@ASP_VERSION@ -ARCH_GIT_REPOS=(packages community) +ARCH_GIT_REPOS=(packages64 community64 packages32) OPT_ARCH=$(uname -m) OPT_FORCE=0 -: "${ASPROOT:=${XDG_CACHE_HOME:-$HOME/.cache}/asp}" +: "${ASPROOT:=${XDG_CACHE_HOME:-$HOME/.cache}/asp32}" : "${ASPCACHE:=$ASPROOT/cache}" m4_include(util.inc.sh) @@ -15,7 +15,7 @@ m4_include(archweb.inc.sh) usage() { cat<<EOF -asp $ASP_VERSION [OPTIONS...] {COMMAND} ... +asp32 $ASP_VERSION [OPTIONS...] {COMMAND} ... Manage build sources for Arch packages. @@ -132,7 +132,11 @@ initialize() { if [[ ! -f $ASPROOT/.asp ]]; then git init -q "$ASPROOT" || return 1 for remote in "${ARCH_GIT_REPOS[@]}"; do - git remote add "$remote" "https://git.archlinux.org/svntogit/$remote.git" || return 1 + if [[ "${remote}" = *64 ]]; then + git remote add "$remote" "https://git.archlinux.org/svntogit/${remote%64}.git" || return 1 + elif [[ "${remote}" = *32 ]]; then + git remote add "$remote" "https://git.archlinux32.org/archlinux32/${remote%32}.git" || return 1 + fi done touch "$ASPROOT/.asp" || return 1 @@ -300,7 +304,11 @@ action__set-git-protocol() { esac for remote in "${ARCH_GIT_REPOS[@]}"; do - git remote set-url "$remote" "$1://git.archlinux.org/svntogit/$remote.git" + if [[ "${remote}" = *64 ]]; then + git remote set-url "$remote" "$1://git.archlinux.org/svntogit/${remote%64}.git" + elif [[ "${remote}" = *32 ]]; then + git remote set-url "$remote" "$1://git.archlinux32.org/archlinux32/${remote%32}.git" + fi done } diff --git a/man/asp.1.txt b/man/asp32.1.txt index 7b984e3..c91f987 100644 --- a/man/asp.1.txt +++ b/man/asp32.1.txt @@ -1,23 +1,27 @@ ///// vim:set ts=4 sw=4 syntax=asciidoc noet: ///// -asp(1) -====== +asp32(1) +======== Name ---- -asp - Manage Arch Linux build sources +asp32 - Manage Arch Linux 32 build sources Synopsis -------- -asp [options] command [targets...] +asp32 [options] command [targets...] Description ----------- +The original script can be found at https://github.com/falconindy/asp. +This is a fork for the specific needs of the Archlinux32 project +(https://www.archlinux32.org). + Manage the version-controlled sources for the build scripts used to create Arch -Linux packages. This program provides a thin wrapper over the svntogit -repositories hosted at https://git.archlinux.org. It aims to provide a -replacement for abs which favors a sparse checkout. +Linux 32 packages. This program provides a thin wrapper over the svntogit +repositories hosted at https://git.archlinux.org and https://git.archlinux32.org/archlinux32/packages. +It aims to provide a replacement for abs which favors a sparse checkout. Commands -------- @@ -27,7 +31,7 @@ The following commands are understood: Create a new git repository containing the full source and history for each of the given targets. The new repository will pull from the repository in '$ASPROOT' and must be updated separately after using - 'asp update'. If a checkout occurs on the same filesystem as '$ASPROOT', + 'asp32 update'. If a checkout occurs on the same filesystem as '$ASPROOT', most of the metadata can be hard linked, making this a relatively cheap copy. @@ -112,7 +116,7 @@ Environment ----------- *ASPROOT*:: Determines where the metadata is stored for locally tracked packages. Defaults - to '`${XDG_CACHE_HOME:-$HOME/.cache}/asp`'. + to '`${XDG_CACHE_HOME:-$HOME/.cache}/asp32`'. *ASPCACHE*:: Determines where cached data is stored. Defaults to '$ASPROOT/cache'. Data in @@ -121,3 +125,8 @@ Environment Authors ------- Dave Reisner <d@falconindy.com> + +Motifications for Archlinux32 +----------------------------- +Andreas Baumann <mail@andreasbaumann.cc> +Erich Eckner <arch32@eckner.net> diff --git a/package.inc.sh b/package.inc.sh index 7af7a82..4d1ab7b 100644 --- a/package.inc.sh +++ b/package.inc.sh @@ -153,6 +153,12 @@ package_export() { log_info 'exporting %s:%s' "$pkgname" "$subtree" git archive --format=tar "remotes/$remote/packages/$pkgname" "$subtree/" | tar --transform "s,^$subtree,$pkgname," -xf - "$subtree/" + # borrowed from archlinux32/builder/lib/common-functions' mangle_pkgbuild() + sed -i ' + /^arch=[^#]*any/!{ + /^arch=(/s/(/(i486 i686 pentium3 / + } + ' "$pkgname/PKGBUILD" } package_checkout() { diff --git a/shell/bash-completion b/shell/bash-completion index 3c7fc06..3eebbd3 100644 --- a/shell/bash-completion +++ b/shell/bash-completion @@ -40,11 +40,11 @@ _asp() { word=${COMP_WORDS[i]} if in_array "$word" ${verbs[ALL_PACKAGES]}; then verb=$word - comps=$(ASP_GIT_QUIET=1 \asp list-all | sed 's,.*/,,') + comps=$(ASP_GIT_QUIET=1 \asp32 list-all | sed 's,.*/,,') break elif in_array "$word" ${verbs[LOCAL_PACKAGES]}; then verb=$word - comps=$(ASP_GIT_QUIET=1 \asp list-local | sed 's,.*/,,') + comps=$(ASP_GIT_QUIET=1 \asp32 list-local | sed 's,.*/,,') break elif in_array "$word" ${verbs[PROTO]}; then verb=$word @@ -60,7 +60,7 @@ _asp() { case $verb in show) if (( i < ${#COMP_WORDS[@]} - 2 )); then - comps=$(ASP_GIT_QUIET=1 \asp ls-files "${COMP_WORDS[i+1]}" 2>/dev/null) + comps=$(ASP_GIT_QUIET=1 \asp32 ls-files "${COMP_WORDS[i+1]}" 2>/dev/null) fi ;; '') @@ -73,4 +73,4 @@ _asp() { fi } -complete -F _asp asp +complete -F _asp asp32 |