diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fast-build.sh | 13 | ||||
-rwxr-xr-x | scripts/fast-x86_64 | 3 | ||||
-rwxr-xr-x | scripts/generate-git-snapshot.sh | 18 | ||||
-rwxr-xr-x | scripts/grab-logs.sh | 31 |
4 files changed, 53 insertions, 12 deletions
diff --git a/scripts/fast-build.sh b/scripts/fast-build.sh new file mode 100755 index 000000000..8286a110f --- /dev/null +++ b/scripts/fast-build.sh @@ -0,0 +1,13 @@ +#! /bin/sh +# Description: +# rpmbuild combo to build the given architecture without +# debugging information, perf or tools. +# +# Sample usage: +# ./fast-build.sh x86_64 kernel-4.7.0-0.rc1.git1.2.fc25.src.rpm + +if [ -z "$1" ] || [ -z "$2" ]; then + echo "usage: $0 [ arch ] [ kernel-x.x.x.fcxx.src.rpm ] " +fi + +rpmbuild --target $1 --without debug --without debuginfo --without perf --without tools --rebuild $2 diff --git a/scripts/fast-x86_64 b/scripts/fast-x86_64 deleted file mode 100755 index 649ef6525..000000000 --- a/scripts/fast-x86_64 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -rpmbuild --target x86_64 --without debuginfo --without perf --without tools --rebuild $1 diff --git a/scripts/generate-git-snapshot.sh b/scripts/generate-git-snapshot.sh index 3da20a1b1..972fd2148 100755 --- a/scripts/generate-git-snapshot.sh +++ b/scripts/generate-git-snapshot.sh @@ -1,14 +1,26 @@ #!/bin/sh +# This script allows for the generation of a git snapshot between the upstream +# git tree and the current tree. # -# Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc or wherever. +# Prerequisites: +# Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc +# or wherever. -[ ! -d "$LINUX_GIT" ] && echo "error: set \$LINUX_GIT to point at upstream git tree" && exit 1 +# Look to see if LINUX_GIT is set in local .bashrc +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi + +if [ ! -d "$LINUX_GIT" ]; then + echo "error: set \$LINUX_GIT to point at upstream git tree" + exit 1 +fi VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz//) if [ -z "$VER" ] ; then - VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz//) + VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz//) fi OLDGIT=$(grep gitrev kernel.spec | head -n1 | sed s/%define\ gitrev\ //) diff --git a/scripts/grab-logs.sh b/scripts/grab-logs.sh index 5df573571..571b503bb 100755 --- a/scripts/grab-logs.sh +++ b/scripts/grab-logs.sh @@ -1,16 +1,35 @@ #!/bin/sh +# Script helps download the build logs for the current tree. +# The downloaded logs will be saved in a logs/ within the +# tree. + +BASEDIR="$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")" +pushd $BASEDIR > /dev/null VER=$(fedpkg verrel) ver=$(echo $VER | sed -e 's/-/ /g' | awk '{print $2}') rev=$(echo $VER | sed -e 's/-/ /g' | awk '{print $3}') -if [ -d logs ]; then - DIR=logs/ +# keep logs in one place. If logs directory does not exist, make it. +if [ -d "$BASEDIR/logs" ]; then + DIR="$BASEDIR/logs" else - DIR=./ + mkdir "$BASEDIR/logs" + DIR="$BASEDIR/logs" fi -wget -O $DIR/build-$VER-i686.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/i686/build.log -wget -O $DIR/build-$VER-x86-64.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/x86_64/build.log -wget -O $DIR/build-$VER-noarch.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/noarch/build.log +# Common architectures that have build logs. +ARCHS[0]=i686 +ARCHS[1]=x86_64 +ARCHS[2]=noarch +ARCHS[3]=armv7hl +for arch in ${ARCHS[@]}; do + URL=http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/$arch/build.log + # Only download logs if exist + wget --spider -q $URL + if [ $? -eq 0 ]; then + wget -O $DIR/build-$VER-$arch.log $URL + fi +done +popd > /dev/null |