From fb07d0770e064867215af7c9bee466f788972f0c Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 25 Oct 2024 14:51:30 +0300 Subject: [PATCH] import gnome-desktop-testing-2018.1-19.el10 --- .gitignore | 1 + .gnome-desktop-testing.metadata | 1 + ...rash-on-unknown-command-line-options.patch | 41 +++++ ...ELPLAN-170235-Fix-OpenScanHub-report.patch | 67 ++++++++ SPECS/gnome-desktop-testing.spec | 159 ++++++++++++++++++ 5 files changed, 269 insertions(+) create mode 100644 .gitignore create mode 100644 .gnome-desktop-testing.metadata create mode 100644 SOURCES/0001-Don-t-crash-on-unknown-command-line-options.patch create mode 100644 SOURCES/0001-Resolve-RHELPLAN-170235-Fix-OpenScanHub-report.patch create mode 100644 SPECS/gnome-desktop-testing.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b817d22 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-desktop-testing-v2018.1.tar.gz diff --git a/.gnome-desktop-testing.metadata b/.gnome-desktop-testing.metadata new file mode 100644 index 0000000..4bbd763 --- /dev/null +++ b/.gnome-desktop-testing.metadata @@ -0,0 +1 @@ +c5f220c49918bd37fa6595ac36c8d061901dc9c9 SOURCES/gnome-desktop-testing-v2018.1.tar.gz diff --git a/SOURCES/0001-Don-t-crash-on-unknown-command-line-options.patch b/SOURCES/0001-Don-t-crash-on-unknown-command-line-options.patch new file mode 100644 index 0000000..2454040 --- /dev/null +++ b/SOURCES/0001-Don-t-crash-on-unknown-command-line-options.patch @@ -0,0 +1,41 @@ +From 6f1a480b8d1a4db83cd5ce8bd3df23dae001dbab Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 28 Nov 2019 14:48:16 +0100 +Subject: [PATCH] Don't crash on unknown command-line options + +gnome-desktop-testing-runner --foo +made it crash because it tried to access a number of arrays which +weren't allocated at option parsing time. Simply allocate them so we +access empty arrays instead of dereference a NULL pointer. +--- + src/gnome-desktop-testing-runner.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c +index 7ddaaaf..7987936 100644 +--- a/src/gnome-desktop-testing-runner.c ++++ b/src/gnome-desktop-testing-runner.c +@@ -855,6 +855,9 @@ main (int argc, char **argv) + + memset (&appstruct, 0, sizeof (appstruct)); + app = &appstruct; ++ app->pending_tests = g_hash_table_new (NULL, NULL); ++ app->tests = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref); ++ app->failed_test_msgs = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free); + + /* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */ + g_setenv ("GIO_USE_VFS", "local", TRUE); +@@ -889,10 +892,6 @@ main (int argc, char **argv) + else + app->parallel = opt_parallel; + +- app->pending_tests = g_hash_table_new (NULL, NULL); +- app->tests = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref); +- app->failed_test_msgs = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free); +- + if (opt_dirs) + datadirs_iter = (const char *const*) opt_dirs; + else +-- +2.23.0 + diff --git a/SOURCES/0001-Resolve-RHELPLAN-170235-Fix-OpenScanHub-report.patch b/SOURCES/0001-Resolve-RHELPLAN-170235-Fix-OpenScanHub-report.patch new file mode 100644 index 0000000..e773d3e --- /dev/null +++ b/SOURCES/0001-Resolve-RHELPLAN-170235-Fix-OpenScanHub-report.patch @@ -0,0 +1,67 @@ +From 34d62ea8af9b2ec83acedfeac31c3d345e88d30b Mon Sep 17 00:00:00 2001 +From: Takao Fujiwara +Date: Thu, 13 Jun 2024 22:30:51 +0900 +Subject: [PATCH] Resolve RHELPLAN-170235 Fix OpenScanHub report + +- Fix deprecated g_spawn_check_exit_status with -Wdeprecated-declarations +- Fix uninitialized n_failed with -Wanalyzer-use-of-uninitialized-value +- Fix to check return value of g_setenv() with CWE-252 +--- + src/gnome-desktop-testing-runner.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/src/gnome-desktop-testing-runner.c b/src/gnome-desktop-testing-runner.c +index 150489f..b17b843 100644 +--- a/src/gnome-desktop-testing-runner.c ++++ b/src/gnome-desktop-testing-runner.c +@@ -46,7 +46,7 @@ rm_rf (GFile *path, GError **error) + if (!g_spawn_sync (NULL, (char**)child_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, + NULL, NULL, &estatus, error)) + return FALSE; +- if (!g_spawn_check_exit_status (estatus, error)) ++ if (!g_spawn_check_wait_status (estatus, error)) + return FALSE; + return TRUE; + } +@@ -348,7 +348,7 @@ on_test_exited (GObject *obj, + if (!g_subprocess_wait (proc, cancellable, error)) + goto out; + estatus = g_subprocess_get_status (proc); +- if (!g_spawn_check_exit_status (estatus, &tmp_error)) ++ if (!g_spawn_check_wait_status (estatus, &tmp_error)) + { + if (g_error_matches (tmp_error, G_SPAWN_EXIT_ERROR, 77)) + { +@@ -671,7 +671,9 @@ main (int argc, char **argv) + GOptionContext *context; + TestRunnerApp appstruct; + const char *const *datadirs_iter; +- int n_passed, n_skipped, n_failed; ++ int n_passed = 0; ++ int n_skipped = 0; ++ int n_failed = 0; + + memset (&appstruct, 0, sizeof (appstruct)); + app = &appstruct; +@@ -680,7 +682,9 @@ main (int argc, char **argv) + app->failed_test_msgs = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free); + + /* avoid gvfs (http://bugzilla.gnome.org/show_bug.cgi?id=526454) */ +- g_setenv ("GIO_USE_VFS", "local", TRUE); ++ errno = 0; ++ if (!g_setenv ("GIO_USE_VFS", "local", TRUE)) ++ g_warning ("Failed to set GIO_USE_VFS=local: %s", g_strerror (errno)); + + context = g_option_context_new ("[PREFIX...] - Run installed tests"); + g_option_context_add_main_entries (context, options, NULL); +@@ -815,7 +819,6 @@ main (int argc, char **argv) + struct rusage child_rusage; + g_autofree char *rusage_str = NULL; + +- n_passed = n_skipped = n_failed = 0; + for (i = 0; i < app->tests->len; i++) + { + GdtrTest *test = app->tests->pdata[i]; +-- +2.45.1 + diff --git a/SPECS/gnome-desktop-testing.spec b/SPECS/gnome-desktop-testing.spec new file mode 100644 index 0000000..4d14e27 --- /dev/null +++ b/SPECS/gnome-desktop-testing.spec @@ -0,0 +1,159 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.1) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 19; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +Name: gnome-desktop-testing +Version: 2018.1 +Release: %autorelease +Summary: GNOME test runner for installed tests + +License: LGPLv2+ +URL: https://live.gnome.org/Initiatives/GnomeGoals/InstalledTests +Source0: https://gitlab.gnome.org/GNOME/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz + +BuildRequires: pkgconfig(gio-unix-2.0) +BuildRequires: pkgconfig(libsystemd) +# I don't see any libgsystem dependencies +#BuildRequires: pkgconfig(libgsystem) +BuildRequires: git automake autoconf libtool +BuildRequires: make + +# https://gitlab.gnome.org/GNOME/gnome-desktop-testing/merge_requests/1 +Patch0: 0001-Don-t-crash-on-unknown-command-line-options.patch +Patch1: 0001-Resolve-RHELPLAN-170235-Fix-OpenScanHub-report.patch + +%description +gnome-desktop-testing-runner is a basic runner for tests that are +installed in /usr/share/installed-tests. For more information, see +"https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests" + +%prep +%autosetup -S git_am -n %{name}-v%{version} +NOCONFIGURE=1 ./autogen.sh + +%build +%configure +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +%files +%doc COPYING README +%{_bindir}/gnome-desktop-testing-runner +%{_bindir}/ginsttest-runner + +%changelog +* Fri Oct 25 2024 MSVSphere Packaging Team - 2018.1-19 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Mon Jun 24 2024 Troy Dawson - 2018.1-19 +- Bump release for June 2024 mass rebuild + +* Thu Jun 13 2024 Takao Fujiwara - 2018.1-18 +- Resolve RHELPLAN-170235 Fix OpenScanHub report +- Fix typo + +* Thu Jun 13 2024 Takao Fujiwara - 2018.1-17 +- Resolve RHELPLAN-170235 Fix OpenScanHub report +- Fix deprecated g_spawn_check_exit_status with -Wdeprecated-declarations +- Fix uninitialized n_failed with -Wanalyzer-use-of-uninitialized-value +- Fix to check return value of g_setenv() with CWE-252 + +* Tue Jun 11 2024 Takao Fujiwara - 2018.1-16 +- Add CI + +* Wed Jan 24 2024 Fedora Release Engineering - 2018.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 2018.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 2018.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 2018.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 2018.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 2018.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 2018.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 2018.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Aug 01 2020 Fedora Release Engineering - 2018.1-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 2018.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 2018.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Nov 28 2019 Bastien Nocera - 2018.1-1 ++ gnome-desktop-testing-2018.1-1 +- Update to 2018.1 + +* Thu Jul 25 2019 Fedora Release Engineering - 2016.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 2016.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 2016.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 2016.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Aug 07 2017 Colin Walters - 2016.1-6 +- Fix systemd BR + +* Wed Aug 02 2017 Fedora Release Engineering - 2016.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2016.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2016.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Mar 31 2016 Colin Walters - 2016.1-2 +- New upstream version + +* Wed Feb 03 2016 Fedora Release Engineering - 2014.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2014.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Aug 16 2014 Fedora Release Engineering - 2014.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2014.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Jan 30 2014 Colin Walters - 2014.1-1 +- New upstream release + +* Sat Aug 03 2013 Fedora Release Engineering - 2013.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jun 21 2013 Matthias Clasen - 2013.1-1 +- Initial packaging (#976919) + +## END: Generated by rpmautospec