Useful for finding packages and bugs assigned to projects with no members. These are effectively unmaintained, but do not show up in the maintainer-needed report.
Suggested-by: Sam James <[email protected]> Signed-off-by: Brett A C Sheffield <[email protected]> --- dormant-projects.sh | 25 ++++++++++++++++++ dormant-projects.xsl | 61 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100755 dormant-projects.sh create mode 100644 dormant-projects.xsl diff --git a/dormant-projects.sh b/dormant-projects.sh new file mode 100755 index 0000000..2f1c113 --- /dev/null +++ b/dormant-projects.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only +# Copyright 2026 Gentoo Authors +# Author: Brett A C Sheffield <[email protected]> +# +# Print a list of projects with no members, linking to their semi-orphaned +# packages. +# +# Requires: +# - dev-libs/libxslt (for xsltproc) +# - net-misc/curl (for wcurl) + +tmpfile=`mktemp` + +cleanup () { + [[ -e ${tmpfile} ]] && rm ${tmpfile} +} + +wcurl --curl-options="--clobber" -O ${tmpfile} https://api.gentoo.org/metastructure/projects.xml || { cleanup; exit 1; } + +xsltproc --novalid --stringparam now "$(date)" -o dormant-projects.html dormant-projects.xsl ${tmpfile} + +cleanup + +exit 0 diff --git a/dormant-projects.xsl b/dormant-projects.xsl new file mode 100644 index 0000000..1d1304e --- /dev/null +++ b/dormant-projects.xsl @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + SPDX-License-Identifier: GPL-2.0-only + Copyright 2026 Gentoo Authors + Author: Brett A C Sheffield <[email protected]> +--> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <xsl:output method="html"/> + + <xsl:param name="now" select="now"/> + + <xsl:template match="/"> + <html> + <head> + <title>Dormant Projects</title> + </head> + <body> + <h1>Dormant Projects</h1> + <p>The following projects do not have any members at present (last updated <xsl:value-of select="$now"/>):</p> + <table> + <tr> + <th>Project</th> + <th>Packages</th> + <th>Bugs</th> + <th>Description</th> + </tr> + <xsl:apply-templates select="projects/project[not(member)]"/> + </table> + </body> + </html> + </xsl:template> + + <xsl:template match="project"> + <tr> + <td> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="url"/> + </xsl:attribute> + <xsl:value-of select="name"/> + </a> + </td> + <td> + <a> + <xsl:attribute name="href">https://packages.gentoo.org/maintainer/<xsl:value-of select="email"/></xsl:attribute> + Packages + </a> + </td> + <td> + <a> + <xsl:attribute name="href">https://packages.gentoo.org/maintainer/<xsl:value-of select="email"/>/bugs</xsl:attribute> + Bugs + </a> + </td> + <td> + <xsl:value-of select="description"/> + </td> + </tr> + </xsl:template> + +</xsl:stylesheet> -- 2.52.0
