From fe5ce262f5d17cb28eaccc596a2729d4c0a1bad8 Mon Sep 17 00:00:00 2001 From: Andrei Lukoshko Date: Thu, 4 Feb 2021 17:27:41 +0300 Subject: [PATCH] Add AlmaLinux plugin --- doc/Makefile.am | 5 +- doc/almalinux_report_event.conf.5 | 1 + doc/report_AlmaLinuxBugTracker.conf.txt | 45 ++ doc/report_almalinux.conf.txt | 41 ++ po/POTFILES.in | 10 + src/plugins/Makefile.am | 12 +- src/plugins/almalinux_report_event.conf | 38 ++ src/plugins/mantisbt.c | 4 +- src/plugins/report_AlmaLinuxBugTracker.conf | 4 + src/plugins/report_AlmaLinuxBugTracker.xml | 543 ++++++++++++++++++ src/plugins/report_AlmaLinuxBugTracker.xml.in | 66 +++ src/plugins/report_EmergencyAnalysis.xml | 4 +- src/plugins/report_uReport.xml | 4 +- src/plugins/report_uReport.xml.in | 2 +- src/plugins/reporter-mantisbt.c | 4 +- src/plugins/reporter-ureport.c | 2 +- src/plugins/ureport.conf | 2 +- src/workflows/Makefile.am | 26 +- src/workflows/report_almalinux.conf | 31 + src/workflows/workflow_AlmaLinuxCCpp.xml | 42 ++ src/workflows/workflow_AlmaLinuxCCpp.xml.in | 12 + src/workflows/workflow_AlmaLinuxJava.xml | 41 ++ src/workflows/workflow_AlmaLinuxJava.xml.in | 11 + .../workflow_AlmaLinuxJavaScript.xml | 41 ++ .../workflow_AlmaLinuxJavaScript.xml.in | 11 + .../workflow_AlmaLinuxKerneloops.xml | 41 ++ .../workflow_AlmaLinuxKerneloops.xml.in | 11 + src/workflows/workflow_AlmaLinuxLibreport.xml | 39 ++ .../workflow_AlmaLinuxLibreport.xml.in | 9 + src/workflows/workflow_AlmaLinuxPython.xml | 41 ++ src/workflows/workflow_AlmaLinuxPython.xml.in | 11 + src/workflows/workflow_AlmaLinuxPython3.xml | 41 ++ .../workflow_AlmaLinuxPython3.xml.in | 11 + src/workflows/workflow_AlmaLinuxVmcore.xml | 42 ++ src/workflows/workflow_AlmaLinuxVmcore.xml.in | 12 + src/workflows/workflow_AlmaLinuxXorg.xml | 39 ++ src/workflows/workflow_AlmaLinuxXorg.xml.in | 9 + 37 files changed, 1289 insertions(+), 19 deletions(-) create mode 100644 doc/almalinux_report_event.conf.5 create mode 100644 doc/report_AlmaLinuxBugTracker.conf.txt create mode 100644 doc/report_almalinux.conf.txt create mode 100644 src/plugins/almalinux_report_event.conf create mode 100644 src/plugins/report_AlmaLinuxBugTracker.conf create mode 100644 src/plugins/report_AlmaLinuxBugTracker.xml create mode 100644 src/plugins/report_AlmaLinuxBugTracker.xml.in create mode 100644 src/workflows/report_almalinux.conf create mode 100644 src/workflows/workflow_AlmaLinuxCCpp.xml create mode 100644 src/workflows/workflow_AlmaLinuxCCpp.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxJava.xml create mode 100644 src/workflows/workflow_AlmaLinuxJava.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxJavaScript.xml create mode 100644 src/workflows/workflow_AlmaLinuxJavaScript.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxKerneloops.xml create mode 100644 src/workflows/workflow_AlmaLinuxKerneloops.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxLibreport.xml create mode 100644 src/workflows/workflow_AlmaLinuxLibreport.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxPython.xml create mode 100644 src/workflows/workflow_AlmaLinuxPython.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxPython3.xml create mode 100644 src/workflows/workflow_AlmaLinuxPython3.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxVmcore.xml create mode 100644 src/workflows/workflow_AlmaLinuxVmcore.xml.in create mode 100644 src/workflows/workflow_AlmaLinuxXorg.xml create mode 100644 src/workflows/workflow_AlmaLinuxXorg.xml.in diff --git a/doc/Makefile.am b/doc/Makefile.am index 837036b..a3ec01b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -51,7 +51,9 @@ MAN5_TXT += libreport.conf.txt MAN5_TXT += mailx.conf.txt MAN5_TXT += mailx_event.conf.txt MAN5_TXT += print_event.conf.txt +MAN5_TXT += report_AlmaLinuxBugTracker.conf.txt MAN5_TXT += report_Bugzilla.conf.txt +MAN5_TXT += report_almalinux.conf.txt MAN5_TXT += report_event.conf.txt MAN5_TXT += report_fedora.conf.txt MAN5_TXT += report_centos.conf.txt @@ -71,7 +73,8 @@ MAN5_TXT += ureport.conf.txt MAN5_TXT += upload.conf.txt MAN5_PREFORMATTED = -MAN5_PREFORMATTED += centos_report_event.conf.5 +MAN5_PREFORMATTED += centos_report_event.conf.5 \ + almalinux_report_event.conf.5 # Manual pages are generated from .txt via Docbook man1_MANS = ${MAN1_TXT:%.txt=%.1} diff --git a/doc/almalinux_report_event.conf.5 b/doc/almalinux_report_event.conf.5 new file mode 100644 index 0000000..71c3fcb --- /dev/null +++ b/doc/almalinux_report_event.conf.5 @@ -0,0 +1 @@ +.so man5/report_event.conf.5 diff --git a/doc/report_AlmaLinuxBugTracker.conf.txt b/doc/report_AlmaLinuxBugTracker.conf.txt new file mode 100644 index 0000000..0c84f94 --- /dev/null +++ b/doc/report_AlmaLinuxBugTracker.conf.txt @@ -0,0 +1,45 @@ +report_AlmaLinuxBugTracker.conf(5) +================================== + +NAME +---- +report_AlmaLinuxBugTracker.conf - libreport's configuration file for 'report_AlmaLinuxBugTracker' events. + +DESCRIPTION +----------- +This configuration file contains values for options defined in +/usr/share/libreport/events/report_AlmaLinuxBugTracker.xml + +Configuration file lines should have 'PARAM = VALUE' format. The parameters are: + +'Mantisbt_Login':: + Login to MantisBT account. + +'Mantisbt_Password':: + Password to MantisBT account. + +'Mantisbt_MantisbtURL':: + MantisBT HTTP(S) address. (default: https://bugs.almalinux.org) + +'Mantisbt_SSLVerify':: + Use yes/true/on/1 to verify server's SSL certificate. (default: yes) + +'Mantisbt_Project':: + Project issue field value. Useful if you needed different project than specified in /etc/os-release + +'Mantisbt_ProjectVersion':: + Version issue field value. Useful if you needed different project version than specified in /etc/os-release + +'http_proxy':: + the proxy server to use for HTTP + +'HTTPS_PROXY':: + the proxy server to use for HTTPS + +SEE ALSO +-------- +report_event.conf(5), reporter-mantisbt(1) + +AUTHOR +------ +* AlmaLinux team diff --git a/doc/report_almalinux.conf.txt b/doc/report_almalinux.conf.txt new file mode 100644 index 0000000..613545a --- /dev/null +++ b/doc/report_almalinux.conf.txt @@ -0,0 +1,41 @@ +report_almalinux.conf(5) +======================== + +NAME +---- +report_almalinux.conf - configuration file for libreport. + +DESCRIPTION +----------- +This configuration file specifies which of the reporting work flow definitions +are applicable for all problems types on AlmaLinux. + +All applicable work flows are presented to users in User Interface as +possibilities for processing of any problems. A particular work flow becomes +applicable if its conditions are satisfied. + +This configuration file consists from one condition per line. + +Each condition line must start with EVENT=workflow_NAME where "workflow_" is +constant prefix and "workflow_NAME" is base name of path to reporting work flow +configuration file. + +The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR +is a name of problem directory element to be checked (for example, +"executable", "package", hostname" etc). The condition may consists +from as many element checks as it is necessary. + +EXAMPLES +-------- +Condition line:: + EVENT=workflow_AlmaLinuxCCpp analyzer=CCpp + +The condition line above expects existence of /usr/share/libreport/workflows/workflow_AlmaLinuxCCpp.xml + +SEE ALSO +-------- +report-gtk(1) + +AUTHOR +------ +* AlmaLinux team diff --git a/po/POTFILES.in b/po/POTFILES.in index fc740ff..5a3306f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -45,6 +45,7 @@ src/plugins/reporter-rhtsupport-parse.c src/plugins/reporter-systemd-journal.c src/plugins/reporter-upload.c src/plugins/reporter-mantisbt.c +src/plugins/report_AlmaLinuxBugTracker.xml.in src/plugins/report_CentOSBugTracker.xml.in src/plugins/report_Kerneloops.xml.in src/plugins/report_Logger.xml.in @@ -59,6 +60,15 @@ src/plugins/rhbz.c src/plugins/mantisbt.c src/plugins/reporter-ureport.c src/report-newt/report-newt.c +src/workflows/workflow_AlmaLinuxCCpp.xml.in +src/workflows/workflow_AlmaLinuxJava.xml.in +src/workflows/workflow_AlmaLinuxJavaScript.xml.in +src/workflows/workflow_AlmaLinuxKerneloops.xml.in +src/workflows/workflow_AlmaLinuxLibreport.xml.in +src/workflows/workflow_AlmaLinuxPython.xml.in +src/workflows/workflow_AlmaLinuxPython3.xml.in +src/workflows/workflow_AlmaLinuxVmcore.xml.in +src/workflows/workflow_AlmaLinuxXorg.xml.in src/workflows/workflow_AnacondaFedora.xml.in src/workflows/workflow_AnacondaRHEL.xml.in src/workflows/workflow_AnacondaRHELBugzilla.xml.in diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index f73e7dc..695a056 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -70,9 +70,11 @@ reporters_events_conf += report_Bugzilla.conf endif if BUILD_MANTISBT -reporters_events += report_CentOSBugTracker.xml +reporters_events += report_CentOSBugTracker.xml \ + report_AlmaLinuxBugTracker.xml -reporters_events_conf += report_CentOSBugTracker.conf +reporters_events_conf += report_CentOSBugTracker.conf \ + report_AlmaLinuxBugTracker.conf endif if BUILD_UREPORT @@ -102,7 +104,8 @@ dist_eventsdef_DATA = \ rhtsupport_event.conf \ uploader_event.conf \ emergencyanalysis_event.conf \ - centos_report_event.conf + centos_report_event.conf \ + almalinux_report_event.conf reporters_extra_dist = if BUILD_BUGZILLA @@ -116,7 +119,8 @@ reporters_extra_dist += report_uReport.xml.in endif if BUILD_MANTISBT -reporters_extra_dist += report_CentOSBugTracker.xml.in +reporters_extra_dist += report_CentOSBugTracker.xml.in \ + report_AlmaLinuxBugTracker.xml.in endif EXTRA_DIST = $(reporters_extra_dist) \ diff --git a/src/plugins/almalinux_report_event.conf b/src/plugins/almalinux_report_event.conf new file mode 100644 index 0000000..635a50e --- /dev/null +++ b/src/plugins/almalinux_report_event.conf @@ -0,0 +1,38 @@ +EVENT=report_AlmaLinuxBugTracker type=xorg + reporter-mantisbt + +EVENT=report_AlmaLinuxBugTracker type=Kerneloops + reporter-mantisbt + +EVENT=report_AlmaLinuxBugTracker type=vmcore + reporter-mantisbt + +EVENT=report_AlmaLinuxBugTracker type=Python component!=anaconda + test -f component || abrt-action-save-package-data + reporter-mantisbt \ + -F /etc/libreport/plugins/mantisbt_format.conf \ + -A /etc/libreport/plugins/mantisbt_formatdup.conf + +EVENT=report_AlmaLinuxBugTracker type=Python3 component!=anaconda + test -f component || abrt-action-save-package-data + reporter-mantisbt \ + -F /etc/libreport/plugins/mantisbt_format.conf \ + -A /etc/libreport/plugins/mantisbt_formatdup.conf + +EVENT=report_AlmaLinuxBugTracker type=CCpp duphash!= + test -f component || abrt-action-save-package-data + component="`cat component`" + format="mantisbt_format.conf" + test -f "/etc/libreport/plugins/mantisbt_format_$component.conf" \ + && format="mantisbt_format_$component.conf" + formatdup="mantisbt_formatdup.conf" + test -f "/etc/libreport/plugins/mantisbt_formatdup_$component.conf" \ + && formatdup="mantisbt_formatdup_$component.conf" + reporter-mantisbt \ + -F "/etc/libreport/plugins/$format" \ + -A "/etc/libreport/plugins/$formatdup" + +EVENT=report_AlmaLinuxBugTracker analyzer=libreport + reporter-mantisbt \ + -F /etc/libreport/plugins/mantisbt_format_analyzer_libreport.conf \ + -A /etc/libreport/plugins/mantisbt_formatdup_analyzer_libreport.conf diff --git a/src/plugins/mantisbt.c b/src/plugins/mantisbt.c index 1750dc5..92804d4 100644 --- a/src/plugins/mantisbt.c +++ b/src/plugins/mantisbt.c @@ -336,7 +336,7 @@ soap_add_new_issue_parameters(soap_request_t *req, free(type); } - soap_node_add_child_node(issue_node, "os_build", SOAP_STRING, version); + soap_node_add_child_node(issue_node, "version", SOAP_STRING, version); soap_node_add_child_node(issue_node, "category", SOAP_STRING, category); soap_node_add_child_node(issue_node, "summary", SOAP_STRING, summary); soap_node_add_child_node(issue_node, "description", SOAP_STRING, description); @@ -891,7 +891,7 @@ mantisbt_search_duplicate_issues(mantisbt_settings_t *settings, const char *cate // version if (version != NULL) - soap_filter_add_new_array_parameter(filter_node, "os_build", SOAP_STRINGARRAY, version); + soap_filter_add_new_array_parameter(filter_node, "version", SOAP_STRINGARRAY, version); soap_request_add_method_parameter(req, "page_number", SOAP_INTEGER, "1"); soap_request_add_method_parameter(req, "per_page", SOAP_INTEGER, /* -1 means get all issues */ "-1"); diff --git a/src/plugins/report_AlmaLinuxBugTracker.conf b/src/plugins/report_AlmaLinuxBugTracker.conf new file mode 100644 index 0000000..bcbf370 --- /dev/null +++ b/src/plugins/report_AlmaLinuxBugTracker.conf @@ -0,0 +1,4 @@ +Mantisbt_MantisbtURL = https://bugs.almalinux.org +Mantisbt_Login = +Mantisbt_Password = +Mantisbt_SSLVerify = yes diff --git a/src/plugins/report_AlmaLinuxBugTracker.xml b/src/plugins/report_AlmaLinuxBugTracker.xml new file mode 100644 index 0000000..58ce438 --- /dev/null +++ b/src/plugins/report_AlmaLinuxBugTracker.xml @@ -0,0 +1,543 @@ + + + AlmaLinux Bug Tracker + Rastrejador d'errors de programari de AlmaLinux + Sledování chyb pro AlmaLinux + AlmaLinux Bug Tracker + AlmaLinux Bug Tracker + AlmaLinux-vianseurantajärjestelmä + AlmaLinux Bug Tracker + Bug tracker di AlmaLinux + AlmaLinux Bug Tracker + System śledzenia błędów projektu AlmaLinux + AlmaLinux Bug Tracker + AlmaLinux Bug Tracker + AlmaLinux felhanterare + Система стеження за вадами у AlmaLinux + AlmaLinux Bug 跟踪系统 + AlmaLinux 臭蟲追蹤器 + Report to AlmaLinux Bug Tracker + Informa al rastrejador d'errors de programari de AlmaLinux + Odeslat hlášení do sledování chyb pro AlmaLinux + Via AlmaLinux Bug Tracker berichten + Enviar informe AlmaLinux Bug Tracker + Ilmoita AlmaLinux-vianseurantajärjestelmään + Signaler à AlmaLinux Bug Tracker + Riporta sul bug tracker di AlmaLinux + Rapporteer aan AlmaLinux Bug Tracker + Zgłasza w systemie śledzenia błędów projektu AlmaLinux + Relatar ao AlmaLinux Bug Tracker + Отправить в AlmaLinux Bug Tracker + Nahlásiť problém na AlmaLinux Bug Tracker + Rapportera till AlmaLinux felhanterare + Повідомити до системи стеження за вадами у AlmaLinux + 向 AlmaLinux Bug 跟踪系统报告 + 回報給 AlmaLinux 臭蟲追蹤器 + + component,duphash,os_release + coredump,count,event_log,reported_to,vmcore + + no + + 3 + yes + yes + + + + + + + + + + + + + + + diff --git a/src/plugins/report_AlmaLinuxBugTracker.xml.in b/src/plugins/report_AlmaLinuxBugTracker.xml.in new file mode 100644 index 0000000..2e7a246 --- /dev/null +++ b/src/plugins/report_AlmaLinuxBugTracker.xml.in @@ -0,0 +1,66 @@ + + + <_name>AlmaLinux Bug Tracker + <_description>Report to AlmaLinux Bug Tracker + + component,duphash,os_release + coredump,count,event_log,reported_to,vmcore + + no + + 3 + yes + yes + + + + + + + + + + + + + + + diff --git a/src/plugins/report_EmergencyAnalysis.xml b/src/plugins/report_EmergencyAnalysis.xml index c129404..b9d87e8 100644 --- a/src/plugins/report_EmergencyAnalysis.xml +++ b/src/plugins/report_EmergencyAnalysis.xml @@ -111,7 +111,7 @@ no - https://retrace.fedoraproject.org/faf/dumpdirs/new/ + https://retrace.almalinux.org/dumpdirs/new/ - \ No newline at end of file + diff --git a/src/plugins/report_uReport.xml b/src/plugins/report_uReport.xml index 80b8daa..302a0bb 100644 --- a/src/plugins/report_uReport.xml +++ b/src/plugins/report_uReport.xml @@ -134,7 +134,7 @@ Адреса вебслужби uReport uReport 网络服务器地址 uReport 網路服務的位址 - https://retrace.fedoraproject.org/faf + https://retrace.almalinux.org - \ No newline at end of file + diff --git a/src/plugins/report_uReport.xml.in b/src/plugins/report_uReport.xml.in index 996f20b..430871b 100644 --- a/src/plugins/report_uReport.xml.in +++ b/src/plugins/report_uReport.xml.in @@ -14,7 +14,7 @@ <_label>uReport Server URL no <_description>Address of uReport webservice - https://bug-report.redhat.com + https://retrace.almalinux.org