The debian policies require that the package maintainer is filled
with someone that can be contacted. Checks of the SBOM of various layers
have shown that often the maintainer is not explicitly set, probably
because we provide a default.
As a change of the default maintainer might create a lot of downstream
changes, we introduce a warning instead. Later on, we can remove the
default and just assert that it is set.
meta/classes-recipe/debianize.bbclass | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/classes-recipe/debianize.bbclass b/meta/classes-recipe/debianize.bbclass
index a629feba..a255dd28 100644
--- a/meta/classes-recipe/debianize.bbclass
+++ b/meta/classes-recipe/debianize.bbclass
@@ -25,7 +25,16 @@ MAINTAINER ??= "Unknown maintainer <
unk...@example.com>"
DEBIANIZE_BUILD_DEPENDS ?= "debhelper-compat (= ${DEBIAN_COMPAT}), ${DEBIAN_BUILD_DEPENDS}"
+deb_check_maintainer() {
+ if [ -z "${MAINTAINER}" ]; then
+ bbwarn "MAINTAINER is empty. Please set a valid maintainer."
+ elif echo "${MAINTAINER}" | grep -q "@
example.com"; then
+ bbwarn "MAINTAINER contains '@
example.com'. Please set a valid maintainer."
+ fi
+}
+
deb_add_changelog() {
+ deb_check_maintainer
changelog_v="${CHANGELOG_V}"
timestamp="${DEBIAN_CHANGELOG_TIMESTAMP}"
if [ -f ${S}/debian/changelog ]; then
@@ -84,6 +93,7 @@ deb_create_control[vardeps] += "DEBIANIZE_BUILD_DEPENDS \
DEBIAN_RULES_REQUIRES_ROOT \
DEBIAN_STANDARDS_VERSION"
deb_create_control() {
+ deb_check_maintainer
# Add Source section
cat << EOF > ${S}/debian/control
Source: ${BPN}
--
2.51.0