From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbdHFBqI (ORCPT ); Sat, 5 Aug 2017 21:46:08 -0400 Received: from smtprelay0222.hostedemail.com ([216.40.44.222]:57213 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751219AbdHFBqG (ORCPT ); Sat, 5 Aug 2017 21:46:06 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:800:857:960:973:982:988:989:1260:1345:1359:1437:1535:1544:1711:1730:1747:1777:1792:2197:2198:2199:2200:2393:2559:2562:2731:3138:3139:3140:3141:3142:3355:3653:3865:3866:3867:3868:3870:3872:4250:4321:5007:6119:6261:7903:7904:9038:10004:10848:11026:11658:11914:12043:12114:12291:12296:12438:12555:12683:12895:12986:14093:14110:14181:14394:14721:21080:21220:21221:21324:21451:21627:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: lock17_8c4ee6662c74f X-Filterd-Recvd-Size: 5382 From: Joe Perches To: Linus Torvalds , linux-kernel@vger.kernel.org Cc: Andrew Morton Subject: [PATCH 4/4] scripts/move_maintainer_sections.bash Date: Sat, 5 Aug 2017 18:45:50 -0700 Message-Id: X-Mailer: git-send-email 2.10.0.rc2.1.g053435c In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move MAINTAINERS into a separate directory and reorder it. Separate various blocks of MAINTAINER sections into separate files. Signed-off-by: Joe Perches --- scripts/move_maintainer_sections.bash | 87 +++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 scripts/move_maintainer_sections.bash diff --git a/scripts/move_maintainer_sections.bash b/scripts/move_maintainer_sections.bash new file mode 100755 index 000000000000..7ea671b6435d --- /dev/null +++ b/scripts/move_maintainer_sections.bash @@ -0,0 +1,87 @@ +# Select various bits out of MAINTAINERS and create new file and commit +function separate_and_commit () { + local filename=$1 + shift + local comment=$1 + shift + local selection=$@ + + cd MAINTAINERS + perl ../scripts/parse-maintainers.pl $selection + mv MAINTAINERS.new MAINTAINERS + mv SECTION.new $filename + cd .. + cat << EOF > commit.msg +MAINTAINERS: Move $comment sections to separate file + +Make it easier to handle merge conflicts. +EOF + git add MAINTAINERS/$filename + git commit -s -F commit.msg MAINTAINERS/MAINTAINERS MAINTAINERS/$filename + rm commit.msg +} + +# First move the MAINTAINERS file into a separate MAINTAINERS directory +git mv MAINTAINERS MAINTAINERS.old +mkdir MAINTAINERS +git mv MAINTAINERS.old MAINTAINERS/MAINTAINERS +cat << EOF > commit.msg +MAINTAINERS: Move to MAINTAINERS directory + +This allows breaking up the very large and difficult to merge +MAINTAINERS files into separate files +EOF +git commit -s -F commit.msg MAINTAINERS/MAINTAINERS +rm commit.msg + +# Sort the MAINTAINERS file appropriately + +cd MAINTAINERS +perl ../scripts/parse-maintainers.pl +mv MAINTAINERS.new MAINTAINERS +cd .. +cat << EOF > commit.msg +MAINTAINERS: Reorder and alphabetize file sections + +Move the sections patterns into a standardized order. +EOF +git commit -s -F commit.msg MAINTAINERS/MAINTAINERS +rm commit.msg + +# Move the kernel related sections + +separate_and_commit kernel kernel "\\nF:\\s*kernel/(?:.*/)*\\n" "\\nF:\\s*kernel/(?:.*/)*(?:.*\\.[ch]|.*\\*)?\\n" +separate_and_commit filesystems "filesystems" "\\nF:\\s*fs/" +separate_and_commit hypervisors "hypervisor subsystems and drivers" "\\nL:\\s*xen-devel" "\\nL:\\s*virtualization" "Hyper-V" + +# Move arch specific files + +for arch in $(find arch -maxdepth 1 -type d | \ + sed 's@^arch/@@' | \ + awk '{ if (NR > 1) { print; } }' | \ + sort) ; do + separate_and_commit arch_$arch arch/$arch "\\nF:\\s*arch/$arch/(?:.*/)*\\n" +done + +# Move various subsystems and driver sections + +separate_and_commit networking_core "networking core" "\\nF:\\s*net/" +separate_and_commit drivers_wireless "wireless drivers" "\\nF:\\s*drivers/net/wireless/" "\\bWIRELESS\\b" +separate_and_commit drivers_ethernet "ethernet drivers" "\\nF:\\s*drivers/net/ethernet/" +separate_and_commit drivers_scsi "scsi drivers" "\\nF:\\s*drivers/scsi/" +separate_and_commit drivers_usb "usb drivers" "\\nF:\\s*drivers/usb/" +separate_and_commit drivers_media "media drivers" "\\nF:\\s*drivers/media/" +separate_and_commit drivers_watchdog "watchdog drivers" "\\nF:\\s*drivers/watchdog/" +separate_and_commit sound "sound subsystems and drivers" "\\nF:\\s*sound/" +separate_and_commit hardware_monitoring "monitoring subsystem and drivers" "\\nL:\\s*linux-hwmon" "\\nF:\\s*drivers/hwmon/" +separate_and_commit acpi "ACPI subsystem and drivers" "\\nL:\\s*linux-acpi" "\\nF:\\s*drivers/acpi/" +separate_and_commit drivers_input "input drivers" "\\nL:\\s*linux-input" "\\nF:\\s*drivers/input/" +separate_and_commit drivers_video "video drivers" "\\nL:\\s*linux-input" "\\nF:\\s*drivers/video/" +separate_and_commit drivers_gpio "gpio drivers" "\\nL:\\s*linux-gpio" "\\nF:\\s*drivers/gpio/" +separate_and_commit drivers_serial "serial/tty drivers" "\\nL:\\s*linux-serial" "\\nF:\\s*drivers/tty/" +separate_and_commit drivers_gpu_drm "GPU/DRM drivers" "\\nF:\\s*drivers/gpu/" +separate_and_commit drivers_i2c "I2C drivers" "\\nL:\\s*linux-i2c" "\\nF:\\s*drivers/i2c/" +separate_and_commit drivers_staging "staging drivers" "\\nL:\\s*devel\@driverdev" "\\nF:\\s*drivers/staging/" +separate_and_commit power "power management and drivers" "\\nL:\\s*linux-pm" "\\nF:\\s*drivers/cpufreq/" "\\nF:\\s*drivers/cpuidle/" "\\nF:\\s*drivers/devfreq/" +separate_and_commit pci "PCI drivers" "\\nL:\\s*linux-pci" "\\nF:\\s*drivers/pci/" +separate_and_commit platform-driver-x86 "x86 platform drivers" "\\nL:\\s*platform-driver-x86" "\\nF:\\s*drivers/platform/x86/" -- 2.10.0.rc2.1.g053435c