From d6e3b57acea6ae8ee79af6414a7decf59ed3b8b3 Mon Sep 17 00:00:00 2001 From: Mathieu Tortuyaux Date: Wed, 6 Apr 2022 17:46:10 +0200 Subject: [PATCH 1/6] app-metrics/scaphandre: restrict test some tests rely on the assumption that /proc/modules is present. Closes: https://bugs.gentoo.org/836916 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Mathieu Tortuyaux --- app-metrics/scaphandre/scaphandre-0.4.1.ebuild | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app-metrics/scaphandre/scaphandre-0.4.1.ebuild b/app-metrics/scaphandre/scaphandre-0.4.1.ebuild index a551256cfa..9752431d68 100644 --- a/app-metrics/scaphandre/scaphandre-0.4.1.ebuild +++ b/app-metrics/scaphandre/scaphandre-0.4.1.ebuild @@ -206,7 +206,8 @@ DESCRIPTION="Electrical power consumption measurement agent." # does not provide this value so instead repository is used HOMEPAGE="https://github.com/hubblo-org/scaphandre" SRC_URI="https://github.com/hubblo-org/${PN}/archive/refs/tags/v${PV}.zip -> ${P}.zip $(cargo_crate_uris ${CRATES})" -RESTRICT="mirror" +# restricting test because '/proc/modules' does not appear to be present in the CI +RESTRICT="mirror test" # License set may be more restrictive as OR is not respected # use cargo-license for a more accurate license picture LICENSE="Apache-2.0 Apache-2.0 ISC MIT MPL-2.0 Unlicense" From 9c10faa88620b320bf4cc88cde844a5bae0d49f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Oszk=C3=A1r=20D=C3=A9nes?= Date: Wed, 6 Apr 2022 19:28:04 +0200 Subject: [PATCH 2/6] dev-python/retworkx: fix CFLAGS/LDFLAGS QA notice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/836800 Closes: https://bugs.gentoo.org/836801 Signed-off-by: Gábor Oszkár Dénes --- dev-python/retworkx/retworkx-0.11.0.ebuild | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev-python/retworkx/retworkx-0.11.0.ebuild b/dev-python/retworkx/retworkx-0.11.0.ebuild index c941326a3d..107fcce5fc 100644 --- a/dev-python/retworkx/retworkx-0.11.0.ebuild +++ b/dev-python/retworkx/retworkx-0.11.0.ebuild @@ -99,6 +99,9 @@ RDEPEND=">=dev-python/numpy-1.16.0" distutils_enable_tests pytest +# Libraries built with rust do not use CFLAGS and LDFLAGS. +QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/retworkx/retworkx.*\\.so" + python_test() { # We have to hide the source code directory so tests # do not use these, but instead the compiled library. From ecd9dc50a8ea3707924eb946d7e6d3a1a4d67b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duje=20Mihanovi=C4=87?= Date: Wed, 6 Apr 2022 19:44:20 +0200 Subject: [PATCH 3/6] sys-auth/pam-gnupg: initial import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Duje Mihanović --- sys-auth/pam-gnupg/Manifest | 1 + sys-auth/pam-gnupg/metadata.xml | 8 ++++++++ sys-auth/pam-gnupg/pam-gnupg-0.3.ebuild | 27 +++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 sys-auth/pam-gnupg/Manifest create mode 100644 sys-auth/pam-gnupg/metadata.xml create mode 100644 sys-auth/pam-gnupg/pam-gnupg-0.3.ebuild diff --git a/sys-auth/pam-gnupg/Manifest b/sys-auth/pam-gnupg/Manifest new file mode 100644 index 0000000000..cb4d9fd284 --- /dev/null +++ b/sys-auth/pam-gnupg/Manifest @@ -0,0 +1 @@ +DIST v0.3.tar.gz 20827 BLAKE2B 3973ffceec48105c28f368c14c879f9c1cae1676a5f5134c49249b3db8877418c2e9ac7937a6cacb3c5c2089be9a6e03c96e1988ecb029756c2f404674b9126c SHA512 5ee9af0f2e0d32680d6bc5e5b55ce46b86f01ff47b364a34484a6522035c96b8556c65d3d834ff711fb158ec4f1edbd48a1fea883641dedcbebd40074dc2fc5f diff --git a/sys-auth/pam-gnupg/metadata.xml b/sys-auth/pam-gnupg/metadata.xml new file mode 100644 index 0000000000..62988a0d4f --- /dev/null +++ b/sys-auth/pam-gnupg/metadata.xml @@ -0,0 +1,8 @@ + + + + + duje.mihanovic@skole.hr + Duje Mihanović + + diff --git a/sys-auth/pam-gnupg/pam-gnupg-0.3.ebuild b/sys-auth/pam-gnupg/pam-gnupg-0.3.ebuild new file mode 100644 index 0000000000..2d892a1c10 --- /dev/null +++ b/sys-auth/pam-gnupg/pam-gnupg-0.3.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="Unlock GnuPG keys on login" +HOMEPAGE="https://github.com/cruegge/pam-gnupg" +SRC_URI="https://github.com/cruegge/pam-gnupg/archive/refs/tags/v${PV}.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +RDEPEND=" +>=sys-libs/pam-1.5.1_p20210622-r1 +>=app-crypt/gnupg-2.2.33-r1 +" + +src_configure() { + eautoreconf + ./configure \ + --host=${CHOST} \ + --prefix=/usr \ + --infodir=/usr/share/info \ + --with-moduledir=/$(get_libdir)/security \ + --mandir=/usr/share/man || die +} From 575a6454796c52b05081e2feda4b4e2c68892d1e Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Wed, 6 Apr 2022 21:06:12 +0300 Subject: [PATCH 4/6] Add new empty emails workflow Added so we have a successful run for full workflow Signed-off-by: Arthur Zamarin --- .github/workflows/emails.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/emails.yml diff --git a/.github/workflows/emails.yml b/.github/workflows/emails.yml new file mode 100644 index 0000000000..6871760f47 --- /dev/null +++ b/.github/workflows/emails.yml @@ -0,0 +1,10 @@ +name: emails + +on: [push, pull_request] + +jobs: + bugzilla: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 From 5fa6ea3b1d1a78edc97608a3f92db07ab4ca19b7 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Wed, 6 Apr 2022 21:08:40 +0300 Subject: [PATCH 5/6] Add emails checker against bugzilla workflow A new check that checks that all new emails written in metadata.xml correspond to existing user in bugzilla. Signed-off-by: Arthur Zamarin --- .github/workflows/emails.yml | 29 ++++++++++++++++++++ scripts/email-checker.py | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100755 scripts/email-checker.py diff --git a/.github/workflows/emails.yml b/.github/workflows/emails.yml index 6871760f47..e7791f5585 100644 --- a/.github/workflows/emails.yml +++ b/.github/workflows/emails.yml @@ -6,5 +6,34 @@ jobs: bugzilla: runs-on: ubuntu-latest steps: + + - uses: nrwl/last-successful-commit-action@v1 + id: last_successful_commit + with: + branch: 'dev' + workflow_id: 'emails.yml' + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout compare ref + uses: actions/checkout@v2 + with: + ref: ${{ steps.last_successful_commit.outputs.commit_hash }} + - name: Checkout code uses: actions/checkout@v2 + + - uses: actions/setup-python@v3 + with: + python-version: '3.x' + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v18.6 + with: + base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }} + files: | + **/metadata.xml + + - name: Check Emails against bugzilla + run: | + python ./scripts/email-checker.py ${{ steps.changed-files.outputs.all_changed_files }} diff --git a/scripts/email-checker.py b/scripts/email-checker.py new file mode 100755 index 0000000000..2b6e93a1de --- /dev/null +++ b/scripts/email-checker.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 + +from http.client import HTTPSConnection +import json +import sys +from typing import Dict, Iterator, NamedTuple +from urllib.parse import quote_plus +import xml.etree.ElementTree as ET + + +class Maintainer(NamedTuple): + name: str + email: str + + def check_details(self, client: HTTPSConnection): + try: + client.request("GET", f"/rest/user?names={quote_plus(self.email)}") + resp = client.getresponse() + resp.read() + return resp.status == 200 + except: + return False + + +def read_all_maintainers(files: Iterator[str]) -> Iterator[Maintainer]: + for file in files: + try: + tree = ET.parse(file) + for maintainer in tree.findall('./maintainer'): + values = {child.tag: child.text for child in maintainer} + yield Maintainer(name=values.get('name', ''), email=values.get('email', '')) + except FileNotFoundError: + print(file, 'not found') + + +def check_maintainers(maintainers: Iterator[Maintainer]) -> Iterator[Maintainer]: + try: + client = HTTPSConnection('bugs.gentoo.org') + for m in maintainers: + if m.check_details(client): + print(f'\033[92m\u2713 {m.name} <{m.email}>\033[0m') + else: + print(f'\033[91m\u2717 {m.name} <{m.email}>\033[0m') + yield m + finally: + client.close() + + +if __name__ == '__main__': + missing_maintainers = len(tuple(check_maintainers(set(read_all_maintainers(sys.argv[1:]))))) + sys.exit(int(missing_maintainers != 0)) From f5e530c289712914229b9447a72db91f860caf77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Duje=20Mihanovi=C4=87?= Date: Wed, 6 Apr 2022 20:48:41 +0200 Subject: [PATCH 6/6] games-fps/assaultcube: initial import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Duje Mihanović --- games-fps/assaultcube/Manifest | 1 + .../assaultcube/assaultcube-1.3.0.2.ebuild | 54 +++++++++++++++++++ games-fps/assaultcube/metadata.xml | 8 +++ licenses/assaultcube | 2 + 4 files changed, 65 insertions(+) create mode 100644 games-fps/assaultcube/Manifest create mode 100644 games-fps/assaultcube/assaultcube-1.3.0.2.ebuild create mode 100644 games-fps/assaultcube/metadata.xml create mode 100644 licenses/assaultcube diff --git a/games-fps/assaultcube/Manifest b/games-fps/assaultcube/Manifest new file mode 100644 index 0000000000..9fdccef2a5 --- /dev/null +++ b/games-fps/assaultcube/Manifest @@ -0,0 +1 @@ +DIST assaultcube-1.3.0.2.tar.gz 51034819 BLAKE2B 61800ed2d7cec797af3bc683a7439d4e8b6dda453bdee4e3f331ab43c973c6d754aacc2e38f4f5535d991c1e755800bc6d178994500f7785a41053d399296756 SHA512 8488c399036532859f7c83d094ac1443c52aa6367d106cc5889b80353ff1d501f7b8ae3b51e34b03215cc88dacc5f29488635047ce90291c601f8f7582498685 diff --git a/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild b/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild new file mode 100644 index 0000000000..a4af1076ea --- /dev/null +++ b/games-fps/assaultcube/assaultcube-1.3.0.2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit desktop xdg-utils + +DESCRIPTION="Free multiplayer FPS based on the Cube engine" +HOMEPAGE="https://assault.cubers.net/" +SRC_URI="https://github.com/assaultcube/AC/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/AC-${PV}" +LICENSE="ZLIB assaultcube" +SLOT="0" +KEYWORDS="~amd64" +RDEPEND="sys-libs/zlib media-libs/libsdl2 media-libs/sdl2-image x11-libs/libX11 media-libs/libogg media-libs/libvorbis media-libs/openal" +DEPEND="${RDEPEND}" +BDEPEND="sys-devel/clang" + +src_prepare() { + eapply_user + sed -i 's|//#define PRODUCTION|#define PRODUCTION|' "${S}/source/src/cube.h" + rm -rf "${S}/source/include" +} + +src_compile() { + cd "${S}/source/src" + emake +} + +src_install() { + cd "${S}/source/src" + emake install + + install -dm755 "${D}/usr/share/assaultcube" + install -Dm755 "${S}"/{assaultcube.sh,check_install.sh,server.sh,server_wizard.sh} -t "${D}/usr/share/assaultcube" + install -Dm755 "${S}/bin_unix/native_client" -t "${D}/usr/share/assaultcube/bin_unix" + cp -r "${S}"/{bot,config,demos,docs,mods,packages} "${D}/usr/share/assaultcube/" + install -Dm644 "${S}"/{CONTRIBUTING.md,GOVERNANCE.md,README.{html,md},SECURITY.md} -t "${D}/usr/share/assaultcube" + + make_desktop_entry \ + "/usr/share/assaultcube/assaultcube.sh %u" \ + AssaultCube \ + /usr/share/assaultcube/packages/misc/icon.png \ + Game \ + "Keywords=assaultcube;game;fps;\nMimeType=x-scheme-handler/assaultcube" +} + +pkg_postinst() { + xdg_desktop_database_update +} + +pkg_postrm() { + xdg_desktop_database_update +} diff --git a/games-fps/assaultcube/metadata.xml b/games-fps/assaultcube/metadata.xml new file mode 100644 index 0000000000..62988a0d4f --- /dev/null +++ b/games-fps/assaultcube/metadata.xml @@ -0,0 +1,8 @@ + + + + + duje.mihanovic@skole.hr + Duje Mihanović + + diff --git a/licenses/assaultcube b/licenses/assaultcube new file mode 100644 index 0000000000..8ee6f033de --- /dev/null +++ b/licenses/assaultcube @@ -0,0 +1,2 @@ +AssaultCube's licensing is very specific, please take a look at: +https://assault.cubers.net/docs/license.html