Blob Blame History Raw
%{!?python_site: %global python_site %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
# platform-dependent
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

# http://fedoraproject.org/wiki/Packaging:Guidelines#PIE
# http://fedoraproject.org/wiki/Hardened_Packages
%global _hardened_build 1

%define libreport_ver 2.1.11-35
%define satyr_ver 0.13-10

Summary: ABRT's addon for catching and analyzing Python 3 exceptions
Name: abrt-addon-python3
Version: 2.1.11
Release: 50%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/abrt/
Source: https://github.com/abrt/abrt/archive/%{version}/abrt-%{version}.tar.gz

Patch1: 0001-Do-not-enabled-Shortened-reporting-in-GNOME.patch
Patch2: 0002-remove-abrt-bodhi-from-configuration.patch
Patch3: 0003-replace-all-Fedora-URLs-by-corresponding-values-for-.patch
Patch4: 0004-have-AutoreportingEnabled-by-default.patch
Patch5: 0005-Enable-sosreport.patch
Patch6: 0006-post_report-always-exit-silenty.patch
Patch7: 0007-collect-installed-RPM-details-in-sosreport.patch
#Patch8: 0008-use-elfutils-stack-unwinder.patch
Patch9: 0009-fix-a-double-free-error-in-abrt-applet.patch
Patch10: 0010-vmcore-properly-configure-Augeas.patch
Patch11: 0011-applet-don-t-notify-missing-ignored_problems-file.patch
Patch12: 0012-configui-show-Close-button-in-the-dialog.patch
Patch13: 0013-applet-do-not-say-the-report-is-anonymous-when-urepo.patch
#Patch14: 0014-spec-abrt-cli-requires-a-pkg-providing-workflows.patch
#Patch15: 0015-testsuite-encourage-users-to-create-a-case-in-RHTS.patch
Patch16: 0016-cli-list-show-a-hint-about-creating-a-case-in-RHTS.patch
Patch17: 0017-harvest-vmcore-properly-handle-inaccessible-dir-erro.patch
Patch18: 0018-don-t-break-the-event-run-by-failures-of-abrt-action.patch
Patch19: 0019-Fix-handling-of-Machine-Check-Exceptions.patch
Patch20: 0020-move-MCE-handling-in-event-to-abrt-action-check-oops.patch
Patch21: 0021-abrt-action-check-oops-for-hw-error-i18n-add-error-c.patch
Patch22: 0022-Add-a-manpage-for-abrt-action-check-oops-for-hw-erro.patch
Patch23: 0023-oops-post-create-do-not-fail-the-event-if-check-oops.patch
Patch24: 0024-doc-MCE_readme.txt-new-file-documentation-about-MCE-.patch
Patch25: 0025-examples-mce2.test-an-example-of-non-fatal-MCE.patch
Patch26: 0026-MCE-cover-cases-where-kernel-version-isn-t-detected-.patch
Patch27: 0027-MCE-make-oops-and-vmcore-MCEs-a-bit-more-similar.patch
Patch28: 0028-python-install-modules-to-sitearch-directory.patch
#Patch29: 0029-spec-abrt-python-s-files-to-arch-specific-dir.patch
Patch30: 0030-retrace-client-stop-failing-on-SSL2.patch
#Patch31: 0031-add-transifex-configuration-for-RHEL7.patch
#Patch32: 0032-correct-rhel7-tx-configuration.patch
Patch33: 0033-upload-watch-remove-busy-wait-for-SIGUSR1.patch
Patch34: 0034-turn-off-Autoreporting.patch
#Patch35: 0035-make-dist-use-tar-ustar-due-to-long-filen
#ames.patch
Patch36: 0036-never-search-for-MCE-strings-in-dmesg.patch
Patch37: 0037-sos-capture-all-necessary-data.patch
Patch38: 0038-stop-sending-ureports-from-abrt-applet.patch
Patch39: 0039-ccpp-run-vulnerability-analysis-in-analyze_LocalGDB.patch
Patch40: 0040-Translation-updates.patch
Patch41: 0041-Translation-updates.patch
Patch42: 0042-vmcore-start-the-service-after-kdump-service.patch
Patch43: 0043-configu-UI-use-glade-file-extension-instead-of-ui.patch
Patch44: 0044-localization-fixes.patch
Patch45: 0045-gdb-disable-loading-of-auto-loaded-files.patch
#Patch46: 0046-spec-add-dependency-on-abrt-python.patch
#Patch47: 0047-spec-add-missing-requires-for-python-api.patch
#Patch48: 0048-spec-remove-stray-space-from-description.patch
Patch49: 0049-koops-add-an-option-controlling-MCE-detection.patch
#Patch50: 0050-spec-hook-Kernel-oops-configuration-files.patch
Patch51: 0051-python-support-exceptions-without-traceback.patch
#Patch52: 0052-spec-don-t-use-native-unwinder-on-arm-arch.patch
Patch53: 0053-gettext-fix-the-initialization-in-python-scripts.patch
Patch54: 0054-oops-add-man-page.patch
#Patch55: 0055-spec-hook-abrt-oops.conf.5.patch
Patch56: 0056-cli-make-consistent-commands-in-abrt-cli.patch
#Patch57: 0057-spec-remove-dependency-on-crash-from-abrt-addon-vmco.patch
Patch58: 0058-cli-robustize-abrt-console-notification.sh.patch
Patch59: 0059-plugins-add-abrt-action-generate-machine-id.patch
#Patch60: 0060-spec-add-abrt-action-generate-machine-id.patch
Patch61: 0061-dbus-fixed-abrt-dbus-memory-leaks.patch
Patch62: 0062-applet-chown-each-notified-problem-before-reporting-.patch
Patch63: 0063-cli-add-option-remove-crash-dirs-after-reporting.patch
Patch64: 0064-applet-confirm-ignoring-of-notifications.patch
Patch65: 0065-cli-batch-reporting-in-abrt-cli.patch
Patch66: 0066-Translation-updates.patch
Patch67: 0067-koops-don-t-analyze-MCEs-like-standard-oopses.patch
Patch68: 0068-ureport-attach-contact-email-if-configured.patch
Patch69: 0069-console-notifications-use-return-instead-of-exit.patch
Patch70: 0070-applet-don-t-show-duphash-instead-of-component.patch
Patch71: 0071-console-notifications-skip-non-interactive-shells.patch
Patch72: 0072-applet-ensure-writable-dump-directory-before-reporti.patch
Patch73: 0073-a-a-g-machine-id-add-systemd-s-machine-id.patch
Patch74: 0074-a-a-g-machine-id-suppress-its-failures-in-abrt_event.patch
Patch75: 0075-Translation-updates.patch
Patch76: 0076-Revert-gdb-disable-loading-of-auto-loaded-files.patch
Patch77: 0077-gdb-make-gdb-aware-of-the-abrt-s-debuginfo-dir.patch
#Patch78: 0078-spec-update-the-required-gdb-version.patch
Patch79: 0079-cli-mark-the-suggestion-text-for-translation.patch
Patch80: 0080-auto-reporting-add-options-to-specify-auth-type.patch
#Patch81: 0081-testsuite-abrt-auto-reporting-uReport-authentication.patch
Patch82: 0082-translations-pull-the-newest-PO-files.patch
#Patch83: 0083-translations-move-from-transifex-to-zanata.patch
#Patch84: 0084-spec-add-missing-augeas-dependency.patch
#Patch85: 0085-zanata-add-gettext-mappings.patch
Patch86: 0086-translations-update-the-PO-files.patch
Patch87: 0087-abrt-auto-reporting-make-the-code-more-safer.patch
# git format-patch 2.1.11-19.el7 -N --start-number 88 --topo-order
Patch88: 0088-a-a-save-package-data-turn-off-reading-data-from-roo.patch
Patch89: 0089-ccpp-fix-symlink-race-conditions.patch
Patch90: 0090-ccpp-stop-reading-hs_error.log-from-tmp.patch
Patch91: 0091-ccpp-do-not-read-data-from-root-directories.patch
Patch92: 0092-ccpp-open-file-for-dump_fd_info-with-O_EXCL.patch
Patch93: 0093-ccpp-postpone-changing-ownership-of-new-dump-directo.patch
Patch94: 0094-ccpp-create-dump-directory-without-parents.patch
Patch95: 0095-ccpp-do-not-override-existing-files-by-compat-cores.patch
Patch96: 0096-ccpp-do-not-use-value-of-proc-PID-cwd-for-chdir.patch
Patch97: 0097-ccpp-harden-dealing-with-UID-GID.patch
Patch98: 0098-ccpp-check-for-overflow-in-abrt-coredump-path-creati.patch
Patch99: 0099-ccpp-emulate-selinux-for-creation-of-compat-cores.patch
Patch100: 0100-make-the-dump-directories-owned-by-root-by-default.patch
Patch101: 0101-configure-move-the-default-dump-location-to-var-spoo.patch
#Patch102: 0102-spec-create-vat-spool-abrt.patch
Patch103: 0103-ccpp-avoid-overriding-system-files-by-coredump.patch
#Patch104: 0104-spec-add-libselinux-devel-to-BRs.patch
Patch105: 0105-daemon-use-libreport-s-function-checking-file-name.patch
Patch106: 0106-lib-add-functions-validating-dump-dir.patch
Patch107: 0107-dbus-process-only-valid-sub-directories-of-the-dump-.patch
Patch108: 0108-dbus-avoid-race-conditions-in-tests-for-dum-dir-avai.patch
Patch109: 0109-dbus-report-invalid-element-names.patch
Patch110: 0110-a-a-i-d-t-a-cache-sanitize-arguments.patch
Patch111: 0111-a-a-i-d-t-a-cache-sanitize-umask.patch
Patch112: 0112-ccpp-revert-the-UID-GID-changes-if-user-core-fails.patch
Patch113: 0113-upload-validate-and-sanitize-uploaded-dump-directori.patch
Patch114: 0114-daemon-harden-against-race-conditions-in-DELETE.patch
Patch115: 0115-daemon-allow-only-root-user-to-trigger-the-post-crea.patch
Patch116: 0116-daemon-dbus-allow-only-root-to-create-CCpp-Koops-vmc.patch
# Temporary RHEL-7.1.z patch #1219464
#Patch117: 0117-dumpers-avoid-AVC-when-creating-dump-directories.patch
# git format-patch 2.1.11-20.el7 -N --start-number 118 --topo-order
Patch118: 0118-dbus-validate-parameters-of-all-calls.patch
# git format-patch 2.1.11-21.el7 -N --start-number 119 --topo-order
Patch119: 0119-ccpp-do-not-unlink-failed-and-big-user-cores.patch
Patch120: 0120-a-a-i-d-t-a-cache-don-t-open-the-build_ids-file-as-a.patch
Patch121: 0121-a-a-i-d-t-a-cache-fix-command-line-argument-generati.patch
# git format-patch 2.1.11-22.el7 -N --start-number 122 --topo-order
Patch122: 0122-Do-not-use-bool-in-OPT_BOOL-macro-it-expects-int.patch
Patch123: 0123-abrt-auto-reporting-require-rhtsupport.conf-file-onl.patch
#Patch124: 0124-spec-add-AUTHENTICATED_AUTOREPORTING-conditional.patch
#Patch125: 0125-spec-abrt-requires-libreport-plugin-rhtsupport-on-rh.patch
Patch126: 0126-doc-fix-in-Makefile.patch
Patch127: 0127-sosreport-add-processor-information-to-sosreport.patch
Patch128: 0128-dbus-add-a-new-method-GetProblemData.patch
Patch129: 0129-libabrt-add-new-function-fetching-full-problem-data-.patch
Patch130: 0130-dbus-add-new-method-to-test-existence-of-an-element.patch
Patch131: 0131-libabrt-add-wrappers-TestElemeExists-and-GetInfo-for.patch
Patch132: 0132-cli-use-the-DBus-methods-for-getting-problem-informa.patch
Patch133: 0133-cli-status-don-t-return-0-if-there-is-a-problem-olde.patch
Patch134: 0134-cli-do-not-exit-with-segfault-if-dbus-fails.patch
Patch135: 0135-cli-chown-before-reporting.patch
Patch136: 0136-cli-exit-with-the-number-of-unreported-problems.patch
Patch137: 0137-cli-remove-dead-code.patch
Patch138: 0138-doc-update-abrt-cli-man-page.patch
Patch139: 0139-cli-enable-polkit-authentication-on-command-line.patch
Patch140: 0140-dbus-keep-the-polkit-authorization-for-all-clients.patch
Patch141: 0141-cli-get-list-of-possible-workflows-for-problem_data_.patch
Patch142: 0142-cli-warn-users-about-Private-Reports.patch
Patch143: 0143-cli-enable-authetication-for-all-commands.patch
Patch144: 0144-cli-do-not-notify-root-about-Private-Reports.patch
Patch145: 0145-cli-remove-useless-code-from-print_crash.patch
Patch146: 0146-cli-use-internal-command-impl-in-the-command-process.patch
# git format-patch 2.1.11-23.el7 -N --start-number 147 --topo-order
Patch147: 0147-abrt-hook-ccpp-minor-refactoring.patch
Patch148: 0148-Create-core-backtrace-in-unwind-hook.patch
Patch149: 0149-abrt-install-ccpp-hook-check-configuration.patch
#Patch150: 0150-spec-enable-dump-time-unwind-by-default.patch
Patch151: 0151-disable-CreateCoreBacktrace-by-default.patch
# git format-patch 2.1.11-24.el7 -N --start-number 152 --topo-order
Patch152: 0152-abrt-hook-ccpp-save-core_backtrace-from-hook.patch
# git format-patch 2.1.11-25.el7 -N --start-number 153 --topo-order
Patch153: 0153-abrt-hook-ccpp-reset-ownership-after-saving-core-bac.patch
# git format-patch 2.1.11-26.el7 -N --start-number 154 --topo-order
Patch154: 0154-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch
Patch155: 0155-abrt-auto-reporting-fix-related-to-conditional-compi.patch
Patch156: 0156-Update-translations.patch
# git format-patch 2.1.11-27.el7 -N --start-number 157 --topo-order
Patch157: 0157-Fix-missing-newline-in-po-fr.po.patch
Patch158: 0158-doc-fix-related-to-conditional-compilation-of-man-pa.patch
#Patch159: 0159-spec-add-dbus-dependency-for-abrt-cli-and-abrt-pytho.patch
# git format-patch 2.1.11-28.el7 -N --start-number 160 --topo-order
Patch160: 0160-dbus-api-unify-reporting-of-errors.patch
Patch161: 0161-cli-fix-testing-of-DBus-API-return-codes.patch
Patch162: 0162-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch
Patch163: 0163-ccpp-use-global-TID.patch
# git format-patch 2.1.11-29.el7 -N --start-number 164 --topo-order
Patch164: 0164-Warn-against-disabling-private-reports-in-abrt.conf.patch
# git format-patch 2.1.11-30.el7 -N --start-number 165 --topo-order
Patch165: 0165-Only-analyze-vulnerabilities-when-coredump-present.patch
# git format-patch 2.1.11-31.el7 -N --start-number 166 --topo-order
Patch166: 0166-UUID-from-core-backtrace-if-coredump-is-missing.patch
# git format-patch 2.1.11-32.el7 -N --start-number 167 --topo-order
Patch167: 0167-ccpp-correct-comments-mentioning-TID.patch
Patch168: 0168-ccpp-Use-Global-PID.patch
Patch169: 0169-doc-add-example-into-the-abrt-auto-reporting-man-pag.patch
Patch170: 0170-abrt-auto-reporting-add-example-into-the-help.patch
# git format-patch 2.1.11-33.el7 -N --start-number 171 --topo-order
#Patch171: 0171-runtests-stick-to-new-BZ-password-rules.patch
#Patch172: 0172-testsuite-use-rpm-to-remove-packages.patch
#Patch173: 0173-testsuite-more-verbose-fail-in-get_crash_path.patch
#Patch174: 0174-testsuite-cli-sanity-comment-not-reportable-phase-ou.patch
#Patch175: 0175-testsuite-new-test-dumpdir_completedness.patch
#Patch176: 0176-testsuite-upload-handling-fix-irrelevant-AVCs.patch
Patch177: 0177-sos-use-services-instead-of-startup.patch
# git format-patch 2.1.11-34.el7 -N --start-number 178 --topo-order
Patch178: 0178-a-a-i-d-to-abrt-cache-make-own-random-temporary-dire.patch
Patch179: 0179-conf-introduce-DebugLevel.patch
Patch180: 0180-ccpp-ignore-crashes-of-ABRT-binaries-if-DebugLevel-0.patch
Patch181: 0181-ccpp-save-abrt-core-files-only-to-new-files.patch
Patch182: 0182-lib-add-convenient-wrappers-for-ensuring-writable-di.patch
Patch183: 0183-abrtd-switch-owner-of-the-dump-location-to-root.patch
#Patch184: 0184-spec-switch-owner-of-the-dump-location-to-root.patch
#Patch185: 0185-testsuite-ccpp-plugin-debug.patch
#Patch186: 0186-testsuite-a-a-i-debuginfo-the-set-uid-wrapper-uses-s.patch
#Patch187: 0187-testsuite-check-file-system-attributes-of-the-dump-l.patch
# git format-patch 2.1.11-35.el7 -N --start-number 188 --topo-order
#Patch188: 0188-testsuite-port-abrtd-directories-to-journald.patch
#Patch189: 0189-testsuite-ccpp-plugin-debug-fix-logs-bundling.patch
#Patch190: 0190-testsuite-ccpp-plugin-debug-normalize-ABRT_BINARY_CO.patch
#Patch191: 0191-testsuite-search-in-journal-logs-for-the-current-boo.patch
#Patch192: 0192-testsuite-add-test-for-reporter-upload-SSH-keys.patch
#Patch193: 0193-testsuite-add-test-for-reporter-upload-passwd-asking.patch
#Patch194: 0194-testsuite-test-abrt-hook-ccpp-selinux-awareness.patch
#Patch195: 0195-testsuite-abrtd-directories-normalize-ABRT_CONF_DUMP.patch
#Patch196: 0196-testsuite-rhts-test-fix-typo-and-URL-change-in-respo.patch
#Patch197: 0197-testsuite-event-configuration-add-missing-xml-files.patch
#Patch198: 0198-translations-update-zanata-configuration.patch
#Patch199: 0199-testsuite-add-ureport-attachments-test.patch
#Patch200: 0200-testsuite-reporter-upload-appending-results-to-repor.patch
#Patch201: 0201-testsuite-remove-ureport-attachments-from-aux.patch
#Patch202: 0202-testsuite-add-concurrent-processing-test-for-abrtd.patch
#Patch203: 0203-testsuite-reporter-upload-ssh-keys-fixes-to-work-on-.patch
#Patch204: 0204-testsuite-Bugzilla-private-bugs.patch
#Patch205: 0205-testsuite-reply-with-invalid-data-for-unexpected-que.patch
Patch206: 0206-augeas-augtool-save-files-etc-abrt-plugins-oops.conf.patch
Patch207: 0207-vmcore-catch-IOErrors-and-OSErrors.patch
#Patch208: 0208-testsuite-add-a-per-test-timeout-for-15m.patch
Patch209: 0209-lib-hooklib-make-signal_is_fatal-public.patch
Patch210: 0210-ccpp-add-IgnoredPath-option.patch
#Patch211: 0211-testsuite-add-test-for-abrt-hook-ccpp-IgnoredPath-op.patch
#Patch212: 0212-testsuite-add-test-for-AllowedUsers-and-AllowedGroup.patch
Patch213: 0213-ccpp-add-AllowedUsers-and-AllowedGroups-feature.patch
Patch214: 0214-Save-Vendor-and-GPG-Fingerprint.patch
#Patch215: 0215-testsuite-add-tests-for-pgk_vendor-and-pkg_fingerpri.patch
#Patch216: 0216-testsuite-add-rhtsupport-discourage-tests.patch
#Patch217: 0217-testsuite-reporter-rhtsupport-should-attach-whole-du.patch
#Patch218: 0218-testsuite-use-problem-report-API-to-create-descripti.patch
#Patch219: 0219-testsuite-test-for-reporter-mailx-email-formatting.patch
#Patch220: 0220-testsuite-mailx-does-not-create-dead.letter-in-failu.patch
Patch221: 0221-lib-prevent-from-creating-non-root-sub-dirs-in-dump-.patch
# git format-patch 2.1.11-36.el7 -N --start-number 222 --topo-order
Patch222: 0222-ccpp-exit-with-error-if-cannot-get-executable.patch
# git format-patch 2.1.11-37.el7 -N --start-number 223 --topo-order
Patch223: 0223-ccpp-add-xfunc_die-if-cannot-get-executable.patch
# git format-patch 2.1.11-38.el7 -N --start-number 224 --topo-order
#Patch224: 0224-testsuite-augeas-set-DropNotReportableOopses-test.patch
Patch225: 0225-vmcore-generate-reason-file-in-all-cases.patch
#Patch226: 0226-testsuite-fix-the-kernel-vmcore-harvest-test.patch
Patch227: 0227-console-notifications-add-timeout.patch
Patch228: 0228-Fix-memory-leaks-in-abrt-dbus.patch
Patch229: 0229-python-fix-check-for-absolute-path.patch
#Patch230: 0230-testsuite-add-test-for-RequireAbsolutePath-option.patch
# git format-patch 2.1.11-39.el7 -N --start-number 231 --topo-order
#Patch231: 0231-testsuite-add-test-which-tests-log-messages-of-ingor.patch
Patch232: 0232-ccpp-unify-log-message-of-ignored-crashes.patch
Patch233: 0233-abrt-hook-ccpp-save-get_fsuid-return-values-in-int-v.patch
# git format-patch 2.1.11-40.el7 -N --start-number 234 --topo-order
#Patch234: 0234-testsuite-fix-ccpp-plugin-debug-test.patch
#Patch235: 0235-testsuite-mailx-reporting-hardcode-locale-and-timezo.patch
#Patch236: 0236-testsuite-rhts-test-relax-a-grep-pattern-a-bit.patch
#Patch237: 0237-testsuite-mailx-reporting-force-creating-symlink.patch
Patch238: 0238-vmcore-fix-finding-partitions-by-UUID-and-LABEL.patch
#Patch239: 0239-spec-add-utils-linux-to-vmcore-s-Require.patch
Patch240: 0240-vmcore-use-findmnt-to-get-mountpoint.patch
# git format-patch 2.1.11-41.el7 -N --start-number 241 --topo-order
#Patch241: 0241-testsuite-do-not-exit-mailx-notify-event-with-1.patch
#Patch242: 0242-testsuite-add-prepare-to-cli-authentication-test.patch
#Patch243: 0243-testsuite-libreport-plugin-mantisbt-is-not-installed.patch
#Patch244: 0244-testsuite-use-crashing-binary-from-signed-package.patch
Patch245: 0245-daemon-trigger-dump-location-cleanup-after-detection.patch
Patch246: 0246-handle-event-stop-creating-post-create-lock.patch
# git format-patch 2.1.11-42.el7 -N --start-number 247 --topo-order
#Patch247: 0247-testsuite-check-fingerprint-only-if-a-kernel-is-sign.patch
#Patch248: 0248-testsuite-fix-reporter-upload-ssh-keys-test.patch
#Patch249: 0249-testsuite-ccpp-plugin-hook-ignoring-fix-typo.patch
Patch250: 0250-lib-check_recent_crash_file-do-not-produce-error_msg.patch
#Patch251: 0251-testsuite-do-not-die-if-crash-is-not-generated.patch
# git format-patch 2.1.11-43.el7 -N --start-number 252 --topo-order
#Patch252: 0252-testsuite-reporter-rhtsupport-no-longer-uses-checks-.patch
#Patch253: 0253-testsuite-puts-NULL-didn-t-cause-segfault-on-s390x.patch
Patch254: 0254-daemon-send-base-names-from-abrt-server-to-abrtd.patch
# git format-patch 2.1.11-44.el7 -N --start-number 255 --topo-order
#Patch255: 0255-testsuite-make-dumpdir_completedness-test-runnable-o.patch
Patch256: 0256-Translation-updates.patch
# git format-patch 2.1.11-45.el7 -N --start-number 257 --topo-order
#Patch257: 0257-testsuite-use-exported-gpg-keys-in-dumpdir_completed.patch
Patch258: 0258-lib-don-t-expect-kernel-s-version-2.6.-or-3.patch
Patch259: 0259-koops-do-not-assume-version-has-3-levels.patch
Patch260: 0260-xorg-rewrite-skip_pfx-function-to-work-with-journal-.patch
#Patch261: 0261-testsuite-add-tescase-for-a-dump-xorg.patch
Patch262: 0262-lib-stop-printing-out-a-debug-message-adding.patch
Patch263: 0263-cli-don-t-start-reporting-of-not-reportable-problems.patch
Patch264: 0264-cli-introduce-unsafe-reporting-for-not-reporable-pro.patch
#Patch265: 0265-cli-configure-libreport-to-ignore-not-reportable.patch
#Patch266: 0266-cli-print-out-the-not-reportable-reason.patch
#Patch267: 0267-testsuite-add-cli-process-test-case.patch
Patch268: 0268-vmcore-remove-not-implemented-option-AttemptHardlink.patch
# git format-patch 2.1.11-46.el7 -N --start-number 269 --topo-order
Patch269: 0269-ccpp-add-h-parameter-into-abrt-hook-ccpp.patch
#Patch270: 0270-testsuite-add-test-for-core-template-substitution.patch
# git format-patch 2.1.11-47.el7 -N --start-number 271 --topo-order
Patch271: 0271-Translation-updates.patch

# abrt-addon-python3
Patch1001: 1001-abrt-addon-python3.patch
Patch1002: 1002-abrt-addon-python3-fixes.patch
Patch1003: 1003-doc-add-translated-abrt-python3.conf.5-man-page.patch

BuildArch: noarch

# git is need for '%%autosetup -S git' which automatically applies all the
# patches above. Please, be aware that the patches must be generated
# by 'git format-patch'
BuildRequires: git
BuildRequires: python36-devel

# Requires for abrt-addon-python3
Requires: python36
Requires: abrt >= %{version}
Requires: abrt-python
Requires: libreport >= %{libreport_ver}
Requires: python


%description
This package contains python 3 hook and python analyzer plugin for handling
uncaught exception in python 3 programs.

%prep
# http://www.rpm.org/wiki/PackagerDocs/Autosetup
# Default '__scm_apply_git' is 'git apply && git commit' but this workflow
# doesn't allow us to create a new file within a patch, so we have to use
# 'git am' (see /usr/lib/rpm/macros for more details)
%define __scm_apply_git(qp:m:) %{__git} am --exclude tests/testsuite.at
%autosetup -S git -n abrt-%{version}

%build

%install
mkdir -p %{buildroot}/%{_sysconfdir}/abrt/plugins
mkdir -p %{buildroot}/%{_datadir}/abrt/conf.d/plugins
mkdir -p %{buildroot}/%{_mandir}/man5
mkdir -p %{buildroot}/%{_sysconfdir}/libreport/events.d
mkdir -p %{buildroot}/%{python3_sitelib}

sed -e s,@VAR_RUN@,\"%{_localstatedir}/run\",g \
    -e s,@CONF_DIR@,\"%{_sysconfdir}/abrt\",g \
    %{_builddir}/abrt-%{version}/src/hooks/abrt_exception_handler3.py.in > \
    %{_builddir}/abrt-%{version}/src/hooks/abrt_exception_handler3.py

install -m644 %{_builddir}/abrt-%{version}/src/hooks/python3.conf %{buildroot}/%{_sysconfdir}/abrt/plugins
install -m644 %{_builddir}/abrt-%{version}/src/hooks/python3.conf %{buildroot}/%{_datadir}/abrt/conf.d/plugins
install -m644 %{_builddir}/abrt-%{version}/doc/abrt-python3.conf.5 %{buildroot}/%{_mandir}/man5
install -m644 %{_builddir}/abrt-%{version}/src/plugins/python3_event.conf %{buildroot}/%{_sysconfdir}/libreport/events.d
install -m644 %{_builddir}/abrt-%{version}/doc/python3_event.conf.5 %{buildroot}/%{_mandir}/man5
install -m644 %{_builddir}/abrt-%{version}/src/hooks/abrt3.pth %{buildroot}/%{python3_sitelib}
install -m644 %{_builddir}/abrt-%{version}/src/hooks/abrt_exception_handler3.py %{buildroot}/%{python3_sitelib}

%files
%config(noreplace) %{_sysconfdir}/abrt/plugins/python3.conf
%{_datadir}/abrt/conf.d/plugins/python3.conf
%{_mandir}/man5/abrt-python3.conf.5*
%config(noreplace) %{_sysconfdir}/libreport/events.d/python3_event.conf
%{_mandir}/man5/python3_event.conf.5*
%{python3_sitelib}/abrt3.pth
%{python3_sitelib}/abrt_exception_handler3.py

%exclude %{python3_sitelib}/abrt_exception_handler3.pyc
%exclude %{python3_sitelib}/abrt_exception_handler3.pyo
%exclude %{python3_sitelib}/__pycache__/abrt*

%changelog
* Thu Mar 07 2019 Troy Dawson <tdawson@redhat.com> - 2.1.11-50
- Rebuilt to change main python from 3.4 to 3.6

* Thu Jun 29 2017 Matej Habrnal <mhabrnal@redhat.com> - 2.1.11-49
- do not require the latest abrt version

* Thu Jun  1 2017 Matej Habrnal <mhabrnal@redhat.com> - 2.1.11-48
- Introduce abrt-addon-python3
- Related: #1445615