diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/bash_completion.d/youri | 141 | ||||
-rw-r--r-- | etc/check.conf | 300 | ||||
-rw-r--r-- | etc/upload.conf | 139 |
3 files changed, 580 insertions, 0 deletions
diff --git a/etc/bash_completion.d/youri b/etc/bash_completion.d/youri new file mode 100644 index 0000000..55e285d --- /dev/null +++ b/etc/bash_completion.d/youri @@ -0,0 +1,141 @@ +# youri tools completion +# $Id$ + +_youri-check() +{ + + local cur prev config i mode + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --config) + _filedir + return 0 + ;; + --skip-plugin) + _find_config check.conf + if [ -n "$config" ]; then + # try to guess mode + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" != -* ]]; then + mode=${COMP_WORDS[i]} + break + fi + done + + if [ -n $mode ]; then + COMPREPLY=( $( awk -F= '/^'$mode's/ {print $2}' $config \ + | grep "^$cur" ) ) + fi + fi + return 0 + ;; + --skip-media) + _find_config check.conf + if [ -n "$config" ]; then + COMPREPLY=( $( awk -F= '/^medias/ {print $2}' $config \ + | grep "^$cur" ) ) + fi + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--config --skip-plugin --skip-media -h \ + --help -t --test -v --verbose' -- $cur ) ) + else + _count_args + case $args in + 1) + COMPREPLY=( $( compgen -W 'input output' -- $cur ) ) + ;; + esac + fi + +} +complete -F _youri-check youri-check + +_youri-upload() +{ + + local cur prev config + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + case "$prev" in + --config) + _filedir + return 0 + ;; + --skip-check) + _find_config upload.conf + if [ -n "$config" ]; then + COMPREPLY=( $( awk -F= '/^checks/ {print $2}' $config \ + | grep "^$cur" ) ) + fi + return 0 + ;; + --skip-action) + _find_config upload.conf + if [ -n "$config" ]; then + COMPREPLY=( $( awk -F= '/^actions/ {print $2}' $config \ + | grep "^$cur" ) ) + fi + return 0 + ;; + esac + + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--config --skip-check --skip-action \ + --define -h --help -t --test -v --verbose' -- $cur ) ) + else + _count_args + case $args in + 1) + _find_config upload.conf + if [ -n "$config" ]; then + COMPREPLY=( $( awk -F= '/^targets/ {print $2}' $config \ + | grep "^$cur" ) ) + fi + ;; + *) + _filedir + ;; + esac + fi + +} +complete -F _youri-upload youri-upload + +_find_config() +{ + local name i + + name=$1 + + for (( i=1; i < COMP_CWORD; i++ )); do + if [[ "${COMP_WORDS[i]}" == --config ]]; then + config=${COMP_WORDS[i+1]} + break + fi + done + if [ -f "$config" ]; then + return 0 + fi + + if [ -f "$HOME/.youri/$name" ]; then + config=$HOME/.youri/$name + return 0 + fi + + if [ -f "/etc/youri/$name" ]; then + config=/etc/youri/$name + return 0 + fi + +} diff --git a/etc/check.conf b/etc/check.conf new file mode 100644 index 0000000..cf595e4 --- /dev/null +++ b/etc/check.conf @@ -0,0 +1,300 @@ +# youri-check sample configuration file +# $Id: check.conf 919 2006-06-15 16:13:11Z pterjan $ + +# resolver declaration +resolver = cgi + +# preferences declaration +preferences = file_pref + +# resultset declaration +resultset = dbi + +# input plugins declaration +inputs = rpmlint \ + age \ + updates \ + build \ + conflicts \ + dependencies \ + missing \ + orphans + +# output plugins declaration +outputs = file mail + +# medias declaration +medias = main.i586 \ + main.x86_64 \ + main.sources \ + contrib.i586 \ + contrib.x86_64 \ + contrib.sources \ + free \ + non-free \ + free.sources \ + non-free.sources + +# helper variables +mirror = ftp://ftp.free.fr/pub/Distributions_Linux/Mandrakelinux/devel/cooker +mirror_i586 = $mirror/i586/media +mirror_x86_64 = $mirror/x86_64/media + +# resolver definition +[cgi] +class = Youri::Check::Maintainer::Resolver::CGI +url = http://plf.zarb.org/cgi-bin/maintainers.cgi + +# preferences definition +[file_pref] +class = Youri::Check::Maintainer::Preferences::File + +# resultset definition +[dbi] +class = Youri::Check::Resultset::DBI +driver = mysql +host = localhost +base = plf_youri +user = plf +pass = s3kr3t + +# checks definitions +[updates] +class = Youri::Check::Input::Updates +aliases = <<EOF +--- #YAML:1.0 +libfame0.8: ~ +EOF +sources = <<EOF +--- #YAML:1.0 +debian: + class: Youri::Check::Input::Updates::Source::Debian + aliases: + fuse-emulator: ~ +cpan: + class: Youri::Check::Input::Updates::Source::CPAN +fedora: + class: Youri::Check::Input::Updates::Source::Fedora +gentoo: + class: Youri::Check::Input::Updates::Source::Gentoo +freshmeat: + class: Youri::Check::Input::Updates::Source::Freshmeat +netbsd: + class: Youri::Check::Input::Updates::Source::NetBSD +raa: + class: Youri::Check::Input::Updates::Source::RAA +sourceforge: + class: Youri::Check::Input::Updates::Source::Sourceforge + aliases: + openquicktime: ~ + klibido: ~ +EOF + +[rpmlint] +class = Youri::Check::Input::Rpmlint + +[age] +class = Youri::Check::Input::Age +max_age = 12 months +pattern = %m months + +[dependencies] +class = Youri::Check::Input::Dependencies + +[conflicts] +class = Youri::Check::Input::Conflicts + +[build] +class = Youri::Check::Input::Build +sources = <<EOF +--- #YAML:1.0 +stefan: + class: Youri::Check::Input::Build::Source::LBD + url: http://eijk.homelinux.org/build/ + medias: + - cooker_plf-free + - cooker_plf-non-free + archs: + - i586 +EOF + +[missing] +class = Youri::Check::Input::Missing + +[orphans] +class = Youri::Check::Input::Orphans + +# reports definitions +[file] +class = Youri::Check::Output::File +to = ${HOME}/www/qa +global = 1 +individual = 1 +formats = <<EOF +--- #YAML:1.0 +html: + class: Youri::Check::Output::File::Format::HTML +text: + class: Youri::Check::Output::File::Format::Text +rss: + class: Youri::Check::Output::File::Format::RSS +EOF + +[mail] +class = Youri::Check::Output::Mail +mta = /usr/sbin/sendmail +to = plf-admin@zarb.org +from = plf@zarb.org +reply_to = plf-admin@zarb.org +formats = <<EOF +--- #YAML:1.0 +text: + class: Youri::Check::Output::Mail::Format::Text +EOF + +# media definitions +[main.i586] +class = Youri::Media::URPM +name = main +type = binary +path = $mirror_i586/main +hdlist = $mirror_i586/media_info/hdlist_main.cz +skip_inputs = <<EOF +--- #YAML:1.0 +- all +EOF + +[main.x86_64] +class = Youri::Media::URPM +name = main +type = binary +path = $mirror_x86_64/main +hdlist = $mirror_x86_64/media_info/hdlist_main.cz +skip_inputs = <<EOF +--- #YAML:1.0 +- all +EOF + +[main.sources] +class = Youri::Media::URPM +name = main +type = source +path = $mirror_i586/main +hdlist = $mirror_i586/media_info/hdlist_main.src.cz +skip_inputs = <<EOF +--- #YAML:1.0 +- all +EOF + +[contrib.i586] +class = Youri::Media::URPM +name = contrib +type = binary +path = $mirror_i586/contrib +hdlist = $mirror_i586/media_info/hdlist_contrib.cz +skip_inputs = <<EOF +--- #YAML:1.0 +- all +EOF + +[contrib.x86_64] +class = Youri::Media::URPM +name = contrib +type = binary +path = $mirror_x86_64/contrib +hdlist = $mirror_x86_64/media_info/hdlist_contrib.cz +skip_inputs = <<EOF +--- #YAML:1.0 +- all +EOF + +[contrib.sources] +class = Youri::Media::URPM +name = contrib +type = source +path = $mirror_i586/contrib +hdlist = $mirror_i586/media_info/hdlist_contrib.src.cz +skip_inputs = <<EOF +--- #YAML:1.0 +- all +EOF + +[free] +class = Youri::Media::URPM +name = free +type = binary +path = ${HOME}/ftp/mandrake/free/cooker/i586 +hdlist = ${HOME}/ftp/mandrake/free/cooker/i586/hdlist.cz +rpmlint_config = ${HOME}/etc/rpmlint-free.conf +allow_deps = <<EOF +--- #YAML:1.0 +- main.i586 +- main.x86_64 +- contrib.i586 +- contrib.x86_64 +- free +EOF +allow_srcs = <<EOF +--- #YAML:1.0 +- free.sources +- main.sources +- contrib.sources +EOF +skip_archs = <<EOF +--- #YAML:1.0 +- ppc +EOF + +[free.sources] +class = Youri::Media::URPM +name = free +type = source +path = ${HOME}/ftp/mandrake/free/src +hdlist = ${HOME}/ftp/mandrake/free/src/hdlist.cz +rpmlint_config = ${HOME}/etc/rpmlint-free.conf +allow_deps = <<EOF +--- #YAML:1.0 +- main.i586 +- contrib.i586 +- free +EOF + +[non-free] +class = Youri::Media::URPM +name = non-free +type = binary +path = ${HOME}/ftp/mandrake/non-free/cooker/i586 +hdlist = ${HOME}/ftp/mandrake/non-free/cooker/i586/hdlist.cz +rpmlint_config = ${HOME}/etc/rpmlint-non-free.conf +allow_deps = <<EOF +--- #YAML:1.0 +- main.i586 +- main.x86_64 +- contrib.i586 +- contrib.x86_64 +- free +- non-free +EOF +allow_srcs = <<EOF +--- #YAML:1.0 +- non-free.sources +EOF +skip_archs = <<EOF +--- #YAML:1.0 +- ppc +EOF + +[non-free.sources] +class = Youri::Media::URPM +name = non-free +type = source +path = ${HOME}/ftp/mandrake/non-free/src +hdlist = ${HOME}/ftp/mandrake/non-free/src/hdlist.cz +rpmlint_config = ${HOME}/etc/rpmlint-non-free.conf +allow_deps = <<EOF +--- #YAML:1.0 +- main.i586 +- contrib.i586 +- free +- non-free +EOF diff --git a/etc/upload.conf b/etc/upload.conf new file mode 100644 index 0000000..efc6f04 --- /dev/null +++ b/etc/upload.conf @@ -0,0 +1,139 @@ +# youri-upload sample configuration file +# $Id: upload.conf 857 2006-04-07 18:46:33Z guillomovitch $ + +# repository declaration +repository = plf + +# targets declaration +targets = cooker 2006.0 + +# repository definition +[plf] +class = Youri::Repository::PLF +install_root = ${HOME}/ftp/mandriva +version_root = ${HOME}/cvs +archive_root = ${HOME}/backup/mandriva +noarch = i586 + +# targets definition +[cooker] +checks = <<EOF +--- #YAML:1.0 +- tag +- recency +- history +EOF +actions = <<EOF +--- #YAML:1.0 +- sign +- install +- link +- archive +- clean +- bugzilla +- cvs +- mail +- rss +EOF + +[2006.0] +checks = <<EOF +--- #YAML:1.0 +- type +- tag +- recency +- history +- precedence +EOF +actions = <<EOF +--- #YAML:1.0 +- sign +- install +- link +- archive +- clean +EOF + +# checks definition +[tag] +class = Youri::Upload::Check::Tag +tags = <<EOF +--- #YAML:1.0 +release: 'plf$' +packager: '<\w+@zarb\.org>$' +distribution: '^Mandriva Linux$' +vendor: '^Penguin Liberation Front$' +EOF + +[recency] +class = Youri::Upload::Check::Recency + +[history] +class = Youri::Upload::Check::History + +[precedence] +class = Youri::Upload::Check::Precedence +target = cooker + +[type] +class = Youri::Upload::Check::Type +type = binary + +# actions definitions +[sign] +class = Youri::Upload::Action::Sign +name = plf@zarb.org +path = ${HOME}/.gnupg +passphrase = s3kr3t + +[install] +class = Youri::Upload::Action::Install + +[link] +class = Youri::Upload::Action::Link + +[archive] +class = Youri::Upload::Action::Archive + +[clean] +class = Youri::Upload::Action::Clean + +[mail] +class = Youri::Upload::Action::Mail +mta = /usr/sbin/sendmail +to = plf-announce@zarb.org +reply_to = plf-discuss@zarb.org +from = plf@zarb.org +prefix = RPM +cc = <<EOF +--- #YAML:1.0 +hot-base: david@dindinx.org bellamy@neverland.net +dcgui: mathen@ketelhot.de +dclib: mathen@ketelhot.de +Video-DVDRip: dvdrip-users@exit1.org +hackVideo-DVDRip: dvdrip-users@exit1.org +goosnes: tak@bard.sytes.net +avidemux: fixounet@free.fr +vobcopy: robos@muon.de +drip: drip-devel@lists.sourceforge.net +libdscaler: vektor@dumbterm.net +xawdecode: pingus77@ifrance.com +EOF + +[rss] +class = Youri::Upload::Action::RSS +file = ${HOME}/www/changelog.rss +title = PLF packages updates +link = http://plf.zarb.org/ +description = ChangeLog for PLF packages + +[cvs] +class = Youri::Upload::Action::CVS + +[bugzilla] +class = Youri::Upload::Action::Bugzilla +host = localhost +base = plf_bugs +user = plf +pass = s3kr3t +contact = plf@zarb.org |