Ed Tanous | d5cea14 | 2021-09-09 11:42:05 -0700 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | # |
| 3 | |
Ed Tanous | 7f8954e | 2021-09-09 11:46:43 -0700 | [diff] [blame] | 4 | script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" |
| 5 | obmc_dir=${script_dir}/../../ |
| 6 | |
| 7 | # openbmc doesn't control what upstream poky, or any of the other layers do, |
| 8 | # which do use patches as part of their upstreaming process. |
| 9 | # meta-phosphor is also included such that patches that the community agrees to |
| 10 | # hold onto will be allowed in that layer. |
| 11 | |
| 12 | patch_files_tmp=$(mktemp) |
| 13 | allowed_patches_tmp=$(mktemp) |
| 14 | |
| 15 | git -C "$obmc_dir" ls-files -- \ |
| 16 | '*.patch' \ |
| 17 | ':!:poky/**' \ |
| 18 | ':!:meta-security/**' \ |
| 19 | ':!:meta-xilinx/**' \ |
| 20 | ':!:meta-raspberrypi/**' \ |
| 21 | ':!:meta-openembedded/**' \ |
| 22 | ':!:meta-phosphor/**' \ |
| 23 | | sort > $patch_files_tmp |
| 24 | |
| 25 | |
| 26 | # The following patches were present on master at the time this test was |
| 27 | # written. Their presence in this list should not be acknowlegement that they |
| 28 | # are now allowed, but ignoring them is required in the intermediate time |
| 29 | # between when this test was created, and when the maintainers of these repos |
| 30 | # clean them up. |
| 31 | # |
| 32 | # https://github.com/openbmc/docs/blob/master/meta-layer-guidelines.md |
| 33 | echo "\ |
| 34 | meta-amd/meta-ethanolx/recipes-x86/chassis/x86-power-control/0001-Amd-power-control-modifications-for-EthanolX.patch |
| 35 | meta-ampere/meta-common/recipes-devtools/mtd/mtd-utils/0001-flashcp-support-offset-option.patch |
| 36 | meta-ampere/meta-jade/recipes-bsp/u-boot/u-boot-aspeed/0001-aspeed-scu-Switch-PWM-pin-to-GPIO-input-mode.patch |
| 37 | meta-ampere/meta-jade/recipes-bsp/u-boot/u-boot-aspeed/0002-aspeed-Disable-internal-PD-resistors-for-GPIOs.patch |
| 38 | meta-ampere/meta-jade/recipes-bsp/u-boot/u-boot-aspeed/0003-aspeed-support-passing-system-reset-status-to-kernel.patch |
| 39 | meta-ampere/meta-jade/recipes-bsp/u-boot/u-boot-aspeed/0004-aspeed-add-gpio-support.patch |
| 40 | meta-ampere/meta-jade/recipes-bsp/u-boot/u-boot-aspeed/0005-aspeed-Enable-SPI-master-mode.patch |
| 41 | meta-ampere/meta-jade/recipes-bsp/u-boot/u-boot-aspeed/0006-aspeed-support-Mt.Jade-platform-init.patch |
| 42 | meta-aspeed/recipes-bsp/u-boot/files/default-gcc.patch |
| 43 | meta-bytedance/meta-g220a/recipes-kernel/linux/linux-aspeed/0001-bytedance-g220a-Enable-ipmb.patch |
| 44 | meta-bytedance/meta-g220a/recipes-kernel/linux/linux-aspeed/0003-misc-aspeed-Add-Aspeed-UART-routing-control-driver.patch |
| 45 | meta-bytedance/meta-g220a/recipes-kernel/linux/linux-aspeed/0004-ARM-dts-aspeed-Add-uart-routing-node.patch |
| 46 | meta-bytedance/meta-g220a/recipes-kernel/linux/linux-aspeed/0005-ARM-dts-aspeed-Enable-g220a-uart-route.patch |
| 47 | meta-bytedance/meta-g220a/recipes-phosphor/ipmi/phosphor-node-manager-proxy/0001-Remove-Total_Power-sensor.patch |
| 48 | meta-facebook/meta-bletchley/recipes-bsp/u-boot/u-boot-aspeed-sdk/0001-u-boot-ast2600-57600-baudrate-for-bletchley.patch |
| 49 | meta-facebook/meta-tiogapass/recipes-bsp/u-boot/u-boot-aspeed/0001-configs-ast-common-use-57600-baud-rate-to-match-Tiog.patch |
| 50 | meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-Mux-for-yosemitev2.patch |
| 51 | meta-facebook/meta-yosemitev2/recipes-bsp/u-boot/u-boot-aspeed/0002-spl-host-console-handle.patch |
| 52 | meta-google/dynamic-layers/nuvoton-layer/recipes-bsp/images/npcm7xx-igps/0001-Set-FIU0_DRD_CFG-and-FIU_Clk_divider-for-gbmc-hoth.patch |
| 53 | meta-google/recipes-extended/libconfig/files/0001-conf2struct-Use-the-right-perl.patch |
| 54 | meta-google/recipes-extended/libconfig/files/0001-makefile-Add-missing-LDFLAGS.patch |
| 55 | meta-google/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/rwfs-clean-dev.patch |
| 56 | meta-ingrasys/meta-zaius/recipes-bsp/u-boot/u-boot-aspeed/0001-board-aspeed-Add-reset_phy-for-Zaius.patch |
| 57 | meta-nuvoton/recipes-bsp/images/npcm7xx-igps/0001-Adjust-paths-for-use-with-Bitbake.patch |
| 58 | meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0001-Add-system-reset-status-support.patch |
| 59 | meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0002-config-ast-common-set-fieldmode-to-true.patch |
| 60 | meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0003-aspeed-add-gpio-support.patch |
| 61 | meta-yadro/meta-nicole/recipes-bsp/u-boot/files/0004-aspeed-add-bmc-position-support.patch |
| 62 | meta-yadro/meta-nicole/recipes-kernel/linux/linux-aspeed/0001-Add-NCSI-channel-selector.patch |
| 63 | meta-yadro/meta-nicole/recipes-phosphor/host/op-proc-control/0001-Stop-and-send-SRESET-for-one-thread-only.patch |
| 64 | meta-yadro/recipes-phosphor/dbus/phosphor-dbus-interfaces/0001-Add-boot-initiator-mailbox-interface.patch |
| 65 | meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-support-for-persistent-only-settings.patch |
| 66 | meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0002-Add-support-for-boot-initiator-mailbox.patch |
| 67 | meta-yadro/recipes-phosphor/ipmi/phosphor-ipmi-host/0003-Fix-version-parsing-update-AUX-revision-info.patch |
| 68 | " | sort > $allowed_patches_tmp |
| 69 | |
| 70 | |
| 71 | |
| 72 | files_diff=$(comm -23 $patch_files_tmp $allowed_patches_tmp) |
| 73 | rm $allowed_patches_tmp |
| 74 | rm $patch_files_tmp |
| 75 | |
| 76 | files_count=$(echo -n "$files_diff" | grep -c '^') |
| 77 | if [[ $files_count -ne 0 ]]; then |
| 78 | echo "Patch files found not in allow list" |
| 79 | echo "$files_diff" |
| 80 | echo "Patches are not allowed on OpenBMC in these layers. Please upstream your changes and see \ |
| 81 | https://github.com/openbmc/docs/blob/master/meta-layer-guidelines.md" |
| 82 | exit 1 |
| 83 | fi |
| 84 | |
Ed Tanous | d5cea14 | 2021-09-09 11:42:05 -0700 | [diff] [blame] | 85 | echo "Repo test passed" |
Ed Tanous | 7f8954e | 2021-09-09 11:46:43 -0700 | [diff] [blame] | 86 | |