Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Benes <mbenes@suse.cz>2017-11-30 15:15:20 +0100
committerMiroslav Benes <mbenes@suse.cz>2017-11-30 15:15:20 +0100
commit95ed856ea8f99b4e48d7d324278b3628d2ac2fa2 (patch)
tree0e3e21600a4726659584a13808643753548241f5
parent237c8f3d13c382321d3e65d138d328eae0b82f6c (diff)
scripts: Generate ExclusiveArch in spec file dynamically
ppc64le architecture kernel support is not present in all currently supported branches. It may cause problem for the maintenance team. Generate ExclusiveArch dynamically. It should be 'ppc64le x86_64' for SLE12-SP3 and 'x86_64' for the rest. Signed-off-by: Miroslav Benes <mbenes@suse.cz>
-rw-r--r--rpm/kgraft-patch.spec2
-rwxr-xr-xscripts/tar-up.sh8
2 files changed, 9 insertions, 1 deletions
diff --git a/rpm/kgraft-patch.spec b/rpm/kgraft-patch.spec
index fb01732..95af48c 100644
--- a/rpm/kgraft-patch.spec
+++ b/rpm/kgraft-patch.spec
@@ -34,7 +34,7 @@ Source6: shadow.c
Source7: shadow.h
@@KGR_PATCHES_SOURCES@@
BuildRequires: kernel-syms kgraft-devel
-ExclusiveArch: ppc64le x86_64
+ExclusiveArch: @@EXCARCH@@
%kgraft_module_package
%description
diff --git a/scripts/tar-up.sh b/scripts/tar-up.sh
index ab15ed2..a2aa613 100755
--- a/scripts/tar-up.sh
+++ b/scripts/tar-up.sh
@@ -93,12 +93,20 @@ if test -n "$branch"; then
echo "GIT Branch: $branch" >>$build_dir/$tsfile
fi
+# ExclusiveArch
+if [[ $RELEASE == SLE12-SP3* ]]; then
+ excarch='ppc64le x86_64'
+else
+ excarch='x86_64'
+fi
+
sed -i \
-e "s/@@RELEASE@@/$RELEASE/g" \
-e "/@@SOURCE_TIMESTAMP@@/ {
e echo -n 'Source timestamp: '; cat $build_dir/$tsfile
d
}" \
+ -e "s/@@EXCARCH@@/$excarch/" \
$build_dir/kgraft-patch-"$RELEASE".spec
# changelog