Compare commits

...

No commits in common. "c8s" and "c9-beta" have entirely different histories.
c8s ... c9-beta

7 changed files with 48 additions and 94 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mtr-0.92.tar.gz SOURCES/mtr-0.94.tar.gz

View File

@ -1 +1 @@
81fe55d8d34cc65f1a03803ada95ce0d7332f8d0 SOURCES/mtr-0.92.tar.gz bf6b83f72aabffe8825bbde23967a64ddd5b7693 SOURCES/mtr-0.94.tar.gz

View File

@ -1,28 +0,0 @@
From 9d2800441a73a1dfb84f1c97a1e2755b9cac163c Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Fri, 26 Jul 2019 01:56:10 +0200
Subject: [PATCH] buildsys: don't set filecaps nor setuid manually and let
rpmbuild handle it
---
Makefile.am | 4 ----
1 file changed, 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c0709ca..daebb84 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,10 +40,6 @@ $(PATHFILES): Makefile
dist_man_MANS = mtr.8 mtr-packet.8
PATHFILES += man/mtr.8 man/mtr-packet.8
-install-exec-hook:
- `setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr-packet` \
- || chmod u+s $(DESTDIR)$(sbindir)/mtr-packet
-
mtr_SOURCES = ui/mtr.c ui/mtr.h \
ui/net.c ui/net.h \
ui/cmdpipe.c ui/cmdpipe.h \
--
2.21.0

View File

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

View File

@ -4,7 +4,7 @@ Type=Application
Comment=Traces packets between two network hosts Comment=Traces packets between two network hosts
Exec=xmtr Exec=xmtr
Terminal=false Terminal=false
Icon=mtr_icon.xpm Icon=mtr_icon
Encoding=UTF-8 Encoding=UTF-8
X-Desktop-File-Install-Version=0.2 X-Desktop-File-Install-Version=0.2
Categories=System;Application; Categories=System;Application;

View File

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

View File

@ -2,20 +2,15 @@
Summary: Network diagnostic tool combining 'traceroute' and 'ping' Summary: Network diagnostic tool combining 'traceroute' and 'ping'
Name: mtr Name: mtr
Version: 0.92 Version: 0.94
Release: 3%{?dist} Release: 4%{?dist}
Epoch: 2 Epoch: 2
Group: Applications/Internet
License: GPLv2 License: GPLv2
URL: https://www.bitwizard.nl/mtr/ URL: https://www.bitwizard.nl/mtr/
Source0: https://github.com/traviscross/mtr/archive/v%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/traviscross/mtr/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: net-x%{name}.desktop Source1: net-x%{name}.desktop
Source2: mtr-gtk-pkexec-wrapper.sh
Source3: org.fedoraproject.mtr.policy
Patch0001: 0001-buildsys-don-t-set-filecaps-nor-setuid-manually-and-.patch BuildRequires: gcc make ncurses-devel libcap-devel jansson-devel
BuildRequires: ncurses-devel gtk2-devel desktop-file-utils
BuildRequires: autoconf automake libtool git BuildRequires: autoconf automake libtool git
%description %description
@ -30,18 +25,18 @@ the link to each machine. While doing this, it prints running statistics
about each machine. about each machine.
MTR provides two user interfaces: an ncurses interface, useful for the 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). in the mtr-gtk package).
%package gtk %package gtk
Summary: GTK+ interface for MTR Summary: GTK interface for MTR
Group: Applications/Internet
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
BuildRequires: gtk3-devel desktop-file-utils
%description gtk %description gtk
MTR combines the functionality of the 'traceroute' and 'ping' programs MTR combines the functionality of the 'traceroute' and 'ping' programs
in a single network diagnostic tool. The mtr-gtk package provides the 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 When MTR is started, it investigates the network connection between the
host MTR runs on and the user-specified destination host. Afterwards it host MTR runs on and the user-specified destination host. Afterwards it
@ -51,55 +46,69 @@ the link to each machine. While doing this, it prints running statistics
about each machine. about each machine.
%prep %prep
%autosetup -S git %setup -q
%build %build
autoreconf -vfi
export CFLAGS="%{optflags} -fPIE"
export LDFLAGS="-z now -pie"
# Upstream forgot to ship .tarball-version
echo "%{version}" > .tarball-version
./bootstrap.sh ./bootstrap.sh
%configure --with-gtk %configure --with-gtk
%make_build && mv -f mtr xmtr.bin && make distclean %make_build && mv -f mtr xmtr && make distclean
%configure --without-gtk %configure --without-gtk
%make_build %make_build
%install %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 %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} desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
%files %files
%{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
%doc AUTHORS FORMATS NEWS README SECURITY %doc AUTHORS FORMATS NEWS README.md SECURITY
%{_sbindir}/%{name} %{_sbindir}/%{name}
%caps(cap_net_raw=pe) %{_sbindir}/%{name}-packet %attr(0755,root,root) %caps(cap_net_raw=pe) %{_sbindir}/%{name}-packet
%{_mandir}/man8/* %{_mandir}/man8/%{name}.8*
%{_mandir}/man8/%{name}-packet.8*
%dir %{_datadir}/bash-completion/ %dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions/ %dir %{_datadir}/bash-completion/completions/
%{_datadir}/bash-completion/completions/%{name} %{_datadir}/bash-completion/completions/%{name}
%files gtk %files gtk
%{_bindir}/xmtr %{_bindir}/xmtr
%{_bindir}/xmtr.bin
%{_datadir}/pixmaps/mtr_icon.xpm %{_datadir}/pixmaps/mtr_icon.xpm
%{_datadir}/polkit-1/actions/org.fedoraproject.mtr.policy
%{_datadir}/applications/net-x%{name}.desktop %{_datadir}/applications/net-x%{name}.desktop
%changelog %changelog
* Mon Jul 29 2019 Michal Sekletar <msekleta@redhat.com> - 2:0.92-3 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2:0.94-4
- fix name of the gating config file (#1681042) - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jul 26 2019 Michal Sekletar <msekleta@redhat.com> - 2:0.92-2 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2:0.94-3
- don't set setuid and filecaps manually (#1633182) - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.94-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 24 2021 Robert Scheck <robert@fedoraproject.org> - 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 <releng@fedoraproject.org> - 2:0.92-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.92-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.92-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.92-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.92-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:0.92-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Aug 26 2017 Robert Scheck <robert@fedoraproject.org> - 2:0.92-1 * Sat Aug 26 2017 Robert Scheck <robert@fedoraproject.org> - 2:0.92-1
- Rebase to 0.92 (#1458265) - Rebase to 0.92 (#1458265)