This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Because the configs rename patch is huge and Laura prefers not to have it on the list, I am purposely excluding the content of that particular patch.
The script changes are attached for public review.
The code can be reviewed here: https://pagure.io/fedora-kernel-dzickus.git rh_sync2
Don Zickus (2): configs: Move base-debug and base-generic to configs/fedora configs: Update config generation script to use configs/fedora
configs/build_configs.sh | 62 +++++++++++----------- configs/config_generation | 5 ++
<snipped giant configs rename>
It was suggested that base-debug and base-generic were not good names to use. Further discussion led to using configs/fedora for the base config files and configs/rhel for any overrides.
This patch does a plain
mkdir configs/fedora git mv configs/base-{generic,debug} configs/fedora
No code changes. ---
<patch snipped to avoid rather large email, see cover letter for git branch>
The previous patch moved the configs/base-{generic,debug} to configs/fedora. Now we update the scripts to reflect that change. Changing the scripts was straightforward. Handling overrides that didn't use generic names was a little trickier.
To handle random override names (well rhel), I added some extra logic in the config_generation script called "ORDER". This tells the scripts which configs to lay down first and which one overrides it.
Through some testing, I realized I could simplify things and just create an outer 'order' loop. This removed some duplicated code.
The other change is the 'skip_if_missing' flag. The overrides directory will not mimic the baseline directory layout 100%. Ensure the baseline config files are all there, but allow the overrides to have missing files.
Tested on my Fedora and my RHEL tree with success. --- configs/build_configs.sh | 62 ++++++++++++++++++++++++----------------------- configs/config_generation | 5 ++++ 2 files changed, 37 insertions(+), 30 deletions(-)
diff --git a/configs/build_configs.sh b/configs/build_configs.sh index f345e2af..15ab6b38 100755 --- a/configs/build_configs.sh +++ b/configs/build_configs.sh @@ -6,7 +6,7 @@
PACKAGE_NAME="${1:-kernel}" # defines the package name used KVERREL="${2:-}" -SUBARCH="${3:-}" # defines a specific arch for use with rh-configs-arch-prep target +SUBARCH="${3:-}" # defines a specific arch SCRIPT="$(readlink -f $0)" OUTPUT_DIR="$PWD" SCRIPT_DIR="$(dirname $SCRIPT)" @@ -49,29 +49,31 @@ function merge_configs() archvar=$1 arch=$(echo "$archvar" | cut -f1 -d"-") configs=$2 + order=$3 name=$OUTPUT_DIR/$PACKAGE_NAME-$archvar.config echo -n "Building $name ... " touch config-merging config-merged
- # apply base first - for config in $(echo $configs | sed -e 's/:/ /g') + # apply based on order + skip_if_missing="" + for o in $order do - perl merge.pl config-base-$config config-merging > config-merged - if [ ! $? -eq 0 ]; then - die "Failed to merge base" - fi - mv config-merged config-merging - done - for config in $(echo $configs | sed -e 's/:/ /g') - do - # not all override files exist - test -e config-$config || continue - - perl merge.pl config-$config config-merging > config-merged - if [ ! $? -eq 0 ]; then - die "Failed to merge configs" - fi - mv config-merged config-merging + for config in $(echo $configs | sed -e 's/:/ /g') + do + cfile="config-$o-$config" + + test -n "$skip_if_missing" && test ! -e $cfile && continue + + perl merge.pl $cfile config-merging > config-merged + if [ ! $? -eq 0 ]; then + die "Failed to merge $cfile" + fi + mv config-merged config-merging + done + + # first configs in $order is baseline, all files should be + # there. second pass is overrides and can be missing. + skip_if_missing="1" done if [ "x$arch" == "xaarch64" ]; then echo "# arm64" > $name @@ -93,22 +95,22 @@ function merge_configs() echo "done" }
-glist=$(find base-generic -type d) -dlist=$(find base-debug -type d) -gllist=$(test -d generic && find generic -type d) -dllist=$(test -d debug && find debug -type d) - -for d in $glist $dlist $gllist $dllist -do - combine_config_layer $d -done - while read line do if [ $(echo "$line" | grep -c "^#") -ne 0 ]; then continue elif [ $(echo "$line" | grep -c "^$") -ne 0 ]; then continue + elif [ $(echo "$line" | grep -c "^ORDER") -ne 0 ]; then + order=$(echo "$line" | cut -f2 -d"=") + for o in $order + do + glist=$(find $o -type d) + for d in $glist + do + combine_config_layer $d + done + done else arch=$(echo "$line" | cut -f1 -d"=") configs=$(echo "$line" | cut -f2 -d"=") @@ -117,7 +119,7 @@ do continue fi
- merge_configs $arch $configs + merge_configs $arch $configs "$order" fi done < $control_file
diff --git a/configs/config_generation b/configs/config_generation index b88a5ea9..e8614c43 100644 --- a/configs/config_generation +++ b/configs/config_generation @@ -3,6 +3,11 @@ # the first arg is arch and variant, the second is a hierarchy of # config options, lowest priority to highest
+# tells the build_configs.sh which order to build the configs. +# this is useful when providing a separate overrides directory. +# do not use quotes and space separate the directories. +ORDER=fedora + # x86_64 x86_64=generic:generic-x86:generic-x86-x86_64 x86_64-debug=generic:generic-x86:generic-x86-x86_64:debug:debug-x86:debug-x86-x86_64
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
Cheers, Don
Because the configs rename patch is huge and Laura prefers not to have it on the list, I am purposely excluding the content of that particular patch.
The script changes are attached for public review.
The code can be reviewed here: https://pagure.io/fedora-kernel-dzickus.git rh_sync2
Don Zickus (2): configs: Move base-debug and base-generic to configs/fedora configs: Update config generation script to use configs/fedora
configs/build_configs.sh | 62 +++++++++++----------- configs/config_generation | 5 ++
<snipped giant configs rename>
On 12/20/2017 09:39 AM, Don Zickus wrote:
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
Cheers, Don
Sorry, I forgot about this last week. I'm pretty much indifferent to what this gets called so I'll wait for feedback from someone before applying.
Because the configs rename patch is huge and Laura prefers not to have it on the list, I am purposely excluding the content of that particular patch.
The script changes are attached for public review.
The code can be reviewed here: https://pagure.io/fedora-kernel-dzickus.git rh_sync2
Don Zickus (2): configs: Move base-debug and base-generic to configs/fedora configs: Update config generation script to use configs/fedora
configs/build_configs.sh | 62 +++++++++++----------- configs/config_generation | 5 ++
<snipped giant configs rename>
On 12/20/2017 04:04 PM, Laura Abbott wrote:
On 12/20/2017 09:39 AM, Don Zickus wrote:
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
Cheers, Don
Sorry, I forgot about this last week. I'm pretty much indifferent to what this gets called so I'll wait for feedback from someone before applying.
I haven't heard any more feedback. If you are still interested in having these applied, can you rebase to the latest rawhide?
Because the configs rename patch is huge and Laura prefers not to have it on the list, I am purposely excluding the content of that particular patch.
The script changes are attached for public review.
The code can be reviewed here: https://pagure.io/fedora-kernel-dzickus.git rh_sync2
Don Zickus (2): configs: Move base-debug and base-generic to configs/fedora configs: Update config generation script to use configs/fedora
configs/build_configs.sh | 62 +++++++++++----------- configs/config_generation | 5 ++
<snipped giant configs rename>
On Thu, Jan 04, 2018 at 11:00:03AM -0800, Laura Abbott wrote:
On 12/20/2017 04:04 PM, Laura Abbott wrote:
On 12/20/2017 09:39 AM, Don Zickus wrote:
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
Cheers, Don
Sorry, I forgot about this last week. I'm pretty much indifferent to what this gets called so I'll wait for feedback from someone before applying.
I haven't heard any more feedback. If you are still interested in having these applied, can you rebase to the latest rawhide?
Actually I am as I think it simplifies things on the script side.
https://pagure.io/fedora-kernel-dzickus.git rh_sync2
is a forced update. Nothing on this patchset changed other than moving new config files to the new directory.
Cheers, Don
On 01/04/2018 11:41 AM, Don Zickus wrote:
On Thu, Jan 04, 2018 at 11:00:03AM -0800, Laura Abbott wrote:
On 12/20/2017 04:04 PM, Laura Abbott wrote:
On 12/20/2017 09:39 AM, Don Zickus wrote:
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
Cheers, Don
Sorry, I forgot about this last week. I'm pretty much indifferent to what this gets called so I'll wait for feedback from someone before applying.
I haven't heard any more feedback. If you are still interested in having these applied, can you rebase to the latest rawhide?
Actually I am as I think it simplifies things on the script side.
https://pagure.io/fedora-kernel-dzickus.git rh_sync2
is a forced update. Nothing on this patchset changed other than moving new config files to the new directory.
Cheers, Don
Merged. Thanks!
On Wed, Dec 20, 2017 at 5:39 PM, Don Zickus dzickus@redhat.com wrote:
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
It's a bit less annoying for tab completion, thanks, sorry for late response, PTO and catchup :)
Because the configs rename patch is huge and Laura prefers not to have it on the list, I am purposely excluding the content of that particular patch.
The script changes are attached for public review.
The code can be reviewed here: https://pagure.io/fedora-kernel-dzickus.git rh_sync2
Don Zickus (2): configs: Move base-debug and base-generic to configs/fedora configs: Update config generation script to use configs/fedora
configs/build_configs.sh | 62 +++++++++++----------- configs/config_generation | 5 ++
<snipped giant configs rename>
On 2018-01-08 1:56 AM, Peter Robinson wrote:
On Wed, Dec 20, 2017 at 5:39 PM, Don Zickus dzickus@redhat.com wrote:
On Wed, Dec 13, 2017 at 04:39:26PM -0500, Don Zickus wrote:
This patchset renames the configs/base-{generic,debug} to configs/fedora/{generic,debug} and updates the scripts to reflect that.
Hi Jarod, Peter,
Does this approach work better?
It's a bit less annoying for tab completion, thanks, sorry for late response, PTO and catchup :)
I'm even later to the party, also doing the post-PTO catch-up shuffle now, but yeah, this looks fine to me.
kernel@lists.fedoraproject.org