1
0

Accepting request 866652 from home:nsaenzjulienne:branches:hardware:boot

Introduce _service file, get rid of get-from-git.sh

OBS-URL: https://build.opensuse.org/request/show/866652
OBS-URL: https://build.opensuse.org/package/show/hardware:boot/raspberrypi-eeprom?expand=0&rev=4
This commit is contained in:
Nicolas Patricio Saenz Julienne 2021-01-25 18:25:16 +00:00 committed by Git OBS Bridge
parent 57fe1607f8
commit 1fa1ac4e17
6 changed files with 21 additions and 37 deletions

11
_service Normal file
View File

@ -0,0 +1,11 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/raspberrypi/rpi-eeprom.git</param>
<param name="filename">raspberrypi-eeprom</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@~g%h</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="tar" mode="buildtime"/>
</services>

View File

@ -1,31 +0,0 @@
#!/bin/bash
# this is a huge hunk of stuff, so reuse the local repo if possible
if [ -d rpi-eeprom/.git ]; then
cd rpi-eeprom
git pull
cd ..
else
set -e
git clone --depth 1 https://github.com/raspberrypi/rpi-eeprom.git
set +e
fi
TOPDIR=$(pwd)
SOURCES="rpi-eeprom-* firmware LICENSE"
cd rpi-eeprom
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-eeprom-$VER/ -o $TOPDIR/raspberrypi-eeprom-${VER}.tar master -- ${SOURCES}
cd $TOPDIR
osc rm -f raspberrypi-eeprom-*.tar.bz2 || true
bzip2 --force raspberrypi-eeprom-${VER}.tar
osc add raspberrypi-eeprom-${VER}.tar.bz2
sed -i "s/^Version:.*/Version: $VER/" raspberrypi-eeprom.spec
osc vc raspberrypi-eeprom -m "Update to $REV ($DATE)"
osc service localrun format_spec_file

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b51e37140c851b1bc16a10080fac43e542a9dc1e87bfebf67b400c4b53218096
size 26358797

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:87a8fb2c186dd92a52b6a9a255c75fc0ccea6fbc5be5e5393e4b307bbe6ddee5
size 5210072

View File

@ -0,0 +1,5 @@
name: raspberrypi-eeprom
version: 2020.09.03138a1.63~g3ae6694
mtime: 1611505181
commit: 3ae6694fbbea25a689ae279cb08ca3cb0e5253d2

View File

@ -17,14 +17,13 @@
Name: raspberrypi-eeprom
Version: 2021.01.21
Version: 2020.09.03138a1.63~g3ae6694
Release: 0
Summary: Raspberry Pi 4 EEPROM firmware
License: SUSE-Firmware
Group: System/Boot
URL: https://github.com/raspberrypi/rpi-eeprom
Source0: raspberrypi-eeprom-%{version}.tar.bz2
Source1: get-from-git.sh
Source0: %{name}-%{version}.tar
Patch0: add-suse-config.patch
Patch1: dont-use-env.patch
Provides: rpi-eeprom