core/getconfig
Ludwig Nussel 978346df45 Fix kernel
2022-11-07 11:23:31 +01:00

30 lines
910 B
Bash
Executable File

#!/bin/bash
set -e
version=$(curl -sf https://download.opensuse.org/history/latest)
curl -s -f https://api.opensuse.org/public/source/openSUSE:Factory/_config > _config.factory
curl -s -f https://api.opensuse.org/public/source/openSUSE:Factory:Rings:0-Bootstrap/_config > _config.ring0
cat > _config.new << EOF
%define _project openSUSE:Factory:Rings:0-Bootstrap
# for glibc
%define disable_32bit 1
Macros:
%disable_32bit 1
:Macros
%if "%_project" == "openSUSE:Factory:Rings:0-Bootstrap" || "%_project" == "openSUSE:Factory:ARM:Rings:0-Bootstrap"
BuildFlags: excludebuild:kernel-source
%endif
EOF
cat _config.factory _config.ring0 >> _config.new
sed -i -e "/^RepoURL:/s,/tumbleweed,/history/$version/tumbleweed," _config.new
# boo#1204790
sed -i -e 's/glibc-devel-32bit.*/glibc-devel-32bit/' _config.new
if [ -e _config ] && cmp -s _config.new _config; then
rm _config.new
else
mv _config.new _config
fi