From 2c3f3ad5f51bd3be29b7cb140fe13eff1cf212d5 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Sun, 24 Jan 2021 21:37:43 +0100 Subject: [PATCH] - Rebase to 0.94 (#1742473, #1840079) - Drop policykit wrapper for xmtr due to libcap (#1488417, #1488418) --- mtr-gtk-pkexec-wrapper.sh | 10 -------- mtr.spec | 45 +++++++++++++++--------------------- net-xmtr.desktop | 2 +- org.fedoraproject.mtr.policy | 17 -------------- sources | 2 +- 5 files changed, 20 insertions(+), 56 deletions(-) delete mode 100644 mtr-gtk-pkexec-wrapper.sh delete mode 100644 org.fedoraproject.mtr.policy diff --git a/mtr-gtk-pkexec-wrapper.sh b/mtr-gtk-pkexec-wrapper.sh deleted file mode 100644 index b40c3e1..0000000 --- a/mtr-gtk-pkexec-wrapper.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -error_message="You are trying to run mtr-gtk in a Wayland session, however mtr-gtk requires root privileges and such graphical applications are not allowed to run on Wayland by default.\n\nSee https://fedoraproject.org/wiki/Common_F25_bugs\#wayland-root-apps for more details and possible workarounds.\n" - -if [ "$XDG_SESSION_TYPE" = wayland ]; then - zenity --error --title "mtr-gtk on Wayland" --text "$error_message" --width=600 2>/dev/null || printf "$error_message" >&2 - exit 1 -fi - -/usr/bin/pkexec /usr/bin/xmtr.bin diff --git a/mtr.spec b/mtr.spec index 6f1edcb..2a4d52c 100644 --- a/mtr.spec +++ b/mtr.spec @@ -2,18 +2,15 @@ Summary: Network diagnostic tool combining 'traceroute' and 'ping' Name: mtr -Version: 0.92 -Release: 7%{?dist} +Version: 0.94 +Release: 1%{?dist} Epoch: 2 License: GPLv2 URL: https://www.bitwizard.nl/mtr/ Source0: https://github.com/traviscross/mtr/archive/v%{version}/%{name}-%{version}.tar.gz Source1: net-x%{name}.desktop -Source2: mtr-gtk-pkexec-wrapper.sh -Source3: org.fedoraproject.mtr.policy -BuildRequires: make -BuildRequires: ncurses-devel gtk2-devel desktop-file-utils +BuildRequires: gcc make ncurses-devel libcap-devel jansson-devel BuildRequires: autoconf automake libtool git %description @@ -28,17 +25,18 @@ the link to each machine. While doing this, it prints running statistics about each machine. MTR provides two user interfaces: an ncurses interface, useful for the -command line, e.g. for SSH sessions; and a GTK+ interface for X (provided +command line, e.g. for SSH sessions; and a GTK interface for X (provided in the mtr-gtk package). %package gtk -Summary: GTK+ interface for MTR +Summary: GTK interface for MTR Requires: %{name} = %{epoch}:%{version}-%{release} +BuildRequires: gtk3-devel desktop-file-utils %description gtk MTR combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool. The mtr-gtk package provides the -GTK+ interface for MTR. +GTK interface for MTR. When MTR is started, it investigates the network connection between the host MTR runs on and the user-specified destination host. Afterwards it @@ -51,46 +49,39 @@ about each machine. %setup -q %build -export CFLAGS="%{optflags} -fPIE" -export LDFLAGS="-z now -pie" - -# Upstream forgot to ship .tarball-version -echo "%{version}" > .tarball-version - ./bootstrap.sh %configure --with-gtk -%make_build && mv -f mtr xmtr.bin && make distclean +%make_build && mv -f mtr xmtr && make distclean %configure --without-gtk %make_build %install -install -D -p -m 0755 mtr %{buildroot}%{_sbindir}/mtr -install -D -p -m 0755 xmtr.bin %{buildroot}%{_bindir}/xmtr.bin -install -D -p -m 0755 %{SOURCE2} %{buildroot}%{_bindir}/xmtr -install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/polkit-1/actions/org.fedoraproject.mtr.policy -install -D -p -m 0644 img/mtr_icon.xpm %{buildroot}%{_datadir}/pixmaps/mtr_icon.xpm %make_install +install -D -p -m 0755 xmtr %{buildroot}%{_bindir}/xmtr +install -D -p -m 0644 img/mtr_icon.xpm %{buildroot}%{_datadir}/pixmaps/mtr_icon.xpm desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1} %files -%{!?_licensedir:%global license %%doc} %license COPYING -%doc AUTHORS FORMATS NEWS README SECURITY +%doc AUTHORS FORMATS NEWS README.md SECURITY %{_sbindir}/%{name} -%caps(cap_net_raw=pe) %{_sbindir}/%{name}-packet -%{_mandir}/man8/* +%attr(0755,root,root) %caps(cap_net_raw=pe) %{_sbindir}/%{name}-packet +%{_mandir}/man8/%{name}.8* +%{_mandir}/man8/%{name}-packet.8* %dir %{_datadir}/bash-completion/ %dir %{_datadir}/bash-completion/completions/ %{_datadir}/bash-completion/completions/%{name} %files gtk %{_bindir}/xmtr -%{_bindir}/xmtr.bin %{_datadir}/pixmaps/mtr_icon.xpm -%{_datadir}/polkit-1/actions/org.fedoraproject.mtr.policy %{_datadir}/applications/net-x%{name}.desktop %changelog +* Sun Jan 24 2021 Robert Scheck - 2:0.94-1 +- Rebase to 0.94 (#1742473, #1840079) +- Drop policykit wrapper for xmtr due to libcap (#1488417, #1488418) + * Tue Jul 28 2020 Fedora Release Engineering - 2:0.92-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/net-xmtr.desktop b/net-xmtr.desktop index a5570fa..69d1fc4 100644 --- a/net-xmtr.desktop +++ b/net-xmtr.desktop @@ -4,7 +4,7 @@ Type=Application Comment=Traces packets between two network hosts Exec=xmtr Terminal=false -Icon=mtr_icon.xpm +Icon=mtr_icon Encoding=UTF-8 X-Desktop-File-Install-Version=0.2 Categories=System;Application; diff --git a/org.fedoraproject.mtr.policy b/org.fedoraproject.mtr.policy deleted file mode 100644 index f9e68b4..0000000 --- a/org.fedoraproject.mtr.policy +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Run mtr - Authentication is required to run traceroute - - no - no - auth_admin_keep - - /usr/bin/xmtr.bin - true - - diff --git a/sources b/sources index 7f2f4f4..ac7d4ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mtr-0.92.tar.gz) = 576da5717f0abf849f5583bdd09790fb14a3b7538289192ac0d41bfa2a1c8e5bc9ec11bff87c5b348e85b5fe6f70f046d1d897e506e597b6f00d56bc918c0450 +SHA512 (mtr-0.94.tar.gz) = 0e58bd79562ff80f9308135562ab22aa1f1eea686aefd3aef07bac05e661e34b60fde7c66c96bf4f0919f546376fbd6106ecd8fa92328c24f6f903097496bf11