From: Marcin Krol Date: Thu, 28 Jul 2016 17:19:43 +0000 (+0000) Subject: - cleanup X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=5f389d0421ebe1442185027b132cd35ca14ff9b4;p=tld-builder.git - cleanup --- diff --git a/client/rebuild-th-kernel.sh b/client/rebuild-th-kernel.sh deleted file mode 100644 index 3688bae..0000000 --- a/client/rebuild-th-kernel.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh -set -e - -dir=$(cd "$(dirname "$0")"; pwd) -rpmdir=$(rpm -E %_topdir) -dist=th - -pkgs_head=" - dahdi-linux - e1000e - igb - ipset - ixgbe - linuxrdac - lirc - madwifi-ng - open-vm-tools - r8168 - VirtualBox - xorg-driver-video-fglrx - xorg-driver-video-fglrx-legacy-12.x - xorg-driver-video-nvidia - xtables-addons -" - -pkgs_longterm=" - iscsitarget - openvswitch - xorg-driver-video-nvidia-legacy3 -" - -# autotag from rpm-build-macros -# displays latest used tag for a specfile -autotag() { - local out spec pkg - for spec in "$@"; do - # strip branches - pkg=${spec%:*} - # ensure package ends with .spec - spec=${pkg%.spec}.spec - # and pkg without subdir - pkg=${pkg#*/} - # or .ext - pkg=${pkg%%.spec} - out=$(cvs status -v $spec | awk "!/Sticky/&&/auto-$dist-$pkg-$alt_kernel/{if (!a++) print \$1}") - echo "$spec:$out" - done -} - -get_last_tags() { - local pkg spec - - echo >&2 "Fetching package tags: $*..." - for pkg in "$@"; do - echo >&2 "$pkg... " - if [ ! -e $pkg/$pkg.spec ]; then - $rpmdir/builder -g $pkg -ns -r HEAD 1>&2 - fi - if [ ! -e $pkg/$pkg.spec ]; then - # just print it out, to fallback to base pkg name - echo "$pkg" - else - spec=$(autotag $pkg/$pkg.spec) - spec=${spec#*/} - echo >&2 "... $spec" - echo $spec - fi - done -} - -cd $rpmdir -case "$1" in - head) - kernel=$(get_last_tags kernel) - kernel=$(echo ${kernel#*auto-??-} | tr _ .) - specs="" - for pkg in $pkgs_head; do - echo >&2 "Rebuilding $pkg..." - $rpmdir/builder -g $pkg -ns - $rpmdir/relup.sh -m "rebuild for $kernel" -ui $pkg/$pkg.spec - specs="$specs $pkg.spec" - done - $dir/make-request.sh -nd -r -d $dist $specs - ;; - longterm) - kernel=$(alt_kernel=longterm get_last_tags kernel) - kernel=$(echo ${kernel#*auto-??-} | tr _ .) - specs="" - for pkg in $pkgs_longterm; do - echo >&2 "Rebuilding $pkg..." - $rpmdir/builder -g $pkg -ns - $rpmdir/relup.sh -m "rebuild for $kernel" -ui $pkg/$pkg.spec - specs="$specs $pkg.spec" - done - # first build with main pkg (userspace), later build from tag - $dir/make-request.sh -nd -r -d $dist --without kernel $specs - - specs=$(get_last_tags $pkgs_head $pkgs_longterm) - $dir/make-request.sh -nd -r -d $dist --kernel longterm --without userspace $specs - ;; - *) - # try to parse all args, filling them with last autotag - while [ $# -gt 0 ]; do - case "$1" in - --kernel|--with|--without) - args="$1 $2" - shift - ;; - -*) - args="$args $1" - ;; - *) - specs="$specs $1" - ;; - esac - shift - done - specs=$(get_last_tags $specs) - $dir/make-request.sh -nd -r -d $dist $args $specs - ;; -esac