diff options
-rw-r--r-- | Makefile | 116 | ||||
-rw-r--r-- | README | 12 | ||||
-rw-r--r-- | archbuild.in | 69 | ||||
-rw-r--r-- | archco.in | 24 | ||||
-rw-r--r-- | archrelease.in | 86 | ||||
-rw-r--r-- | archrm.in | 15 | ||||
-rw-r--r-- | bash_completion.in | 50 | ||||
-rw-r--r-- | checkpkg.in | 2 | ||||
-rw-r--r-- | commitpkg.in | 224 | ||||
-rw-r--r-- | crossrepomove.in | 98 | ||||
-rw-r--r-- | find-libdeps.in | 2 | ||||
-rw-r--r-- | finddeps.in | 2 | ||||
-rw-r--r-- | gitconfig | 17 | ||||
-rw-r--r-- | lddd.in | 2 | ||||
-rw-r--r-- | lib/common.sh | 13 | ||||
-rw-r--r-- | lib/valid-tags.sh | 20 | ||||
-rw-r--r-- | makechrootpkg.in | 306 | ||||
-rw-r--r-- | makepkg-i686.conf | 121 | ||||
-rw-r--r-- | makepkg-x86_64.conf | 121 | ||||
-rw-r--r-- | mkarchroot.in | 2 | ||||
-rw-r--r-- | pacman-extra.conf | 96 | ||||
-rw-r--r-- | pacman-gnome-unstable.conf | 100 | ||||
-rw-r--r-- | pacman-kde-unstable.conf | 100 | ||||
-rw-r--r-- | pacman-multilib-staging.conf | 118 | ||||
-rw-r--r-- | pacman-multilib-testing.conf | 106 | ||||
-rw-r--r-- | pacman-multilib.conf | 107 | ||||
-rw-r--r-- | pacman-staging.conf | 104 | ||||
-rw-r--r-- | pacman-testing.conf | 96 | ||||
-rw-r--r-- | rebuildpkgs.in | 97 | ||||
-rw-r--r-- | zsh_completion.in | 39 |
30 files changed, 71 insertions, 2194 deletions
@@ -1,78 +1,22 @@ -V=20121115 +V=20121128.6 PREFIX = /usr/local +pkgdatadir=$(PREFIX)/share/devtools BINPROGS = \ checkpkg \ - commitpkg \ - archco \ - archrelease \ - archrm \ - archbuild \ - lddd \ - finddeps \ - rebuildpkgs \ find-libdeps \ - crossrepomove + finddeps \ + lddd SBINPROGS = \ - mkarchroot \ - makechrootpkg - -CONFIGFILES = \ - makepkg-i686.conf \ - makepkg-x86_64.conf \ - pacman-extra.conf \ - pacman-testing.conf \ - pacman-staging.conf \ - pacman-multilib.conf \ - pacman-multilib-testing.conf \ - pacman-multilib-staging.conf \ - pacman-kde-unstable.conf \ - pacman-gnome-unstable.conf - -COMMITPKG_LINKS = \ - extrapkg \ - corepkg \ - testingpkg \ - stagingpkg \ - communitypkg \ - community-testingpkg \ - community-stagingpkg \ - multilibpkg \ - multilib-testingpkg \ - multilib-stagingpkg \ - kde-unstablepkg \ - gnome-unstablepkg - -ARCHBUILD_LINKS = \ - extra-i686-build \ - extra-x86_64-build \ - testing-i686-build \ - testing-x86_64-build \ - staging-i686-build \ - staging-x86_64-build \ - multilib-build \ - multilib-testing-build \ - multilib-staging-build \ - kde-unstable-i686-build \ - kde-unstable-x86_64-build \ - gnome-unstable-i686-build \ - gnome-unstable-x86_64-build - -CROSSREPOMOVE_LINKS = \ - extra2community \ - community2extra - -BASHCOMPLETION_LINKS = \ - archco \ - communityco + mkarchroot all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion -edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g" +edit = sed -e "s|@pkgdatadir[@]|$(pkgdatadir)|g" -%: %.in Makefile lib/common.sh +%: %.in Makefile @echo "GEN $@" @$(RM) "$@" @m4 -P $@.in | $(edit) >$@ @@ -82,39 +26,29 @@ edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g" clean: rm -f $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion -install: +install: all install -dm0755 $(DESTDIR)$(PREFIX)/bin install -dm0755 $(DESTDIR)$(PREFIX)/sbin - install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools - install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin - install -m0755 ${SBINPROGS} $(DESTDIR)$(PREFIX)/sbin - install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools - for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done - for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done - for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done + install -dm0755 $(DESTDIR)$(pkgdatadir) + + install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin +# install -m0755 ${SBINPROGS} $(DESTDIR)$(PREFIX)/sbin + install -m0755 mkarchroot $(DESTDIR)$(PREFIX)/sbin/archroot + ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides - install -Dm0644 bash_completion $(DESTDIR)/usr/share/bash-completion/completions/devtools - for l in ${BASHCOMPLETION_LINKS}; do ln -sf devtools $(DESTDIR)/usr/share/bash-completion/completions/$$l; done - install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools - ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco + + install -m0644 lib/common.sh $(DESTDIR)$(pkgdatadir)/common.sh + install -Dm0644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools + install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools uninstall: - for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done - for f in ${SBINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/sbin/$$f; done - for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/$$f; done - for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done - for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done - for l in ${CROSSREPOMOVE_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done - rm $(DESTDIR)/usr/share/bash-completion/completions/devtools - rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools - rm -f $(DESTDIR)$(PREFIX)/bin/communityco - rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides + for f in ${BINPROGS} ; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done +# for f in ${SBINPROGS} ; do rm -f $(DESTDIR)$(PREFIX)/sbin/$$f; done + rm -f $(DESTDIR)$(PREFIX)/sbin/archroot -dist: - git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz - gpg --detach-sign --use-agent devtools-$(V).tar.gz + rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides -upload: - scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig gerolde.archlinux.org:/srv/ftp/other/devtools/ + rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools + rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools -.PHONY: all clean install uninstall dist upload +.PHONY: all clean install uninstall @@ -0,0 +1,12 @@ +This is a minimal fork of Arch's `devtools'. + +It is a fork in that bugs are fixed and features added. + This happens on the "complete" branch. Most development should happen here, + and it should be able to be merged back into devtools. +It is minimal in that it doesn't include most of what is in devtools. + This happens on the "master" branch. + +A sample .git/config file is included to make it easy to merge from devtools. + +Tags in the format "%YYYY%MM%DD" are devtools. +Tags in the format "v%YYYY%MM%DD" are chroottools. diff --git a/archbuild.in b/archbuild.in deleted file mode 100644 index a41d490..0000000 --- a/archbuild.in +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -m4_include(lib/common.sh) - -base_packages=(base base-devel sudo) - -cmd="${0##*/}" -if [[ "${cmd%%-*}" == 'multilib' ]]; then - repo="${cmd%-build}" - arch='x86_64' - base_packages+=(multilib-devel) -else - tag="${cmd%-build}" - repo=${tag%-*} - arch=${tag##*-} -fi -chroots='/var/lib/archbuild' -clean_first=false - -usage() { - echo "Usage: $cmd" - echo ' -c Recreate the chroot before building' - echo ' -r <dir> Create chroots in this directory' - exit 1 -} - -while getopts 'cr:' arg; do - case "${arg}" in - c) clean_first=true ;; - r) chroots="$OPTARG" ;; - *) usage ;; - esac -done - -if [[ "$EUID" != '0' ]]; then - die 'This script must be run as root.' -fi - -if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then - msg "Creating chroot for [${repo}] (${arch})..." - - for copy in "${chroots}/${repo}-${arch}"/*; do - [[ -d $copy ]] || continue - msg2 "Deleting chroot copy '$(basename "${copy}")'..." - - lock_open_write 9 "$copy.lock" "Locking chroot copy '$copy'" - - { type -P btrfs && btrfs subvolume delete "${copy}"; } &>/dev/null - rm -rf --one-file-system "${copy}" - done - lock_close 9 - - rm -rf --one-file-system "${chroots}/${repo}-${arch}" - mkdir -p "${chroots}/${repo}-${arch}" - setarch "${arch}" mkarchroot \ - -C "@pkgdatadir@/pacman-${repo}.conf" \ - -M "@pkgdatadir@/makepkg-${arch}.conf" \ - "${chroots}/${repo}-${arch}/root" \ - "${base_packages[@]}" || abort -else - setarch ${arch} mkarchroot \ - -u \ - -C "@pkgdatadir@/pacman-${repo}.conf" \ - -M "@pkgdatadir@/makepkg-${arch}.conf" \ - "${chroots}/${repo}-${arch}/root" || abort -fi - -msg "Building in chroot for [${repo}] (${arch})..." -exec setarch "${arch}" makechrootpkg -c -n -r "${chroots}/${repo}-${arch}" diff --git a/archco.in b/archco.in deleted file mode 100644 index 5d497cc..0000000 --- a/archco.in +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -m4_include(lib/common.sh) - -scriptname=${0##*/} - -if [[ -z $1 ]]; then - echo 'Usage: '$scriptname' <package name>...' - exit 1 -fi - -case $scriptname in - archco) - SVNURL="svn+ssh://gerolde.archlinux.org/srv/svn-packages";; - communityco) - SVNURL="svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn";; - *) - die "Couldn't find svn url for $scriptname" - ;; -esac - -for i in "$@"; do - svn co "$SVNURL/$i" -done diff --git a/archrelease.in b/archrelease.in deleted file mode 100644 index 2e742c2..0000000 --- a/archrelease.in +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -m4_include(lib/common.sh) -m4_include(lib/valid-tags.sh) - -# parse command line options -FORCE= -while getopts ':f' flag; do - case $flag in - f) FORCE=1 ;; - :) die "Option requires an argument -- '$OPTARG'" ;; - \?) die "Invalid option -- '$OPTARG'" ;; - esac -done -shift $(( OPTIND - 1 )) - -if ! (( $# )); then - echo 'Usage: archrelease [-f] <repo>...' - exit 1 -fi - -# validate repo is really repo-arch -if [[ -z $FORCE ]]; then - for tag in "$@"; do - if ! in_array "$tag" "${_tags[@]}"; then - die 'archrelease: Invalid tag: "'$tag'" (use -f to force release)' - fi - done -fi - -if [[ ! -f PKGBUILD ]]; then - die 'archrelease: PKGBUILD not found' -fi - -trunk=${PWD##*/} - -# Normally this should be trunk, but it may be something -# such as 'gnome-unstable' -IFS='/' read -r -d '' -a parts <<< "$PWD" -if [[ "${parts[@]:(-2):1}" == "repos" ]]; then - die 'archrelease: Should not be in repos dir (try from trunk/)' -fi -unset parts - -if [[ $(svn status -q) ]]; then - die 'archrelease: You have not committed your changes yet!' -fi - -pushd .. >/dev/null -IFS=$'\n' read -r -d '' -a known_files < <(svn ls -r HEAD "$trunk") -for file in "${known_files[@]}"; do - if [[ ${file:(-1)} = '/' ]]; then - die "archrelease: subdirectories are not supported in package directories!" - fi -done - -# gracefully handle files containing an "@" character -known_files=("${known_files[@]/%/@}") - -for tag in "$@"; do - stat_busy "Copying ${trunk} to ${tag}" - - if [[ -d repos/$tag ]]; then - declare -a trash - trash=() - while read -r file; do - trash+=("repos/$tag/$file") - done < <(svn ls "repos/$tag") - [[ $trash ]] && svn rm -q "${trash[@]/%/@}" - else - mkdir -p "repos/$tag" - svn add --parents -q "repos/$tag" - fi - - # copy all files at once from trunk to the subdirectory in repos/ - svn copy -q -r HEAD ${known_files[@]/#/$trunk/} "repos/$tag/" - - stat_done -done - -stat_busy "Releasing package" -printf -v tag_list ", %s" "$@"; tag_list="${tag_list#, }" -svn commit -q -m "archrelease: copy ${trunk} to $tag_list" || abort -stat_done - -popd >/dev/null diff --git a/archrm.in b/archrm.in deleted file mode 100644 index 7c7139b..0000000 --- a/archrm.in +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -m4_include(lib/common.sh) - -if [[ -z $1 ]]; then - echo 'Usage: archrm <path to checkout>' - exit 1 -fi - -# FIXME: Check if there are uncommited changes -#pushd $1 -# -#popd - -rm -rf $1 diff --git a/bash_completion.in b/bash_completion.in index cd959fc..5e4fe66 100644 --- a/bash_completion.in +++ b/bash_completion.in @@ -1,50 +1,4 @@ -_devtools_compgen() { - local i r - COMPREPLY=($(compgen -W '$*' -- "$cur")) - for ((i=1; i < ${#COMP_WORDS[@]}-1; i++)); do - for r in ${!COMPREPLY[@]}; do - if [[ ${COMP_WORDS[i]} = ${COMPREPLY[r]} ]]; then - unset 'COMPREPLY[r]'; break - fi - done - done -} - -_archco_pkg() { - _devtools_compgen "$( - \pacman -$1 - )" -} - -_archco() { - local cur prev - COMPREPLY=() - cur=$(_get_cword) - prev=${COMP_WORDS[COMP_CWORD-1]} - - _archco_pkg Slq - true -} && -complete -F _archco archco communityco - -_makechrootpkg() { - local cur - COMPREPLY=() - _get_comp_words_by_ref cur - - case $cur in - -*) - COMPREPLY=( $( compgen -W '-I -c -d -h -l -r -u' -- "$cur" ) ) - ;; - *) - _filedir - return 0 - ;; - esac - - true -} && -complete -F _makechrootpkg makechrootpkg +#!/bin/bash _mkarchroot() { local cur @@ -63,7 +17,7 @@ _mkarchroot() { true } && -complete -F _mkarchroot mkarchroot +complete -F _mkarchroot archroot # ex:et ts=2 sw=2 ft=sh diff --git a/checkpkg.in b/checkpkg.in index 95bf049..a761df7 100644 --- a/checkpkg.in +++ b/checkpkg.in @@ -1,6 +1,6 @@ #!/bin/bash -m4_include(lib/common.sh) +source @pkgdatadir@/common.sh # Source makepkg.conf; fail if it is not found if [[ -r '/etc/makepkg.conf' ]]; then diff --git a/commitpkg.in b/commitpkg.in deleted file mode 100644 index d9ee0aa..0000000 --- a/commitpkg.in +++ /dev/null @@ -1,224 +0,0 @@ -#!/bin/bash - -m4_include(lib/common.sh) - -getpkgfile() { - case $# in - 0) - error 'No canonical package found!' - return 1 - ;; - [!1]) - error 'Failed to canonicalize package name -- multiple packages found:' - msg2 '%s' "$@" - return 1 - ;; - esac - - echo "$1" -} - -# Source makepkg.conf; fail if it is not found -if [[ -r '/etc/makepkg.conf' ]]; then - source '/etc/makepkg.conf' -else - die '/etc/makepkg.conf not found!' -fi - -# Source user-specific makepkg.conf overrides -if [[ -r ~/.makepkg.conf ]]; then - . ~/.makepkg.conf -fi - -cmd=${0##*/} - -if [[ ! -f PKGBUILD ]]; then - die 'No PKGBUILD file' -fi - -. PKGBUILD -pkgbase=${pkgbase:-$pkgname} - -case "$cmd" in - commitpkg) - if (( $# == 0 )); then - die 'Usage: commitpkg <reponame> [-f] [-s server] [-l limit] [-a arch] [commit message]' - fi - repo="$1" - shift - ;; - *pkg) - repo="${cmd%pkg}" - ;; - *) - die 'Usage: commitpkg <reponame> [-f] [-s server] [-l limit] [-a arch] [commit message]' - ;; -esac - -# check if all local source files are under version control -for s in "${source[@]}"; do - if [[ $s != *://* ]] && ! svn status -v "$s@" | grep -q '^[ AMRX~]'; then - die "$s is not under version control" - fi -done - -# check if changelog and install files are under version control -for i in 'changelog' 'install'; do - while read -r file; do - # evaluate any bash variables used - eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\" - if ! svn status -v "${file}" | grep -q '^[ AMRX~]'; then - die "${file} is not under version control" - fi - done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD) -done - -rsyncopts=(-e ssh -p --chmod=ug=rw,o=r -c -h -L --progress --partial -y) -archreleaseopts=() -while getopts ':l:a:s:f' flag; do - case $flag in - f) archreleaseopts+=('-f') ;; - s) server=$OPTARG ;; - l) rsyncopts+=("--bwlimit=$OPTARG") ;; - a) commit_arch=$OPTARG ;; - :) die "Option requires an argument -- '$OPTARG'" ;; - \?) die "Invalid option -- '$OPTARG'" ;; - esac -done -shift $(( OPTIND - 1 )) - -# check packages have the packager field set -for _arch in ${arch[@]}; do - if [[ -n $commit_arch && ${_arch} != "$commit_arch" ]]; then - continue - fi - for _pkgname in ${pkgname[@]}; do - fullver=$(get_full_version $_pkgname) - - if pkgfile=$(shopt -s nullglob; - getpkgfile "${PKGDEST+$PKGDEST/}$_pkgname-$fullver-${_arch}".pkg.tar.?z); then - if grep -q "packager = Unknown Packager" <(bsdtar -xOqf $pkgfile .PKGINFO); then - die "PACKAGER was not set when building package" - fi - fi - done -done - -if [[ -z $server ]]; then - case "$repo" in - core|extra|testing|staging|kde-unstable|gnome-unstable) - server='gerolde.archlinux.org' ;; - community*|multilib*) - server='nymeria.archlinux.org' ;; - *) - server='gerolde.archlinux.org' - msg "Non-standard repository $repo in use, defaulting to server $server" ;; - esac -fi - -if [[ -n $(svn status -q) ]]; then - msgtemplate="upgpkg: $pkgbase $(get_full_version)"$'\n\n' - if [[ -n $1 ]]; then - stat_busy 'Committing changes to trunk' - svn commit -q -m "${msgtemplate}${1}" || die - stat_done - else - msgfile="$(mktemp)" - echo "$msgtemplate" > "$msgfile" - if [[ -n $SVN_EDITOR ]]; then - $SVN_EDITOR "$msgfile" - elif [[ -n $VISUAL ]]; then - $VISUAL "$msgfile" - elif [[ -n $EDITOR ]]; then - $EDITOR "$msgfile" - else - vi "$msgfile" - fi - [[ -s $msgfile ]] || die - stat_busy 'Committing changes to trunk' - svn commit -q -F "$msgfile" || die - unlink "$msgfile" - stat_done - fi -fi - -declare -a uploads -declare -a commit_arches -declare -a skip_arches - -for _arch in ${arch[@]}; do - if [[ -n $commit_arch && ${_arch} != "$commit_arch" ]]; then - skip_arches+=($_arch) - continue - fi - - for _pkgname in ${pkgname[@]}; do - fullver=$(get_full_version $_pkgname) - - if ! pkgfile=$(shopt -s nullglob; - getpkgfile "${PKGDEST+$PKGDEST/}$_pkgname-$fullver-${_arch}".pkg.tar.?z); then - warning "Skipping $_pkgname-$fullver-$_arch: failed to locate package file" - skip_arches+=($_arch) - continue 2 - fi - uploads+=("$pkgfile") - - sigfile="${pkgfile}.sig" - if [[ ! -f $sigfile ]]; then - msg "Signing package ${pkgfile}..." - if [[ -n $GPGKEY ]]; then - SIGNWITHKEY="-u ${GPGKEY}" - fi - gpg --detach-sign --use-agent ${SIGNWITHKEY} "${pkgfile}" || die - fi - if ! gpg --verify "$sigfile" >/dev/null 2>&1; then - die "Signature ${pkgfile}.sig is incorrect!" - fi - uploads+=("$sigfile") - done -done - -for _arch in ${arch[@]}; do - if ! in_array $_arch ${skip_arches[@]}; then - commit_arches+=($_arch) - fi -done - -if [[ ${#commit_arches[*]} -gt 0 ]]; then - archrelease "${archreleaseopts[@]}" "${commit_arches[@]/#/$repo-}" || die -fi - -if [[ ${#uploads[*]} -gt 0 ]]; then - new_uploads=() - - # convert to absolute paths so rsync can work with colons (epoch) - while read -r -d '' upload; do - new_uploads+=("$upload") - done < <(realpath -z "${uploads[@]}") - - uploads=("${new_uploads[@]}") - unset new_uploads - msg 'Uploading all package and signature files' - rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die -fi - -if [[ "${arch[*]}" == 'any' ]]; then - if [[ -d ../repos/$repo-i686 && -d ../repos/$repo-x86_64 ]]; then - pushd ../repos/ >/dev/null - stat_busy "Removing $repo-i686 and $repo-x86_64" - svn rm -q $repo-i686 - svn rm -q $repo-x86_64 - svn commit -q -m "Removed $repo-i686 and $repo-x86_64 for $pkgname" - stat_done - popd >/dev/null - fi -else - if [[ -d ../repos/$repo-any ]]; then - pushd ../repos/ >/dev/null - stat_busy "Removing $repo-any" - svn rm -q $repo-any - svn commit -q -m "Removed $repo-any for $pkgname" - stat_done - popd >/dev/null - fi -fi diff --git a/crossrepomove.in b/crossrepomove.in deleted file mode 100644 index 8794326..0000000 --- a/crossrepomove.in +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -m4_include(lib/common.sh) - -scriptname=${0##*/} - -if [[ -z $1 ]]; then - echo 'Usage: '$scriptname' [pkgbase]' - exit 1 -fi - -pkgbase="${1}" - -packages_svn='svn+ssh://gerolde.archlinux.org/srv/svn-packages' -packages_server='gerolde.archlinux.org' -community_svn='svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn' -community_server='nymeria.archlinux.org' -mirror='http://mirrors.kernel.org/archlinux' - -case $scriptname in - extra2community) - source_svn="${packages_svn}" - target_svn="${community_svn}" - source_server="${packages_server}" - target_server="${community_server}" - source_repo='extra' - target_repo='community' - ;; - community2extra) - source_svn="${community_svn}" - target_svn="${packages_svn}" - source_server="${community_server}" - target_server="${packages_server}" - source_repo='community' - target_repo='extra' - ;; - *) - die "Couldn't find configuration for $scriptname" - ;; -esac - -setup_workdir - -pushd $WORKDIR >/dev/null - -msg "Downloading sources for ${pkgbase}" -svn -q checkout -N "${target_svn}" target_checkout -mkdir -p "target_checkout/${pkgbase}/repos" -svn -q export "${source_svn}/${pkgbase}/trunk" "target_checkout/${pkgbase}/trunk" || die -. "target_checkout/${pkgbase}/trunk/PKGBUILD" - -msg "Downloading packages for ${pkgbase}" -for _arch in ${arch[@]}; do - if [[ "${_arch[*]}" == 'any' ]]; then - repo_arch='x86_64' - else - repo_arch=${_arch} - fi - for _pkgname in ${pkgname[@]}; do - fullver=$(get_full_version $_pkgname) - # FIXME: this only works with .xz packages - ssh "${target_server}" "cd staging/${target_repo} - curl -O ${mirror}/${source_repo}/os/${repo_arch}/$_pkgname-$fullver-${_arch}.pkg.tar.xz - curl -O ${mirror}/${source_repo}/os/${repo_arch}/$_pkgname-$fullver-${_arch}.pkg.tar.xz.sig" || die - done -done - -msg "Adding ${pkgbase} to ${target_repo}" -svn -q add "target_checkout/${pkgbase}" -svn -q propset svn:keywords 'Id' "target_checkout/${pkgbase}/trunk/PKGBUILD" -svn -q commit -m"${scriptname}: Moving ${pkgbase} from ${source_repo} to ${target_repo}" target_checkout -pushd "target_checkout/${pkgbase}/trunk" >/dev/null -archrelease "${arch[@]/#/$target_repo-}" || die -popd >/dev/null - -if [[ "${target_server}" == "${community_server}" ]]; then - dbscripts_path='/srv/repos/svn-community/dbscripts' -else - dbscripts_path='/arch' -fi - -ssh "${target_server}" "${dbscripts_path}/db-update" || die - -msg "Removing ${pkgbase} from ${source_repo}" -if [[ "${source_server}" == "${community_server}" ]]; then - dbscripts_path='/srv/repos/svn-community/dbscripts' -else - dbscripts_path='/arch' -fi -for _arch in ${arch[@]}; do - ssh "${source_server}" "${dbscripts_path}/db-remove ${source_repo} ${_arch} ${pkgbase}" -done -svn -q checkout -N "${source_svn}" source_checkout -svn -q up "source_checkout/${pkgbase}" -svn -q rm "source_checkout/${pkgbase}" -svn -q commit -m"${scriptname}: Moving ${pkgbase} from ${source_repo} to ${target_repo}" source_checkout - -popd >/dev/null diff --git a/find-libdeps.in b/find-libdeps.in index 36e2c43..7618850 100644 --- a/find-libdeps.in +++ b/find-libdeps.in @@ -1,6 +1,6 @@ #!/bin/bash -m4_include(lib/common.sh) +source @pkgdatadir@/common.sh set -e shopt -s extglob diff --git a/finddeps.in b/finddeps.in index 7a2a3fb..656fe5a 100644 --- a/finddeps.in +++ b/finddeps.in @@ -3,7 +3,7 @@ # finddeps - find packages that depend on a given depname # -m4_include(lib/common.sh) +source @pkgdatadir@/common.sh match=$1 diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..890a5d0 --- /dev/null +++ b/gitconfig @@ -0,0 +1,17 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[remote "origin"] + url = ssh://git@parabolagnulinux.org:1863/srv/git/packages/chroottools.git + fetch = +refs/heads/*:refs/remotes/origin/* +[remote "devtools"] + url = git://projects.archlinux.org/devtools.git + fetch = +refs/heads/*:refs/remotes/devtools/* +[branch "master"] + remote = origin + merge = refs/heads/master +[branch "complete"] + remote = devtools + merge = refs/heads/master @@ -3,7 +3,7 @@ # lddd - find broken library links on your machine # -m4_include(lib/common.sh) +source @pkgdatadir@/common.sh ifs=$IFS IFS="${IFS}:" diff --git a/lib/common.sh b/lib/common.sh index 932799e..d6fbe7c 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -57,13 +57,19 @@ stat_done() { printf "${BOLD}done${ALL_OFF}\n" >&2 } +_setup_workdir=false setup_workdir() { [[ -z $WORKDIR ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX") + _setup_workdir=true + trap 'trap_abort' INT QUIT TERM HUP + trap 'trap_exit' EXIT } cleanup() { - [[ -n $WORKDIR ]] && rm -rf "$WORKDIR" - [[ $1 ]] && exit $1 + if [[ -n $WORKDIR ]] && $_setup_workdir; then + rm -rf "$WORKDIR" + fi + [[ -n $1 ]] && exit $1 } abort() { @@ -86,9 +92,6 @@ die() { cleanup 1 } -trap 'trap_abort' INT QUIT TERM HUP -trap 'trap_exit' EXIT - ## # usage : in_array( $needle, $haystack ) # return : 0 - found diff --git a/lib/valid-tags.sh b/lib/valid-tags.sh deleted file mode 100644 index 36918fe..0000000 --- a/lib/valid-tags.sh +++ /dev/null @@ -1,20 +0,0 @@ -_arch=( - i686 - x86_64 - any -) - -_tags=( - core-i686 core-x86_64 core-any - extra-i686 extra-x86_64 extra-any - multilib-x86_64 - staging-i686 staging-x86_64 staging-any - testing-i686 testing-x86_64 testing-any - multilib-testing-x86_64 - multilib-staging-x86_64 - community-i686 community-x86_64 community-any - community-staging-i686 community-staging-x86_64 community-staging-any - community-testing-i686 community-testing-x86_64 community-testing-any - kde-unstable-i686 kde-unstable-x86_64 kde-unstable-any - gnome-unstable-i686 gnome-unstable-x86_64 gnome-unstable-any -) diff --git a/makechrootpkg.in b/makechrootpkg.in deleted file mode 100644 index 244700c..0000000 --- a/makechrootpkg.in +++ /dev/null @@ -1,306 +0,0 @@ -#!/bin/bash -# 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; version 2 of the License. -# -# 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. - -m4_include(lib/common.sh) - -shopt -s nullglob - -makepkg_args='-s --noconfirm -L' -repack=false -update_first=false -clean_first=false -install_pkg= -add_to_db=false -run_namcap=false -chrootdir= -passeddir= - -default_copy=$USER -[[ -n $SUDO_USER ]] && default_copy=$SUDO_USER -[[ -z $default_copy || $default_copy = root ]] && default_copy=copy -src_owner=${SUDO_USER:-$USER} - -usage() { - echo "Usage: ${0##*/} [options] -r <chrootdir> [--] [makepkg args]" - echo ' Run this script in a PKGBUILD dir to build a package inside a' - echo ' clean chroot. All unrecognized arguments passed to this script' - echo ' will be passed to makepkg.' - echo '' - echo ' The chroot dir consists of the following directories:' - echo ' <chrootdir>/{root, copy} but only "root" is required' - echo ' by default. The working copy will be created as needed' - echo '' - echo 'The chroot "root" directory must be created via the following' - echo 'command:' - echo ' mkarchroot <chrootdir>/root base base-devel sudo' - echo '' - echo "Default makepkg args: $makepkg_args" - echo '' - echo 'Flags:' - echo '-h This help' - echo '-c Clean the chroot before building' - echo '-u Update the working copy of the chroot before building' - echo ' This is useful for rebuilds without dirtying the pristine' - echo ' chroot' - echo '-d Add the package to a local db at /repo after building' - echo '-r <dir> The chroot dir to use' - echo '-I <pkg> Install a package into the working copy of the chroot' - echo '-l <copy> The directory to use as the working copy of the chroot' - echo ' Useful for maintaining multiple copies.' - echo " Default: $default_copy" - echo '-n Run namcap on the package' - exit 1 -} - -while getopts 'hcudr:I:l:n' arg; do - case "$arg" in - h) usage ;; - c) clean_first=true ;; - u) update_first=true ;; - d) add_to_db=true ;; - r) passeddir="$OPTARG" ;; - I) install_pkg="$OPTARG" ;; - l) copy="$OPTARG" ;; - n) run_namcap=true; makepkg_args="$makepkg_args -i" ;; - *) makepkg_args="$makepkg_args -$arg $OPTARG" ;; - esac -done - -# Canonicalize chrootdir, getting rid of trailing / -chrootdir=$(readlink -e "$passeddir") - -if [[ ${copy:0:1} = / ]]; then - copydir=$copy -else - [[ -z $copy ]] && copy=$default_copy - copydir="$chrootdir/$copy" -fi - -# Pass all arguments after -- right to makepkg -makepkg_args="$makepkg_args ${*:$OPTIND}" - -# See if -R was passed to makepkg -for arg in ${*:$OPTIND}; do - if [[ $arg = -R ]]; then - repack=true - break - fi -done - -if (( EUID )); then - die 'This script must be run as root.' -fi - -if [[ ! -f PKGBUILD && -z $install_pkg ]]; then - die 'This must be run in a directory containing a PKGBUILD.' -fi - -if [[ ! -d $chrootdir ]]; then - die "No chroot dir defined, or invalid path '$passeddir'" -fi - -if [[ ! -d $chrootdir/root ]]; then - die "Missing chroot dir root directory. Try using: mkarchroot $chrootdir/root base base-devel sudo" -fi - -umask 0022 - -# Lock the chroot we want to use. We'll keep this lock until we exit. -# Note this is the same FD number as in mkarchroot -lock_open_write 9 "$copydir.lock" "Locking chroot copy '$copy'" - -if [[ ! -d $copydir ]] || $clean_first; then - # Get a read lock on the root chroot to make - # sure we don't clone a half-updated chroot - lock_open_read 8 "$chrootdir/root" "Locking clean chroot" - - stat_busy 'Creating clean working copy' - use_rsync=false - if type -P btrfs >/dev/null; then - [[ -d $copydir ]] && btrfs subvolume delete "$copydir" &>/dev/null - btrfs subvolume snapshot "$chrootdir/root" "$copydir" &>/dev/null || - use_rsync=true - else - use_rsync=true - fi - - if $use_rsync; then - mkdir -p "$copydir" - rsync -a --delete -q -W -x "$chrootdir/root/" "$copydir" - fi - stat_done - - # Drop the read lock again - lock_close 8 -fi - -if [[ -n $install_pkg ]]; then - pkgname="${install_pkg##*/}" - cp "$install_pkg" "$copydir/$pkgname" - - mkarchroot -r "pacman -U /$pkgname --noconfirm" "$copydir" - ret=$? - - rm "$copydir/$pkgname" - - # Exit early, we've done all we need to - exit $ret -fi - -$update_first && mkarchroot -u "$copydir" - -mkdir -p "$copydir/build" - -# Remove anything in there UNLESS -R (repack) was passed to makepkg -$repack || rm -rf "$copydir"/build/* - -# Read .makepkg.conf and .gnupg/pubring.gpg even if called via sudo -if [[ -n $SUDO_USER ]]; then - SUDO_HOME="$(eval echo ~$SUDO_USER)" - makepkg_conf="$SUDO_HOME/.makepkg.conf" - if [[ -r "$SUDO_HOME/.gnupg/pubring.gpg" ]]; then - install -D "$SUDO_HOME/.gnupg/pubring.gpg" "$copydir/build/.gnupg/pubring.gpg" - fi -else - makepkg_conf="$HOME/.makepkg.conf" - if [[ -r "$HOME/.gnupg/pubring.gpg" ]]; then - install -D "$HOME/.gnupg/pubring.gpg" "$copydir/build/.gnupg/pubring.gpg" - fi -fi - -# Get SRC/PKGDEST from makepkg.conf -if [[ -f $makepkg_conf ]]; then - eval $(grep '^SRCDEST=' "$makepkg_conf") - eval $(grep '^PKGDEST=' "$makepkg_conf") - eval $(grep '^MAKEFLAGS=' "$makepkg_conf") - eval $(grep '^PACKAGER=' "$makepkg_conf") -fi - -[[ -z $SRCDEST ]] && eval $(grep '^SRCDEST=' /etc/makepkg.conf) -[[ -z $PKGDEST ]] && eval $(grep '^PKGDEST=' /etc/makepkg.conf) -[[ -z $MAKEFLAGS ]] && eval $(grep '^MAKEFLAGS=' /etc/makepkg.conf) -[[ -z $PACKAGER ]] && eval $(grep '^PACKAGER=' /etc/makepkg.conf) - -# Use PKGBUILD directory if PKGDEST or SRCDEST don't exist -[[ -d $PKGDEST ]] || PKGDEST=. -[[ -d $SRCDEST ]] || SRCDEST=. - -mkdir -p "$copydir/pkgdest" -if ! grep -q 'PKGDEST="/pkgdest"' "$copydir/etc/makepkg.conf"; then - echo 'PKGDEST="/pkgdest"' >> "$copydir/etc/makepkg.conf" -fi - -mkdir -p "$copydir/srcdest" -if ! grep -q 'SRCDEST="/srcdest"' "$copydir/etc/makepkg.conf"; then - echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf" -fi - -if [[ -n $MAKEFLAGS ]]; then - sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf" - echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf" -fi - -if [[ -n $PACKAGER ]]; then - sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf" - echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf" -fi - -# Set target CARCH as it might be used within the PKGBUILD to select correct sources -eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf") -export CARCH - -# Copy PKGBUILD and sources -cp PKGBUILD "$copydir/build/" -( - source PKGBUILD - for file in "${source[@]}"; do - file="${file%%::*}" - file="${file##*://*/}" - if [[ -f $file ]]; then - cp "$file" "$copydir/srcdest/" - elif [[ -f $SRCDEST/$file ]]; then - cp "$SRCDEST/$file" "$copydir/srcdest/" - fi - done - - # Find all changelog and install files, even inside functions - for i in 'changelog' 'install'; do - while read -r file; do - # evaluate any bash variables used - eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\" - [[ -f $file ]] && cp "$file" "$copydir/build/" - done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD) - done -) - -chown -R nobody "$copydir"/{build,pkgdest,srcdest} - -cat > "$copydir/etc/sudoers.d/nobody-pacman" <<EOF -Defaults env_keep += "HOME" -nobody ALL = NOPASSWD: /usr/bin/pacman -EOF -chmod 440 "$copydir/etc/sudoers.d/nobody-pacman" - -# This is a little gross, but this way the script is recreated every time in the -# working copy -cat >"$copydir/chrootbuild" <<EOF -#!/bin/bash -. /etc/profile -export HOME=/build - -cd /build -sudo -u nobody ${MAKEPKG:-makepkg} $makepkg_args || touch BUILD_FAILED - -[[ -f BUILD_FAILED ]] && exit 1 - -if $run_namcap; then - pacman -S --needed --noconfirm namcap - for pkgfile in /build/PKGBUILD /pkgdest/*.pkg.tar.?z; do - echo "Checking \${pkgfile##*/}" - sudo -u nobody namcap "\$pkgfile" 2>&1 | tee "/build/\${pkgfile##*/}-namcap.log" - done -fi - -exit 0 -EOF -chmod +x "$copydir/chrootbuild" - -if mkarchroot -r "/chrootbuild" "$copydir"; then - for pkgfile in "$copydir"/pkgdest/*.pkg.tar.?z; do - if $add_to_db; then - mkdir -p "$copydir/repo" - pushd "$copydir/repo" >/dev/null - cp "$pkgfile" . - repo-add repo.db.tar.gz "${pkgfile##*/}" - popd >/dev/null - fi - - chown "$src_owner" "$pkgfile" - mv "$pkgfile" "$PKGDEST" - done - - for l in "$copydir"/build/*-{build,check,namcap,package,package_*}.log; do - chown "$src_owner" "$l" - [[ -f $l ]] && mv "$l" . - done -else - # Just in case. We returned 1, make sure we fail - touch "$copydir/build/BUILD_FAILED" -fi - -for f in "$copydir"/srcdest/*; do - chown "$src_owner" "$f" - mv "$f" "$SRCDEST" -done - -if [[ -e $copydir/build/BUILD_FAILED ]]; then - rm "$copydir/build/BUILD_FAILED" - die "Build failed, check $copydir/build" -fi diff --git a/makepkg-i686.conf b/makepkg-i686.conf deleted file mode 100644 index 725c2a2..0000000 --- a/makepkg-i686.conf +++ /dev/null @@ -1,121 +0,0 @@ -# -# /etc/makepkg.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/wget - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="i686" -CHOST="i686-pc-linux-gnu" - -#-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" -CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" -#-- Make Flags: change this for DistCC/SMP systems -#MAKEFLAGS="-j2" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- fakeroot: Allow building packages as a non-root user -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(fakeroot !distcc color !ccache check !sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs libtool emptydirs zipman purge !upx) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -#-- upx: Compress binary executable files using UPX -# -OPTIONS=(strip docs libtool emptydirs zipman purge !upx) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe <john@doe.com>" -#-- Specify a key to use for package signing -#GPGKEY="" - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.xz' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/makepkg-x86_64.conf b/makepkg-x86_64.conf deleted file mode 100644 index 4de5c67..0000000 --- a/makepkg-x86_64.conf +++ /dev/null @@ -1,121 +0,0 @@ -# -# /etc/makepkg.conf -# - -######################################################################### -# SOURCE ACQUISITION -######################################################################### -# -#-- The download utilities that makepkg should use to acquire sources -# Format: 'protocol::agent' -DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' - 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' - 'rsync::/usr/bin/rsync -z %u %o' - 'scp::/usr/bin/scp -C %u %o') - -# Other common tools: -# /usr/bin/snarf -# /usr/bin/lftpget -c -# /usr/bin/wget - -######################################################################### -# ARCHITECTURE, COMPILE FLAGS -######################################################################### -# -CARCH="x86_64" -CHOST="x86_64-unknown-linux-gnu" - -#-- Compiler and Linker Flags -# -march (or -mcpu) builds exclusively for an architecture -# -mtune optimizes for an architecture, but builds for whole processor family -CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" -CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" -LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro" -#-- Make Flags: change this for DistCC/SMP systems -#MAKEFLAGS="-j2" - -######################################################################### -# BUILD ENVIRONMENT -######################################################################### -# -# Defaults: BUILDENV=(fakeroot !distcc color !ccache check !sign) -# A negated environment option will do the opposite of the comments below. -# -#-- fakeroot: Allow building packages as a non-root user -#-- distcc: Use the Distributed C/C++/ObjC compiler -#-- color: Colorize output messages -#-- ccache: Use ccache to cache compilation -#-- check: Run the check() function if present in the PKGBUILD -#-- sign: Generate PGP signature file -# -BUILDENV=(fakeroot !distcc color !ccache check !sign) -# -#-- If using DistCC, your MAKEFLAGS will also need modification. In addition, -#-- specify a space-delimited list of hosts running in the DistCC cluster. -#DISTCC_HOSTS="" -# -#-- Specify a directory for package building. -#BUILDDIR=/tmp/makepkg - -######################################################################### -# GLOBAL PACKAGE OPTIONS -# These are default values for the options=() settings -######################################################################### -# -# Default: OPTIONS=(strip docs libtool emptydirs zipman purge !upx) -# A negated option will do the opposite of the comments below. -# -#-- strip: Strip symbols from binaries/libraries -#-- docs: Save doc directories specified by DOC_DIRS -#-- libtool: Leave libtool (.la) files in packages -#-- emptydirs: Leave empty directories in packages -#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip -#-- purge: Remove files specified by PURGE_TARGETS -#-- upx: Compress binary executable files using UPX -# -OPTIONS=(strip docs libtool emptydirs zipman purge !upx) - -#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512 -INTEGRITY_CHECK=(md5) -#-- Options to be used when stripping binaries. See `man strip' for details. -STRIP_BINARIES="--strip-all" -#-- Options to be used when stripping shared libraries. See `man strip' for details. -STRIP_SHARED="--strip-unneeded" -#-- Options to be used when stripping static libraries. See `man strip' for details. -STRIP_STATIC="--strip-debug" -#-- Manual (man and info) directories to compress (if zipman is specified) -MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) -#-- Doc directories to remove (if !docs is specified) -DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) -#-- Files to be removed from all packages (if purge is specified) -PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) - -######################################################################### -# PACKAGE OUTPUT -######################################################################### -# -# Default: put built package and cached source in build directory -# -#-- Destination: specify a fixed directory where all packages will be placed -#PKGDEST=/home/packages -#-- Source cache: specify a fixed directory where source files will be cached -#SRCDEST=/home/sources -#-- Source packages: specify a fixed directory where all src packages will be placed -#SRCPKGDEST=/home/srcpackages -#-- Packager: name/email of the person or organization building packages -#PACKAGER="John Doe <john@doe.com>" -#-- Specify a key to use for package signing -#GPGKEY="" - -######################################################################### -# EXTENSION DEFAULTS -######################################################################### -# -# WARNING: Do NOT modify these variables unless you know what you are -# doing. -# -PKGEXT='.pkg.tar.xz' -SRCEXT='.src.tar.gz' - -# vim: set ft=sh ts=2 sw=2 et: diff --git a/mkarchroot.in b/mkarchroot.in index aeeacc2..96f4399 100644 --- a/mkarchroot.in +++ b/mkarchroot.in @@ -8,7 +8,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -m4_include(lib/common.sh) +source @pkgdatadir@/common.sh CHROOT_VERSION='v2' diff --git a/pacman-extra.conf b/pacman-extra.conf deleted file mode 100644 index 821f9a5..0000000 --- a/pacman-extra.conf +++ /dev/null @@ -1,96 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-gnome-unstable.conf b/pacman-gnome-unstable.conf deleted file mode 100644 index 9bdca63..0000000 --- a/pacman-gnome-unstable.conf +++ /dev/null @@ -1,100 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -[gnome-unstable] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-kde-unstable.conf b/pacman-kde-unstable.conf deleted file mode 100644 index 1bec946..0000000 --- a/pacman-kde-unstable.conf +++ /dev/null @@ -1,100 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -[kde-unstable] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-multilib-staging.conf b/pacman-multilib-staging.conf deleted file mode 100644 index 3d1ab75..0000000 --- a/pacman-multilib-staging.conf +++ /dev/null @@ -1,118 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -[staging] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-staging] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repositories as required here. -[multilib-staging] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[multilib-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[multilib] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-multilib-testing.conf b/pacman-multilib-testing.conf deleted file mode 100644 index d24eb6c..0000000 --- a/pacman-multilib-testing.conf +++ /dev/null @@ -1,106 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -[testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repositories as required here. -[multilib-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[multilib] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-multilib.conf b/pacman-multilib.conf deleted file mode 100644 index 8d10757..0000000 --- a/pacman-multilib.conf +++ /dev/null @@ -1,107 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -#[testing] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -#[community-testing] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# If you want to run 32 bit applications on your x86_64 system, -# enable the multilib repositories as required here. - -#[multilib-testing] -#SigLevel = PackageRequired -#Include = /etc/pacman.d/mirrorlist - -[multilib] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-staging.conf b/pacman-staging.conf deleted file mode 100644 index d4116e2..0000000 --- a/pacman-staging.conf +++ /dev/null @@ -1,104 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -[staging] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-staging] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/pacman-testing.conf b/pacman-testing.conf deleted file mode 100644 index 353bdbb..0000000 --- a/pacman-testing.conf +++ /dev/null @@ -1,96 +0,0 @@ -# -# /etc/pacman.conf -# -# See the pacman.conf(5) manpage for option and repository directives - -# -# GENERAL OPTIONS -# -[options] -# The following paths are commented out with their default values listed. -# If you wish to use different paths, uncomment and update the paths. -#RootDir = / -#DBPath = /var/lib/pacman/ -#CacheDir = /var/cache/pacman/pkg/ -#LogFile = /var/log/pacman.log -#GPGDir = /etc/pacman.d/gnupg/ -HoldPkg = pacman glibc -# If upgrades are available for these packages they will be asked for first -SyncFirst = pacman -#XferCommand = /usr/bin/curl -C - -f %u > %o -#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u -#CleanMethod = KeepInstalled -Architecture = auto - -# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup -#IgnorePkg = -#IgnoreGroup = - -#NoUpgrade = -#NoExtract = - -# Misc options -#UseSyslog -#UseDelta -#TotalDownload -# We cannot check disk space from within a chroot environment -#CheckSpace -#VerbosePkgLists - -# By default, pacman accepts packages signed by keys that its local keyring -# trusts (see pacman-key and its man page), as well as unsigned packages. -#SigLevel = Optional TrustedOnly - -# NOTE: You must run `pacman-key --init` before first using pacman; the local -# keyring can then be populated with the keys of all official Arch Linux -# packagers with `pacman-key --populate archlinux`. - -# -# REPOSITORIES -# - can be defined here or included from another file -# - pacman will search repositories in the order defined here -# - local/custom mirrors can be added here or in separate files -# - repositories listed first will take precedence when packages -# have identical names, regardless of version number -# - URLs will have $repo replaced by the name of the current repo -# - URLs will have $arch replaced by the name of the architecture -# -# Repository entries are of the format: -# [repo-name] -# Server = ServerName -# Include = IncludePath -# -# The header [repo-name] is crucial - it must be present and -# uncommented to enable the repo. -# - -# The testing repositories are disabled by default. To enable, uncomment the -# repo name header and Include lines. You can add preferred servers immediately -# after the header, and they will be used before the default mirrors. - -[testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[core] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[extra] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community-testing] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -[community] -SigLevel = PackageRequired -Include = /etc/pacman.d/mirrorlist - -# An example of a custom package repository. See the pacman manpage for -# tips on creating your own repositories. -#[custom] -#SigLevel = Optional TrustAll -#Server = file:///home/custompkgs - diff --git a/rebuildpkgs.in b/rebuildpkgs.in deleted file mode 100644 index a4c8969..0000000 --- a/rebuildpkgs.in +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# This script rebuilds a list of packages in order -# and reports anything that fails -# -# Due to sudo usage, it is recommended to allow makechrootpkg -# to be run with NOPASSWD in your sudoers file -# -# FIXME -# Currently uses $(pwd)/rebuilds as the directory for rebuilding... -# TODO make this work for community too - -m4_include(lib/common.sh) - -if (( $# < 1 )); then - echo "Usage: $(basename $0) <chrootdir> <packages to rebuild>" - echo " example: $(basename $0) ~/chroot readline bash foo bar baz" - exit 1 -fi - -# Source makepkg.conf; fail if it is not found -if [[ -r '/etc/makepkg.conf' ]]; then - source '/etc/makepkg.conf' -else - die '/etc/makepkg.conf not found!' -fi - -bump_pkgrel() { - # Get the current pkgrel from SVN and update the working copy with it - # This prevents us from incrementing out of control :) - pbuild='.svn/text-base/PKGBUILD.svn-base' - oldrel=$(grep 'pkgrel=' $pbuild | cut -d= -f2) - - #remove decimals - rel=$(echo $oldrel | cut -d. -f1) - - newrel=$(($rel + 1)) - - sed -i "s/pkgrel=$oldrel/pkgrel=$newrel/" PKGBUILD -} - -pkg_from_pkgbuild() { - # we want the sourcing to be done in a subshell so we don't pollute our current namespace - export CARCH PKGEXT - (source PKGBUILD; echo "$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT") -} - -chrootdir="$1"; shift -pkgs="$@" - -SVNPATH='svn+ssh://gerolde.archlinux.org/srv/svn-packages' - -msg "Work will be done in $(pwd)/rebuilds" - -REBUILD_ROOT="$(pwd)/rebuilds" -mkdir -p "$REBUILD_ROOT" -cd "$REBUILD_ROOT" - -/usr/bin/svn co -N $SVNPATH - -FAILED="" -for pkg in $pkgs; do - cd "$REBUILD_ROOT/svn-packages" - - msg2 "Building '$pkg'" - /usr/bin/svn update "$pkg" - if [[ ! -d "$pkg/trunk" ]]; then - FAILED="$FAILED $pkg" - warning "$pkg does not exist in SVN" - continue - fi - cd "$pkg/trunk/" - - bump_pkgrel - - if ! sudo makechrootpkg -u -d -r "$chrootdir" -- --noconfirm; then - FAILED="$FAILED $pkg" - error "$pkg Failed!" - else - pkgfile=$(pkg_from_pkgbuild) - if [[ -e $pkgfile ]]; then - msg2 "$pkg Complete" - else - FAILED="$FAILED $pkg" - error "$pkg Failed, no package built!" - fi - fi -done - -cd "$REBUILD_ROOT" -if [[ -n $FAILED ]]; then - msg 'Packages failed:' - for pkg in $FAILED; do - msg2 "$pkg" - done -fi - -msg 'SVN pkgbumps in svn-packages/ - commit when ready' diff --git a/zsh_completion.in b/zsh_completion.in index 727112a..ec07b3b 100644 --- a/zsh_completion.in +++ b/zsh_completion.in @@ -1,45 +1,15 @@ -#compdef archbuild archco archrelease archrm commitpkg finddeps makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg community-testingpkg=commitpkg community-stagingpkg=commitpkg multilibpkg=commitpkg multilib-testingpkg=commitpkg extra-i686-build=archbuild extra-x86_64-build=archbuild testing-i686-build=archbuild testing-x86_64-build=archbuild staging-i686-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild multilib-staging-build=archbuild kde-unstable-i686-build=archbuild kde-unstable-x86_64-build=archbuild gnome-unstable-i686-build=archbuild gnome-unstable-x86_64-build=archbuild communityco=archco - -m4_include(lib/valid-tags.sh) +#compdef finddeps archroot _archbuild_args=( '-c[Recreate the chroot before building]' '-r[Create chroots in this directory]:base_dir:_files -/' ) -_archco_args=( - '*:packages:_devtools_completions_all_packages' -) - -_archrelease_args=( - "*:arch:($_tags[*])" -) - -_archrm_args=( - '1:path:_files -/' -) - -_commitpkg_args=( - "-a[Release to a specific architecture only]:arch:($_arch[*])" - '-l[Set bandwidth limit]:limit' - '1:commit_msg' -) - _finddeps_args=( '1:packages:_devtools_completions_all_packages' ) -_makechrootpkg_args=( - '-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"' - '-c[Clean the chroot before building]' - '-d[Add the package to a local db at /repo after building]' - '-h[Display usage]' - '-l[The directory to use as the working copy]:copy_dir:_files -/' - '-r[The chroot dir to use]:chroot_dir:_files -/' - '-u[Update the working copy of the chroot before building]' -) - -_mkarchroot_args=( +_archroot_args=( '-r[Run a program within the context of the chroot]:app' '-u[Update the chroot via pacman]' '-f[Force overwrite of files in the working-dir]' @@ -50,11 +20,6 @@ _mkarchroot_args=( '-h[Display usage]' ) -_rebuildpkgs_args=( - '1:chroot_dir:_files -/' - '*:packages:_devtools_completions_all_packages' -) - _devtools_completions_all_packages() { typeset -U packages packages=($(_call_program packages pacman -Sql)) |