Commit 865205df authored by Seblu's avatar Seblu
Browse files
parents
Loading
Loading
Loading
Loading

addpkg

0 → 100755
+10 −0
Original line number Diff line number Diff line
#!/bin/bash

(( $# != 1 )) && echo "usage: ${0##*/} name" && exit 1

mkdir -p "$1"/{repos,trunk}
touch "$1"/trunk/PKGBUILD
svn add "$1"
svn propset svn:keywords 'Id' "$1/trunk/PKGBUILD"

# vim:set ts=2 sw=2 ft=sh noet:

archbuild-dl

0 → 100755
+59 −0
Original line number Diff line number Diff line
#!/bin/bash

pkg_host='root@whooper.v.seblu.net'
pkg_base='/root/packages'
pkg_regex=''
arch_regexp="($(uname -m)|any)"

usage() {
	echo "usage: ${0##*/} <list|get|install> [pkg_regex] [arch_regexp] [pkg_base] [pkg_host]" >&2
	echo 'default:'
	echo "   pkg_host: $pkg_host"
	echo "   pkg_regex: $pkg_regex"
	echo "   pkg_base: $pkg_base"
	echo "   arch_regex: $arch_regexp"
	exit 1
}

(( $# >= 1 )) || usage

case $1 in
	list|get|install) action="$1";;
	*) usage;;
esac

[[ -n "$2" ]] && pkg_regex=$2
[[ -n "$3" ]] && arch_regexp=$3
[[ -n "$4" ]] && pkg_base=$4
[[ -n "$5" ]] && pkg_host=$5

list_tmp=$(mktemp)
ssh "$pkg_host" \
"find '$pkg_base' -type f \
-regextype posix-egrep -regex '.*/$pkg_regex.*-$arch_regexp.pkg\.tar\.xz'" \
</dev/null >"$list_tmp" 2>/dev/null
exec 3<>"$list_tmp"

while read -u 3 -r line; do
	[[ $line ]] || continue
	case $action in
	list)
		echo "$line"
		;;
	get)
		[[ -f $(basename $line) ]] &&
			echo "==> $(basename $line): already exists. skipped!" && continue
		scp "$pkg_host:$line" .
		;;
	install)
		(( EUID == 0 )) && pacman='pacman' || pacman='sudo pacman'
		pkg_tmp=$(mktemp)
		scp "$pkg_host:$line" "$pkg_tmp" && $pacman -U "$pkg_tmp"
		rm -f "$pkg_tmp"
		;;
	esac
done

rm -f "$list_tmp"

# vim:set ts=2 sw=2 ft=sh noet:

aurdown

0 → 100755
+13 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2012 Seblu

(( $# < 1 )) && echo "usage: ${0##*/} <pkgsource> [pkgsource]..." >&2

for pkg; do
  [[ -e "$pkg.tar.gz" ]] && echo "$pkg.tar.gz already exists. skipped!" >&2 && continue
	wget "http://aur.archlinux.org/packages/${pkg:0:2}/$pkg/$pkg.tar.gz" || continue
  tar -xvv --no-same-owner --no-same-permissions -f "$pkg.tar.gz"
  (( $UID == 0 )) && chown -R nobody:nobody "$pkg"
done

# vim:set ts=2 sw=2 ft=sh et:

go2chroot

0 → 100755
+17 −0
Original line number Diff line number Diff line
#!/bin/bash

base='/var/lib/archbuild'

# list chroots
if (( $# == 0 )); then
	cd "$base"
	ls --color -1d */{copy,root}
	exit 0
fi

if [[ "$1" =~ i686 ]]; then
	linux32 mkarchroot -r bash "$base/$1"
elif [[ "$1" =~ x86_64 ]]; then
	linux64 mkarchroot -r bash "$base/$1"
fi

pacman-seblu.conf

0 → 100644
+98 −0
Original line number Diff line number Diff line
#
# /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

# PGP signature checking
# NOTE: None of this will work without running `pacman-key --init` first.
# The compiled in default is equivalent to the following line. This requires
# you to locally sign and trust packager keys using `pacman-key` for them to be
# considered valid.
#SigLevel = Optional TrustedOnly
# If you wish to check signatures but avoid local sign and trust issues, use
# the following line. This will treat any key imported into pacman's keyring as
# trusted.
#SigLevel = Optional TrustAll
# For now, off by default unless you read the above.
SigLevel = Never

#
# 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]
#Include = /etc/pacman.d/mirrorlist
[seblu]
Server = http://127.0.0.1/archlinux/$repo/$arch

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
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