From: Don Zickus dzickus@redhat.com
The kernel workflow is adding complexity. Let's hide some of that complexity behind git aliases. Instead of having the developer manually add them all the time, add a make command to 'include' kernel aliases.
A new command 'make rh-gitsetup' runs
git config --local --add include.path "../redhat/kernel.gitconfig"
and adds an include to the local repo's .git/config file.
Over time more workflow commands can be added to help developers.
Start with a stub config file.
V5: text cleanups V4: s/gitconfig/gitsetup V3: expand comment in kernel.gitconfig
Signed-off-by: Don Zickus dzickus@redhat.com --- redhat/Makefile | 6 ++++++ redhat/kernel.gitconfig | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 redhat/kernel.gitconfig
diff --git a/redhat/Makefile b/redhat/Makefile index 0118e5b9e2e9..9236fdb1418a 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -133,6 +133,10 @@ rh-kabi-dw-check: rh-kabi @echo "**** End of KABI DWARF-based comparison report ****" @rm -rf $(KABIDW)/base/$(CURARCH).tmp
+rh-gitsetup: + @git config --get include.path | grep -q 'redhat/kernel.gitconfig' || \ + git config --local --add include.path "../redhat/kernel.gitconfig" + rh-configs-commit: rh-configs-prep @cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh $(FLAVOR) 1; \ ./process_configs.sh -z $(PACKAGE_NAME) $(KVERSION) "" $(FLAVOR) @@ -363,6 +367,7 @@ rh-help: @echo ' rh-cross-all-rpms - Build RPMs for all supported archs using a cross compiler.' @echo '' @echo 'Configuration targets:' + @echo ' rh-gitsetup - include redhat/kernel.gitconfig in repo git config' @echo ' rh-configs - Create RHEL config files in redhat/config/.' @echo '' @echo 'For detailed description and full list of targets, run `make rh-full-help`.' @@ -442,6 +447,7 @@ rh-full-help:
@echo '' @echo 'Configuration targets:' + @echo ' rh-gitsetup - include redhat/kernel.gitconfig in repo git config' @echo ' rh-configs - Creates config files for RHEL $(RHEL_MAJOR) architectures, cleans them' @echo ' by running make nonint_oldconfig, and copies them to' @echo ' redhat/configs/ directory. This is the target to use for a config!' diff --git a/redhat/kernel.gitconfig b/redhat/kernel.gitconfig new file mode 100644 index 000000000000..6fd63c7ac1aa --- /dev/null +++ b/redhat/kernel.gitconfig @@ -0,0 +1,10 @@ +# The kernel workflow is growing in complexity. Developers can not always +# remember all the nuisances involved. +# This file is meant to aid developers by providing wrappers around some +# parts of the workflow that everyone can use. +# +# Examples include 'aliases' for git-push options or a shortcut for +# executing workflow checks before pushing. +# +# Please do not include personal information here. +[alias]
On Thu, 14 May 2020 01:41:12 -0000, GitLab Bridge on behalf of dzickusrh wrote:
@@ -363,6 +367,7 @@ rh-help: @echo ' rh-cross-all-rpms - Build RPMs for all supported archs using a cross compiler.' @echo '' @echo 'Configuration targets:'
- @echo ' rh-gitsetup - include redhat/kernel.gitconfig in repo git config'
Please make this a full sentence, starting with a capital letter and ending with a period to match the other help texts.
Also, in the basic rh-help, avoid explaining what is going on under the hood but explain what is the effect of the target. Saying "include another gitconfig" is not helpful without looking into that file. The help text should rather be something like "Adjust git repo configuration for Fedora/CentOS/RHEL workflow." In the rh-full-help, you can elaborate on that.
Lastly, you'll have to sync with Prarit's rh -> dist conversion, these two patches collide.
Politely, Nacked-by: Jiri Benc jbenc@redhat.com
Jiri
From: Don Zickus dzickus@redhat.com
The kernel workflow is adding complexity. Let's hide some of that complexity behind git aliases. Instead of having the developer manually add them all the time, add a make command to 'include' kernel aliases.
A new command 'make rh-gitsetup' runs
git config --local --add include.path "../redhat/kernel.gitconfig"
and adds an include to the local repo's .git/config file.
Over time more workflow commands can be added to help developers.
Start with a stub config file.
V6: rebase to dist- changes, text changes V5: text cleanups V4: s/gitconfig/gitsetup V3: expand comment in kernel.gitconfig
Signed-off-by: Don Zickus dzickus@redhat.com --- redhat/Makefile | 8 ++++++++ redhat/kernel.gitconfig | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 redhat/kernel.gitconfig
diff --git a/redhat/Makefile b/redhat/Makefile index 1465469cab95..858240325bf2 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -133,6 +133,10 @@ dist-kabi-dw-check: dist-kabi @echo "**** End of KABI DWARF-based comparison report ****" @rm -rf $(KABIDW)/base/$(CURARCH).tmp
+dist-gitsetup: + @git config --get include.path | grep -q 'redhat/kernel.gitconfig' || \ + git config --local --add include.path "../redhat/kernel.gitconfig" + dist-configs-commit: dist-configs-prep @cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh $(FLAVOR) 1; \ ./process_configs.sh -z $(PACKAGE_NAME) $(KVERSION) "" $(FLAVOR) @@ -365,6 +369,7 @@ dist-help: @echo ' compiler.' @echo '' @echo 'Configuration targets:' + @echo ' dist-gitsetup - Adjust the git repo configuration for the Fedora/ARK workflow.' @echo ' dist-configs - Create RHEL config files in redhat/config/.' @echo '' @echo 'For detailed description and full list of targets, run `make dist-full-help`.' @@ -452,6 +457,9 @@ dist-full-help:
@echo '' @echo 'Configuration targets:' + @echo ' dist-gitsetup - Adjust the git repo configuration for the Fedora/ARK workflow' + @echo ' by including the redhat/kernel.gitconfig file. This hook' + @echo ' allows the creation of git alias shortcuts.' @echo ' dist-configs - Creates config files for RHEL $(RHEL_MAJOR) architectures,' @echo ' cleans them by running make nonint_oldconfig, and copies' @echo ' them to redhat/configs/ directory. This is the target to use' diff --git a/redhat/kernel.gitconfig b/redhat/kernel.gitconfig new file mode 100644 index 000000000000..6fd63c7ac1aa --- /dev/null +++ b/redhat/kernel.gitconfig @@ -0,0 +1,10 @@ +# The kernel workflow is growing in complexity. Developers can not always +# remember all the nuisances involved. +# This file is meant to aid developers by providing wrappers around some +# parts of the workflow that everyone can use. +# +# Examples include 'aliases' for git-push options or a shortcut for +# executing workflow checks before pushing. +# +# Please do not include personal information here. +[alias]
On Wed, 20 May 2020 16:25:24 -0000, GitLab Bridge on behalf of dzickusrh wrote:
From: Don Zickus dzickus@redhat.com
The kernel workflow is adding complexity. Let's hide some of that complexity behind git aliases. Instead of having the developer manually add them all the time, add a make command to 'include' kernel aliases.
A new command 'make rh-gitsetup' runs
git config --local --add include.path "../redhat/kernel.gitconfig"
and adds an include to the local repo's .git/config file.
Over time more workflow commands can be added to help developers.
Start with a stub config file.
V6: rebase to dist- changes, text changes V5: text cleanups V4: s/gitconfig/gitsetup V3: expand comment in kernel.gitconfig
Thanks!
Acked-by: Jiri Benc jbenc@redhat.com
On Wed, May 20, 2020 at 04:25:24PM -0000, GitLab Bridge on behalf of dzickusrh wrote:
From: Don Zickus dzickus@redhat.com
The kernel workflow is adding complexity. Let's hide some of that complexity behind git aliases. Instead of having the developer manually add them all the time, add a make command to 'include' kernel aliases.
A new command 'make rh-gitsetup' runs
git config --local --add include.path "../redhat/kernel.gitconfig"
and adds an include to the local repo's .git/config file.
Over time more workflow commands can be added to help developers.
Start with a stub config file.
V6: rebase to dist- changes, text changes V5: text cleanups V4: s/gitconfig/gitsetup V3: expand comment in kernel.gitconfig
Signed-off-by: Don Zickus dzickus@redhat.com
Acked-by: Brian Masney bmasney@redhat.com Tested-by: Brian Masney bmasney@redhat.com
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/340#note_53709452...
closing this as not necessary for right now.
kernel@lists.fedoraproject.org