├── .dir-locals.el ├── .git-commit-template ├── .github └── workflows │ └── release.yml ├── .gitignore ├── .packit.yml ├── .tito ├── custom │ └── abrt │ │ └── __init__.py ├── packages │ ├── .readme │ └── libreport ├── releasers.conf └── tito.props ├── CHANGELOG.md ├── COPYING ├── HACKING.md ├── INSTALL ├── Makefile.am ├── README.md ├── apidoc ├── Doxyfile.in ├── Makefile.am └── html │ └── Makefile.am ├── asciidoc.conf ├── autogen.sh ├── configure.ac ├── data ├── Makefile.am └── augeas │ ├── Makefile.am │ ├── libreport.aug │ └── test_libreport.aug ├── doc ├── Makefile.am ├── anaconda_event.conf.txt ├── bugzilla.conf.txt ├── bugzilla_anaconda_event.conf.txt ├── bugzilla_event.conf.txt ├── bugzilla_format.conf.txt ├── bugzilla_format_anaconda.conf.txt ├── bugzilla_format_analyzer_libreport.conf.txt ├── bugzilla_format_kernel.conf.txt ├── bugzilla_formatdup.conf.txt ├── bugzilla_formatdup_anaconda.conf.txt ├── bugzilla_formatdup_analyzer_libreport.conf.txt ├── centos_report_event.conf.5 ├── forbidden_words.conf.txt ├── ignored_elements.conf.txt ├── ignored_words.conf.txt ├── libreport.conf.txt ├── mailx.conf.txt ├── mailx_event.conf.txt ├── mantisbt.conf.txt ├── mantisbt_format.conf.txt ├── mantisbt_format_analyzer_libreport.conf.txt ├── mantisbt_formatdup.conf.txt ├── mantisbt_formatdup_analyzer_libreport.conf.txt ├── print_event.conf.txt ├── report-cli.txt ├── report-gtk.txt ├── report-newt.txt ├── report_Bugzilla.conf.txt ├── report_CentOSBugTracker.conf.txt ├── report_Logger.conf.txt ├── report_Uploader.conf.txt ├── report_centos.conf.txt ├── report_event.conf.txt ├── report_fedora.conf.txt ├── report_logger.conf.txt ├── report_mailx.conf.txt ├── report_rhel_bugzilla.conf.txt ├── report_uReport.conf.txt ├── report_uploader.conf.txt ├── reporter-bugzilla.txt ├── reporter-kerneloops.txt ├── reporter-mailx.txt ├── reporter-mantisbt.txt ├── reporter-print.txt ├── reporter-systemd-journal.txt ├── reporter-upload.txt ├── reporter-ureport.txt ├── upload.conf.txt ├── uploader_event.conf.txt └── ureport.conf.txt ├── gen-version ├── libreport-web.pc.in ├── libreport.pc.in ├── libreport.spec ├── m4 └── ld-version-script.m4 ├── po ├── ChangeLog ├── LINGUAS ├── Makefile.in.in ├── Makevars.template ├── POTFILES.in ├── POTFILES.skip ├── af.po ├── ar.po ├── as.po ├── ast.po ├── bg.po ├── bn.po ├── bn_IN.po ├── bs.po ├── ca.po ├── cs.po ├── da.po ├── de.po ├── el.po ├── en_GB.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fa.po ├── fi.po ├── fr.po ├── fur.po ├── gl.po ├── gu.po ├── he.po ├── hi.po ├── hu.po ├── ia.po ├── id.po ├── it.po ├── ja.po ├── ka.po ├── kk.po ├── km.po ├── kn.po ├── ko.po ├── libreport.pot ├── lt.po ├── lv.po ├── ml.po ├── mr.po ├── nb.po ├── nds.po ├── nl.po ├── nn.po ├── or.po ├── pa.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ru.po ├── si.po ├── sk.po ├── sq.po ├── sr.po ├── sr_Latn.po ├── sv.po ├── ta.po ├── te.po ├── tg.po ├── th.po ├── tr.po ├── uk.po ├── ur.po ├── vi.po ├── zh_CN.po ├── zh_HK.po └── zh_TW.po ├── src ├── Makefile.am ├── cli │ ├── Makefile.am │ ├── cli-report.c │ ├── cli-report.h │ ├── cli.c │ ├── run-command.c │ └── run-command.h ├── client-python │ ├── Makefile.am │ └── reportclient │ │ ├── Makefile.am │ │ ├── __init__.py │ │ ├── client.c │ │ ├── clientmodule.c │ │ ├── common.h │ │ ├── debuginfo.py │ │ ├── dnfdebuginfo.py │ │ └── internal │ │ ├── Makefile.am │ │ ├── bz_connection.py │ │ ├── configuration_files.py │ │ ├── const.py │ │ ├── dump_dir.py │ │ ├── global_configuration.py │ │ ├── iso_date_string.py │ │ ├── problem_data.py │ │ ├── problem_formatter.py │ │ ├── problem_utils.py │ │ ├── report_result.py │ │ ├── reported_to.py │ │ └── utils.py ├── gtk-helpers │ ├── Makefile.am │ ├── ask_dialogs.c │ ├── autowrapped_label.c │ ├── config_dialog.c │ ├── desktop-utils.c │ ├── event_config_dialog.c │ ├── hyperlinks.c │ ├── internal_libreport_gtk.h │ ├── libreport-gtk.pc.in │ ├── libreport-gtk.sym │ ├── problem_details_dialog.c │ ├── problem_details_dialog.h │ ├── problem_details_widget.c │ ├── problem_details_widget.h │ ├── problem_utils.h │ ├── search_item.c │ ├── search_item.h │ ├── secrets.c │ ├── test-desktop-utils.c │ ├── utils.c │ └── workflow_config_dialog.c ├── gui-wizard-gtk │ ├── Makefile.am │ ├── forbidden_words.conf │ ├── ignored_elements.conf │ ├── ignored_words.conf │ ├── main.c │ ├── wizard.c │ ├── wizard.glade │ └── wizard.h ├── include │ ├── Makefile.am │ ├── client.h │ ├── config_item_info.h │ ├── dump_dir.h │ ├── event_config.h │ ├── file_obj.h │ ├── global_configuration.h │ ├── internal_libreport.h │ ├── libreport_curl.h │ ├── libreport_types.h │ ├── problem_data.h │ ├── problem_report.h │ ├── report.h │ ├── report_result.h │ ├── reporters.h │ ├── run_event.h │ ├── ureport.h │ ├── workflow.h │ └── xml_parser.h ├── lib │ ├── Makefile.am │ ├── abrt_sock.c │ ├── abrt_types.c │ ├── abrt_xmlrpc.c │ ├── abrt_xmlrpc.h │ ├── append_to_malloced_string.c │ ├── client.c │ ├── compress.c │ ├── concat_path_file.c │ ├── config_item_info.c │ ├── configuration_files.c │ ├── copy_file_recursive.c │ ├── copyfd.c │ ├── create_dump_dir.c │ ├── curl.c │ ├── dirsize.c │ ├── dump_dir.c │ ├── encbase64.c │ ├── event_config.c │ ├── event_xml_parser.c │ ├── file_list.c │ ├── file_obj.c │ ├── get_cmdline.c │ ├── glib_support.c │ ├── global_configuration.c │ ├── is_in_comma_separated_list.c │ ├── is_in_string_list.c │ ├── iso_date_string.c │ ├── libreport-web.sym │ ├── libreport.conf │ ├── libreport.sym │ ├── libreport_init.c │ ├── logging.c │ ├── make_descr.c │ ├── overlapping_strcpy.c │ ├── parse_options.c │ ├── parse_release.c │ ├── problem_data.c │ ├── problem_report.c │ ├── proxies.c │ ├── proxies.h │ ├── read_write.c │ ├── report.c │ ├── report_event.conf │ ├── report_result.c │ ├── reported_to.c │ ├── reporters.c │ ├── run_event.c │ ├── skip_whitespace.c │ ├── spawn.c │ ├── stdio_helpers.c │ ├── steal_directory.c │ ├── strbuf.c │ ├── ureport.c │ ├── uriparser.c │ ├── user_settings.c │ ├── utf8.c │ ├── workflow.c │ ├── workflow_xml_parser.c │ ├── xfuncs.c │ └── xml_parser.c ├── plugins │ ├── Makefile.am │ ├── bugzilla.conf │ ├── bugzilla_anaconda_event.conf │ ├── bugzilla_event.conf │ ├── bugzilla_format.conf │ ├── bugzilla_format_anaconda.conf │ ├── bugzilla_format_analyzer_libreport.conf │ ├── bugzilla_format_kernel.conf │ ├── bugzilla_formatdup.conf │ ├── bugzilla_formatdup_anaconda.conf │ ├── bugzilla_formatdup_analyzer_libreport.conf │ ├── centos_report_event.conf │ ├── mailx.conf │ ├── mailx_event.conf │ ├── mantisbt.c │ ├── mantisbt.conf │ ├── mantisbt.h │ ├── mantisbt_format.conf │ ├── mantisbt_format_analyzer_libreport.conf │ ├── mantisbt_formatdup.conf │ ├── mantisbt_formatdup_analyzer_libreport.conf │ ├── print_event.conf │ ├── python │ │ ├── Makefile.am │ │ ├── fixtures │ │ │ ├── bugzilla.conf │ │ │ ├── bugzilla_format.conf │ │ │ ├── dummy_attachment │ │ │ ├── sample_problem │ │ │ │ ├── .libreport │ │ │ │ │ └── owner │ │ │ │ ├── abrt_version │ │ │ │ ├── analyzer │ │ │ │ ├── architecture │ │ │ │ ├── cgroup │ │ │ │ ├── cmdline │ │ │ │ ├── component │ │ │ │ ├── core_backtrace │ │ │ │ ├── coredump │ │ │ │ ├── count │ │ │ │ ├── cpuinfo │ │ │ │ ├── crash_function │ │ │ │ ├── dso_list │ │ │ │ ├── executable │ │ │ │ ├── journald_cursor │ │ │ │ ├── kernel │ │ │ │ ├── last_occurrence │ │ │ │ ├── limits │ │ │ │ ├── maps │ │ │ │ ├── open_fds │ │ │ │ ├── os_info │ │ │ │ ├── os_release │ │ │ │ ├── package │ │ │ │ ├── pid │ │ │ │ ├── pkg_arch │ │ │ │ ├── pkg_epoch │ │ │ │ ├── pkg_fingerprint │ │ │ │ ├── pkg_name │ │ │ │ ├── pkg_release │ │ │ │ ├── pkg_vendor │ │ │ │ ├── pkg_version │ │ │ │ ├── proc_pid_status │ │ │ │ ├── reason │ │ │ │ ├── rootdir │ │ │ │ ├── runlevel │ │ │ │ ├── time │ │ │ │ ├── type │ │ │ │ ├── uid │ │ │ │ └── uuid │ │ │ └── vcr_cassettes │ │ │ │ ├── add_attachment.yaml │ │ │ │ ├── create_bug.yaml │ │ │ │ └── get_bug.yaml │ │ ├── reporter_bugzilla.py │ │ └── test_reporter_bugzilla.py │ ├── report_Bugzilla.conf │ ├── report_Bugzilla.xml.in.in │ ├── report_CentOSBugTracker.conf │ ├── report_CentOSBugTracker.xml.in │ ├── report_Kerneloops.xml.in │ ├── report_Logger.conf │ ├── report_Logger.xml.in │ ├── report_Mailx.xml.in │ ├── report_Uploader.conf │ ├── report_Uploader.xml.in │ ├── report_uReport.xml.in │ ├── reporter-bugzilla.c │ ├── reporter-kerneloops.c │ ├── reporter-mailx.c │ ├── reporter-mantisbt.c │ ├── reporter-print.c │ ├── reporter-systemd-journal.c │ ├── reporter-upload.c │ ├── reporter-ureport.c │ ├── rhbz.c │ ├── rhbz.h │ ├── upload.conf │ ├── uploader_event.conf │ ├── ureport.conf │ └── watch_Bugzilla.xml.in ├── report-newt │ ├── Makefile.am │ └── report-newt.c ├── report-python │ ├── Makefile.am │ └── report │ │ ├── Makefile.am │ │ ├── README │ │ ├── __init__.py │ │ ├── accountmanager.py │ │ ├── common.h │ │ ├── dump_dir.c │ │ ├── io │ │ ├── GTKIO.py │ │ ├── NewtIO.py │ │ ├── TextIO.py │ │ └── __init__.py │ │ ├── libreport-meh-test.py │ │ ├── problem_data.c │ │ ├── py_report_test.py │ │ ├── pyreport.c │ │ ├── report.c │ │ ├── reportmodule.c │ │ ├── run_event.c │ │ ├── test_dd_create │ │ ├── test_full │ │ ├── test_full2 │ │ ├── test_problem_data │ │ ├── test_problem_data2 │ │ ├── test_run_event_state │ │ ├── test_run_event_state1 │ │ ├── test_setroubleshoot_example │ │ └── test_setroubleshoot_example2 └── workflows │ ├── Makefile.am │ ├── anaconda_event.conf │ ├── report_centos.conf │ ├── report_fedora.conf │ ├── report_logger.conf │ ├── report_mailx.conf │ ├── report_rhel_bugzilla.conf │ ├── report_uReport.conf │ ├── report_uploader.conf │ ├── workflow_AnacondaFedora.xml.in │ ├── workflow_AnacondaRHELBugzilla.xml.in │ ├── workflow_AnacondaUpload.xml.in │ ├── workflow_CentOSCCpp.xml.in │ ├── workflow_CentOSJava.xml.in │ ├── workflow_CentOSJavaScript.xml.in │ ├── workflow_CentOSKerneloops.xml.in │ ├── workflow_CentOSLibreport.xml.in │ ├── workflow_CentOSPython.xml.in │ ├── workflow_CentOSPython3.xml.in │ ├── workflow_CentOSVmcore.xml.in │ ├── workflow_CentOSXorg.xml.in │ ├── workflow_FedoraCCpp.xml.in │ ├── workflow_FedoraJava.xml.in │ ├── workflow_FedoraJavaScript.xml.in │ ├── workflow_FedoraKerneloops.xml.in │ ├── workflow_FedoraLibreport.xml.in │ ├── workflow_FedoraPython.xml.in │ ├── workflow_FedoraPython3.xml.in │ ├── workflow_FedoraVmcore.xml.in │ ├── workflow_FedoraXorg.xml.in │ ├── workflow_Logger.xml.in │ ├── workflow_LoggerCCpp.xml.in │ ├── workflow_Mailx.xml.in │ ├── workflow_MailxCCpp.xml.in │ ├── workflow_RHELBugzillaCCpp.xml.in │ ├── workflow_RHELBugzillaJava.xml.in │ ├── workflow_RHELBugzillaJavaScript.xml.in │ ├── workflow_RHELBugzillaKerneloops.xml.in │ ├── workflow_RHELBugzillaLibreport.xml.in │ ├── workflow_RHELBugzillaPython.xml.in │ ├── workflow_RHELBugzillaVmcore.xml.in │ ├── workflow_RHELBugzillaXorg.xml.in │ ├── workflow_Upload.xml.in │ ├── workflow_UploadCCpp.xml.in │ └── workflow_uReport.xml.in └── tests ├── Makefile.am ├── atlocal.in ├── bugzilla_plugin.at.in ├── client.at ├── client_python.at ├── compress.c ├── conf ├── default │ ├── file.conf │ └── test_ignored.conf ├── event_implicit_no_support_restricted.xml ├── event_no_support_restricted.xml ├── event_support_restricted_no_option.xml ├── event_support_restricted_with_option.xml ├── event_test_definition.xml ├── first │ └── file.conf ├── second │ └── file.conf └── workflow_test_definition.xml ├── configuration_files.at ├── data ├── compressed-file ├── compressed-file.lz4 ├── compressed-file.xz └── compressed-file.zst ├── dump_dir.at ├── event_config.at ├── forbidden_words.at ├── glib_helpers.at ├── global_config.at ├── gtk-meh-test.py ├── helpers ├── testsuite.h └── testsuite_tools.h ├── is_text_file.at ├── iso_date.at ├── libreport_types.at ├── load_rule_list.at ├── local.at ├── make_description.at ├── mock_bugzilla_server ├── mock_bugzilla_server.py └── products.json ├── newt-meh-test.py ├── osinfo.at ├── osrelease.at ├── problem_data.at ├── problem_report.at ├── proc_helpers.at ├── report_python.at ├── report_result.at ├── reported_to.at ├── rules ├── comments ├── conditions ├── consecutive_events ├── empty ├── include_multiple ├── include_right_after_event ├── include_simple ├── newline_condition ├── newline_in_event ├── oneline ├── only_comments └── simple ├── sample_problems ├── 1 │ ├── architecture │ ├── backtrace │ ├── component │ ├── time │ └── type ├── 2 │ ├── architecture │ ├── component │ ├── time │ └── type └── 3 │ ├── architecture │ ├── component │ ├── time │ └── type ├── sitem.at ├── strbuf.at ├── string_list.at ├── taghyperlinks.at ├── testsuite.at ├── ureport.at ├── ureport └── certs │ ├── correct │ ├── cert.pem │ └── key.pem │ ├── only_cert │ └── cert.pem │ └── only_key │ └── key.pem ├── uriparser.at ├── valgrind.supp ├── xfuncs.at └── xml_definition.at /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;; Emacs settings for ABRT 2 | ((c-mode . ((c-file-style . "BSD") 3 | (c-basic-offset . 4) 4 | (indent-tabs-mode . nil) 5 | (show-trailing-whitespace . t))) 6 | (c++-mode . ((c-file-style . "BSD") 7 | (c-basic-offset . 4) 8 | (indent-tabs-mode . nil) 9 | (show-trailing-whitespace . t)))) 10 | -------------------------------------------------------------------------------- /.git-commit-template: -------------------------------------------------------------------------------- 1 | COMPONENT: Subject 2 | 3 | Explanation 4 | 5 | Resolves: 6 | https://github.com/abrt/libreport/issues/XXXX 7 | https://bugzilla.redhat.com/show_bug.cgi?id=XXXXXX 8 | 9 | # Try to keep the subject line within 52 chars ----| 10 | # Also please try to not exceed 72 characters of length for the body --| 11 | # Avoid using exact file names as COMPONENT. Use keywords such as spec, 12 | # client, dump_dir etc. You do not need to follow this template 100%. 13 | # See git log for examples. 14 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Create new release 2 | on: 3 | push: 4 | tags: 5 | - '[0-9]+.[0-9]+.[0-9]+' # Semantic versioning, hence the inflexible pattern. 6 | jobs: 7 | release: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Check out sources 11 | uses: actions/checkout@v2 12 | 13 | - name: Create release 14 | uses: actions/create-release@v1 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions 17 | with: 18 | tag_name: ${{ github.ref }} 19 | release_name: Release ${{ github.ref }} 20 | draft: false 21 | prerelease: false 22 | -------------------------------------------------------------------------------- /.packit.yml: -------------------------------------------------------------------------------- 1 | specfile_path: libreport.spec 2 | files_to_sync: 3 | - .packit.yml 4 | - libreport.spec 5 | upstream_package_name: libreport 6 | upstream_project_url: https://github.com/abrt/libreport 7 | downstream_package_name: libreport 8 | 9 | # No extra dependencies are necessary to build the SRPM. 10 | srpm_build_deps: [] 11 | 12 | jobs: 13 | - job: propose_downstream 14 | trigger: release 15 | metadata: 16 | dist_git_branch: fedora-all 17 | - job: copr_build 18 | trigger: pull_request 19 | metadata: 20 | targets: 21 | - fedora-all 22 | -------------------------------------------------------------------------------- /.tito/packages/.readme: -------------------------------------------------------------------------------- 1 | the .tito/packages directory contains metadata files 2 | named after their packages. Each file has the latest tagged 3 | version and the project's relative directory. 4 | -------------------------------------------------------------------------------- /.tito/packages/libreport: -------------------------------------------------------------------------------- 1 | 2.17.15 ./ 2 | -------------------------------------------------------------------------------- /.tito/releasers.conf: -------------------------------------------------------------------------------- 1 | [fedora-git] 2 | releaser = tito.release.FedoraGitReleaser 3 | branches = master f33 4 | -------------------------------------------------------------------------------- /.tito/tito.props: -------------------------------------------------------------------------------- 1 | [buildconfig] 2 | builder = tito.builder.Builder 3 | tagger = abrt.Tagger 4 | lib_dir = .tito/custom 5 | changelog_do_not_remove_cherrypick = 0 6 | changelog_format = %s (%ae) 7 | tag_commit_message_format = Release version %(version)s 8 | tag_format = {version} 9 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | How to install 2 | ============== 3 | 4 | 1. ./autogen.sh 5 | 2. ./configure 6 | 3. make 7 | 4. make install 8 | 9 | on rpm based distros 10 | 11 | 1. dnf install tito 12 | 2. tito build --test --rpm -i 13 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | SUBDIRS = data po src tests doc apidoc 3 | 4 | EXTRA_DIST = \ 5 | libreport.pc.in \ 6 | libreport-version \ 7 | asciidoc.conf \ 8 | README.md 9 | 10 | pkgconfigdir = $(libdir)/pkgconfig 11 | pkgconfig_DATA = libreport.pc 12 | pkgconfig_DATA += libreport-web.pc 13 | 14 | rpm: 15 | tito build --rpm 16 | 17 | srpm: 18 | tito build --srpm 19 | 20 | # value for overriding from command line 21 | # e.g: make scratch-build DIST=f15 22 | DIST=rawhide 23 | scratch-build: srpm 24 | koji build --scratch $(DIST) `make srpm | grep Wrote | cut -d' ' -f2` 25 | 26 | UPLOAD_URL ?= localhost 27 | 28 | upload: dist 29 | scp $(distdir).tar.gz $$(test -n "$$UPLOAD_LOGIN" && echo "$$UPLOAD_LOGIN@")$(UPLOAD_URL) 30 | 31 | .PHONY: release 32 | release: 33 | tito tag 34 | -------------------------------------------------------------------------------- /apidoc/Makefile.am: -------------------------------------------------------------------------------- 1 | if DOXYGEN_DOCS_ENABLED 2 | SUBDIRS = html 3 | 4 | EXTRA_DIST = Doxyfile.in 5 | 6 | noinst_PROGRAMS = index.html 7 | 8 | index_html_SOURCES = Doxyfile 9 | 10 | index.html: Doxyfile 11 | doxygen Doxyfile 12 | 13 | endif 14 | 15 | MAINTAINERCLEANFILES = \ 16 | Makefile.in 17 | -------------------------------------------------------------------------------- /apidoc/html/Makefile.am: -------------------------------------------------------------------------------- 1 | CLEANFILES = *.html *.css *.png *.gif *.js 2 | 3 | MAINTAINERCLEANFILES = \ 4 | Makefile.in 5 | -------------------------------------------------------------------------------- /asciidoc.conf: -------------------------------------------------------------------------------- 1 | ifdef::doctype-manpage[] 2 | ifdef::backend-docbook[] 3 | [header] 4 | template::[header-declarations] 5 | 6 | 7 | {mantitle} 8 | {manvolnum} 9 | LIBREPORT 10 | {libreport_version} 11 | LIBREPORT MANUAL 12 | 13 | 14 | {manname} 15 | {manpurpose} 16 | 17 | endif::backend-docbook[] 18 | endif::doctype-manpage[] 19 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = augeas 2 | -------------------------------------------------------------------------------- /data/augeas/Makefile.am: -------------------------------------------------------------------------------- 1 | augeasdir = $(datadir)/augeas/lenses 2 | dist_augeas_DATA = libreport.aug 3 | 4 | check-local: 5 | $(AUGPARSE) -I "$(abs_builddir)" "$(abs_builddir)/test_libreport.aug" 6 | 7 | EXTRA_DIST = test_libreport.aug 8 | -------------------------------------------------------------------------------- /data/augeas/libreport.aug: -------------------------------------------------------------------------------- 1 | module Libreport = 2 | autoload xfm 3 | 4 | (* Define useful primitives *) 5 | let word = /[a-zA-Z][a-zA-Z_]+/ 6 | let empty_val = value "" 7 | let val = store Rx.space_in 8 | let equal = Sep.space_equal 9 | let hard_eol = Util.del_str "\n" 10 | let eol = Util.eol 11 | 12 | (* Define entry 13 | - Key:Value pairs are separated by an equal sign. 14 | - Values can be empty. 15 | - Quoting values is not supported. 16 | *) 17 | let entry_gen (body:lens) (end:lens) = 18 | [ Util.indent . key word . equal . body . end ] 19 | 20 | let entry = entry_gen val eol 21 | | entry_gen empty_val hard_eol 22 | 23 | (* Define lens *) 24 | let lns = ( Util.comment | Util.empty | entry )* 25 | 26 | let filter = (incl "/etc/libreport/plugins/*") 27 | . (incl "/etc/libreport/events/*") 28 | . (incl (Sys.getenv("HOME") . "/.config/abrt/settings/*")) 29 | . (incl (Sys.getenv("XDG_CACHE_HOME") . "/abrt/events/*")) 30 | . (incl (Sys.getenv("HOME") . "/.cache/abrt/events/*")) 31 | . (incl (Sys.getenv("HOME") . "/.config/libreport/*")) 32 | . (excl "/etc/libreport/plugins/bugzilla_format*") 33 | . (excl "/etc/libreport/plugins/mantisbt_format*") 34 | . (excl "/etc/libreport/plugins/catalog*") 35 | . Util.stdexcl 36 | 37 | let xfm = transform lns filter 38 | -------------------------------------------------------------------------------- /doc/anaconda_event.conf.txt: -------------------------------------------------------------------------------- 1 | anaconda_event.conf(5) 2 | ====================== 3 | 4 | NAME 5 | ---- 6 | anaconda_event.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the reporting work flow definitions 11 | are applicable for a particular problem data for problems in 'anaconda' 12 | package. 13 | 14 | All applicable reporting work flows are presented to users in User Interface as 15 | possibilities for processing of particular problem in 'anaconda' package. 16 | 17 | This configuration file consists from one condition per line. 18 | 19 | Each condition line must start with EVENT=workflow_NAME where "workflow_" is 20 | constant prefix and "workflow_NAME" is base name of path to reporting work flow 21 | configuration file. 22 | 23 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 24 | is a name of problem directory element to be checked (for example, 25 | "executable", "package", hostname" etc). The condition may consists 26 | from as many element checks as it is necessary. 27 | 28 | EXAMPLES 29 | -------- 30 | Condition line:: 31 | EVENT=workflow_Anaconda component=anaconda 32 | 33 | The condition line above expects existence of /usr/share/libreport/workflows/workflow_Anaconda.xml 34 | 35 | SEE ALSO 36 | -------- 37 | report-gtk(1) 38 | 39 | AUTHOR 40 | ------ 41 | * ABRT team 42 | -------------------------------------------------------------------------------- /doc/bugzilla.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla.conf(5) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | bugzilla.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides default configuration for 'reporter-bugzilla'. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-bugzilla(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT team 19 | -------------------------------------------------------------------------------- /doc/bugzilla_anaconda_event.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_anaconda_event.conf(5) 2 | =============================== 3 | 4 | NAME 5 | ---- 6 | bugzilla_anaconda_event.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definitions of events specific for problems in 11 | 'anaconda' package. 12 | 13 | SEE ALSO 14 | -------- 15 | report_event.conf(5), report_Bugzilla.conf(5) 16 | 17 | AUTHOR 18 | ------ 19 | * ABRT team 20 | -------------------------------------------------------------------------------- /doc/bugzilla_event.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_event.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | bugzilla_event.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definitions for events which uses 11 | 'reporter-bugzilla'. 12 | 13 | By default the file contains definition for 'report_Bugzilla' event. 14 | 15 | SEE ALSO 16 | -------- 17 | report_event.conf(5), reporter-bugzilla(1), report_Bugzilla(5) 18 | 19 | AUTHOR 20 | ------ 21 | * ABRT team 22 | -------------------------------------------------------------------------------- /doc/bugzilla_format.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_format.conf(5) 2 | ======================= 3 | 4 | NAME 5 | ---- 6 | bugzilla_format.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for new Bugzilla bugs. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-bugzilla(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT Team 19 | -------------------------------------------------------------------------------- /doc/bugzilla_format_anaconda.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_format_anaconda.conf(5) 2 | ================================ 3 | 4 | NAME 5 | ---- 6 | bugzilla_format_anaconda.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of formatting for new Bugzilla bugs 11 | for problems in 'anaconda' package. 12 | 13 | SEE ALSO 14 | -------- 15 | reporter-bugzilla(1), bugzilla_anaconda_events.conf(5) 16 | 17 | AUTHOR 18 | ------ 19 | * ABRT Team 20 | -------------------------------------------------------------------------------- /doc/bugzilla_format_analyzer_libreport.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_format_analyzer_libreport.conf(5) 2 | ========================================= 3 | 4 | NAME 5 | ---- 6 | bugzilla_format_analyzer_libreport.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of formatting for new Bugzilla bugs 11 | for arbitrary problems reported over libreport. 12 | 13 | SEE ALSO 14 | -------- 15 | reporter-bugzilla(1), bugzilla_format.conf(5), bugzilla_event.conf(5) 16 | 17 | AUTHOR 18 | ------ 19 | * ABRT Team 20 | -------------------------------------------------------------------------------- /doc/bugzilla_format_kernel.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_format_kernel.conf(5) 2 | ============================== 3 | 4 | NAME 5 | ---- 6 | bugzilla_format_kernel.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of formatting for new Bugzilla bugs 11 | for Kernel oopses. 12 | 13 | SEE ALSO 14 | -------- 15 | reporter-bugzilla(1), bugzilla_format.conf(5) 16 | 17 | AUTHOR 18 | ------ 19 | * ABRT Team 20 | -------------------------------------------------------------------------------- /doc/bugzilla_formatdup.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_formatdup.conf(5) 2 | ========================== 3 | 4 | NAME 5 | ---- 6 | bugzilla_formatdup.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for 11 | additional comments to Bugzilla bugs which are found as duplicates of currently 12 | reported problem. 13 | 14 | SEE ALSO 15 | -------- 16 | reporter-bugzilla(1) 17 | 18 | AUTHOR 19 | ------ 20 | * ABRT Team 21 | -------------------------------------------------------------------------------- /doc/bugzilla_formatdup_anaconda.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_formatdup_anaconda.conf(5) 2 | ================================== 3 | 4 | NAME 5 | ---- 6 | bugzilla_formatdup_anaconda.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of formatting for additional 11 | comments of Bugzilla bugs for problems in 'anaconda' package. 12 | 13 | SEE ALSO 14 | -------- 15 | reporter-bugzilla(1), bugzilla_anaconda_events.conf(5) 16 | 17 | AUTHOR 18 | ------ 19 | * ABRT Team 20 | -------------------------------------------------------------------------------- /doc/bugzilla_formatdup_analyzer_libreport.conf.txt: -------------------------------------------------------------------------------- 1 | bugzilla_formatdup_analyzer_libreport.conf(5) 2 | ============================================= 3 | 4 | NAME 5 | ---- 6 | bugzilla_formatdup_analyzer_libreport.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for duplicate Bugzilla issues. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-bugzilla(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT Team 19 | -------------------------------------------------------------------------------- /doc/centos_report_event.conf.5: -------------------------------------------------------------------------------- 1 | .so man5/report_event.conf.5 2 | -------------------------------------------------------------------------------- /doc/forbidden_words.conf.txt: -------------------------------------------------------------------------------- 1 | forbidden_words.conf(5) 2 | ======================= 3 | 4 | NAME 5 | ---- 6 | forbidden_words.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which words are highlighted in User Interface 11 | during the process of reporting a problem for the purpose of warning a user and 12 | getting his attention before he publish security sensitive data. 13 | 14 | The configuration format is one line per forbidden word. 15 | 16 | Users can provide own file with the list of forbidden words which will be 17 | appended to the list of forbidden words loaded from 18 | /etc/libreport/forbidden_words.conf 19 | 20 | EXAMPLES 21 | -------- 22 | System configuration: 23 | 24 | /etc/libreport/forbidden_words.conf 25 | 26 | password 27 | login 28 | mastercard 29 | 30 | User configuration: 31 | 32 | $XDG_CONFIG_HOME/abrt/settings/forbidden_words.conf 33 | 34 | usersecretpassword 35 | 36 | SEE ALSO 37 | -------- 38 | report-gtk(1), ignored_words.conf(5), ignored_elements.conf(5) 39 | 40 | AUTHOR 41 | ------ 42 | * ABRT team 43 | -------------------------------------------------------------------------------- /doc/ignored_elements.conf.txt: -------------------------------------------------------------------------------- 1 | ignored_elements.conf(5) 2 | ======================== 3 | 4 | NAME 5 | ---- 6 | ignored_elements.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which elements should *NOT* be checked 11 | for sensitive data during the process of reporting a problem. This means 12 | that, for the elements specified in this file, no words will be highlighted 13 | in the User Interface (UI). See also report-gtk(1). 14 | 15 | Only elements that are known not to contain sensitive data should be on this 16 | list. 17 | 18 | Custom search in the UI ignores this list and works with all elements. 19 | 20 | The configuration format is one line per ignored element. 21 | 22 | Users can provide own file with the list of ignored elements which will be 23 | appended to the list of ignored elements loaded from 24 | /etc/libreport/ignored_elements.conf 25 | 26 | EXAMPLES 27 | -------- 28 | System configuration: 29 | 30 | /etc/libreport/ignored_elements.conf 31 | 32 | cpuinfo 33 | open_fds 34 | 35 | User configuration: 36 | 37 | $XDG_CONFIG_HOME/abrt/settings/ignored_elements.conf 38 | 39 | hostname 40 | 41 | SEE ALSO 42 | -------- 43 | report-gtk(1), forbidden_words.conf(5), ignored_words.conf(5) 44 | 45 | AUTHOR 46 | ------ 47 | * ABRT team 48 | -------------------------------------------------------------------------------- /doc/ignored_words.conf.txt: -------------------------------------------------------------------------------- 1 | ignored_words.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | ignored_words.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which words are *NOT* highlighted in User 11 | Interface during the process of reporting a problem for the purpose of warning 12 | a user and getting his attention before he publish security sensitive data. 13 | 14 | The configuration format is one line per ignored word. 15 | 16 | Users can provide own file with the list of ignored words which will be 17 | appended to the list of ignored words loaded from 18 | /etc/libreport/ignored_words.conf 19 | 20 | EXAMPLES 21 | -------- 22 | System configuration: 23 | 24 | /etc/libreport/ignored_words.conf 25 | 26 | USER= 27 | login.so 28 | SSH_ASKPASS= 29 | 30 | User configuration: 31 | 32 | $XDG_CONFIG_HOME/abrt/settings/ignored_words.conf 33 | 34 | libpassword.so 35 | 36 | SEE ALSO 37 | -------- 38 | report-gtk(1), forbidden_words.conf(5), ignored_elements.conf(5) 39 | 40 | AUTHOR 41 | ------ 42 | * ABRT team 43 | -------------------------------------------------------------------------------- /doc/libreport.conf.txt: -------------------------------------------------------------------------------- 1 | libreport.conf(5) 2 | ================= 3 | 4 | NAME 5 | ---- 6 | libreport.conf - Configuration file for libreport and its plugins. 7 | 8 | DESCRIPTION 9 | ----------- 10 | 'libreport' is libraries providing API for reporting different problems in 11 | applications to different bug targets like Bugzilla, ftp, trac, etc... 12 | 13 | The configuration file consists of items in the format "Option = Value". 14 | A description of each item follows: 15 | 16 | AlwaysExcludedElements = 'name, name1, name2':: 17 | A colon separated list of problem element names (problem element is usually 18 | represented by a single file in a directory (i.e. environment variables are 19 | stored in 'environ' file)). The list is used by libreport and its plugins to 20 | exclude the listed problem elements from reports. If you do not want to 21 | include some information in reports, add the name of problem element that 22 | contain this information on this list. 23 | 24 | FILES 25 | ----- 26 | /etc/libreport/libreport.conf:: 27 | system configuration 28 | 29 | $XDG_CONFIG_HOME/abrt/settings/libreport.conf:: 30 | user specific configuration 31 | 32 | AUTHORS 33 | ------- 34 | * ABRT team 35 | -------------------------------------------------------------------------------- /doc/mailx.conf.txt: -------------------------------------------------------------------------------- 1 | mailx.conf(5) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | mailx.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides default configuration for 'reporter-mailx'. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-mailx(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT team 19 | -------------------------------------------------------------------------------- /doc/mailx_event.conf.txt: -------------------------------------------------------------------------------- 1 | mailx_event.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | mailx_event.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definitions for events which uses 11 | 'reporter-mailx'. 12 | 13 | By default the file contains definition for 'report_Mailx', 'notify' and 14 | 'notify-dup' events for all problem types. 15 | 16 | report_Mailx event configuration file 17 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | The configuration for report_Mailx event is read from /etc/libreport/events/report_Mailx.conf file if exists. 19 | 20 | The configuration file contains values for options defined in /usr/share/libreport/events/report_Mailx.xml 21 | 22 | Configuration file lines should have 'PARAM = VALUE' format. The parameters are: 23 | 24 | 'Mailx_Subject':: 25 | Message subject 26 | 27 | 'Mailx_EmailFrom':: 28 | Sender's email 29 | 30 | 'Mailx_EmailTo':: 31 | Recipient's email 32 | 33 | 'Mailx_SendBinaryData':: 34 | Send binary files like coredump 35 | 36 | SEE ALSO 37 | -------- 38 | report_event.conf(5), reporter-mailx(1) 39 | 40 | AUTHOR 41 | ------ 42 | * ABRT team 43 | -------------------------------------------------------------------------------- /doc/mantisbt.conf.txt: -------------------------------------------------------------------------------- 1 | mantisbt.conf(5) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | mantisbt.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides default configuration for 'reporter-mantisbt'. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-mantisbt(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT team 19 | -------------------------------------------------------------------------------- /doc/mantisbt_format.conf.txt: -------------------------------------------------------------------------------- 1 | mantisbt_format.conf(5) 2 | ======================= 3 | 4 | NAME 5 | ---- 6 | mantisbt_format.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for new MantisBT issues. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-mantisbt(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT Team 19 | -------------------------------------------------------------------------------- /doc/mantisbt_format_analyzer_libreport.conf.txt: -------------------------------------------------------------------------------- 1 | mantisbt_format_analyzer_libreport.conf(5) 2 | ========================================== 3 | 4 | NAME 5 | ---- 6 | mantisbt_format_analyzer_libreport.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for duplicate MantisBT issues. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-mantisbt(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT Team 19 | -------------------------------------------------------------------------------- /doc/mantisbt_formatdup.conf.txt: -------------------------------------------------------------------------------- 1 | mantisbt_formatdup.conf(5) 2 | ========================== 3 | 4 | NAME 5 | ---- 6 | mantisbt_formatdup.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for duplicate MantisBT issues. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-mantisbt(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT Team 19 | -------------------------------------------------------------------------------- /doc/mantisbt_formatdup_analyzer_libreport.conf.txt: -------------------------------------------------------------------------------- 1 | mantisbt_formatdup_analyzer_libreport.conf(5) 2 | ============================================= 3 | 4 | NAME 5 | ---- 6 | mantisbt_formatdup_analyzer_libreport.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definition of general formatting for duplicate MantisBT issues. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-mantisbt(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT Team 19 | -------------------------------------------------------------------------------- /doc/print_event.conf.txt: -------------------------------------------------------------------------------- 1 | print_event.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | print_event.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definitions for events which reports problems 11 | to file or standard output. 12 | 13 | By default the file contains definition only for 'report_Logger' event. 14 | 15 | SEE ALSO 16 | -------- 17 | report_event.conf(5), reporter-print(1), report_Logger.conf(5) 18 | 19 | AUTHOR 20 | ------ 21 | * ABRT team 22 | -------------------------------------------------------------------------------- /doc/report-cli.txt: -------------------------------------------------------------------------------- 1 | report-cli(1) 2 | =========== 3 | 4 | NAME 5 | ---- 6 | report-cli - Work with ABRT problem directories from command line. 7 | 8 | SYNOPSIS 9 | -------- 10 | 'report-cli' [-vsp] -L[PREFIX] [PROBLEM_DIR] 11 | 12 | 'report-cli' [-vsp] -e EVENT PROBLEM_DIR 13 | 14 | 'report-cli' [-vsp] -a[y] PROBLEM_DIR 15 | 16 | 'report-cli' [-vsp] -c[y] PROBLEM_DIR 17 | 18 | 'report-cli' [-vsp] -r[y|o|d] PROBLEM_DIR 19 | 20 | DESCRIPTION 21 | ----------- 22 | 'report-cli' is a command line tool that manages application crashes and other problems 23 | caught by abrtd daemon, or created by other programs using libreport. 24 | It enables access to, manipulation of problem data, and reporting. 25 | 26 | OPTIONS 27 | ------- 28 | -L[PREFIX]:: 29 | List possible events [which start with PREFIX] 30 | 31 | -e EVENT:: 32 | Run EVENT on PROBLEM_DIR 33 | 34 | -a, --analyze:: 35 | Run analyze event(s) on PROBLEM_DIR 36 | 37 | -c, --collect:: 38 | Run collect event(s) on PROBLEM_DIR 39 | 40 | -r, --report:: 41 | Analyze, collect and report problem data in PROBLEM_DIR 42 | 43 | -d, --delete:: 44 | Remove PROBLEM_DIR after reporting 45 | 46 | -y, --always:: 47 | Noninteractive: don't ask questions, assume positive answer to all of them 48 | 49 | -o, --report-only:: 50 | With -r: do not run analyzers, run only reporters 51 | 52 | -v, --verbose:: 53 | Be verbose 54 | 55 | -s:: 56 | Log to syslog 57 | 58 | -p:: 59 | Add program names to log 60 | 61 | -V, --version:: 62 | Display version and exit 63 | 64 | AUTHORS 65 | ------- 66 | * ABRT team 67 | -------------------------------------------------------------------------------- /doc/report-newt.txt: -------------------------------------------------------------------------------- 1 | report-newt(1) 2 | ============ 3 | 4 | NAME 5 | ---- 6 | report-newt - Reports ABRT problem to various bug tracking tools. 7 | 8 | SYNOPSIS 9 | -------- 10 | 'report-newt' [-d] PROBLEM_DIR 11 | 12 | DESCRIPTION 13 | ----------- 14 | 'report-newt' is a command line tool that reports application crashes and other 15 | problems caught by abrtd daemon, or created by other programs using libreport. 16 | 17 | OPTIONS 18 | ------- 19 | -d, --delete:: 20 | Remove PROBLEM_DIR after reporting 21 | 22 | -V, --version:: 23 | Display version and exit 24 | 25 | AUTHORS 26 | ------- 27 | * ABRT team 28 | -------------------------------------------------------------------------------- /doc/report_Bugzilla.conf.txt: -------------------------------------------------------------------------------- 1 | report_Bugzilla.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | report_Bugzilla.conf - libreport's configuration file for 'report_Bugzilla' events. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file contains values for options defined in 11 | /usr/share/libreport/events/report_Bugzilla.xml 12 | 13 | Configuration file lines should have 'PARAM = VALUE' format. The parameters are: 14 | 15 | 'Bugzilla_APIKey':: 16 | API key for authentication to Bugzilla account. 17 | 18 | 'Bugzilla_BugzillaURL':: 19 | Bugzilla HTTP(S) address. (default: https://bugzilla.redhat.com) 20 | 21 | 'Bugzilla_SSLVerify':: 22 | Use yes/true/on/1 to verify server's SSL certificate. (default: yes) 23 | 24 | 'Bugzilla_Product':: 25 | Product bug field value. Useful if you needed different product than specified in /etc/os-release 26 | 27 | 'Bugzilla_ProductVersion':: 28 | Version bug field value. Useful if you needed different product version than specified in /etc/os-release 29 | 30 | 'Bugzilla_PrivateGroups':: 31 | List of Bugzilla group names that will be set to the new bug if Bugzilla_CreatePrivate equals 'yes' 32 | 33 | 'Bugzilla_CreatePrivate':: 34 | Use yes/no to control whether the new bug should have set groups listed in Bugzilla_PrivateGroups 35 | 36 | 'Bugzilla_DontMatchComponents':: 37 | Comma-separated list of package components (e.g. selinux-policy, anaconda) for which reporter-bugzilla should not use Bugzilla component match when searching for duplicate bug reports. 38 | 39 | 'http_proxy':: 40 | the proxy server to use for HTTP 41 | 42 | 'HTTPS_PROXY':: 43 | the proxy server to use for HTTPS 44 | 45 | SEE ALSO 46 | -------- 47 | report_event.conf(5), reporter-bugzilla(1), bugzilla_event.conf(5) 48 | 49 | AUTHOR 50 | ------ 51 | * ABRT team 52 | -------------------------------------------------------------------------------- /doc/report_CentOSBugTracker.conf.txt: -------------------------------------------------------------------------------- 1 | report_CentOSBugTracker.conf(5) 2 | =============================== 3 | 4 | NAME 5 | ---- 6 | report_CentOSBugTracker.conf - libreport's configuration file for 'report_CentOSBugTracker' events. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file contains values for options defined in 11 | /usr/share/libreport/events/report_CentOSBugTracker.xml 12 | 13 | Configuration file lines should have 'PARAM = VALUE' format. The parameters are: 14 | 15 | 'Mantisbt_Login':: 16 | Login to MantisBT account. 17 | 18 | 'Mantisbt_Password':: 19 | Password to MantisBT account. 20 | 21 | 'Mantisbt_MantisbtURL':: 22 | MantisBT HTTP(S) address. (default: https://bugs.centos.org) 23 | 24 | 'Mantisbt_SSLVerify':: 25 | Use yes/true/on/1 to verify server's SSL certificate. (default: yes) 26 | 27 | 'Mantisbt_Project':: 28 | Project issue field value. Useful if you needed different project than specified in /etc/os-release 29 | 30 | 'Mantisbt_ProjectVersion':: 31 | Version issue field value. Useful if you needed different project version than specified in /etc/os-release 32 | 33 | 'http_proxy':: 34 | the proxy server to use for HTTP 35 | 36 | 'HTTPS_PROXY':: 37 | the proxy server to use for HTTPS 38 | 39 | SEE ALSO 40 | -------- 41 | report_event.conf(5), reporter-mantisbt(1) 42 | 43 | AUTHOR 44 | ------ 45 | * ABRT team 46 | -------------------------------------------------------------------------------- /doc/report_Logger.conf.txt: -------------------------------------------------------------------------------- 1 | report_Logger.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | report_Logger.conf - libreport's configuration file for 'report_Logger' events. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file contains values for options defined in 11 | /usr/share/libreport/events/report_Logger.xml 12 | 13 | Configuration file lines should have 'PARAM = VALUE' format. The parameters are: 14 | 15 | 'Logger_Log_File':: 16 | Name of the logfile. 17 | 18 | 'Logger_Append':: 19 | Append new reports or overwrite the old one. 20 | 21 | SEE ALSO 22 | -------- 23 | report_event.conf(5), reporter-print(1), print_event.conf(5) 24 | 25 | AUTHOR 26 | ------ 27 | * ABRT team 28 | -------------------------------------------------------------------------------- /doc/report_Uploader.conf.txt: -------------------------------------------------------------------------------- 1 | report_Uploader.conf(5) 2 | ====================== 3 | 4 | NAME 5 | ---- 6 | report_Uploader.conf - libreport's configuration file for 'report_Uploader' events. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file contains values for options defined in 11 | /usr/share/libreport/events/report_Uploader.xml and is placed in 12 | /etc/libreport/events/report_Uploader.conf. 13 | 14 | Configuration file lines should have 'PARAM = VALUE' format. The parameters are: 15 | 16 | 'Upload_URL':: 17 | The URL where should be the tarball uploaded 18 | 19 | 'Upload_Username':: 20 | User name for the upload URL 21 | 22 | 'Upload_Password':: 23 | Password for the upload URL 24 | 25 | 'Upload_SSHPublicKey':: 26 | Path to SSH public key file 27 | 28 | 'Upload_SSHPrivateKey':: 29 | Path to SSH private key file 30 | 31 | 'http_proxy':: 32 | The proxy server to use for HTTP 33 | 34 | 'HTTPS_PROXY':: 35 | The proxy server to use for HTTPS 36 | 37 | 'FTP_PROXY':: 38 | The proxy server to use for FTP 39 | 40 | SEE ALSO 41 | -------- 42 | report_event.conf(5), reporter-upload(1) 43 | 44 | AUTHOR 45 | ------ 46 | * ABRT team 47 | -------------------------------------------------------------------------------- /doc/report_centos.conf.txt: -------------------------------------------------------------------------------- 1 | report_centos.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | report_centos.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the reporting work flow definitions 11 | are applicable for all problems types on CentOS. 12 | 13 | All applicable work flows are presented to users in User Interface as 14 | possibilities for processing of any problems. A particular work flow becomes 15 | applicable if its conditions are satisfied. 16 | 17 | This configuration file consists from one condition per line. 18 | 19 | Each condition line must start with EVENT=workflow_NAME where "workflow_" is 20 | constant prefix and "workflow_NAME" is base name of path to reporting work flow 21 | configuration file. 22 | 23 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 24 | is a name of problem directory element to be checked (for example, 25 | "executable", "package", hostname" etc). The condition may consists 26 | from as many element checks as it is necessary. 27 | 28 | EXAMPLES 29 | -------- 30 | Condition line:: 31 | EVENT=workflow_CentOSCCpp analyzer=CCpp 32 | 33 | The condition line above expects existence of /usr/share/libreport/workflows/workflow_CentOSCCpp.xml 34 | 35 | SEE ALSO 36 | -------- 37 | report-gtk(1) 38 | 39 | AUTHOR 40 | ------ 41 | * ABRT team 42 | -------------------------------------------------------------------------------- /doc/report_fedora.conf.txt: -------------------------------------------------------------------------------- 1 | report_fedora.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | report_fedora.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the reporting work flow definitions 11 | are applicable for all problems types on Fedora. 12 | 13 | All applicable work flows are presented to users in User Interface as 14 | possibilities for processing of any problems. A particular work flow becomes 15 | applicable if its conditions are satisfied. 16 | 17 | This configuration file consists from one condition per line. 18 | 19 | Each condition line must start with EVENT=workflow_NAME where "workflow_" is 20 | constant prefix and "workflow_NAME" is base name of path to reporting work flow 21 | configuration file. 22 | 23 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 24 | is a name of problem directory element to be checked (for example, 25 | "executable", "package", hostname" etc). The condition may consists 26 | from as many element checks as it is necessary. 27 | 28 | EXAMPLES 29 | -------- 30 | Condition line:: 31 | EVENT=workflow_FedoraCCpp analyzer=CCpp 32 | 33 | The condition line above expects existence of /usr/share/libreport/workflows/workflow_FedoraCCpp.xml 34 | 35 | SEE ALSO 36 | -------- 37 | report-gtk(1) 38 | 39 | AUTHOR 40 | ------ 41 | * ABRT team 42 | -------------------------------------------------------------------------------- /doc/report_logger.conf.txt: -------------------------------------------------------------------------------- 1 | report_logger.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | report_logger.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the work flow definitions 11 | are applicable to analyzing problems and export the problem data information to 12 | a text file. 13 | 14 | All applicable work flows are presented to users in User Interface as 15 | possibilities for processing of any problems. A particular work flow becomes 16 | applicable if its conditions are satisfied. 17 | 18 | This configuration file consists from condition lines. Each condition line must 19 | start with EVENT=workflow_NAME where "workflow_" is constant prefix and 20 | "workflow_NAME" is base name of path to reporting work flow configuration file. 21 | 22 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 23 | is a name of problem directory element to be checked (for example, 24 | "executable", "package", hostname" etc). The condition may consists from as 25 | many element checks as it is necessary. 26 | 27 | All condition lines in this configuration file are commented out by default. 28 | Therefore all applicable work flows from this file are not presented to users in 29 | User Interface. For enable this extension uncomment all condition line in this 30 | configuration file. 31 | 32 | EXAMPLES 33 | -------- 34 | Condition line:: 35 | EVENT=workflow_LoggerCCpp analyzer=CCpp 36 | 37 | The condition line above expects existence of 38 | /usr/share/libreport/workflows/workflow_LoggerCCpp.xml 39 | 40 | SEE ALSO 41 | -------- 42 | report-gtk(1) 43 | 44 | AUTHOR 45 | ------ 46 | * ABRT team 47 | 48 | -------------------------------------------------------------------------------- /doc/report_mailx.conf.txt: -------------------------------------------------------------------------------- 1 | report_mailx.conf(5) 2 | ==================== 3 | 4 | NAME 5 | ---- 6 | report_mailx.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the work flow definitions 11 | are applicable to analyzing problems and send information via email. 12 | 13 | All applicable work flows are presented to users in User Interface as 14 | possibilities for processing of any problems. A particular work flow becomes 15 | applicable if its conditions are satisfied. 16 | 17 | This configuration file consists from condition lines. Each condition line must 18 | start with EVENT=workflow_NAME where "workflow_" is constant prefix and 19 | "workflow_NAME" is base name of path to reporting work flow configuration file. 20 | 21 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 22 | is a name of problem directory element to be checked (for example, 23 | "executable", "package", hostname" etc). The condition may consists 24 | from as many element checks as it is necessary. 25 | 26 | All condition lines in this configuration file are commented out by default. 27 | Therefore all applicable work flows from this file are not presented to users in 28 | User Interface. For enable this extension uncomment all condition line in this 29 | configuration file. 30 | 31 | EXAMPLES 32 | -------- 33 | Condition line:: 34 | EVENT=workflow_MailxCCpp analyzer=CCpp 35 | 36 | The condition line above expects existence of 37 | /usr/share/libreport/workflows/workflow_MailxCCpp.xml 38 | 39 | SEE ALSO 40 | -------- 41 | report-gtk(1) 42 | 43 | AUTHOR 44 | ------ 45 | * ABRT team 46 | 47 | -------------------------------------------------------------------------------- /doc/report_rhel_bugzilla.conf.txt: -------------------------------------------------------------------------------- 1 | report_rhel_bugzilla.conf(5) 2 | ============================ 3 | 4 | NAME 5 | ---- 6 | report_rhel_bugzilla.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the reporting work flow definitions 11 | are applicable for all problems types on Red Hat Enterprise Linux. 12 | 13 | All applicable reporting work flows are presented to users in User Interface as 14 | possibilities for processing of all problem types. 15 | 16 | This configuration file consists from one condition per line. 17 | 18 | Each condition line must start with EVENT=workflow_NAME where "workflow_" is 19 | constant prefix and "workflow_NAME" is base name of path to reporting work flow 20 | configuration file. 21 | 22 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 23 | is a name of problem directory element to be checked (for example, 24 | "executable", "package", hostname" etc). The condition may consist 25 | of as many element checks as it is necessary. 26 | 27 | EXAMPLES 28 | -------- 29 | Condition line:: 30 | EVENT=workflow_RHELBugzillaCCpp analyzer=CCpp 31 | 32 | The condition line above expects existence of /usr/share/libreport/workflows/workflow_RHELBugzillaCCpp.xml 33 | 34 | SEE ALSO 35 | -------- 36 | report-gtk(1) 37 | 38 | AUTHOR 39 | ------ 40 | * ABRT team 41 | -------------------------------------------------------------------------------- /doc/report_uReport.conf.txt: -------------------------------------------------------------------------------- 1 | report_uReport.conf(5) 2 | ====================== 3 | 4 | NAME 5 | ---- 6 | report_uReport.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the reporting work flow definitions 11 | are applicable for all problems types on Red Hat Enterprise Linux. 12 | 13 | All applicable work flows are presented to users in User Interface as 14 | possibilities for processing of any problems. A particular work flow becomes 15 | applicable if its conditions are satisfied. 16 | 17 | This configuration file consists from one condition per line. 18 | 19 | Each condition line must start with EVENT=workflow_NAME where "workflow_" is 20 | constant prefix and "workflow_NAME" is base name of path to reporting work flow 21 | configuration file. 22 | 23 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 24 | is a name of problem directory element to be checked (for example, 25 | "executable", "package", hostname" etc). The condition may consists 26 | from as many element checks as it is necessary. 27 | 28 | EXAMPLES 29 | -------- 30 | Condition line:: 31 | EVENT=workflow_uReport 32 | 33 | The condition line above expects existence of /usr/share/libreport/workflows/workflow_uReport.xml 34 | 35 | SEE ALSO 36 | -------- 37 | report-gtk(1) 38 | 39 | AUTHOR 40 | ------ 41 | * ABRT team 42 | -------------------------------------------------------------------------------- /doc/report_uploader.conf.txt: -------------------------------------------------------------------------------- 1 | report_uploader.conf(5) 2 | ======================= 3 | 4 | NAME 5 | ---- 6 | report_uploader.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file specifies which of the work flow definitions 11 | are applicable to analyzing problems and upload the data via scp or ftp. 12 | 13 | All applicable work flows are presented to users in User Interface as 14 | possibilities for processing of any problems. A particular work flow becomes 15 | applicable if its conditions are satisfied. 16 | 17 | This configuration file consists from condition lines. Each condition line must 18 | start with EVENT=workflow_NAME where "workflow_" is constant prefix and 19 | "workflow_NAME" is base name of path to reporting work flow configuration file. 20 | 21 | The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR 22 | is a name of problem directory element to be checked (for example, 23 | "executable", "package", hostname" etc). The condition may consists 24 | from as many element checks as it is necessary. 25 | 26 | All condition lines in this configuration file are commented out by default. 27 | Therefore all applicable work flows from this file are not presented to users in 28 | User Interface. For enable this extension uncomment all condition line in this 29 | configuration file. 30 | 31 | EXAMPLES 32 | -------- 33 | Condition line:: 34 | EVENT=workflow_UploadCCpp analyzer=CCpp 35 | 36 | The condition line above expects existence of 37 | /usr/share/libreport/workflows/workflow_UploadCCpp.xml 38 | 39 | SEE ALSO 40 | -------- 41 | report-gtk(1) 42 | 43 | AUTHOR 44 | ------ 45 | * ABRT team 46 | 47 | -------------------------------------------------------------------------------- /doc/reporter-print.txt: -------------------------------------------------------------------------------- 1 | reporter-print(1) 2 | ================= 3 | 4 | NAME 5 | ---- 6 | reporter-print - Prints problem information to standard output or FILE. 7 | 8 | SYNOPSIS 9 | -------- 10 | 'reporter-print' [-v] [-d DIR] [-o FILE] [-a yes/no] [-r] 11 | 12 | DESCRIPTION 13 | ----------- 14 | The tool reads problem directory DIR and prints its text representation 15 | to stdout or to a specified FILE. 16 | 17 | Integration with ABRT events 18 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | 'reporter-print' can be used as a reporter, to allow users 20 | to report problems by writing them to a file. Example: 21 | 22 | ------------ 23 | EVENT=report reporter-print -o "${Log_File:-/tmp/abrt.log}" 24 | ------------ 25 | 26 | OPTIONS 27 | ------- 28 | -d DIR:: 29 | Path to problem directory. 30 | 31 | -v:: 32 | Be more verbose. Can be given multiple times. 33 | 34 | -o FILE:: 35 | Output file 36 | 37 | -a yes/no:: 38 | If -o FILE is specified, controls whether FILE is appended to, or 39 | overwritten. (default: no) 40 | 41 | -r:: 42 | Add a record to 'reported_to' in DIR which specifies that this 43 | problem was reported. Some tools use this to differentiate between 44 | problems which were and weren't yet reported. 45 | 46 | Output format 47 | ~~~~~~~~~~~~~ 48 | The output is designed to be machine-parsable. The elements which have 49 | only one line are printed in the form 50 | 51 | NAME:VALUE 52 | 53 | Elements which have more than one line are printed in the form 54 | 55 | NAME: 56 | :LINE1 57 | :LINE2 58 | :LINE3 59 | 60 | Output may contain empty lines for better readability. 61 | 62 | SEE ALSO 63 | -------- 64 | print_event.conf(5) 65 | 66 | AUTHORS 67 | ------- 68 | * ABRT team 69 | -------------------------------------------------------------------------------- /doc/upload.conf.txt: -------------------------------------------------------------------------------- 1 | upload.conf(5) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | upload.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides default configuration for 'reporter-upload'. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-upload(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT team 19 | -------------------------------------------------------------------------------- /doc/uploader_event.conf.txt: -------------------------------------------------------------------------------- 1 | uploader_event.conf(5) 2 | ===================== 3 | 4 | NAME 5 | ---- 6 | uploader_event.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides definitions for events which use 11 | 'reporter-uploader'. 12 | 13 | By default the file contains definition for single 'report_Uploader' event 14 | applicable for all problem types. 15 | 16 | report_Uploader event configuration file 17 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | The configuration for report_Uploader event is read from /etc/libreport/events/report_Uploader.conf file if exists. 19 | 20 | The configuration file contains values for options defined in /usr/share/libreport/events/report_Uploader.xml 21 | 22 | Configuration file lines should have 'PARAM = VALUE' format. The parameters are: 23 | 24 | 'Upload_URL':: 25 | Configured upload URL 26 | 27 | 'http_proxy':: 28 | the proxy server to use for HTTP 29 | 30 | 'HTTPS_PROXY':: 31 | the proxy server to use for HTTPS 32 | 33 | 'FTP_PROXY':: 34 | the proxy server to use for FTP 35 | 36 | SEE ALSO 37 | -------- 38 | report_event.conf(5), reporter-uploader(1) 39 | 40 | AUTHOR 41 | ------ 42 | * ABRT team 43 | -------------------------------------------------------------------------------- /doc/ureport.conf.txt: -------------------------------------------------------------------------------- 1 | ureport.conf(5) 2 | =============== 3 | 4 | NAME 5 | ---- 6 | ureport.conf - configuration file for libreport. 7 | 8 | DESCRIPTION 9 | ----------- 10 | This configuration file provides default configuration for 'reporter-ureport'. 11 | 12 | SEE ALSO 13 | -------- 14 | reporter-ureport(1) 15 | 16 | AUTHOR 17 | ------ 18 | * ABRT team 19 | -------------------------------------------------------------------------------- /gen-version: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DEF_VER=$(sed -ne '/^Version:/s/^Version:\s*//p' libreport.spec) 4 | LF=' 5 | ' 6 | 7 | if test -d .git -o -f .git && 8 | VN=$(git describe --tags --match "[0-9]*" --abbrev=4 HEAD 2>/dev/null) && 9 | case "$VN" in 10 | *$LF*) (exit 1) ;; 11 | [0-9]*) 12 | git update-index -q --refresh 13 | test -z "$(git diff-index --name-only HEAD --)" || VN="$VN-dirty" 14 | esac 15 | then 16 | VN=$(echo "$VN" | sed -e 's/-/./g'); 17 | else 18 | VN="$DEF_VER" 19 | fi 20 | 21 | echo -n $VN > libreport-version 22 | -------------------------------------------------------------------------------- /libreport-web.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libreport 7 | Description: Library providing network API for libreport 8 | Version: @VERSION@ 9 | Requires: glib-2.0 libcurl libxml-2.0 xmlrpc xmlrpc_client @JSON_C_PACKAGE@ satyr libreport 10 | Libs: -L${libdir} -lreport-web 11 | Cflags: 12 | 13 | -------------------------------------------------------------------------------- /libreport.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | sysconfdir=@sysconfdir@ 6 | dd_mode=@DEFAULT_DUMP_DIR_MODE@ 7 | plugins_conf_dir=@REPORT_PLUGINS_CONF_DIR@ 8 | 9 | Name: libreport 10 | Description: Generic library for reporting various problems 11 | Version: @VERSION@ 12 | Requires: glib-2.0 13 | Libs: -L${libdir} -lreport 14 | Cflags: -I${includedir}/libreport 15 | -------------------------------------------------------------------------------- /m4/ld-version-script.m4: -------------------------------------------------------------------------------- 1 | # ld-version-script.m4 serial 4 2 | dnl Copyright (C) 2008-2016 Free Software Foundation, Inc. 3 | dnl This file is free software; the Free Software Foundation 4 | dnl gives unlimited permission to copy and/or distribute it, 5 | dnl with or without modifications, as long as this notice is preserved. 6 | 7 | dnl From Simon Josefsson 8 | 9 | # FIXME: The test below returns a false positive for mingw 10 | # cross-compiles, 'local:' statements does not reduce number of 11 | # exported symbols in a DLL. Use --disable-ld-version-script to work 12 | # around the problem. 13 | 14 | # gl_LD_VERSION_SCRIPT 15 | # -------------------- 16 | # Check if LD supports linker scripts, and define automake conditional 17 | # HAVE_LD_VERSION_SCRIPT if so. 18 | AC_DEFUN([gl_LD_VERSION_SCRIPT], 19 | [ 20 | AC_ARG_ENABLE([ld-version-script], 21 | [AS_HELP_STRING([--enable-ld-version-script], 22 | [enable linker version script (default is enabled when possible)])], 23 | [have_ld_version_script=$enableval], 24 | [AC_CACHE_CHECK([if LD -Wl,--version-script works], 25 | [gl_cv_sys_ld_version_script], 26 | [gl_cv_sys_ld_version_script=no 27 | save_LDFLAGS=$LDFLAGS 28 | LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" 29 | echo foo >conftest.map 30 | AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], 31 | [], 32 | [cat > conftest.map < 20 | 21 | #include "client.h" 22 | /* module-level functions */ 23 | /* for include/client.h */ 24 | PyObject *p_alert(PyObject *pself, PyObject *args); 25 | PyObject *p_ask(PyObject *pself, PyObject *args); 26 | PyObject *p_ask_password(PyObject *pself, PyObject *args); 27 | PyObject *p_ask_yes_no(PyObject *pself, PyObject *args); 28 | PyObject *p_ask_yes_no_yesforever(PyObject *pself, PyObject *args); 29 | PyObject *p_ask_yes_no_save_result(PyObject *pself, PyObject *args); 30 | -------------------------------------------------------------------------------- /src/client-python/reportclient/internal/Makefile.am: -------------------------------------------------------------------------------- 1 | PYFILES = \ 2 | bz_connection.py \ 3 | dump_dir.py \ 4 | problem_data.py \ 5 | utils.py \ 6 | configuration_files.py \ 7 | global_configuration.py \ 8 | problem_formatter.py \ 9 | reported_to.py \ 10 | const.py \ 11 | iso_date_string.py \ 12 | problem_utils.py \ 13 | report_result.py 14 | 15 | if BUILD_PYTHON3 16 | py3clientdir = $(py3execdir)/reportclient/internal 17 | 18 | py3client_PYTHON = $(PYFILES) 19 | endif 20 | 21 | clean: 22 | rm -rf __pycache__ 23 | 24 | all: 25 | 26 | -------------------------------------------------------------------------------- /src/client-python/reportclient/internal/problem_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 ABRT team 2 | # Copyright (C) 2022 Red Hat Inc 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; either version 2 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | 18 | from typing import Dict, List 19 | 20 | 21 | def pd_get_item(item_name, problem_data: List[Dict]): 22 | for item in problem_data: 23 | if item['name'] == item_name: 24 | return item 25 | return None 26 | 27 | 28 | def pd_get_item_content(item_name, problem_data: List[Dict]): 29 | for item in problem_data: 30 | if item['name'] == item_name: 31 | return item['content'] 32 | return None 33 | 34 | 35 | def os_info_get_value(key, os_info: List[str]): 36 | for line in os_info: 37 | k, v = line.split('=') 38 | if k == key: 39 | return v.strip('\t\n "') 40 | return '' 41 | -------------------------------------------------------------------------------- /src/client-python/reportclient/internal/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 ABRT team 2 | # Copyright (C) 2022 Red Hat Inc 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; either version 2 of the License, or 7 | # (at your option) any later version. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | # GNU General Public License for more details. 13 | # 14 | # You should have received a copy of the GNU General Public License along 15 | # with this program; if not, write to the Free Software Foundation, Inc., 16 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | 18 | def string_to_bool(string): 19 | if string: 20 | return bool(string.lower() in ['enabled', 21 | 'enable', 22 | 'true', 23 | 'yes', 24 | 'on', 25 | '1']) 26 | return False 27 | -------------------------------------------------------------------------------- /src/gtk-helpers/Makefile.am: -------------------------------------------------------------------------------- 1 | # libreportgtk - the stuff shared among gtk clients (abrt-gui, wizard) 2 | libreport_gtk_includedir = \ 3 | $(includedir)/libreport 4 | 5 | libreport_gtk_include_HEADERS = \ 6 | internal_libreport_gtk.h \ 7 | problem_details_widget.h \ 8 | problem_details_dialog.h \ 9 | problem_utils.h 10 | 11 | lib_LTLIBRARIES = \ 12 | libreport-gtk.la 13 | 14 | libreport_gtk_la_SOURCES = \ 15 | utils.c \ 16 | event_config_dialog.c \ 17 | secrets.c \ 18 | hyperlinks.c \ 19 | autowrapped_label.c \ 20 | workflow_config_dialog.c \ 21 | config_dialog.c \ 22 | ask_dialogs.c \ 23 | search_item.c search_item.h \ 24 | problem_details_widget.c problem_details_widget.h \ 25 | problem_details_dialog.c problem_details_dialog.h \ 26 | desktop-utils.c problem_utils.h \ 27 | libreport-gtk.sym 28 | 29 | libreport_gtk_la_CPPFLAGS = \ 30 | -I$(srcdir)/../include \ 31 | -I$(srcdir)/../lib \ 32 | -Wno-error=unused-local-typedefs \ 33 | $(GTK_CFLAGS) \ 34 | $(GLIB_CFLAGS) \ 35 | $(GIO_CFLAGS) \ 36 | -DWORKFLOWS_DIR=\"$(WORKFLOWS_DIR)\" \ 37 | -DGDK_DISABLE_DEPRECATION_WARNINGS \ 38 | -D_GNU_SOURCE 39 | libreport_gtk_la_LDFLAGS = \ 40 | -version-info 1:1:0 41 | 42 | if HAVE_LD_VERSION_SCRIPT 43 | libreport_gtk_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libreport-gtk.sym 44 | endif 45 | 46 | libreport_gtk_la_LIBADD = \ 47 | $(GTK_LIBS) \ 48 | $(GLIB_LIBS) \ 49 | $(GIO_LIBS) \ 50 | ../lib/libreport.la 51 | 52 | noinst_PROGRAMS = test-desktop-utils 53 | test_desktop_utils_CFLAGS = -I$(srcdir) $(GIO_CFLAGS) 54 | test_desktop_utils_LDADD = libreport-gtk.la 55 | 56 | EXTRA_DIST = libreport-gtk.pc.in 57 | 58 | pkgconfigdir = $(libdir)/pkgconfig 59 | pkgconfig_DATA = libreport-gtk.pc 60 | -------------------------------------------------------------------------------- /src/gtk-helpers/libreport-gtk.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libreport-gtk 7 | Description: libreport bindings for GTK apps 8 | Version: @VERSION@ 9 | Requires: libreport 10 | Libs: -L${libdir} -lreport-gtk 11 | Cflags: -fPIC -I${includedir}/libreport 12 | -------------------------------------------------------------------------------- /src/gtk-helpers/libreport-gtk.sym: -------------------------------------------------------------------------------- 1 | LIBREPORT_GTK_2.13.1 { 2 | global: 3 | /* from internal_libreport_gtk.h */ 4 | libreport_make_label_autowrap_on_resize; 5 | libreport_show_events_list_dialog; 6 | libreport_is_event_config_user_storage_available; 7 | libreport_load_single_event_config_data_from_user_storage; 8 | libreport_load_event_config_data_from_user_storage; 9 | libreport_save_event_config_data_to_user_storage; 10 | libreport_show_event_config_dialog; 11 | libreport_create_event_config_dialog_content; 12 | save_data_from_event_config_dialog; 13 | libreport_add_item_to_config_liststore; 14 | new_conf_liststore; 15 | show_config_list_dialog; 16 | add_events_to_liststore; 17 | add_workflows_to_liststore; 18 | new_config_dialog; 19 | load_workflow_config_data_from_user_storage; 20 | cdialog_set_widget; 21 | cdialog_get_widget; 22 | cdialog_get_data; 23 | cdialog_run; 24 | dehydrate_config_dialog; 25 | tag_url; 26 | libreport_find_url_tokens; 27 | libreport_reload_text_to_text_view; 28 | libreport_run_ask_yes_no_yesforever_dialog; 29 | libreport_run_ask_yes_no_save_result_dialog; 30 | 31 | /* from problem_details_widget.h */ 32 | problem_details_dialog_new; 33 | problem_details_dialog_new_for_dir; 34 | 35 | /* from problem_details_dialog.h */ 36 | problem_details_widget_get_type; 37 | problem_details_widget_new; 38 | 39 | /* from problem_utils.h */ 40 | problem_create_app_from_cmdline; 41 | problem_create_app_from_env; 42 | problem_get_argv0; 43 | 44 | /* from search_item.h */ 45 | sitem_new; 46 | sitem_compare; 47 | sitem_contains; 48 | sitem_get_start_iter; 49 | sitem_get_end_iter; 50 | local: 51 | *; 52 | }; 53 | -------------------------------------------------------------------------------- /src/gtk-helpers/problem_details_dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 ABRT Team 3 | Copyright (C) 2014 RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #ifndef _PROBLEM_DETAILS_DIALOG_H 20 | #define _PROBLEM_DETAILS_DIALOG_H 21 | 22 | #include 23 | #include "problem_data.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif /* __cplusplus */ 28 | 29 | GtkWidget *problem_details_dialog_new(problem_data_t *problem, GtkWindow *parent); 30 | GtkWidget *problem_details_dialog_new_for_dir(const char *dir, GtkWindow *parent); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif /* __cplusplus */ 35 | 36 | #endif /* _PROBLEM_DETAILS_DIALOG_H */ 37 | 38 | -------------------------------------------------------------------------------- /src/gtk-helpers/problem_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) ABRT Team 3 | Copyright (C) RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include 21 | 22 | GAppInfo *problem_create_app_from_cmdline (const char *cmdline); 23 | GAppInfo *problem_create_app_from_env (const char **envp, 24 | pid_t pid); 25 | char *problem_get_argv0 (const char *cmdline); 26 | -------------------------------------------------------------------------------- /src/gtk-helpers/search_item.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) ABRT Team 3 | Copyright (C) RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef SEARCH_ITEM_H_ 21 | #define SEARCH_ITEM_H_ 22 | 23 | 24 | #include 25 | #include 26 | 27 | typedef struct 28 | { 29 | int page; //which tab in notepad 30 | GtkTextBuffer *buffer; 31 | GtkTextView *tev; 32 | GtkTextIter start; 33 | GtkTextIter end; 34 | } search_item_t; 35 | 36 | search_item_t *sitem_new(int page, 37 | GtkTextBuffer *buffer, 38 | GtkTextView *tev, 39 | GtkTextIter start, 40 | GtkTextIter end 41 | ); 42 | int sitem_compare(const search_item_t *item1, const search_item_t *item2); 43 | GtkTextIter *sitem_get_start_iter(search_item_t *item); 44 | GtkTextIter *sitem_get_end_iter(search_item_t *item); 45 | gint sitem_contains(const search_item_t *parent, const search_item_t *subitem); 46 | 47 | #endif //SEARCH_ITEM_H_ 48 | -------------------------------------------------------------------------------- /src/gtk-helpers/test-desktop-utils.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Jiri Moskovcak (jmoskovc@redhat.com) 3 | Copyright (C) 2009 RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include "problem_utils.h" 24 | 25 | int main(int argc, char** argv) 26 | { 27 | GAppInfo *app; 28 | 29 | setlocale(LC_ALL, ""); 30 | 31 | if (argc != 2) 32 | { 33 | g_print ("Usage: %s CMDLINE\n", argv[0]); 34 | return 1; 35 | } 36 | 37 | app = problem_create_app_from_cmdline (argv[1]); 38 | if (!app) 39 | { 40 | g_print ("Could not find an app for cmdline '%s'\n", argv[1]); 41 | return 1; 42 | } 43 | g_print ("Found desktop file: %s\n", g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (app))); 44 | 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /src/gtk-helpers/utils.c: -------------------------------------------------------------------------------- 1 | #include "internal_libreport_gtk.h" 2 | 3 | void libreport_reload_text_to_text_view(GtkTextView *tv, const char *text) 4 | { 5 | GtkTextBuffer *tb = gtk_text_view_get_buffer(tv); 6 | GtkTextIter beg_iter, end_iter; 7 | gtk_text_buffer_get_iter_at_offset(tb, &beg_iter, 0); 8 | gtk_text_buffer_get_iter_at_offset(tb, &end_iter, -1); 9 | gtk_text_buffer_delete(tb, &beg_iter, &end_iter); 10 | 11 | if (!text) 12 | return; 13 | 14 | const gchar *end; 15 | while (!g_utf8_validate(text, -1, &end)) 16 | { 17 | gtk_text_buffer_insert_at_cursor(tb, text, end - text); 18 | char buf[8]; 19 | unsigned len = snprintf(buf, sizeof(buf), "<%02X>", (unsigned char)*end); 20 | gtk_text_buffer_insert_at_cursor(tb, buf, len); 21 | text = end + 1; 22 | } 23 | 24 | gtk_text_buffer_insert_at_cursor(tb, text, strlen(text)); 25 | } 26 | -------------------------------------------------------------------------------- /src/gui-wizard-gtk/Makefile.am: -------------------------------------------------------------------------------- 1 | # report-gtk binary 2 | bin_PROGRAMS = report-gtk 3 | 4 | report_gtk_SOURCES = \ 5 | wizard.h wizard.c \ 6 | main.c \ 7 | wizard_glade.c 8 | 9 | 10 | # Required for gtk_builder_connect_signals() to work correctly: 11 | # -g 12 | # -Wl,--export-dynamic 13 | report_gtk_CFLAGS = \ 14 | -I$(srcdir)/../include \ 15 | -I$(srcdir)/../lib \ 16 | -I$(srcdir)/../gtk-helpers \ 17 | -DBIN_DIR=\"$(bindir)\" \ 18 | -DDATA_DIR=\"$(datadir)\" \ 19 | -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \ 20 | -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \ 21 | -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \ 22 | -DICON_DIR=\"${datadir}/abrt/icons/hicolor/48x48/status\" \ 23 | -DWORKFLOWS_DIR=\"$(WORKFLOWS_DIR)\" \ 24 | -DLIBEXEC_DIR=\"$(libexecdir)\" \ 25 | -DGDK_DISABLE_DEPRECATION_WARNINGS \ 26 | $(GLIB_CFLAGS) \ 27 | $(GTK_CFLAGS) \ 28 | -D_GNU_SOURCE 29 | 30 | # Required for gtk_builder_connect_signals() to work correctly: 31 | # -lgmodule-2.0 32 | # -lgthread-2.0 33 | report_gtk_LDADD = \ 34 | ../lib/libreport.la \ 35 | ../gtk-helpers/libreport-gtk.la \ 36 | $(GLIB_LIBS) \ 37 | $(GTK_LIBS) 38 | 39 | # we don't want to install it, just make it part of tarball 40 | # created by make dist 41 | GLADE_FILES = wizard.glade 42 | #pkgdata_DATA = $(GLADE_FILES) 43 | EXTRA_DIST = $(GLADE_FILES) 44 | 45 | libreportconfdir = $(CONF_DIR) 46 | dist_libreportconf_DATA = \ 47 | forbidden_words.conf \ 48 | ignored_words.conf \ 49 | ignored_elements.conf 50 | 51 | # For internal glade file storage in the binary: 52 | wizard.c: wizard_glade.c 53 | 54 | wizard_glade.c: wizard.glade 55 | { \ 56 | echo '#define WIZARD_GLADE_CONTENTS "\'; \ 57 | cat $(srcdir)/wizard.glade | sed -e 's/"/\\"/g' -e 's/?/\\?/g' -e 's/$$/\\/g'; \ 58 | echo '"'; \ 59 | } >wizard_glade.c 60 | 61 | 62 | DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ 63 | 64 | @INTLTOOL_DESKTOP_RULE@ 65 | -------------------------------------------------------------------------------- /src/gui-wizard-gtk/forbidden_words.conf: -------------------------------------------------------------------------------- 1 | access 2 | Access 3 | ACCESS 4 | account 5 | Account 6 | ACCOUNT 7 | ANSIBLE_ 8 | APPID_ 9 | AWS_ 10 | AZURE_ 11 | bank 12 | Bank 13 | BANK 14 | banking 15 | Banking 16 | BANKING 17 | DO_ 18 | EC2_ 19 | GCE_ 20 | http:// 21 | https:// 22 | key 23 | Key 24 | KEY 25 | login 26 | Login 27 | LOGIN 28 | mastercard 29 | Mastercard 30 | MASTERCARD 31 | ONE_ 32 | OS_ 33 | OVIRT_ 34 | pass 35 | Pass 36 | PASS 37 | password 38 | Password 39 | PASSWORD 40 | RACKSPACE_ 41 | RS_ 42 | rootpw 43 | secret 44 | Secret 45 | SECRET 46 | token 47 | Token 48 | TOKEN 49 | username 50 | Username 51 | USERNAME 52 | visa 53 | Visa 54 | VISA 55 | VMWARE_ 56 | -------------------------------------------------------------------------------- /src/gui-wizard-gtk/ignored_elements.conf: -------------------------------------------------------------------------------- 1 | cpuinfo 2 | open_fds -------------------------------------------------------------------------------- /src/gui-wizard-gtk/ignored_words.conf: -------------------------------------------------------------------------------- 1 | access on a process. 2 | access on the 3 | accesses on a process. 4 | accesses on the 5 | accessibility 6 | Accessibility 7 | accessible 8 | Accessible 9 | accountsservice 10 | account_for_vscrollbar 11 | AccountsService 12 | bypass 13 | Bypass 14 | BYPASS 15 | Cannot access memory 16 | DEBUGINFOD_URLS=http:// 17 | DEBUGINFOD_URLS=https:// 18 | DEBUGINFOD_IMA_CERT_PATH=/etc/keys/ 19 | EventKey 20 | event_key 21 | escKey 22 | gnome-ssh-askpass 23 | hawkey 24 | hotkey 25 | http://debuginfod. 26 | https://debuginfod. 27 | Hotkey 28 | IBRS_FW 29 | keyboard 30 | KEYBOARD 31 | KeyboardInterrupt 32 | keymap 33 | KEYMAP 34 | keyDown 35 | KeyDown 36 | KEYDOWN 37 | KEY_Down 38 | keyring 39 | KEYRING 40 | KeyUp 41 | KEYUP 42 | KeyEvent 43 | key_event 44 | KEY_EVENT 45 | keypress 46 | keyPress 47 | KeyPress 48 | key_press 49 | KEY_PRESS 50 | keyRelease 51 | key_release 52 | KEY_RELEASE 53 | KeyValuePair 54 | KeyValuePairKeyExtractor 55 | keyup 56 | KEYUP 57 | ksshaskpass 58 | libkeyutils.so 59 | libpciaccess.so 60 | libsecret 61 | login.so 62 | libkeyutils 63 | libxcb-keysyms 64 | lxqt-openssh-askpass 65 | PAM_KWALLET_LOGIN 66 | PassOwnPtr 67 | PassRefPtr 68 | passed 69 | QNetworkAccessManager 70 | This access was not denied. 71 | .keymap= 72 | (because of 'access') 73 | (because of 'key') 74 | systemd-logind 75 | tokenize 76 | # not considered sensitive 77 | USER= 78 | USERNAME= 79 | SHELL=/sbin/nologin 80 | SSH_ASKPASS= 81 | key=0x 82 | keys=0x 83 | keyname 84 | key_name 85 | key-name 86 | key name 87 | Key name 88 | keyfile 89 | key_file 90 | key-file 91 | key file 92 | Key file 93 | KeyError 94 | keygroup 95 | XDG_ACTIVATION_TOKEN 96 | MEMORY_PRESSURE_WATCH 97 | passthrough 98 | -------------------------------------------------------------------------------- /src/gui-wizard-gtk/wizard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT Team 3 | Copyright (C) 2011 RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #ifndef WIZARD_H_ 20 | #define WIZARD_H_ 21 | 22 | #include "internal_libreport_gtk.h" 23 | 24 | void create_assistant(GtkApplication *app); 25 | 26 | enum 27 | { 28 | /* 29 | * the selected event is updated to a first event wich can be applied on 30 | * the current problem directory 31 | */ 32 | UPDATE_SELECTED_EVENT = 1 << 0, 33 | }; 34 | 35 | /* Loads problem's data and update GUI elements according to the data. 36 | * 37 | * @param flags Flags to alternate the update process 38 | */ 39 | void update_gui_state_from_problem_data(int flags); 40 | void show_error_as_msgbox(const char *msg); 41 | 42 | 43 | extern char *g_dump_dir_name; 44 | extern char *g_events; 45 | extern GList *g_auto_event_list; 46 | extern problem_data_t *g_cd; 47 | void problem_data_reload_from_dump_dir(void); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/include/Makefile.am: -------------------------------------------------------------------------------- 1 | libreport_includedir = $(includedir)/libreport 2 | libreport_include_HEADERS = \ 3 | libreport_types.h \ 4 | client.h \ 5 | dump_dir.h \ 6 | event_config.h \ 7 | problem_data.h \ 8 | problem_report.h \ 9 | report.h \ 10 | run_event.h \ 11 | libreport_curl.h \ 12 | workflow.h \ 13 | global_configuration.h \ 14 | config_item_info.h \ 15 | file_obj.h \ 16 | internal_libreport.h \ 17 | xml_parser.h \ 18 | reporters.h \ 19 | report_result.h 20 | 21 | if BUILD_UREPORT 22 | libreport_include_HEADERS += ureport.h 23 | endif 24 | -------------------------------------------------------------------------------- /src/include/config_item_info.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT team 3 | Copyright (C) 2010 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef LIBREPORT_CONFIG_ITEM_H 21 | #define LIBREPORT_CONFIG_ITEM_H 22 | 23 | typedef struct config_item_info config_item_info_t; 24 | 25 | config_item_info_t *new_config_info(const char *name); 26 | void free_config_info(config_item_info_t *info); 27 | 28 | void ci_set_screen_name(config_item_info_t *ci, const char *screen_name); 29 | void ci_set_description(config_item_info_t *ci, const char *description); 30 | void ci_set_long_desc(config_item_info_t *ci, const char *long_description); 31 | 32 | const char *ci_get_screen_name(config_item_info_t *ci); 33 | const char *ci_get_name(config_item_info_t *ci); 34 | const char *ci_get_description(config_item_info_t *ci); 35 | const char *ci_get_long_desc(config_item_info_t *ci); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/include/file_obj.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2010 ABRT team 3 | Copyright (C) 2010 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | typedef struct file_obj 21 | { 22 | /* just the filename without the path and extension 23 | * so it can be used as event name 24 | * e.g: 25 | * if fullpath is: /foo/bar/report_Bugzilla.xml 26 | * then filename is: report_Bugzilla 27 | * in case of symlink the filename is created from the symlink name 28 | * and the fullpath is the symlink target 29 | */ 30 | char *filename; 31 | char *fullpath; //the full path with extension 32 | } file_obj_t; 33 | 34 | void free_file_obj(file_obj_t *f); 35 | const char *fo_get_fullpath(file_obj_t *fo); 36 | const char *fo_get_filename(file_obj_t *fo); 37 | -------------------------------------------------------------------------------- /src/include/libreport_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2013 ABRT team 3 | Copyright (C) 2013 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #ifndef LIBREPORT_TYPES_H_ 20 | #define LIBREPORT_TYPES_H_ 21 | 22 | #include 23 | #include 24 | 25 | typedef gchar **string_vector_ptr_t; 26 | typedef const gchar *const *const_string_vector_const_ptr_t; 27 | 28 | GHashTable *libreport_clone_map_string(GHashTable *ms); 29 | int libreport_try_get_map_string_item_as_bool(GHashTable *ms, const char *key, int *value); 30 | 31 | #endif /* LIBREPORT_TYPES_H_ */ 32 | -------------------------------------------------------------------------------- /src/include/report_result.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | G_BEGIN_DECLS 6 | 7 | typedef struct report_result report_result_t; 8 | 9 | char *report_result_get_label (report_result_t *result); 10 | char *report_result_get_url (report_result_t *result); 11 | char *report_result_get_message (report_result_t *result); 12 | char *report_result_get_bthash (report_result_t *result); 13 | char *report_result_get_workflow (report_result_t *result); 14 | time_t report_result_get_timestamp(report_result_t *result); 15 | 16 | void report_result_set_url (report_result_t *result, 17 | const char *url); 18 | void report_result_set_message (report_result_t *result, 19 | const char *message); 20 | void report_result_set_bthash (report_result_t *result, 21 | const char *bthash); 22 | void report_result_set_workflow (report_result_t *result, 23 | const char *workflow); 24 | void report_result_set_timestamp(report_result_t *result, 25 | time_t timestamp); 26 | 27 | GString *report_result_to_string(report_result_t *result); 28 | 29 | report_result_t *report_result_new_with_label (const char *label); 30 | report_result_t *report_result_new_with_label_from_env(const char *label); 31 | report_result_t *report_result_parse (const char *line, 32 | size_t label_length); 33 | 34 | void report_result_free(report_result_t *result); 35 | 36 | G_DEFINE_AUTOPTR_CLEANUP_FUNC(report_result_t, report_result_free) 37 | 38 | G_END_DECLS 39 | -------------------------------------------------------------------------------- /src/include/reporters.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 ABRT team 3 | Copyright (C) 2014 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #ifndef REPORTERS_H 21 | #define REPORTERS_H 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | int libreport_is_comment_dup(GList *comments, const char *comment); 28 | unsigned libreport_comments_find_best_bt_rating(GList *comments); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/include/xml_parser.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2013 ABRT team 3 | Copyright (C) 2013 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | /** @file xml_parser.h */ 21 | 22 | struct my_parse_data 23 | { 24 | workflow_t *workflow; 25 | char *cur_locale; 26 | char *attribute_lang; 27 | bool in_event_list; 28 | bool exact_name; 29 | bool exact_description; 30 | }; 31 | 32 | /** 33 | @brief Gets the language info for the current xml element 34 | 35 | @param parse_data Data parsed from the current element 36 | @param att_names Names of attributes 37 | @param att_values Attribute's values 38 | 39 | @return lang value for xml:lang attribute if value matches current locale 40 | @return "" (empty string) if element has no xml:lang attribute 41 | @return NULL if the lang value does not match the current locale 42 | */ 43 | char *get_element_lang(struct my_parse_data *parse_data, const gchar **att_names, const gchar **att_values); 44 | -------------------------------------------------------------------------------- /src/lib/abrt_types.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2010 ABRT Team 3 | Copyright (C) 2010 RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "internal_libreport.h" 20 | 21 | GHashTable *libreport_clone_map_string(GHashTable *ms) 22 | { 23 | if (ms == NULL) 24 | return NULL; 25 | 26 | GHashTable *clone = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); 27 | 28 | gpointer key; 29 | gpointer value; 30 | GHashTableIter iter; 31 | g_hash_table_iter_init(&iter, ms); 32 | while(g_hash_table_iter_next(&iter, &key, &value)) 33 | g_hash_table_insert(clone, g_strdup((char *)key), g_strdup((char *)value)); 34 | 35 | return clone; 36 | } 37 | 38 | #define GET_ITEM_OR_RETURN(val_name, conf, item_name)\ 39 | const char *const val_name = g_hash_table_lookup(conf, item_name); \ 40 | if (val_name == NULL) \ 41 | { \ 42 | log_debug("Configuration option '%s' not found in loaded settings", item_name); \ 43 | return 0; \ 44 | } 45 | 46 | int libreport_try_get_map_string_item_as_bool(GHashTable *ms, const char *key, int *value) 47 | { 48 | GET_ITEM_OR_RETURN(option, ms, key); 49 | 50 | *value = libreport_string_to_bool(option); 51 | return true; 52 | } 53 | -------------------------------------------------------------------------------- /src/lib/append_to_malloced_string.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2010 ABRT team 3 | Copyright (C) 2010 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "internal_libreport.h" 20 | 21 | char *libreport_append_to_malloced_string(char *mstr, const char *append) 22 | { 23 | unsigned mlen = strlen(mstr); 24 | mstr = (char*) g_realloc(mstr, mlen + strlen(append) + 1); 25 | strcpy(mstr + mlen, append); 26 | return mstr; 27 | } 28 | -------------------------------------------------------------------------------- /src/lib/file_obj.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT Team 3 | Copyright (C) 2011 RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include "internal_libreport.h" 21 | 22 | file_obj_t *libreport_new_file_obj(const char* fullpath, const char* filename) 23 | { 24 | file_obj_t *file = g_malloc(sizeof(*file)); 25 | file->fullpath = g_strdup(fullpath); 26 | file->filename = g_strdup(filename); 27 | return file; 28 | } 29 | 30 | void libreport_free_file_obj(file_obj_t *f) 31 | { 32 | if (f == NULL) 33 | return; 34 | 35 | g_free(f->fullpath); 36 | g_free(f->filename); 37 | g_free(f); 38 | } 39 | 40 | const char *fo_get_fullpath(file_obj_t *fo) 41 | { 42 | return fo->fullpath; 43 | } 44 | 45 | const char *fo_get_filename(file_obj_t *fo) 46 | { 47 | return fo->filename; 48 | } 49 | -------------------------------------------------------------------------------- /src/lib/is_in_comma_separated_list.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT team 3 | Copyright (C) 2011 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include 20 | #include "internal_libreport.h" 21 | 22 | bool libreport_is_in_comma_separated_list(const char *value, const char *list) 23 | { 24 | if (!list) 25 | return false; 26 | unsigned len = strlen(value); 27 | while (*list) 28 | { 29 | const char *comma = strchrnul(list, ','); 30 | if ((comma - list == len) && strncmp(value, list, len) == 0) 31 | return true; 32 | if (!*comma) 33 | break; 34 | list = comma + 1; 35 | } 36 | return false; 37 | } 38 | 39 | bool libreport_is_in_comma_separated_list_of_glob_patterns(const char *value, const char *list) 40 | { 41 | if (!list) 42 | return false; 43 | while (*list) 44 | { 45 | const char *comma = strchrnul(list, ','); 46 | g_autofree char *pattern = g_strndup(list, comma - list); 47 | int match = !fnmatch(pattern, value, /*flags:*/ 0); 48 | if (match) 49 | return true; 50 | if (!*comma) 51 | break; 52 | list = comma + 1; 53 | } 54 | return false; 55 | } 56 | -------------------------------------------------------------------------------- /src/lib/is_in_string_list.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT team 3 | Copyright (C) 2011 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "internal_libreport.h" 20 | 21 | bool libreport_is_in_string_list(const char *name, const char *const *v) 22 | { 23 | while (*v) 24 | { 25 | if (strcmp(*v, name) == 0) 26 | return true; 27 | v++; 28 | } 29 | return false; 30 | } 31 | 32 | int libreport_index_of_string_in_list(const char *name, const char *const *v) 33 | { 34 | for(int i = 0; v[i]; ++i) 35 | { 36 | if (strcmp(v[i], name) == 0) 37 | return i; 38 | } 39 | return -1; 40 | } 41 | -------------------------------------------------------------------------------- /src/lib/libreport.conf: -------------------------------------------------------------------------------- 1 | # This is a global configuration used by all libreport plugins 2 | 3 | # A colon separated list of element names used by libreport plugins to exclude 4 | # the listed problems element from reports. If you do not want to include some 5 | # file in reports add it on this list. 6 | # 7 | # AlwaysExcludedElements = 8 | -------------------------------------------------------------------------------- /src/lib/libreport_init.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 ABRT team 3 | Copyright (C) 2014 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "internal_libreport.h" 20 | 21 | int g_libreport_inited; 22 | 23 | void libreport_init(void) 24 | { 25 | #if ENABLE_NLS 26 | bindtextdomain(PACKAGE, LOCALEDIR); 27 | #endif 28 | } 29 | -------------------------------------------------------------------------------- /src/lib/overlapping_strcpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2004 by Erik Andersen 3 | * 4 | * Copyright (C) 2010 ABRT team 5 | * Copyright (C) 2010 RedHat Inc 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License along 18 | * with this program; if not, write to the Free Software Foundation, Inc., 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | #include "internal_libreport.h" 22 | 23 | /* Like strcpy but can copy overlapping strings. */ 24 | void libreport_overlapping_strcpy(char *dst, const char *src) 25 | { 26 | /* Cheap optimization for dst == src case - 27 | * better to have it here than in many callers. 28 | */ 29 | if (dst != src) 30 | { 31 | while ((*dst = *src) != '\0') 32 | { 33 | dst++; 34 | src++; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/lib/proxies.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT team 3 | Copyright (C) 2011 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "internal_libreport.h" 20 | #include "proxies.h" 21 | 22 | #include 23 | 24 | GList *get_proxy_list(const char *url) 25 | { 26 | int i; 27 | GList *l = NULL; 28 | GProxyResolver *resolver; 29 | g_auto(GStrv) proxies = NULL; 30 | g_autoptr(GError) error = NULL; 31 | 32 | resolver = g_proxy_resolver_get_default(); 33 | 34 | proxies = g_proxy_resolver_lookup(resolver, url, NULL, &error); 35 | if (!proxies) 36 | { 37 | log_warning("Failed to perform proxy lookup for %s: %s", url, error->message); 38 | return NULL; 39 | } 40 | 41 | for (i = 0, l = NULL; proxies[i]; i++) 42 | l = g_list_append(l, g_steal_pointer(&proxies[i])); 43 | 44 | /* Don't set proxy if the list contains just "direct://" */ 45 | if (l && !g_list_next(l) && !strcmp(l->data, "direct://")) 46 | { 47 | g_list_free(l); 48 | l = NULL; 49 | } 50 | 51 | return l; 52 | } 53 | -------------------------------------------------------------------------------- /src/lib/proxies.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 ABRT team 3 | Copyright (C) 2011 RedHat Inc 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #ifndef PROXIES_H_ 20 | #define PROXIES_H_ 21 | 22 | #include 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | GList *get_proxy_list(const char *url); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/lib/skip_whitespace.c: -------------------------------------------------------------------------------- 1 | /* vi: set sw=4 ts=4: */ 2 | /* 3 | * Copyright (C) 2003 Manuel Novoa III 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program; if not, write to the Free Software Foundation, Inc., 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | #include "internal_libreport.h" 20 | 21 | char *libreport_skip_blank(const char *s) 22 | { 23 | while (isblank(*s)) ++s; 24 | 25 | return (char *) s; 26 | } 27 | 28 | char *libreport_skip_whitespace(const char *s) 29 | { 30 | /* NB: isspace('\0') returns 0 */ 31 | while (isspace(*s)) ++s; 32 | 33 | return (char *) s; 34 | } 35 | 36 | char *libreport_skip_non_whitespace(const char *s) 37 | { 38 | while (*s && !isspace(*s)) ++s; 39 | 40 | return (char *) s; 41 | } 42 | -------------------------------------------------------------------------------- /src/plugins/bugzilla.conf: -------------------------------------------------------------------------------- 1 | # NOTE this file is readable by everyone, do NOT store here sensitive data, 2 | # for such cases should be used config file in user's home, 3 | # i.e.: $HOME/.config/libreport/bugzilla.conf 4 | 5 | # Bugzilla URL, defaults to BUG_REPORT_URL from /etc/os-release 6 | # BugzillaURL = https://bugzilla.example.com/ 7 | # yes means that ssl certificates will be checked 8 | SSLVerify = yes 9 | 10 | # Bugzilla API key. 11 | # You can set up an API key by using the "API Key" tab in the Preferences pages. 12 | APIKey = 13 | 14 | # SELinux guys almost always move filed bugs from component 15 | # selinux-policy to another component. 16 | # This setting instructs reporter-bugzilla to not require 17 | # component match when it searches for duplicates of 18 | # bugs in selinux-policy component. 19 | # (If you need to add more, the syntax is: "component[,component...]") 20 | # 21 | DontMatchComponents = selinux-policy 22 | 23 | # for more info about these settings see: https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets 24 | # CreatePrivate = no 25 | # PrivateGroups = fedora_contrib_private 26 | -------------------------------------------------------------------------------- /src/plugins/bugzilla_anaconda_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=report_Bugzilla component=anaconda 2 | # remove sensitive information from the sensitive files 3 | for sf in backtrace ks.cfg anaconda-tb; do 4 | if [ -f $sf ]; then 5 | # blindly remove entire line 6 | # filing a less usable bug is surely better than publishing passwords 7 | sed 's/^.*rootpw.*$//' -i $sf 8 | fi 9 | done 10 | # file a bug in Bugzilla 11 | reporter-bugzilla -b \ 12 | -F /etc/libreport/plugins/bugzilla_format_anaconda.conf \ 13 | -A /etc/libreport/plugins/bugzilla_formatdup_anaconda.conf 14 | 15 | EVENT=report-gui component=anaconda 16 | report-gtk -- "$DUMP_DIR" 17 | 18 | EVENT=report-cli component=anaconda 19 | report-cli -- "$DUMP_DIR" 20 | -------------------------------------------------------------------------------- /src/plugins/bugzilla_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=report_Bugzilla analyzer=libreport 2 | reporter-bugzilla -b \ 3 | -A /etc/libreport/plugins/bugzilla_formatdup_analyzer_libreport.conf \ 4 | -F /etc/libreport/plugins/bugzilla_format_analyzer_libreport.conf 5 | 6 | EVENT=watch_Bugzilla reported_to~=Bugzilla 7 | reporter-bugzilla -t -w -d "$DUMP_DIR" 8 | -------------------------------------------------------------------------------- /src/plugins/bugzilla_format_kernel.conf: -------------------------------------------------------------------------------- 1 | # Lines starting with # are ignored. 2 | # Lines can be continued on the next line using trailing backslash. 3 | # 4 | # Format: 5 | # %summary:: summary format 6 | # section:: element1[,element2]... 7 | # The literal text line to be added to Bugzilla comment. Can be empty. 8 | # (IOW: empty lines are NOT ignored!) 9 | # 10 | # Summary format is a line of text, where %element% is replaced by 11 | # text element's content, and [[...%element%...]] block is used only if 12 | # %element% exists. [[...]] blocks can nest. 13 | # 14 | # Sections can be: 15 | # - %summary: bug summary format string. 16 | # - %attach: a list of elements to attach. 17 | # - text, double colon (::) and the list of comma-separated elements. 18 | # 19 | # Elements can be: 20 | # - problem directory element names, which get formatted as 21 | # : 22 | # or 23 | # : 24 | # : 25 | # : 26 | # : 27 | # - problem directory element names prefixed by "%bare_", 28 | # which is formatted as-is, without ":" and colons 29 | # - %oneline, %multiline, %text wildcards, which select all corresponding 30 | # elements for output or attachment 31 | # - %binary wildcard, valid only for %attach section, instructs to attach 32 | # binary elements 33 | # - problem directory element names prefixed by "-", 34 | # which excludes given element from all wildcards 35 | # 36 | # Nonexistent elements are silently ignored. 37 | # If none of elements exists, the section will not be created. 38 | 39 | %summary:: [abrt] [[%crash_function%: ]]%reason%[[: TAINTED %tainted_short%]] 40 | 41 | Description of problem:: %bare_comment 42 | 43 | Additional info:: %reporter, %bare_backtrace 44 | 45 | %attach:: dmesg 46 | -------------------------------------------------------------------------------- /src/plugins/centos_report_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=report_CentOSBugTracker type=xorg 2 | reporter-mantisbt 3 | 4 | EVENT=report_CentOSBugTracker type=Kerneloops 5 | reporter-mantisbt 6 | 7 | EVENT=report_CentOSBugTracker type=vmcore 8 | reporter-mantisbt 9 | 10 | EVENT=report_CentOSBugTracker type=Python component!=anaconda 11 | test -f component || abrt-action-save-package-data 12 | reporter-mantisbt \ 13 | -F /etc/libreport/plugins/mantisbt_format.conf \ 14 | -A /etc/libreport/plugins/mantisbt_formatdup.conf 15 | 16 | EVENT=report_CentOSBugTracker type=Python3 component!=anaconda 17 | test -f component || abrt-action-save-package-data 18 | reporter-mantisbt \ 19 | -F /etc/libreport/plugins/mantisbt_format.conf \ 20 | -A /etc/libreport/plugins/mantisbt_formatdup.conf 21 | 22 | EVENT=report_CentOSBugTracker type=CCpp duphash!= 23 | test -f component || abrt-action-save-package-data 24 | component="`cat component`" 25 | format="mantisbt_format.conf" 26 | test -f "/etc/libreport/plugins/mantisbt_format_$component.conf" \ 27 | && format="mantisbt_format_$component.conf" 28 | formatdup="mantisbt_formatdup.conf" 29 | test -f "/etc/libreport/plugins/mantisbt_formatdup_$component.conf" \ 30 | && formatdup="mantisbt_formatdup_$component.conf" 31 | reporter-mantisbt \ 32 | -F "/etc/libreport/plugins/$format" \ 33 | -A "/etc/libreport/plugins/$formatdup" 34 | 35 | EVENT=report_CentOSBugTracker analyzer=libreport 36 | reporter-mantisbt \ 37 | -F /etc/libreport/plugins/mantisbt_format_analyzer_libreport.conf \ 38 | -A /etc/libreport/plugins/mantisbt_formatdup_analyzer_libreport.conf 39 | -------------------------------------------------------------------------------- /src/plugins/mailx.conf: -------------------------------------------------------------------------------- 1 | # The configuration files expect Key-Value pairs separated by an equal sign. 2 | # Quoting of the values is not supported. 3 | 4 | # Uncomment and specify these parameters if you want to use 5 | # reporter-mailx tool outside of libreport's GUI 6 | # (i.e. from command line or in custom scripts) 7 | # and you don't want to specify parameters in every tool invocation. 8 | # 9 | # String parameters: 10 | Subject = [abrt] a crash has been detected 11 | EmailFrom = ABRT Daemon 12 | EmailTo = root@localhost 13 | 14 | # Boolean parameter: 15 | # SendBinaryData=yes/no 16 | -------------------------------------------------------------------------------- /src/plugins/mailx_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=notify 2 | reporter-mailx --notify-only 3 | 4 | EVENT=notify-dup 5 | reporter-mailx --notify-only 6 | 7 | EVENT=report_Mailx reporter-mailx 8 | -------------------------------------------------------------------------------- /src/plugins/mantisbt.conf: -------------------------------------------------------------------------------- 1 | # NOTE this file is readable by everyone, do NOT store here sensitive data, 2 | # for such cases should be used config file in user's home, 3 | # i.e.: $HOME/.config/libreport/mantisbt.conf 4 | 5 | # MantisBT URL 6 | MantisbtURL = http://localhost/mantisbt/ 7 | # yes means that ssl certificates will be checked 8 | SSLVerify = no 9 | # your login has to exist, if you don have any, please create one 10 | Login = 11 | # your password 12 | Password = 13 | -------------------------------------------------------------------------------- /src/plugins/print_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=report_Logger 2 | reporter-print -o "${Logger_Log_File:-/tmp/abrt.log}" -a "${Logger_Append:-no}" -r 3 | -------------------------------------------------------------------------------- /src/plugins/python/Makefile.am: -------------------------------------------------------------------------------- 1 | if BUILD_BUGZILLA 2 | bin_SCRIPTS = reporter-bugzilla-python 3 | endif 4 | 5 | maintainer-check: 6 | PYTHONPATH="$(top_builddir)/src/client-python" pytest test_reporter_bugzilla.py 7 | 8 | reporter-bugzilla-python: reporter_bugzilla.py 9 | cat $< >$@ 10 | 11 | all: reporter-bugzilla-python 12 | 13 | clean-local: 14 | rm -f reporter-bugzilla-python 15 | rm -rf __pycache__ 16 | 17 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/bugzilla.conf: -------------------------------------------------------------------------------- 1 | # NOTE this file is readable by everyone, do NOT store here sensitive data, 2 | # for such cases should be used config file in user's home, 3 | # i.e.: $HOME/.config/libreport/bugzilla.conf 4 | 5 | # Bugzilla URL, defaults to BUG_REPORT_URL from /etc/os-release 6 | # BugzillaURL = https://bugzilla.example.com/ 7 | # yes means that ssl certificates will be checked 8 | SSLVerify = yes 9 | 10 | # Bugzilla API key. 11 | # You can set up an API key by using the "API Key" tab in the Preferences pages. 12 | APIKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 13 | 14 | # SELinux guys almost always move filed bugs from component 15 | # selinux-policy to another component. 16 | # This setting instructs reporter-bugzilla to not require 17 | # component match when it searches for duplicates of 18 | # bugs in selinux-policy component. 19 | # (If you need to add more, the syntax is: "component[,component...]") 20 | # 21 | DontMatchComponents = selinux-policy 22 | 23 | # for more info about these settings see: https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets 24 | # CreatePrivate = no 25 | # PrivateGroups = fedora_contrib_private 26 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/dummy_attachment: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/.libreport/owner: -------------------------------------------------------------------------------- 1 | 1000 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/abrt_version: -------------------------------------------------------------------------------- 1 | 2.15.1 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/analyzer: -------------------------------------------------------------------------------- 1 | abrt-journal-core -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/architecture: -------------------------------------------------------------------------------- 1 | x86_64 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/cgroup: -------------------------------------------------------------------------------- 1 | 0::/user.slice/user-1000.slice/user@1000.service/app.slice/app-org.gnome.Terminal.slice/vte-spawn-e83630df-e9e1-454e-8862-769b77092eda.scope 2 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/cmdline: -------------------------------------------------------------------------------- 1 | reporter-mantisbt -vvv -d /var/spool/abrt/ccpp-2022-06-21-14:24:55.227430-1306000/ -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/component: -------------------------------------------------------------------------------- 1 | libreport -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/coredump: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/src/plugins/python/fixtures/sample_problem/coredump -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/count: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/crash_function: -------------------------------------------------------------------------------- 1 | read -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/dso_list: -------------------------------------------------------------------------------- 1 | /usr/lib/locale/locale-archive glibc-all-langpacks-2.35-11.fc36.x86_64 (Fedora Project) 1654691118 2 | /usr/lib64/libcap-ng.so.0.0.0 libcap-ng-0.8.3-1.fc36.x86_64 (Fedora Project) 1654691129 3 | /usr/lib64/libcrypt.so.2.0.0 libxcrypt-4.4.28-1.fc36.x86_64 (Fedora Project) 1654686083 4 | /usr/lib64/libsqlite3.so.0.8.6 sqlite-libs-3.36.0-5.fc36.x86_64 (Fedora Project) 1654686083 5 | /usr/bin/reporter-mantisbt libreport-plugin-mantisbt-2.17.1-1.fc36.x86_64 (Fedora Project) 1655814606 6 | /usr/lib64/libaudit.so.1.0.0 audit-libs-3.0.8-1.fc36.x86_64 (Fedora Project) 1654686084 7 | /usr/lib64/liblua-5.4.so lua-libs-5.4.4-1.fc36.x86_64 (Fedora Project) 1654686084 8 | /usr/lib64/libgpg-error.so.0.33.0 libgpg-error-1.45-1.fc36.x86_64 (Fedora Project) 1654691129 9 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/executable: -------------------------------------------------------------------------------- 1 | /usr/bin/reporter-mantisbt -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/journald_cursor: -------------------------------------------------------------------------------- 1 | s=638625c5499c44c3839f696aa01f00f5;i=46909;b=3a8d0cbae94e40679647fa471fa2f129;m=337f9c5e;t=5e1f48c567405;x=ea1816f4dc90a6b6 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/kernel: -------------------------------------------------------------------------------- 1 | 5.18.5-200.fc36.x86_64 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/last_occurrence: -------------------------------------------------------------------------------- 1 | 1655815326 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/limits: -------------------------------------------------------------------------------- 1 | Limit Soft Limit Hard Limit Units 2 | Max cpu time unlimited unlimited seconds 3 | Max file size unlimited unlimited bytes 4 | Max data size unlimited unlimited bytes 5 | Max stack size 8388608 unlimited bytes 6 | Max core file size unlimited unlimited bytes 7 | Max resident set unlimited unlimited bytes 8 | Max processes 126651 126651 processes 9 | Max open files 1024 524288 files 10 | Max locked memory 8388608 8388608 bytes 11 | Max address space unlimited unlimited bytes 12 | Max file locks unlimited unlimited locks 13 | Max pending signals 126651 126651 signals 14 | Max msgqueue size 819200 819200 bytes 15 | Max nice priority 0 0 16 | Max realtime priority 0 0 17 | Max realtime timeout unlimited unlimited us 18 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/open_fds: -------------------------------------------------------------------------------- 1 | 0:/dev/pts/6 2 | pos: 0 3 | flags: 02 4 | mnt_id: 29 5 | ino: 9 6 | 7 | 1:/dev/pts/6 8 | pos: 0 9 | flags: 02 10 | mnt_id: 29 11 | ino: 9 12 | 13 | 2:/dev/pts/6 14 | pos: 0 15 | flags: 02 16 | mnt_id: 29 17 | ino: 9 18 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/os_info: -------------------------------------------------------------------------------- 1 | NAME="Fedora Linux" 2 | VERSION="36 (Workstation Edition)" 3 | ID=fedora 4 | VERSION_ID=36 5 | VERSION_CODENAME="" 6 | PLATFORM_ID="platform:f36" 7 | PRETTY_NAME="Fedora Linux 36 (Workstation Edition)" 8 | ANSI_COLOR="0;38;2;60;110;180" 9 | LOGO=fedora-logo-icon 10 | CPE_NAME="cpe:/o:fedoraproject:fedora:36" 11 | HOME_URL="https://fedoraproject.org/" 12 | DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/" 13 | SUPPORT_URL="https://ask.fedoraproject.org/" 14 | BUG_REPORT_URL="https://bugzilla.redhat.com/" 15 | REDHAT_BUGZILLA_PRODUCT="Fedora" 16 | REDHAT_BUGZILLA_PRODUCT_VERSION=36 17 | REDHAT_SUPPORT_PRODUCT="Fedora" 18 | REDHAT_SUPPORT_PRODUCT_VERSION=36 19 | PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" 20 | VARIANT="Workstation Edition" 21 | VARIANT_ID=workstation 22 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/os_release: -------------------------------------------------------------------------------- 1 | Fedora release 36 (Thirty Six) -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/package: -------------------------------------------------------------------------------- 1 | libreport-plugin-mantisbt-2.17.1-1.fc36 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pid: -------------------------------------------------------------------------------- 1 | 7005 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_arch: -------------------------------------------------------------------------------- 1 | x86_64 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_epoch: -------------------------------------------------------------------------------- 1 | 0 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_fingerprint: -------------------------------------------------------------------------------- 1 | 999F 7CBF 38AB 71F4 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_name: -------------------------------------------------------------------------------- 1 | libreport-plugin-mantisbt -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_release: -------------------------------------------------------------------------------- 1 | 1.fc36 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_vendor: -------------------------------------------------------------------------------- 1 | Fedora Project -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/pkg_version: -------------------------------------------------------------------------------- 1 | 2.17.1 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/proc_pid_status: -------------------------------------------------------------------------------- 1 | Name: reporter-mantis 2 | Umask: 0002 3 | State: S (sleeping) 4 | Tgid: 7005 5 | Ngid: 0 6 | Pid: 7005 7 | PPid: 4998 8 | TracerPid: 0 9 | Uid: 1000 1000 1000 1000 10 | Gid: 1000 1000 1000 1000 11 | FDSize: 256 12 | Groups: 10 173 1000 13 | NStgid: 7005 14 | NSpid: 7005 15 | NSpgid: 7005 16 | NSsid: 4998 17 | VmPeak: 253076 kB 18 | VmSize: 253076 kB 19 | VmLck: 0 kB 20 | VmPin: 0 kB 21 | VmHWM: 13356 kB 22 | VmRSS: 13356 kB 23 | RssAnon: 2356 kB 24 | RssFile: 11000 kB 25 | RssShmem: 0 kB 26 | VmData: 1636 kB 27 | VmStk: 132 kB 28 | VmExe: 24 kB 29 | VmLib: 18816 kB 30 | VmPTE: 128 kB 31 | VmSwap: 0 kB 32 | HugetlbPages: 0 kB 33 | CoreDumping: 1 34 | THP_enabled: 1 35 | Threads: 1 36 | SigQ: 1/126651 37 | SigPnd: 0000000000000000 38 | ShdPnd: 0000000000000000 39 | SigBlk: 0000000000000000 40 | SigIgn: 0000000000000000 41 | SigCgt: 0000000000000000 42 | CapInh: 0000000000000000 43 | CapPrm: 0000000000000000 44 | CapEff: 0000000000000000 45 | CapBnd: 000001ffffffffff 46 | CapAmb: 0000000000000000 47 | NoNewPrivs: 0 48 | Seccomp: 0 49 | Seccomp_filters: 0 50 | Speculation_Store_Bypass: thread vulnerable 51 | SpeculationIndirectBranch: conditional enabled 52 | Cpus_allowed: ff 53 | Cpus_allowed_list: 0-7 54 | Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 55 | Mems_allowed_list: 0 56 | voluntary_ctxt_switches: 3 57 | nonvoluntary_ctxt_switches: 0 58 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/reason: -------------------------------------------------------------------------------- 1 | reporter-mantisbt killed by SIGSEGV -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/rootdir: -------------------------------------------------------------------------------- 1 | / -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/runlevel: -------------------------------------------------------------------------------- 1 | N 5 2 | -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/time: -------------------------------------------------------------------------------- 1 | 1655815326 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/type: -------------------------------------------------------------------------------- 1 | CCpp -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/uid: -------------------------------------------------------------------------------- 1 | 1000 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/sample_problem/uuid: -------------------------------------------------------------------------------- 1 | 9a5668cded278f6f7c629d63c2d791b67095d577 -------------------------------------------------------------------------------- /src/plugins/python/fixtures/vcr_cassettes/add_attachment.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"ids": [2077591], "data": "Zm9vCg==", "file_name": "fixtures/dummy_attachment", 4 | "content_type": "text/plain", "summary": "File: fixtures/dummy_attachment", 5 | "minor_update": true}' 6 | headers: 7 | Accept: 8 | - application/json 9 | Accept-Encoding: 10 | - gzip, deflate 11 | Authorization: 12 | - 'Bearer: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 13 | Connection: 14 | - keep-alive 15 | Content-Length: 16 | - '178' 17 | Content-Type: 18 | - application/json 19 | User-Agent: 20 | - python-requests/2.27.1 21 | method: POST 22 | uri: https://bugzilla.redhat.com/rest.cgi/bug/2077591/attachment 23 | response: 24 | body: 25 | string: '' 26 | headers: 27 | Access-Control-Allow-Headers: 28 | - origin, content-type, accept, x-requested-with 29 | Access-Control-Allow-Origin: 30 | - '*' 31 | Cache-Control: 32 | - private, must-revalidate 33 | Connection: 34 | - keep-alive 35 | Content-Length: 36 | - '0' 37 | Content-Security-Policy: 38 | - frame-ancestors 'self' bugzilla.redhat.com 39 | Content-Type: 40 | - text/plain; charset=UTF-8 41 | Date: 42 | - Thu, 28 Jul 2022 16:44:39 GMT 43 | Strict-Transport-Security: 44 | - max-age=63072000; includeSubDomains 45 | Vary: 46 | - User-Agent 47 | X-content-type-options: 48 | - nosniff 49 | X-frame-options: 50 | - ALLOW-FROM=https://bugzilla.redhat.com/ 51 | X-xss-protection: 52 | - 1; mode=block 53 | x-rh-edge-cache-status: 54 | - Miss from child, Miss from parent 55 | x-rh-edge-reference-id: 56 | - 0.3e6ed417.1659026679.144ab57c 57 | x-rh-edge-request-id: 58 | - 144ab57c 59 | status: 60 | code: 201 61 | message: Created 62 | version: 1 63 | -------------------------------------------------------------------------------- /src/plugins/report_Bugzilla.conf: -------------------------------------------------------------------------------- 1 | Bugzilla_BugzillaURL = https://bugzilla.redhat.com 2 | Bugzilla_APIKey = 3 | Bugzilla_SSLVerify = yes 4 | -------------------------------------------------------------------------------- /src/plugins/report_CentOSBugTracker.conf: -------------------------------------------------------------------------------- 1 | Mantisbt_MantisbtURL = https://bugs.centos.org 2 | Mantisbt_Login = 3 | Mantisbt_Password = 4 | Mantisbt_SSLVerify = yes 5 | -------------------------------------------------------------------------------- /src/plugins/report_Kerneloops.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Kerneloops.org 4 | <_description>Send to kernel oops tracker 5 | 6 | backtrace 7 | 8 | * 9 | yes 10 | 11 | 0 12 | yes 13 | 14 | 15 | 21 | 22 | 27 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/plugins/report_Logger.conf: -------------------------------------------------------------------------------- 1 | #Logger_Log_File=/tmp/abrt/log 2 | Logger_Append=yes 3 | -------------------------------------------------------------------------------- /src/plugins/report_Logger.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Logger 4 | <_description>Save as text file 5 | 6 | 7 | count,event_log,reported_to 8 | coredump,vmcore 9 | yes 10 | 11 | 0 12 | yes 13 | 14 | 15 | 20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/plugins/report_Mailx.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Mailx 4 | <_description>Send via email 5 | 6 | 7 | count,event_log,reported_to,coredump,vmcore 8 | 9 | no 10 | 11 | 0 12 | yes 13 | 14 | 15 | 21 | 26 | 31 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/plugins/report_Uploader.conf: -------------------------------------------------------------------------------- 1 | # The URL where should be the tarball uploaded 2 | #Upload_URL = 3 | 4 | # User name for the upload URL 5 | #Upload_Username = 6 | 7 | # Password for the upload URL 8 | #Upload_Password = 9 | 10 | # Path to SSH public key file 11 | #Upload_SSHPublicKey = 12 | 13 | # Path to SSH private key file 14 | #Upload_SSHPrivateKey = 15 | 16 | # The proxy server to use for HTTP 17 | #http_proxy = 18 | 19 | # The proxy server to use for HTTPS 20 | #HTTPS_PROXY = 21 | 22 | # The proxy server to use for FTP 23 | #FTP_PROXY = 24 | -------------------------------------------------------------------------------- /src/plugins/upload.conf: -------------------------------------------------------------------------------- 1 | # reporter-upload configuration file 2 | # check man reporter-upload for more details 3 | 4 | #URL = scp://USERNAME:PASSWORD@SERVERNAME/var/spool/abrt-upload/ 5 | #URL = ftp://USERNAME:PASSWORD@SERVERNAME/var/spool/abrt-upload/ 6 | #URL = file:///var/spool/abrt-upload/ 7 | 8 | # Specify SSH public key 9 | #SSHPublicKey = 10 | 11 | # Specify SSH private key 12 | #SSHPrivateKey = 13 | -------------------------------------------------------------------------------- /src/plugins/uploader_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=report_Uploader reporter-upload 2 | -------------------------------------------------------------------------------- /src/plugins/ureport.conf: -------------------------------------------------------------------------------- 1 | # Base URL to uReport server 2 | # URL = https://retrace.fedoraproject.org/faf 3 | 4 | # no means that ssl certificates will not be checked 5 | # SSLVerify = no 6 | 7 | # Contact email attached to an uploaded uReport if required 8 | # ContactEmail = foo@example.com 9 | 10 | # yes means that uReport will contain 'auth' object consisting 11 | # from key value pairs made from AuthDataItems. 12 | # The default value is 'no', unless you set 'SSLClientAuth' to some value. 13 | # In that case, the default value is 'yes'. 14 | # IncludeAuthData = yes 15 | 16 | # If IncludeAuthData is set to yes, these fields will be included 17 | # in 'auth' object 18 | # AuthDataItems = hostname, machineid 19 | 20 | # Client-side authentication. 21 | # Assingning any value to 'SSLClientAuth' changes the default value of 22 | # 'IncludeAuthData' to 'yes'. 23 | # None (default): 24 | # SSLClientAuth = 25 | # Using Puppet certificate: 26 | # SSLClientAuth = puppet 27 | # Using custom certificate: 28 | # SSLClientAuth = /path/to/cert.pem:/path/to/key.pem 29 | 30 | # HTTP Basic authentication credentials. 31 | # Assingning any value to 'HTTPAuth' changes the default value of 32 | # 'IncludeAuthData' to 'yes'. 33 | # Use username and password: 34 | # HTTPAuth = username:password 35 | 36 | # Processing problems coming from unpackaged executables 37 | # ProcessUnpackaged = no 38 | -------------------------------------------------------------------------------- /src/plugins/watch_Bugzilla.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Watch Bugzilla Bug 4 | <_description>Adds your e-mail to CC List of Bugzilla bug 5 | 6 | reported_to 7 | coredump,count,event_log,reported_to,vmcore 8 | 9 | no 10 | 11 | 0 12 | no 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/report-newt/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = report-newt 2 | 3 | report_newt_SOURCES = \ 4 | report-newt.c 5 | 6 | report_newt_LDADD = \ 7 | ../lib/libreport.la \ 8 | $(GLIB_LIBS) \ 9 | $(NEWT_LIBS) 10 | 11 | report_newt_CFLAGS = \ 12 | -I$(srcdir)/../include \ 13 | -I$(srcdir)/../lib \ 14 | $(GLIB_CFLAGS) \ 15 | $(NEWT_CFLAGS) 16 | 17 | DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ 18 | -------------------------------------------------------------------------------- /src/report-python/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = report 2 | -------------------------------------------------------------------------------- /src/report-python/report/Makefile.am: -------------------------------------------------------------------------------- 1 | PYFILES = __init__.py accountmanager.py 2 | 3 | PYEXTFILES = \ 4 | reportmodule.c \ 5 | problem_data.c \ 6 | dump_dir.c \ 7 | run_event.c \ 8 | report.c \ 9 | common.h 10 | 11 | PYEXTCPPFLAGS = \ 12 | -I$(srcdir)/../../include/report -I$(srcdir)/../../include \ 13 | -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \ 14 | -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \ 15 | -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \ 16 | -DLOCALSTATEDIR='"$(localstatedir)"' \ 17 | -DVAR_RUN=\"$(VAR_RUN)\" \ 18 | -DDEFAULT_DUMP_DIR_MODE=$(DEFAULT_DUMP_DIR_MODE) \ 19 | $(GLIB_CFLAGS) \ 20 | -D_GNU_SOURCE \ 21 | -fPIE 22 | 23 | PYEXTLDFLAGS = \ 24 | -module \ 25 | -avoid-version \ 26 | -Wl,-z,relro -Wl,-z,now 27 | 28 | if BUILD_PYTHON3 29 | py3reportexecdir = $(py3execdir)/report 30 | 31 | py3reportexec_PYTHON = $(PYFILES) 32 | py3reportexec_LTLIBRARIES = _py3report.la 33 | 34 | _py3report_la_SOURCES = $(PYEXTFILES) 35 | 36 | _py3report_la_CPPFLAGS = \ 37 | $(PYEXTCPPFLAGS) \ 38 | $(PYTHON3_CFLAGS) 39 | 40 | _py3report_la_LDFLAGS = \ 41 | $(PYEXTLDFLAGS) \ 42 | -export-symbols-regex PyInit__py3report 43 | 44 | _py3report_la_LIBADD = \ 45 | ../../lib/libreport.la \ 46 | $(PYTHON3_LIBS) 47 | 48 | _py3report.so: $(py3reportexec_LTLIBRARIES) 49 | ln -sf $(abs_builddir)/.libs/$@ ./ 50 | 51 | all-local: _py3report.so 52 | 53 | clean-local: 54 | rm -f _py3report.so 55 | endif 56 | 57 | # report compat: 58 | PYIOFILES = \ 59 | io/__init__.py \ 60 | io/GTKIO.py \ 61 | io/NewtIO.py \ 62 | io/TextIO.py 63 | 64 | if BUILD_PYTHON3 65 | py3reportioexecdir = $(py3execdir)/report/io 66 | py3reportioexec_PYTHON = $(PYIOFILES) 67 | endif 68 | -------------------------------------------------------------------------------- /src/report-python/report/README: -------------------------------------------------------------------------------- 1 | Currently (2011-05), include/report/*.h are: 2 | 3 | dump_dir.h 4 | event_config.h 5 | problem_data.h 6 | report.h 7 | run_event.h 8 | 9 | and we wrap all of them except event_config.h. 10 | 11 | Python wrappers for C types and functions declared in include/report/FOO.h 12 | should be implemented in corresponding FOO.c file in this directory. 13 | 14 | Their (C-level) declarations should go to common.h. 15 | 16 | Note that methods don't have to be declared in common.h: 17 | they can be static functions inside FOO.c, and exposed to the rest 18 | of the world via PyTypeObject instance. In FOO.c: 19 | 20 | static PyObject *p_method_name(PyObject *pself, PyObject *args) 21 | ... 22 | static PyMethodDef p_FOO_methods[] = { 23 | { "method_name", p_method_name, METH_VARARGS, NULL } 24 | ... 25 | }; 26 | PyTypeObject p_FOO_type = { 27 | .tp_methods = p_FOO_methods, 28 | ... 29 | }; 30 | 31 | and only p_FOO_type needs to be declared in common.h. 32 | 33 | Similarly, (de)allocators, attr getters/setters also can be static functions 34 | and be hooked into p_FOO_type. 35 | 36 | However, non-method functions can't be static. 37 | 38 | 39 | File reportmodule.c contains the initialization function which should 40 | initialize types (p_FOO_type objects) and hook up finctions from every 41 | FOO.c so that they are usable from python code. 42 | 43 | Python wrappers for C constants (enums, defines) are created directly 44 | by reportmodule.c. 45 | -------------------------------------------------------------------------------- /src/report-python/report/accountmanager.py: -------------------------------------------------------------------------------- 1 | # This program is free software; you can redistribute it and/or modify 2 | # it under the terms of the GNU General Public License as published by 3 | # the Free Software Foundation; either version 2 of the License, or 4 | # (at your option) any later version. 5 | # 6 | # This program is distributed in the hope that it will be useful, 7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | # GNU General Public License for more details. 10 | # 11 | # You should have received a copy of the GNU General Public License 12 | # along with this program; if not, write to the Free Software 13 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 14 | 15 | 16 | """ 17 | Compatibility with report package 18 | """ 19 | 20 | class AccountManager: 21 | pass 22 | -------------------------------------------------------------------------------- /src/report-python/report/io/GTKIO.py: -------------------------------------------------------------------------------- 1 | # This program is free software; you can redistribute it and/or modify 2 | # it under the terms of the GNU General Public License as published by 3 | # the Free Software Foundation; either version 2 of the License, or 4 | # (at your option) any later version. 5 | # 6 | # This program is distributed in the hope that it will be useful, 7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | # GNU General Public License for more details. 10 | # 11 | # You should have received a copy of the GNU General Public License 12 | # along with this program; if not, write to the Free Software 13 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 14 | 15 | """ 16 | Compatibility with report package 17 | """ 18 | 19 | class GTKIO: 20 | def __init__(self, loginManager = None): 21 | pass 22 | 23 | #class FailDialog(): 24 | # def __init__(self, title, message): 25 | # pass 26 | -------------------------------------------------------------------------------- /src/report-python/report/io/NewtIO.py: -------------------------------------------------------------------------------- 1 | # This program is free software; you can redistribute it and/or modify 2 | # it under the terms of the GNU General Public License as published by 3 | # the Free Software Foundation; either version 2 of the License, or 4 | # (at your option) any later version. 5 | # 6 | # This program is distributed in the hope that it will be useful, 7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | # GNU General Public License for more details. 10 | # 11 | # You should have received a copy of the GNU General Public License 12 | # along with this program; if not, write to the Free Software 13 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 14 | 15 | """ 16 | Compatibility with report package 17 | """ 18 | 19 | class NewtIO: 20 | def __init__(self, screen = None): 21 | self.screen = screen 22 | pass 23 | -------------------------------------------------------------------------------- /src/report-python/report/io/TextIO.py: -------------------------------------------------------------------------------- 1 | # This program is free software; you can redistribute it and/or modify 2 | # it under the terms of the GNU General Public License as published by 3 | # the Free Software Foundation; either version 2 of the License, or 4 | # (at your option) any later version. 5 | # 6 | # This program is distributed in the hope that it will be useful, 7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | # GNU General Public License for more details. 10 | # 11 | # You should have received a copy of the GNU General Public License 12 | # along with this program; if not, write to the Free Software 13 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 14 | 15 | """ 16 | Compatibility with report package 17 | """ 18 | 19 | class TextIO: 20 | pass 21 | -------------------------------------------------------------------------------- /src/report-python/report/io/__init__.py: -------------------------------------------------------------------------------- 1 | # This program is free software; you can redistribute it and/or modify 2 | # it under the terms of the GNU General Public License as published by 3 | # the Free Software Foundation; either version 2 of the License, or 4 | # (at your option) any later version. 5 | # 6 | # This program is distributed in the hope that it will be useful, 7 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 8 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 9 | # GNU General Public License for more details. 10 | # 11 | # You should have received a copy of the GNU General Public License 12 | # along with this program; if not, write to the Free Software 13 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 14 | 15 | pass 16 | -------------------------------------------------------------------------------- /src/report-python/report/libreport-meh-test.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | 3 | from meh.dump import ReverseExceptionDump 4 | from meh.handler import * 5 | from meh.ui.gui import * 6 | 7 | class Config: 8 | def __init__(self): 9 | self.programName = "abrt" 10 | self.programVersion = "2.0" 11 | self.attrSkipList = [] 12 | self.fileList = [] 13 | self.config_value_one = 1 14 | self.config_value_two = 2 15 | 16 | 17 | 18 | #meh.makeRHHandler("crash-test-meh", "1.0", Config()) 19 | config = Config() 20 | intf = GraphicalIntf(None) 21 | handler = ExceptionHandler(config, intf, ReverseExceptionDump) 22 | handler.install(None) 23 | 24 | 25 | print("handler set up, about to divide by zero") 26 | 27 | zero = 0 28 | print(1 / zero) 29 | 30 | print("should have crashed") 31 | 32 | -------------------------------------------------------------------------------- /src/report-python/report/py_report_test.py: -------------------------------------------------------------------------------- 1 | import _pyreport 2 | 3 | pd = _pyreport.problem_data() 4 | pd.add("foo", "bar") 5 | pd.add("description", "python-libreport test bug") 6 | 7 | _pyreport.report(pd) 8 | -------------------------------------------------------------------------------- /src/report-python/report/pyreport.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Abrt team. 3 | Copyright (C) 2009 RedHat inc. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License along 16 | with this program; if not, write to the Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | #include "common.h" 21 | 22 | /* struct dump_dir *create_dump_dir_from_problem_data(problem_data_t *problem_data, const char *base_dir_name); */ 23 | -------------------------------------------------------------------------------- /src/report-python/report/test_dd_create: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from report import * 4 | 5 | dd = dd_create("testdir") 6 | print dd 7 | 8 | if dd: 9 | print "dd is nonzero" 10 | else: 11 | print "dd is zero" 12 | 13 | print "name:", dd.name 14 | print "closing" 15 | dd.close() 16 | 17 | if dd: 18 | print "dd is nonzero" 19 | else: 20 | print "dd is zero" 21 | 22 | # Should fail here 23 | dd.name = "qwe" 24 | 25 | print "Done" 26 | -------------------------------------------------------------------------------- /src/report-python/report/test_full: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | from report import * 5 | 6 | def run_event_on_problem_data(cd, event, log_function = None): 7 | dd = cd.create_dump_dir("/tmp") 8 | dir_name = dd.name 9 | print "Created dump_dir:", dir_name 10 | dd.close() 11 | run_state = run_event_state() 12 | if log_function: # maybe if callable(log_function)? 13 | run_state.logging_callback = log_function 14 | print "Running event:", event 15 | r = run_state.run_event_on_dir_name(dir_name, event) 16 | print "Deleting:", dir_name 17 | delete_dump_dir(dir_name) 18 | return r; 19 | 20 | def log_function(line): 21 | print "LOG:", line 22 | 23 | cd = problem_data() 24 | cd.add("foo", "bar") 25 | cd.add("analyzer", "baz", CD_FLAG_ISNOTEDITABLE) 26 | r = run_event_on_problem_data(cd, "post-create", log_function) 27 | print "Result:", r 28 | -------------------------------------------------------------------------------- /src/report-python/report/test_full2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | from report import * 5 | 6 | def log_function(line): 7 | print "LOG:", line 8 | 9 | cd = problem_data() 10 | cd.add("foo", "bar") 11 | cd.add("analyzer", "baz", CD_FLAG_ISNOTEDITABLE) 12 | 13 | st = run_event_state() 14 | st.logging_callback = log_function 15 | r = st.run_event_on_problem_data(cd, "post-create") 16 | 17 | print "Result:", r 18 | -------------------------------------------------------------------------------- /src/report-python/report/test_problem_data: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from report import * 4 | 5 | cd = problem_data() 6 | cd.add("foo", "bar") 7 | 8 | dd = cd.create_dump_dir() 9 | 10 | if dd: 11 | print "dd is nonzero" 12 | else: 13 | print "dd is zero" 14 | 15 | print "closing" 16 | dd.close() 17 | 18 | if dd: 19 | print "dd is nonzero" 20 | else: 21 | print "dd is zero" 22 | -------------------------------------------------------------------------------- /src/report-python/report/test_problem_data2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from report import * 4 | 5 | cd = problem_data() 6 | cd.add("foo", "bar") 7 | 8 | print "foo:", cd.get("foo") 9 | print "nonexistent:", cd.get("nonexistent") 10 | print "done" 11 | -------------------------------------------------------------------------------- /src/report-python/report/test_run_event_state: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | from report import * 4 | 5 | def func(): 6 | return 0 7 | 8 | res = run_event_state() 9 | print res 10 | print res.post_run_callback 11 | res.post_run_callback = func 12 | res.logging_callback = func 13 | print res.post_run_callback 14 | -------------------------------------------------------------------------------- /src/report-python/report/test_run_event_state1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | from report import * 5 | 6 | def post_run_callback(dump_dir_name): 7 | return 0 8 | 9 | def logging_callback(line): 10 | print "LOG:", line 11 | return 12 | 13 | res = run_event_state() 14 | res.post_run_callback = post_run_callback 15 | res.logging_callback = logging_callback 16 | 17 | dd = dd_create("testdir") 18 | if not dd: 19 | sys.exit(1) 20 | dd.save_text("analyzer", "foo") 21 | dd.close() 22 | 23 | res.run_event_on_dir_name("testdir", "post-create") 24 | 25 | dd = dd_opendir("testdir") 26 | dd.delete() 27 | dd.close() 28 | -------------------------------------------------------------------------------- /src/report-python/report/test_setroubleshoot_example: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import report 4 | import report.io 5 | import report.io.GTKIO 6 | import report.accountmanager 7 | 8 | accounts = report.accountmanager.AccountManager() 9 | 10 | signature = report.createAlertSignature("selinux-policy", 11 | "setroubleshoot", 12 | "self.siginfo.get_hash()", 13 | "self.summary", 14 | "content") 15 | 16 | rc = report.report(signature, report.io.GTKIO.GTKIO(accounts)) 17 | 18 | print "rc:", rc 19 | -------------------------------------------------------------------------------- /src/report-python/report/test_setroubleshoot_example2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import report 4 | import report.io 5 | import report.io.GTKIO 6 | import report.accountmanager 7 | 8 | accounts = report.accountmanager.AccountManager() 9 | 10 | signature = report.createAlertSignature("selinux-policy", 11 | "setroubleshoot", 12 | "self.siginfo.get_hash()", 13 | "self.summary", 14 | "content") 15 | 16 | # Won't send log anywhere: 17 | #rc = report.report(signature, report.io.GTKIO.GTKIO(accounts)) 18 | 19 | # report.report() + logging: 20 | def logging_callback(line): 21 | print "LOG:", line 22 | return 23 | state = report.run_event_state() 24 | state.logging_callback = logging_callback 25 | rc = state.run_event_on_problem_data(signature, "report") 26 | 27 | print "rc:", rc 28 | -------------------------------------------------------------------------------- /src/workflows/anaconda_event.conf: -------------------------------------------------------------------------------- 1 | EVENT=workflow_AnacondaFedora component=anaconda 2 | EVENT=workflow_AnacondaRHELBugzilla component=anaconda 3 | EVENT=workflow_AnacondaUpload component=anaconda 4 | -------------------------------------------------------------------------------- /src/workflows/report_centos.conf: -------------------------------------------------------------------------------- 1 | EVENT=workflow_CentOSLibreport analyzer=libreport 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | 5 | EVENT=workflow_CentOSCCpp type=CCpp 6 | # this is just a meta event which consists of other events 7 | # the list is defined in the xml file 8 | 9 | EVENT=workflow_CentOSPython type=Python component!=anaconda 10 | # this is just a meta event which consists of other events 11 | # the list is defined in the xml file 12 | 13 | EVENT=workflow_CentOSPython3 type=Python3 component!=anaconda 14 | # this is just a meta event which consists of other events 15 | # the list is defined in the xml file 16 | 17 | EVENT=workflow_CentOSKerneloops type=Kerneloops 18 | # this is just a meta event which consists of other events 19 | # the list is defined in the xml file 20 | 21 | EVENT=workflow_CentOSVmcore type=vmcore 22 | # this is just a meta event which consists of other events 23 | # the list is defined in the xml file 24 | 25 | EVENT=workflow_CentOSXorg type=xorg 26 | # this is just a meta event which consists of other events 27 | # the list is defined in the xml file 28 | 29 | EVENT=workflow_CentOSJava type=Java 30 | # this is just a meta event which consists of other events 31 | # the list is defined in the xml file 32 | -------------------------------------------------------------------------------- /src/workflows/report_fedora.conf: -------------------------------------------------------------------------------- 1 | EVENT=workflow_FedoraLibreport analyzer=libreport 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | 5 | EVENT=workflow_FedoraCCpp type=CCpp 6 | # this is just a meta event which consists of other events 7 | # the list is defined in the xml file 8 | 9 | EVENT=workflow_FedoraPython type=Python component!=anaconda 10 | # this is just a meta event which consists of other events 11 | # the list is defined in the xml file 12 | 13 | EVENT=workflow_FedoraPython3 type=Python3 component!=anaconda 14 | # this is just a meta event which consists of other events 15 | # the list is defined in the xml file 16 | 17 | EVENT=workflow_FedoraKerneloops type=Kerneloops 18 | # this is just a meta event which consists of other events 19 | # the list is defined in the xml file 20 | 21 | EVENT=workflow_FedoraVmcore type=vmcore 22 | # this is just a meta event which consists of other events 23 | # the list is defined in the xml file 24 | 25 | EVENT=workflow_FedoraXorg type=xorg 26 | # this is just a meta event which consists of other events 27 | # the list is defined in the xml file 28 | 29 | EVENT=workflow_FedoraJava type=Java 30 | # this is just a meta event which consists of other events 31 | # the list is defined in the xml file 32 | 33 | EVENT=workflow_FedoraJavaScript type=JavaScript 34 | # this is just a meta event which consists of other events 35 | # the list is defined in the xml file 36 | -------------------------------------------------------------------------------- /src/workflows/report_logger.conf: -------------------------------------------------------------------------------- 1 | # EVENT=workflow_LoggerCCpp type=CCpp 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | 5 | # EVENT=workflow_Logger type!=CCpp 6 | # this must be changed with new workflow 7 | -------------------------------------------------------------------------------- /src/workflows/report_mailx.conf: -------------------------------------------------------------------------------- 1 | # EVENT=workflow_MailxCCpp type=CCpp 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | 5 | # EVENT=workflow_Mailx type!=CCpp 6 | # this must be changed with new workflow 7 | -------------------------------------------------------------------------------- /src/workflows/report_rhel_bugzilla.conf: -------------------------------------------------------------------------------- 1 | EVENT=workflow_RHELBugzillaLibreport analyzer=libreport 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | 5 | EVENT=workflow_RHELBugzillaCCpp type=CCpp 6 | # this is just a meta event which consists of other events 7 | # the list is defined in the xml file 8 | 9 | EVENT=workflow_RHELBugzillaPython type=Python component!=anaconda 10 | # this is just a meta event which consists of other events 11 | # the list is defined in the xml file 12 | 13 | EVENT=workflow_RHELBugzillaKerneloops type=Kerneloops 14 | # this is just a meta event which consists of other events 15 | # the list is defined in the xml file 16 | 17 | EVENT=workflow_RHELBugzillaVmcore type=vmcore 18 | # this is just a meta event which consists of other events 19 | # the list is defined in the xml file 20 | 21 | EVENT=workflow_RHELBugzillaXorg type=xorg 22 | # this is just a meta event which consists of other events 23 | # the list is defined in the xml file 24 | 25 | EVENT=workflow_RHELBugzillaJava type=Java 26 | # this is just a meta event which consists of other events 27 | # the list is defined in the xml file 28 | -------------------------------------------------------------------------------- /src/workflows/report_uReport.conf: -------------------------------------------------------------------------------- 1 | EVENT=workflow_uReport 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | -------------------------------------------------------------------------------- /src/workflows/report_uploader.conf: -------------------------------------------------------------------------------- 1 | # EVENT=workflow_UploadCCpp type=CCpp 2 | # this is just a meta event which consists of other events 3 | # the list is defined in the xml file 4 | 5 | # EVENT=workflow_Upload type!=CCpp 6 | # this must be changed with new workflow 7 | -------------------------------------------------------------------------------- /src/workflows/workflow_AnacondaFedora.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report a bug to Fedora maintainers 4 | <_description>Process the report using the Fedora infrastructure 5 | 99 6 | 7 | 8 | report_Bugzilla 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/workflows/workflow_AnacondaRHELBugzilla.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report a bug to Red Hat Bugzilla 4 | <_description>Process the report using the Red Hat infrastructure 5 | 98 6 | 7 | 8 | report_Bugzilla 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/workflows/workflow_AnacondaUpload.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Export the problem data for manual reporting 4 | <_description>Upload the data via scp or ftp to a remote destination 5 | 6 | 7 | report_Uploader 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSCCpp.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the C/C++ crash using the CentOS infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_CCpp 10 | report_CentOSBugTracker 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSJava.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the Java exception using the CentOS infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_CentOSBugTracker 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSJavaScript.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the JavaScript exception using the CentOS infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_CentOSBugTracker 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSKerneloops.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the kerneloops using the CentOS infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_CentOSBugTracker 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSLibreport.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the problem using the CentOS infrastructure 5 | 6 | 7 | report_CentOSBugTracker 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSPython.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the python exception using the CentOS infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_CentOSBugTracker 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSPython3.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the python 3 exception using the CentOS infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_CentOSBugTracker 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSVmcore.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the kernel crash using the CentOS infrastructure 5 | 6 | 7 | analyze_VMcore 8 | report_uReport 9 | collect_* 10 | report_CentOSBugTracker 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_CentOSXorg.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to CentOS Bug Tracker 4 | <_description>Process the X Server problem using the CentOS infrastructure 5 | 6 | 7 | report_CentOSBugTracker 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraCCpp.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the C/C++ crash using the Fedora infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_CCpp 10 | analyze_BodhiUpdates 11 | report_Bugzilla 12 | post_report 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraJava.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the Java exception using the Fedora infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_BodhiUpdates 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraJavaScript.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the JavaScript exception using the Fedora infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_BodhiUpdates 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraKerneloops.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the kerneloops using the Fedora infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_BodhiUpdates 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraLibreport.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the problem using the Fedora infrastructure 5 | 6 | 7 | analyze_BodhiUpdates 8 | report_Bugzilla 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraPython.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the python exception using the Fedora infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_BodhiUpdates 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraPython3.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the python 3 exception using the Fedora infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_BodhiUpdates 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraVmcore.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the kernel crash using the Fedora infrastructure 5 | 6 | 7 | analyze_VMcore 8 | report_uReport 9 | collect_* 10 | analyze_BodhiUpdates 11 | report_Bugzilla 12 | post_report 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/workflows/workflow_FedoraXorg.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Fedora 4 | <_description>Process the X Server problem using the Fedora infrastructure 5 | 6 | 7 | analyze_BodhiUpdates 8 | report_Bugzilla 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/workflows/workflow_Logger.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Export the problem data information to a text file 4 | <_description>Analyze the problem locally and export the problem data information to a text file 5 | -99 6 | 7 | 8 | collect_* 9 | report_Logger 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_LoggerCCpp.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Export the problem data information to a text file 4 | <_description>Analyze the problem locally and export the problem data information to a text file 5 | -99 6 | 7 | 8 | collect_* 9 | analyze_CCpp 10 | report_Logger 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_Mailx.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Send the problem data via email 4 | <_description>Analyze the problem locally and send information via email 5 | -99 6 | 7 | 8 | collect_* 9 | report_Mailx 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_MailxCCpp.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Send the problem data via email 4 | <_description>Analyze the problem locally and send information via email 5 | -99 6 | 7 | 8 | collect_* 9 | analyze_CCpp 10 | report_Mailx 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaCCpp.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the C/C++ crash using the Red Hat infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | analyze_LocalGDB 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaJava.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the Java exception using the Red Hat infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_Bugzilla 10 | post_report 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaJavaScript.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the JavaScript exception using the Red Hat infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_Bugzilla 10 | post_report 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaKerneloops.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the kerneloops using the Red Hat infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_Bugzilla 10 | post_report 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaLibreport.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the problem using the Red Hat infrastructure 5 | 6 | 7 | report_Bugzilla 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaPython.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the python exception using the Red Hat infrastructure 5 | 6 | 7 | report_uReport 8 | collect_* 9 | report_Bugzilla 10 | post_report 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaVmcore.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the kernel crash using the Red Hat infrastructure 5 | 6 | 7 | analyze_VMcore 8 | report_uReport 9 | collect_* 10 | report_Bugzilla 11 | post_report 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/workflows/workflow_RHELBugzillaXorg.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Report to Red Hat Bugzilla 4 | <_description>Process the X Server problem using the Red Hat infrastructure 5 | 6 | 7 | report_Bugzilla 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/workflows/workflow_Upload.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Upload the problem data to a server 4 | <_description>Analyze the problem locally and upload the data via scp or ftp 5 | -99 6 | 7 | 8 | collect_* 9 | report_Uploader 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/workflows/workflow_UploadCCpp.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Upload the problem data to a server 4 | <_description>Analyze the problem locally and upload the data via scp or ftp 5 | -99 6 | 7 | 8 | collect_* 9 | analyze_CCpp 10 | report_Uploader 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/workflows/workflow_uReport.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | <_name>Submit anonymous crash report 4 | <_description>Submit anonymous crash report - I do not want to be contacted by Red Hat Support 5 | 6 | 7 | report_uReport 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/atlocal.in: -------------------------------------------------------------------------------- 1 | # @configure_input@ -*- shell-script -*- 2 | # Configurable variable values for btparser test suite. 3 | 4 | # We need a C compiler. 5 | CC='@CC@' 6 | LIBTOOL="$abs_top_builddir/libtool" 7 | 8 | # We want no optimization. 9 | CFLAGS="@O0CFLAGS@ -I$abs_top_builddir/tests/helpers -I$abs_top_builddir/src/include -I$abs_top_builddir/src/lib -I$abs_top_builddir/src/plugins -I$abs_top_builddir/src/gtk-helpers -I${abs_top_srcdir}/src -D_GNU_SOURCE @GLIB_CFLAGS@ @GTK_CFLAGS@ -DDEFAULT_DUMP_DIR_MODE=@DEFAULT_DUMP_DIR_MODE@" 10 | 11 | # Are special link options needed? 12 | LDFLAGS="@LDFLAGS@" 13 | 14 | # Are special libraries needed? 15 | LIBS="@LIBS@ $abs_top_builddir/src/lib/libreport.la $abs_top_builddir/src/gtk-helpers/libreport-gtk.la $abs_top_builddir/src/lib/libreport-web.la" 16 | 17 | BUILD_BUGZILLA="@BUILD_BUGZILLA@" 18 | -------------------------------------------------------------------------------- /tests/client_python.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([client_python]) 4 | 5 | ## --------- ## 6 | ## verbosity ## 7 | ## --------- ## 8 | 9 | AT_PYTESTFUN([verbosity], [[ 10 | import sys 11 | import os 12 | import unittest 13 | from importlib import reload 14 | 15 | sys.path.insert(0, "../../../src/client-python") 16 | sys.path.insert(0, "../../../src/client-python/reportclient/.libs") 17 | sys.path.insert(0, "../../../src/report-python") 18 | sys.path.insert(0, "../../../src/report-python/report/.libs") 19 | 20 | report = __import__("report", globals(), locals(), [], 0) 21 | sys.modules["report"] = report 22 | 23 | 24 | class TestReportClientVerbose(unittest.TestCase): 25 | def setUp(self): 26 | try: 27 | del os.environ["ABRT_VERBOSE"] 28 | except: 29 | pass 30 | os.unsetenv("ABRT_VERBOSE") 31 | self.reportclient = __import__("reportclient", globals(), locals(), [], 0) 32 | sys.modules["reportclient"] = self.reportclient 33 | 34 | def tearDown(self): 35 | del sys.modules["reportclient"] 36 | 37 | def test_default(self): 38 | self.assertEqual(self.reportclient.verbose, 0) 39 | 40 | def test_assign(self): 41 | self.reportclient.set_verbosity(1) 42 | self.assertEqual(self.reportclient.verbose, 1) 43 | self.assertEqual(os.environ["ABRT_VERBOSE"], "1") 44 | 45 | def test_load_from_environ(self): 46 | os.environ["ABRT_VERBOSE"] = "2" 47 | reload(self.reportclient) 48 | self.assertEqual(self.reportclient.verbose, 2) 49 | 50 | def test_recover_from_invalid_environ(self): 51 | os.environ["ABRT_VERBOSE"] = "foo" 52 | reload(self.reportclient) 53 | self.assertEqual(self.reportclient.verbose, 0) 54 | 55 | 56 | if __name__ == "__main__": 57 | unittest.main() 58 | ]]) 59 | -------------------------------------------------------------------------------- /tests/compress.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | static void 7 | test_decompression(const void *user_data) 8 | { 9 | char template[] = "/tmp/libreport-test_decompression-XXXXXX"; 10 | int in_fd; 11 | int out_fd; 12 | int result; 13 | 14 | in_fd = open(user_data, O_RDONLY); 15 | g_assert_cmpint(in_fd, !=, -1); 16 | 17 | out_fd = mkstemp(template); 18 | g_assert_cmpint(out_fd, !=, -1); 19 | 20 | result = libreport_decompress_fd(in_fd, out_fd); 21 | g_assert_cmpint(result, ==, 0); 22 | 23 | lseek(out_fd, 0, SEEK_SET); 24 | 25 | close(in_fd); 26 | 27 | in_fd = open("data/compressed-file", O_RDONLY); 28 | g_assert_cmpint(in_fd, !=, -1); 29 | 30 | for (; ; ) 31 | { 32 | char in_buf[256] = { 0 }; 33 | ssize_t in_read; 34 | char out_buf[256] = { 0 }; 35 | ssize_t out_read; 36 | 37 | in_read = read(in_fd, in_buf, sizeof(in_buf)); 38 | g_assert_cmpint(in_read, !=, -1); 39 | 40 | out_read = read(out_fd, out_buf, sizeof(out_buf)); 41 | g_assert_cmpint(out_read, !=, -1); 42 | 43 | g_assert_cmpmem(in_buf, in_read, out_buf, out_read); 44 | 45 | if (0 == in_read || 0 == out_read) 46 | { 47 | break; 48 | } 49 | } 50 | 51 | close(in_fd); 52 | close(out_fd); 53 | 54 | unlink(template); 55 | } 56 | 57 | int 58 | main(int argc, 59 | char **argv) 60 | { 61 | g_test_init(&argc, &argv, NULL); 62 | 63 | g_test_add_data_func("/decompression/lz4", "data/compressed-file.lz4", test_decompression); 64 | g_test_add_data_func("/decompression/lzma", "data/compressed-file.xz", test_decompression); 65 | g_test_add_data_func("/decompression/zstd", "data/compressed-file.zst", test_decompression); 66 | 67 | return g_test_run(); 68 | } 69 | -------------------------------------------------------------------------------- /tests/conf/default/file.conf: -------------------------------------------------------------------------------- 1 | success = "total" 2 | failure = "none" 3 | effort = "minimal" 4 | state = "done" 5 | -------------------------------------------------------------------------------- /tests/conf/default/test_ignored.conf: -------------------------------------------------------------------------------- 1 | # comment 2 | one 3 | two 4 | three 5 | four 6 | -------------------------------------------------------------------------------- /tests/conf/event_implicit_no_support_restricted.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bugzilla 4 | Report to Bugzilla bug tracker 5 | Report to Bugzilla bug tracker in long description 6 | 7 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/conf/event_no_support_restricted.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bugzilla 4 | Report to Bugzilla bug tracker 5 | Report to Bugzilla bug tracker in long description 6 | 7 | no 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/conf/event_support_restricted_no_option.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bugzilla 4 | Report to Bugzilla bug tracker 5 | Report to Bugzilla bug tracker in long description 6 | 7 | yes 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/conf/event_support_restricted_with_option.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bugzilla 4 | Report to Bugzilla bug tracker 5 | Report to Bugzilla bug tracker in long description 6 | 7 | yes 8 | 9 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/conf/event_test_definition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Bugzilla 4 | screen name 5 | bad screen name 6 | 7 | Report to Bugzilla bug tracker 8 | description 9 | bad description 10 | 11 | Report to Bugzilla bug tracker in long description 12 | long description 13 | bad long description 14 | 15 | 16 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/conf/first/file.conf: -------------------------------------------------------------------------------- 1 | success = "extreme" 2 | failure = "few" 3 | effort = "minimal" 4 | impact = "deep" 5 | usability = "good" 6 | -------------------------------------------------------------------------------- /tests/conf/second/file.conf: -------------------------------------------------------------------------------- 1 | success = "unbelievable" 2 | failure = "few" 3 | effort = "minimal" 4 | usability = "best" 5 | -------------------------------------------------------------------------------- /tests/conf/workflow_test_definition.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Report to Red Hat Customer Portal 4 | screen name 5 | bad screen name 6 | Process the C/C++ crash using the Red Hat infrastructure 7 | description 8 | bad description 9 | 10 | 11 | collect_* 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/data/compressed-file: -------------------------------------------------------------------------------- 1 | I’d just like to interject for a moment. What you’re referring to as Linux 2 | is, in fact, GNU/Linux or as I’ve recently taken to calling it, GNU plus Linux. 3 | Linux is not an operating system unto itself, but rather another free component 4 | of a fully functioning GNU system made useful by the GNU corelibs, shell 5 | utilities and vital system components comprising a full OS as defined by POSIX. 6 | 7 | Many computer users run a modified version of the GNU system every day 8 | without realizing it. Through a peculiar turn of events, the version of GNU 9 | which is widely used today is often called “Linux” and many of its users are 10 | not aware that it is basically the GNU system, developed by the GNU Project. 11 | 12 | There really is a Linux and these people are using it, but it is just a 13 | part of the system they use. Linux is the kernel - the program in the system 14 | that allocates the machine’s resources to the other programs that you run. 15 | The kernel is an essential part of an operating system, but useless by itself; 16 | it can only function in the context of a complete operating system. Linux is 17 | normally used in combination with the GNU operating system - the whole system 18 | is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” 19 | distributions are really distributions of GNU/Linux. 20 | -------------------------------------------------------------------------------- /tests/data/compressed-file.lz4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/data/compressed-file.lz4 -------------------------------------------------------------------------------- /tests/data/compressed-file.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/data/compressed-file.xz -------------------------------------------------------------------------------- /tests/data/compressed-file.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/data/compressed-file.zst -------------------------------------------------------------------------------- /tests/forbidden_words.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([Forbidden words]) 4 | 5 | ## ------------------------------ ## 6 | ## libreport_load_words_from_file ## 7 | ## ------------------------------ ## 8 | 9 | AT_TESTFUN([libreport_load_words_from_file], 10 | [[ 11 | #include "testsuite.h" 12 | 13 | #define CONF_DIR_PATH "../../conf/default/" 14 | 15 | TS_MAIN 16 | { 17 | GList *dynamic_words; 18 | 19 | TS_ASSERT_STDERR_EQ_BEGIN 20 | { 21 | libreport_g_verbose = 0; 22 | dynamic_words = libreport_load_words_from_file("certainly_missing_file.conf"); 23 | libreport_g_verbose = 3; 24 | } 25 | TS_ASSERT_STDERR_EQ_END("", "No error messages produced!"); 26 | 27 | TS_ASSERT_PTR_IS_NULL(dynamic_words); 28 | g_list_free_full(dynamic_words, (GDestroyNotify)free); 29 | 30 | const char *static_words[] = { "one", "two", "three", "four", NULL }; 31 | g_setenv("LIBREPORT_DEBUG_USER_CONF_BASE_DIR", CONF_DIR_PATH, TRUE); 32 | 33 | TS_ASSERT_STDERR_EQ_BEGIN 34 | { 35 | dynamic_words = libreport_load_words_from_file("test_ignored.conf"); 36 | } 37 | TS_ASSERT_STDERR_EQ_END("Can't open " CONF_DIR "/test_ignored.conf: No such file or directory\n", "User notified about errors!"); 38 | 39 | TS_ASSERT_PTR_IS_NOT_NULL(dynamic_words); 40 | 41 | const char **fptr = static_words; 42 | GList *sptr = dynamic_words; 43 | for (; *fptr && sptr; ++fptr, sptr = g_list_next(sptr)) 44 | { 45 | const char *fval = *fptr; 46 | const char *sval = sptr->data; 47 | 48 | TS_ASSERT_STRING_EQ(fval, sval, "List item equals"); 49 | } 50 | 51 | TS_ASSERT_TRUE_MESSAGE(*fptr == NULL && sptr == NULL, "instances are not equal in size"); 52 | 53 | g_list_free_full(dynamic_words, (GDestroyNotify)free); 54 | } 55 | TS_RETURN_MAIN 56 | ]]) 57 | -------------------------------------------------------------------------------- /tests/glib_helpers.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([glib helpers]) 4 | 5 | ## ------------ ## 6 | ## parse a list ## 7 | ## ------------ ## 8 | 9 | AT_TESTFUN([libreport_parse_delimited_list], 10 | [[ 11 | #include "internal_libreport.h" 12 | #include 13 | 14 | int test(const char *list, const char *delimiter, const char *strings[]) 15 | { 16 | GList *l = libreport_parse_delimited_list(list, delimiter); 17 | GList *start = l; 18 | 19 | char **tmp = (char **)strings; 20 | int retval = 0; 21 | 22 | while(l != NULL) { 23 | log_warning("is: '%s'", (char *)l->data); 24 | log_warning("should be: '%s'", *tmp); 25 | retval |= strcmp((char *)l->data, *(tmp++)) != 0; 26 | if (retval) 27 | break; // no need to continue further 28 | l = g_list_next(l); 29 | } 30 | 31 | g_list_free_full(start, g_free); 32 | 33 | return retval; 34 | } 35 | 36 | int main(void) 37 | { 38 | const char *new_line_list = "hello \n world \n fedora \n redhat"; 39 | const char *colon_list = "hello:world:fedora:redhat"; 40 | const char *strings[] = {"hello", "world", "fedora", "redhat"}; 41 | 42 | assert(test(new_line_list, "\n", strings) == 0); 43 | assert(test(colon_list, ":", strings) == 0); 44 | } 45 | ]]) 46 | -------------------------------------------------------------------------------- /tests/gtk-meh-test.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | 3 | from meh.dump import ReverseExceptionDump 4 | from meh.handler import * 5 | from meh.ui.gui import * 6 | 7 | class Config: 8 | def __init__(self): 9 | self.programName = "abrt" 10 | self.programVersion = "2.0" 11 | self.attrSkipList = [] 12 | self.fileList = [] 13 | self.config_value_one = 1 14 | self.config_value_two = 2 15 | 16 | 17 | 18 | #meh.makeRHHandler("crash-test-meh", "1.0", Config()) 19 | config = Config() 20 | intf = GraphicalIntf(None) 21 | handler = ExceptionHandler(config, intf, ReverseExceptionDump) 22 | handler.install(None) 23 | 24 | 25 | print("handler set up, about to divide by zero") 26 | 27 | zero = 0 28 | print(1 / zero) 29 | 30 | print("should have crashed") 31 | 32 | -------------------------------------------------------------------------------- /tests/is_text_file.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([is_text_file]) 4 | 5 | ## ---------------------- ## 6 | ## is_text_file ## 7 | ## ---------------------- ## 8 | 9 | AT_TESTFUN([is_text_file], 10 | [[ 11 | #include "internal_libreport.h" 12 | #include 13 | int main(void) 14 | { 15 | g_autofree char *template = strdup("/tmp/ddXXXXXX"); 16 | char *dir = mkdtemp(template); 17 | assert(dir); 18 | assert(chdir(dir) == 0); 19 | struct dump_dir *dd = dd_create("test", -1, -1); 20 | assert(dd); 21 | dd_save_text(dd, FILENAME_TIME, "1377092425"); 22 | dd_save_text(dd, FILENAME_TYPE, "testing_type"); 23 | 24 | dd_save_text(dd, "os_release", "Fedora release 19 (Schrödinger's Cat)"); 25 | //dd_save_text(dd, "cat", "Schrödinger's Cat"); 26 | 27 | g_autoptr(GHashTable) problem_data = problem_data_new(); 28 | problem_data_load_from_dump_dir(problem_data, dd, NULL); 29 | dd_close(dd); 30 | 31 | GList *list = g_hash_table_get_keys(problem_data); 32 | list = g_list_sort(list, (GCompareFunc)strcmp); 33 | GList *l = list; 34 | while (l) 35 | { 36 | const char *key = l->data; 37 | l = l->next; 38 | struct problem_item *item = g_hash_table_lookup(problem_data, key); 39 | assert(item); 40 | printf("%s:'%s'\n", key, item->content); 41 | assert(!(item->flags & CD_FLAG_BIN)); 42 | } 43 | g_list_free(list); 44 | 45 | dd = dd_opendir("test", 0); 46 | assert(dd); 47 | dd_delete(dd); 48 | assert(rmdir(dir) == 0); 49 | 50 | return 0; 51 | } 52 | ]]) 53 | -------------------------------------------------------------------------------- /tests/local.at: -------------------------------------------------------------------------------- 1 | # Source: bison local.at 2 | 3 | # ---------------------------------------- 4 | # AT_COMPILE(OUTPUT, [SOURCES = OUTPUT.c]) 5 | # ---------------------------------------- 6 | # Compile SOURCES into OUTPUT. If OUTPUT does not contain '.', 7 | # assume that we are linking too; this is a hack. 8 | m4_define([AT_COMPILE], 9 | [AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])-o $1 m4_default([$2], [$1.c])[]m4_bmatch([$1], [[.]], [], [ $LIBS])], 10 | 0, [ignore], [ignore])]) 11 | 12 | # ------------------------ 13 | # AT_TESTFUN(NAME, SOURCE) 14 | # ------------------------ 15 | 16 | # Create a test named NAME by compiling and running C file with 17 | # contents SOURCE. The stdout and stderr output of the C program is 18 | # ignored by Autotest. 19 | 20 | m4_define([AT_TESTFUN], 21 | [AT_SETUP([$1]) 22 | AT_DATA([$1.c], [[#line] __line__ "__file__" 23 | $2]) 24 | AT_COMPILE([$1]) 25 | AT_CHECK([$PRE_AT_CHECK ./$1], 0, [ignore], [ignore]) 26 | AT_CLEANUP]) 27 | 28 | m4_define([AT_TESTFUN_COND], 29 | [AT_SETUP([$1]) 30 | AT_SKIP_IF([$3]) 31 | AT_DATA([$1.c], [[#line] __line__ "__file__" 32 | $2]) 33 | AT_COMPILE([$1]) 34 | AT_CHECK([$PRE_AT_CHECK ./$1], 0, [ignore], [ignore]) 35 | AT_CLEANUP]) 36 | 37 | # ------------------------ 38 | # AT_PYTESTFUN(NAME, SOURCE) 39 | # ------------------------ 40 | 41 | # Create a test named NAME by running Python file with contents SOURCE. The 42 | # stdout and stderr output of the Python program is ignored by Autotest. 43 | 44 | m4_define([AT_PYTESTFUN], 45 | [AT_SETUP([$1]) 46 | AT_DATA([$1], [$2]) 47 | AT_SKIP_IF([test -z $BUILD_PYTHON3]) 48 | AT_CHECK([PYTHONPATH=../../../src python3 ./$1], 0, [ignore], [ignore]), 49 | AT_CLEANUP]) 50 | 51 | AT_INIT 52 | -------------------------------------------------------------------------------- /tests/newt-meh-test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from snack import * 3 | 4 | from meh.dump import ReverseExceptionDump 5 | from meh.handler import * 6 | from meh.ui.text import * 7 | 8 | class Config: 9 | def __init__(self): 10 | self.programName = "abrt" 11 | self.programVersion = "2.0" 12 | self.attrSkipList = [] 13 | self.fileList = [] 14 | self.config_value_one = 1 15 | self.config_value_two = 2 16 | 17 | s = SnackScreen() 18 | config = Config() 19 | intf = TextIntf(screen=s) 20 | handler = ExceptionHandler(config, intf, ReverseExceptionDump) 21 | handler.install(None) 22 | 23 | l = Button('divide by zero!') 24 | gf = GridForm(s, 'test', 1, 1) 25 | gf.add(l, 0, 0) 26 | result = gf.run() 27 | if result == l: 28 | 1/0 29 | 30 | s.popWindow() 31 | s.finish() 32 | -------------------------------------------------------------------------------- /tests/rules/comments: -------------------------------------------------------------------------------- 1 | # 2 | # LALA comments 3 | # 4 | 5 | EVENT=report-gui type=libreport 6 | echo 'yes' 7 | 8 | # 9 | # moar comments 10 | # 11 | # 12 | # second event 13 | EVENT=report-gui type=libreport 14 | #echo 'yes' 15 | echo 'no' 16 | 17 | # commented event, should be ignored 18 | #EVENT=report-gui type=libreport 19 | echo 'no' 20 | -------------------------------------------------------------------------------- /tests/rules/conditions: -------------------------------------------------------------------------------- 1 | EVENT=test t=t x=2 a=3 2 | echo 'yes' 3 | -------------------------------------------------------------------------------- /tests/rules/consecutive_events: -------------------------------------------------------------------------------- 1 | EVENT=report-gui type=libreport 2 | EVENT=report-gui type=libreport 3 | echo 'yes' 4 | -------------------------------------------------------------------------------- /tests/rules/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/rules/empty -------------------------------------------------------------------------------- /tests/rules/include_multiple: -------------------------------------------------------------------------------- 1 | include simple 2 | include comments 3 | include newline_in_event 4 | -------------------------------------------------------------------------------- /tests/rules/include_right_after_event: -------------------------------------------------------------------------------- 1 | EVENT=report-gui 2 | echo 'yes' 3 | include oneline 4 | -------------------------------------------------------------------------------- /tests/rules/include_simple: -------------------------------------------------------------------------------- 1 | include simple 2 | -------------------------------------------------------------------------------- /tests/rules/newline_condition: -------------------------------------------------------------------------------- 1 | EVENT=report-gui type=libreport 2 | this_is_not_a_condition=pls 3 | echo 'yes' 4 | -------------------------------------------------------------------------------- /tests/rules/newline_in_event: -------------------------------------------------------------------------------- 1 | EVENT=report-gui 2 | 3 | echo 'yes' 4 | -------------------------------------------------------------------------------- /tests/rules/oneline: -------------------------------------------------------------------------------- 1 | EVENT=report-gui command 2 | -------------------------------------------------------------------------------- /tests/rules/only_comments: -------------------------------------------------------------------------------- 1 | # 2 | # LALA comments 3 | # 4 | # 5 | # moar comments 6 | # 7 | # 8 | # second event 9 | # commented event, should be ignored 10 | #EVENT=report-gui type=libreport 11 | echo 'no' 12 | 13 | #EVENT=lala 14 | # echo 'yes' 15 | # 16 | 17 | # include nope 18 | -------------------------------------------------------------------------------- /tests/rules/simple: -------------------------------------------------------------------------------- 1 | EVENT=report-gui 2 | echo 'yes' 3 | -------------------------------------------------------------------------------- /tests/sample_problems/1/architecture: -------------------------------------------------------------------------------- 1 | x86_64 -------------------------------------------------------------------------------- /tests/sample_problems/1/backtrace: -------------------------------------------------------------------------------- 1 | Traceback (most recent call last): 2 | File "", line 1, in 3 | NameError: name 'myvar' is not defined 4 | -------------------------------------------------------------------------------- /tests/sample_problems/1/component: -------------------------------------------------------------------------------- 1 | gdb 2 | -------------------------------------------------------------------------------- /tests/sample_problems/1/time: -------------------------------------------------------------------------------- 1 | 1593515258 2 | -------------------------------------------------------------------------------- /tests/sample_problems/1/type: -------------------------------------------------------------------------------- 1 | CCpp -------------------------------------------------------------------------------- /tests/sample_problems/2/architecture: -------------------------------------------------------------------------------- 1 | x86_64 -------------------------------------------------------------------------------- /tests/sample_problems/2/component: -------------------------------------------------------------------------------- 1 | gdb 2 | -------------------------------------------------------------------------------- /tests/sample_problems/2/time: -------------------------------------------------------------------------------- 1 | 1593515260 2 | -------------------------------------------------------------------------------- /tests/sample_problems/2/type: -------------------------------------------------------------------------------- 1 | CCpp -------------------------------------------------------------------------------- /tests/sample_problems/3/architecture: -------------------------------------------------------------------------------- 1 | x86_64 -------------------------------------------------------------------------------- /tests/sample_problems/3/component: -------------------------------------------------------------------------------- 1 | afmw 2 | -------------------------------------------------------------------------------- /tests/sample_problems/3/time: -------------------------------------------------------------------------------- 1 | 1593515300 2 | -------------------------------------------------------------------------------- /tests/sample_problems/3/type: -------------------------------------------------------------------------------- 1 | CCpp -------------------------------------------------------------------------------- /tests/sitem.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([TextBuffer search]) 4 | 5 | ## -------------------------- ## 6 | ## compares two search items ## 7 | ## -------------------------- ## 8 | 9 | AT_TESTFUN([sitem_compare], 10 | [[ 11 | #include "internal_libreport.h" 12 | #include "search_item.h" 13 | #include 14 | 15 | /* comparing two items */ 16 | int test() 17 | { 18 | char text[] = "Some text"; 19 | GtkTextTagTable *table = gtk_text_tag_table_new(); 20 | GtkTextBuffer *buffer = gtk_text_buffer_new(table); 21 | gtk_text_buffer_insert_at_cursor(buffer, text, strlen(text)); 22 | GtkTextIter start; 23 | gtk_text_buffer_get_start_iter(buffer, &start); 24 | GtkTextIter end; 25 | gtk_text_buffer_get_end_iter(buffer, &end); 26 | int ret = -2; 27 | 28 | search_item_t *sitem1 = sitem_new( 29 | 0, 30 | buffer, 31 | NULL, //not needed, maybe we can remove it from the sitem struct? 32 | start, 33 | end 34 | ); 35 | 36 | search_item_t *sitem2 = sitem_new( //yes, it's the same, so it should return 0 37 | 0, 38 | buffer, 39 | NULL, //not needed, maybe we can remove it from the sitem struct? 40 | start, 41 | end 42 | ); 43 | 44 | ret = sitem_compare(sitem1, sitem2); 45 | 46 | g_clear_object(&buffer); 47 | g_clear_object(&table); 48 | 49 | g_free(sitem1); 50 | g_free(sitem2); 51 | 52 | return ret; 53 | } 54 | 55 | int main(void) 56 | { 57 | libreport_glib_init(); 58 | 59 | assert(test() == 0); 60 | 61 | return 0; 62 | } 63 | ]]) 64 | -------------------------------------------------------------------------------- /tests/strbuf.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([strbuf]) 4 | 5 | 6 | ## --------------------- ## 7 | ## libreport_strremovech ## 8 | ## --------------------- ## 9 | 10 | AT_TESTFUN([libreport_strremovech], 11 | [[ 12 | #include "internal_libreport.h" 13 | #include 14 | int main(void) 15 | { 16 | char test[] = "Hello , world!"; 17 | 18 | if (strcmp(libreport_strremovech(test, ' '), "Hello,world!") != 0) 19 | { 20 | fprintf(stderr, "Expected: 'Hello,world!'\nResult : '%s'", test); 21 | assert(!"Failed to remove space"); 22 | } 23 | 24 | return 0; 25 | } 26 | ]]) 27 | -------------------------------------------------------------------------------- /tests/string_list.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([string_list]) 4 | 5 | ## --------------------------------- ## 6 | ## libreport_index_of_string_in_list ## 7 | ## --------------------------------- ## 8 | 9 | AT_TESTFUN([libreport_index_of_string_in_list], 10 | [[ 11 | #include "internal_libreport.h" 12 | #include 13 | int main(void) 14 | { 15 | static const char *const list_order[] = { 16 | FILENAME_REASON , 17 | FILENAME_TIME , 18 | FILENAME_CMDLINE , 19 | FILENAME_PACKAGE , 20 | FILENAME_UID , 21 | FILENAME_COUNT , 22 | NULL 23 | }; 24 | 25 | int index = libreport_index_of_string_in_list(FILENAME_REASON, list_order); 26 | assert(index == 0); 27 | 28 | index = libreport_index_of_string_in_list(FILENAME_COUNT, list_order); 29 | assert(index == 5); 30 | 31 | index = libreport_index_of_string_in_list("other", list_order); 32 | assert(index < 0); 33 | 34 | return 0; 35 | } 36 | ]]) 37 | -------------------------------------------------------------------------------- /tests/taghyperlinks.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([tag hyperlinks]) 4 | 5 | ## ------------------------------ ## 6 | ## libreport_parse_release_for_bz ## 7 | ## ------------------------------ ## 8 | 9 | AT_TESTFUN([gtk_labels], 10 | [[ 11 | #include "testsuite.h" 12 | #include 13 | #include 14 | #include 15 | 16 | //from hyperlinks.c 17 | char *tag_url(const char* line, const char* prefix); 18 | 19 | /* Test parsing different release strings */ 20 | int test(char ***input) 21 | { 22 | g_autofree char *hyperlink = tag_url(**input, ""); 23 | (*input)++; 24 | 25 | printf("'%s' == '%s'\n", hyperlink, **input); 26 | return strcmp(hyperlink, **input); 27 | } 28 | 29 | int main(void) 30 | { 31 | const char *urls[3][2] = 32 | { 33 | //"Fedora release 15.a (Lovelock)", //should fail 34 | {"https://bugzilla.redhat.com/show_bug.cgi?id=743198", 35 | "https://bugzilla.redhat.com/show_bug.cgi?id=743198"}, 36 | {"SOMETEXT https://bugzilla.redhat.com/show_bug.cgi?id=743198", 37 | "SOMETEXT https://bugzilla.redhat.com/show_bug.cgi?id=743198"}, 38 | NULL, 39 | }; 40 | 41 | 42 | char **tmp = (char **)urls; 43 | while(*tmp) 44 | { 45 | assert(test(&tmp) == 0); 46 | tmp++; 47 | } 48 | } 49 | ]]) 50 | 51 | -------------------------------------------------------------------------------- /tests/testsuite.at: -------------------------------------------------------------------------------- 1 | # Test suite for abrt. 2 | # See http://www.gnu.org/software/hello/manual/autoconf/Writing-Testsuites.html 3 | 4 | m4_include([xfuncs.at]) 5 | m4_include([strbuf.at]) 6 | m4_include([osrelease.at]) 7 | m4_include([osinfo.at]) 8 | m4_include([is_text_file.at]) 9 | m4_include([taghyperlinks.at]) 10 | m4_include([glib_helpers.at]) 11 | m4_include([sitem.at]) 12 | m4_include([configuration_files.at]) 13 | m4_include([report_result.at]) 14 | m4_include([reported_to.at]) 15 | m4_include([problem_data.at]) 16 | m4_include([make_description.at]) 17 | m4_include([libreport_types.at]) 18 | m4_include([xml_definition.at]) 19 | m4_include([report_python.at]) 20 | m4_include([client_python.at]) 21 | m4_include([string_list.at]) 22 | m4_include([ureport.at]) 23 | m4_include([problem_report.at]) 24 | m4_include([dump_dir.at]) 25 | m4_include([global_config.at]) 26 | m4_include([load_rule_list.at]) 27 | m4_include([iso_date.at]) 28 | m4_include([uriparser.at]) 29 | m4_include([event_config.at]) 30 | m4_include([bugzilla_plugin.at]) 31 | m4_include([proc_helpers.at]) 32 | m4_include([forbidden_words.at]) 33 | m4_include([client.at]) 34 | -------------------------------------------------------------------------------- /tests/ureport/certs/correct/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | cer 3 | tifica 4 | te 5 | -----END CERTIFICATE----- 6 | -----BEGIN ENTITLEMENT DATA----- 7 | entitlement 8 | data 9 | -----END ENTITLEMENT DATA----- 10 | -----BEGIN RSA SIGNATURE----- 11 | rsa 12 | signature 13 | -----END RSA SIGNATURE----- 14 | -------------------------------------------------------------------------------- /tests/ureport/certs/correct/key.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/ureport/certs/correct/key.pem -------------------------------------------------------------------------------- /tests/ureport/certs/only_cert/cert.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/ureport/certs/only_cert/cert.pem -------------------------------------------------------------------------------- /tests/ureport/certs/only_key/key.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abrt/libreport/d084c6b7d792751ecf42d2205a41ca1ef30c3085/tests/ureport/certs/only_key/key.pem -------------------------------------------------------------------------------- /tests/valgrind.supp: -------------------------------------------------------------------------------- 1 | { 2 | libgobject 3 | Memcheck:Leak 4 | ... 5 | obj:/usr/*lib*/libgobject-* 6 | ... 7 | fun:_dl_init 8 | } 9 | 10 | { 11 | libpixman 12 | Memcheck:Leak 13 | ... 14 | obj:/usr/*lib*/libpixman-* 15 | ... 16 | fun:_dl_init 17 | } 18 | 19 | { 20 | xmlrpc_parseValue 21 | Memcheck:Leak 22 | ... 23 | fun:xmlrpc_parseValue 24 | } 25 | -------------------------------------------------------------------------------- /tests/xfuncs.at: -------------------------------------------------------------------------------- 1 | # -*- Autotest -*- 2 | 3 | AT_BANNER([xfuncs]) 4 | 5 | ## ------------------------- ## 6 | ## libreport_xstrdup_between ## 7 | ## ------------------------- ## 8 | 9 | AT_TESTFUN([libreport_xstrdup_between], 10 | [[#include "internal_libreport.h" 11 | #include 12 | #include 13 | #include 14 | 15 | #define DEBUG_PRINT(e, r, o, c, s) \ 16 | fprintf(stderr, "Expected: '%s'\nFound: '%s'\nOpen: '%s'\nClose: '%s'\nSource: '%s'\n", e, r, o, c, s) 17 | 18 | void test(const char *src, const char *open, const char *close, const char *exp) 19 | { 20 | g_autofree char *res = libreport_xstrdup_between(src, open, close); 21 | 22 | if (exp == NULL && res != NULL) 23 | { 24 | DEBUG_PRINT("NULL", res, open, close, src); 25 | assert(!"Found non-existing section."); 26 | } 27 | else if (exp != NULL && res == NULL) 28 | { 29 | DEBUG_PRINT(exp, "NULL", open, close, src); 30 | assert(!"Didn't find section."); 31 | } 32 | else if (exp == NULL && res == NULL) 33 | return; 34 | else if (strcmp(res, exp) != 0) 35 | { 36 | DEBUG_PRINT(exp, res, open, close, src); 37 | assert(!"Invalid selection."); 38 | } 39 | } 40 | 41 | 42 | int main(void) 43 | { 44 | libreport_g_verbose=3; 45 | 46 | test("foo blah", "", "", NULL); 47 | test("foo blah", "", "", NULL); 48 | test("", "", "", ""); 49 | test("@.$.@GOOD.$.", "@.$.@", ".$.", "GOOD"); 50 | 51 | return 0; 52 | } 53 | 54 | ]]) 55 | --------------------------------------------------------------------------------