[Arm-dev] [PATCH 1/2] Forward port CentOS AltArch git machinery

Mon Nov 7 22:20:20 UTC 2016
Christopher Covington <cov at codeaurora.org>

From: Jim Perrin <jperrin at centos.org>

Copy in the git machinery from CentOS AltArch 7.2 (commit
9933f223293366d995fb4759f4f97168a038f5d0) to make the preparation
of patches in series easy.

[Rebase from CentOS AltArch 7.2 onto CentOS AltArch 7.3]
Signed-off-by: Christopher Covington <cov at codeaurora.org>
---
 SOURCES/config-centos-sig |  2 ++
 SPECS/kernel-aarch64.spec | 16 ++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
 create mode 100644 SOURCES/config-centos-sig

diff --git a/SOURCES/config-centos-sig b/SOURCES/config-centos-sig
new file mode 100644
index 0000000..3f73759
--- /dev/null
+++ b/SOURCES/config-centos-sig
@@ -0,0 +1,2 @@
+# This file is for SIG members to add additional configuration options
+# common to CentOS SIGs but not configured in other config files
diff --git a/SPECS/kernel-aarch64.spec b/SPECS/kernel-aarch64.spec
index fa31182..e7af8ae 100644
--- a/SPECS/kernel-aarch64.spec
+++ b/SPECS/kernel-aarch64.spec
@@ -12,11 +12,12 @@ Summary: The Linux kernel
 
 %define rpmversion 4.5.0
 %define pkgrelease 15.el7
+%define centupdate 15.el7
 
 # allow pkg_release to have configurable %{?dist} tag
 %define specrelease %%SPECRELEASE%%
 
-%define pkg_release %{pkgrelease}%{?buildid}
+%define pkg_release %{centupdate}%{?buildid}
 
 # The kernel tarball/base version
 %define rheltarball %{rpmversion}-%{pkgrelease}
@@ -240,6 +241,7 @@ BuildRequires: hostname, net-tools, bc
 BuildRequires: xmlto, asciidoc
 BuildRequires: openssl openssl-devel
 BuildRequires: hmaccalc
+BuildRequires: git
 %ifarch x86_64
 BuildRequires: pesign >= 0.109-4
 %endif
@@ -320,6 +322,7 @@ Source56: config-arm64-redhat
 Source57: config-nodebug-redhat
 Source58: config-generic
 Source59: config-debug
+Source60: config-centos-sig
 
 # empty final patch to facilitate testing of kernel patches
 Patch999999: linux-kernel-test.patch
@@ -640,6 +643,15 @@ make -f %{SOURCE30} VERSION=%{version} configs
 
 ApplyOptionalPatch linux-kernel-test.patch
 
+if [ ! -d .git ]; then
+  git init
+  git config user.email "noreply at centos.org"
+  git config user.name "AltArch Kernel"
+  git config gc.auto 0
+  git add .
+  git commit -a -q -m "baseline"
+fi
+
 # Any further pre-build tree manipulations happen here.
 
 chmod +x scripts/checkpatch.pl
@@ -668,7 +680,7 @@ rm -f kernel-%{version}-*debug.config
 # now run oldconfig over all the config files
 for i in *.config
 do
-  mv $i .config
+  perl merge.pl config-centos-sig $i > .config
   Arch=`head -1 .config | cut -b 3-`
   %{make} ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true
 %if %{listnewconfig_fail}
-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora
Forum, a Linux Foundation Collaborative Project.