From 2f2d49c6f6698b1faddd38079fe9f1f00f2506ba Mon Sep 17 00:00:00 2001 From: liubo Date: Tue, 17 Oct 2023 11:46:54 +0800 Subject: [PATCH] AppDataCheck: Pass --nonet to appstream-util if NetworkEnabled is False Signed-off-by: liubo (cherry picked from commit c7d8d01d829ff59697ace08274ce35b6b99671ec) --- ...s-nonet-to-appstream-util-if-Network.patch | 32 +++++++++++++++++++ rpmlint.spec | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch diff --git a/0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch b/0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch new file mode 100644 index 0000000..bcff486 --- /dev/null +++ b/0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch @@ -0,0 +1,32 @@ +From c5a80c6d83af05b97ebea0014192215d39148226 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Thu, 14 Sep 2017 13:58:07 +0300 +Subject: [PATCH] AppDataCheck: Pass --nonet to appstream-util if + NetworkEnabled is False + +--- + AppDataCheck.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/AppDataCheck.py b/AppDataCheck.py +index 43320a69..20302d80 100644 +--- a/AppDataCheck.py ++++ b/AppDataCheck.py +@@ -28,8 +28,13 @@ class AppDataCheck(AbstractCheck.AbstractFilesCheck): + def check_file(self, pkg, filename): + root = pkg.dirName() + f = root + filename ++ ++ checker = appdata_checker ++ if checker[0] == "appstream-util" and not self.network_enabled: ++ checker += ("--nonet",) ++ print(checker) + try: +- st = getstatusoutput(appdata_checker + (f,)) ++ st = getstatusoutput(checker + (f,)) + except OSError: + # ignore if the checker is not installed + return +-- +2.42.0.windows.2 + diff --git a/rpmlint.spec b/rpmlint.spec index ba9b63d..571c846 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -2,7 +2,7 @@ Name: rpmlint Version: 1.10 -Release: 19 +Release: 20 Summary: Check the RPM package of tools for common errors License: GPLv2 URL: https://github.com/rpm-software-management/rpmlint @@ -16,6 +16,7 @@ Patch0003: rpmlint-1.10-missing-files-exception.patch Patch0004: rpmlint-1.10-py37mtime.patch Patch0005: rpmlint-1.10-py37magic.patch Patch0006: rpmlint-1.10-ugly-workaroud-for-RPM-4.14-vs-4.15-python3-bindings-incompatibility.patch +Patch0007: 0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch BuildArch: noarch @@ -62,6 +63,9 @@ install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/rpmlint/config %{_mandir}/man1/* %changelog +* Tue Oct 17 2023 liubo - 1.10-20 +- AppDataCheck: Pass --nonet to appstream-util if NetworkEnabled is False + * Wed Nov 4 2020 Guoshuai Sun - 1.10-19 - Ugly workaroud for RPM 4.14 vs 4.15 python3 bindings incompatibility