#2 Update to 0.94
Closed 3 years ago by mikelo2. Opened 3 years ago by mikelo2.
rpms/ mikelo2/mtr 094  into  master

@@ -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

file modified
+13 -18
@@ -2,8 +2,8 @@ 

  

  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/
@@ -12,7 +12,8 @@ 

  Source2: mtr-gtk-pkexec-wrapper.sh

  Source3: org.fedoraproject.mtr.policy

  

- BuildRequires: ncurses-devel gtk2-devel desktop-file-utils

+ BuildRequires: ncurses-devel gtk3-devel desktop-file-utils

+ BuildRequires: jansson-devel libasan libubsan libcap-devel

  BuildRequires: autoconf automake libtool git

  

  %description
@@ -31,7 +32,7 @@ 

  in the mtr-gtk package).

  

  %package gtk

- Summary: GTK+ interface for MTR

+ Summary: GTK interface for MTR

  Requires: %{name} = %{epoch}:%{version}-%{release}

  

  %description gtk
@@ -50,23 +51,16 @@ 

  %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

- %configure --without-gtk

+ %configure --with-gtk --with-libasan

+ %make_build && mv -f mtr xmtr && make distclean

+ %configure --without-gtk --with-libasan

  %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 0755 xmtr %{buildroot}%{_bindir}/xmtr

  install -D -p -m 0644 img/mtr_icon.xpm %{buildroot}%{_datadir}/pixmaps/mtr_icon.xpm

  %make_install

  desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
@@ -74,7 +68,7 @@ 

  %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/*
@@ -84,12 +78,13 @@ 

  

  %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

+ * Fri Nov 06 2020 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 2:0.94-1

+ - Update to 0.94

+ 

  * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.92-7

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

@@ -1,17 +0,0 @@ 

- <?xml version="1.0" encoding="UTF-8"?>

- <!DOCTYPE policyconfig PUBLIC

-  "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"

-  "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">

- <policyconfig>

-    <action id="org.fedoraproject.mtr.pkexec.run">

-     <description>Run mtr</description>

-     <message>Authentication is required to run traceroute</message>

-     <defaults>

-       <allow_any>no</allow_any>

-       <allow_inactive>no</allow_inactive>

-       <allow_active>auth_admin_keep</allow_active>

-     </defaults>

-     <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/xmtr.bin</annotate>

-     <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>

-    </action>

- </policyconfig>

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (mtr-0.92.tar.gz) = 576da5717f0abf849f5583bdd09790fb14a3b7538289192ac0d41bfa2a1c8e5bc9ec11bff87c5b348e85b5fe6f70f046d1d897e506e597b6f00d56bc918c0450

+ SHA512 (mtr-0.94.tar.gz) = 0e58bd79562ff80f9308135562ab22aa1f1eea686aefd3aef07bac05e661e34b60fde7c66c96bf4f0919f546376fbd6106ecd8fa92328c24f6f903097496bf11

  • Remove xmtr.bin referneces, just use xmtr
  • Remove org.fedoraproject.mtr.policy works without authentication
  • Remove mtr-gtk-pkexec-wrapper.sh works fine with Wayland
  • Enable json output with jansson
  • Enable drop capabilities with libcap-devel
  • Remove .tarball-version setting, tarball includes it

Pull-Request has been closed by mikelo2

3 years ago