From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3AF07138334 for ; Sat, 6 Oct 2018 01:15:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5C573E093A; Sat, 6 Oct 2018 01:15:45 +0000 (UTC) Received: from smtp.gentoo.org (unknown [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1335AE093A for ; Sat, 6 Oct 2018 01:15:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6044335C5A for ; Sat, 6 Oct 2018 01:15:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 12A903F6 for ; Sat, 6 Oct 2018 01:15:21 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1538788454.dd605b1aa574fc035d3319d954be1ca0d2cdde19.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/install-qa-check.d/ X-VCS-Repository: proj/portage X-VCS-Files: bin/install-qa-check.d/08gentoo-paths X-VCS-Directories: bin/install-qa-check.d/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: dd605b1aa574fc035d3319d954be1ca0d2cdde19 X-VCS-Branch: master Date: Sat, 6 Oct 2018 01:15:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5b53394f-03b6-446c-990b-45f621612696 X-Archives-Hash: 6d2558ae2ba56bcd7e705b0b8998fdb3 commit: dd605b1aa574fc035d3319d954be1ca0d2cdde19 Author: Zac Medico gentoo org> AuthorDate: Sat Oct 6 01:11:02 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Oct 6 01:14:14 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=dd605b1a Revert "install-qa-checks.d: Add a check for Gentoo path policies (FHS-y)" This reverts commit d5f97eaa464736a454c8ad410f4acd4fccdf2324. Until this QA check has adjustable whitelist support, we can consider it an unstable work in progress. Therefore, I'd like for the QA team to move it gentoo/metadata/install-qa-check.d/08gentoo-paths until it has matured. It's safe to commit it to the gentoo repository now, and it will become active when portage's internal copy is removed. Bug: https://bugs.gentoo.org/667604 Closes: https://bugs.gentoo.org/667378 Closes: https://github.com/gentoo/portage/pull/373 Signed-off-by: Zac Medico gentoo.org> bin/install-qa-check.d/08gentoo-paths | 77 ----------------------------------- 1 file changed, 77 deletions(-) diff --git a/bin/install-qa-check.d/08gentoo-paths b/bin/install-qa-check.d/08gentoo-paths deleted file mode 100644 index 3ee887df0..000000000 --- a/bin/install-qa-check.d/08gentoo-paths +++ /dev/null @@ -1,77 +0,0 @@ -# Check whether ebuilds are not installing new, non-Gentoo-ey paths. - -gentoo_path_check() { - # allowed path definitions - # ------------------------ - - # directories common to / and /usr - local allowed_common_dirs=( - bin lib lib32 lib64 libx32 sbin - ) - - # toplevel directories which can be installed to by ebuilds - # /home is not included as no ebuilds should install files there - local allowed_paths_toplevel=( - "${allowed_common_dirs[@]}" - boot dev etc opt srv usr var - ) - - # directories in /usr which can be installed to by ebuilds - # /usr/games is not included as it is banned nowadays - local allowed_paths_usr=( - "${allowed_common_dirs[@]}" - include libexec share src - # toolchain stuff - "${CHOST}" "${CTARGET}" - ) - - - # the logic - # --------- - local bad_paths=() - local x - - local shopt_save=$(shopt -p nullglob) - shopt -s nullglob - - # 1. check for unexpected top-level directories - local toplevel_dirs=( "${ED%/}"/* ) - for x in "${toplevel_dirs[@]##*/}"; do - if ! has "${x}" "${allowed_paths_toplevel[@]}"; then - bad_paths+=( "/${x}" ) - fi - done - - # 2. check for unexpected /usr subdirectories - local usr_dirs=( "${ED%/}"/usr/* ) - for x in "${usr_dirs[@]##*/}"; do - if ! has "${x}" "${allowed_paths_usr[@]}"; then - bad_paths+=( "/usr/${x}" ) - fi - done - - # 3. check for unexpected /usr/share/doc subdirectories - local doc_dirs=( "${ED%/}"/usr/share/doc/* ) - for x in "${doc_dirs[@]##*/}"; do - if [[ ${x} != ${PF} ]]; then - bad_paths+=( "/usr/share/doc/${x}" ) - fi - done - - ${shopt_save} - - # report - # ------ - if [[ -n ${bad_paths[@]} ]]; then - eqawarn "The ebuild is installing to one or more unexpected paths:" - eqawarn - eqatag -v non-gentoo-paths "${bad_paths[@]}" - eqawarn - eqawarn "Please fix the ebuild to use correct FHS/Gentoo policy paths." - fi -} - -gentoo_path_check -: # guarantee successful exit - -# vim:ft=sh