17
0
Files
raspberrypi-tools/get-from-git.sh
Matthias Brugger 1fc3202df8 Accepting request 878066 from home:iivanov
PSCI Secure Monitor implementation running in EL3 for Cortex-A72
This fixes bsc#1173489 (vulnerable to spec_store_bypass, spectre_v2)

OBS-URL: https://build.opensuse.org/request/show/878066
OBS-URL: https://build.opensuse.org/package/show/hardware:boot/raspberrypi-tools?expand=0&rev=1
2021-03-11 12:29:08 +00:00

31 lines
820 B
Bash

#!/bin/bash
# this is a huge hunk of stuff, so reuse the local repo if possible
if [ -d tools/.git ]; then
cd tools
git pull -r
cd ..
else
set -e
git clone --depth 1 https://github.com/raspberrypi/tools.git
set +e
fi
TOPDIR=$(pwd)
SOURCES="armstubs/armstub8.S armstubs/Makefile"
cd tools
LINE=$(git log --format=format:"%h %ai" -- ${SOURCES}|head -n 1)
set -- $LINE
REV=$1
DATE=$2
VER=${DATE//-/.}
set -e
git archive --prefix=raspberrypi-tools-$VER/ -o $TOPDIR/raspberrypi-tools-${VER}.tar master -- ${SOURCES}
cd $TOPDIR
osc rm -f raspberrypi-tools-*.tar.bz2 || true
bzip2 --force raspberrypi-tools-${VER}.tar
osc add raspberrypi-tools-${VER}.tar.bz2
sed -i "s/^Version:.*/Version: $VER/" raspberrypi-tools.spec;
osc vc raspberrypi-tools -m "Update to $REV ($DATE)"
osc service localrun format_spec_file