R4SAS
1 year ago
3 changed files with 141 additions and 189 deletions
@ -1,45 +0,0 @@ |
|||||||
Project: miniupnp |
|
||||||
Project web page: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ |
|
||||||
Author: Thomas Bernard |
|
||||||
Copyright (c) 2005-2011 Thomas Bernard |
|
||||||
This software is subject to the conditions detailed in the |
|
||||||
LICENSE file provided within this distribution. |
|
||||||
|
|
||||||
This file was contributed by Domingo Becker, domingobecker@gmail.com |
|
||||||
|
|
||||||
UPnPc usage |
|
||||||
===== ===== |
|
||||||
|
|
||||||
From the command line: |
|
||||||
|
|
||||||
For listing all forwarded ports through UPnP in the current router: |
|
||||||
|
|
||||||
upnpc -l |
|
||||||
|
|
||||||
For adding a new port forward rule to the current router, for example, |
|
||||||
to forward tcp traffic on port 81 to internal ip port 80: |
|
||||||
|
|
||||||
upnpc -a 10.0.0.3 80 81 tcp |
|
||||||
|
|
||||||
You don't have to worry about overwriting previous rules, because the |
|
||||||
new ones will replace existing ones. |
|
||||||
|
|
||||||
If upnpc fails to add the rule, it may be because the port was added |
|
||||||
before in a static forwarding rule. |
|
||||||
|
|
||||||
Traffic on port 1900 is blocked by default on Fedora, and even if |
|
||||||
you open it, all traffic gets blocked because the nature of SSDP protocol. |
|
||||||
You will need to open incoming traffic from udp port 1900, because the |
|
||||||
packet sent to the router was from YourIP to 239.255.255.250 and the answer |
|
||||||
sent by the router is from RouterIP to YourIP. As a result, conntrack |
|
||||||
module can't track that kind of traffic and blocks all incoming answers. |
|
||||||
To add the iptables rule manually, do the following: |
|
||||||
|
|
||||||
iptables -I INPUT -p udp --sport 1900 -j ACCEPT |
|
||||||
|
|
||||||
You may also add this custom rule to system-config-firewall. |
|
||||||
|
|
||||||
I hope you enjoy. |
|
||||||
|
|
||||||
Domingo Becker |
|
||||||
|
|
@ -1,16 +0,0 @@ |
|||||||
--- CMakeLists.txt.orig 2018-05-07 11:07:00.000000000 +0000
|
|
||||||
+++ CMakeLists.txt 2019-10-22 13:34:43.486818800 +0000
|
|
||||||
@@ -119,12 +119,11 @@ endif ()
|
|
||||||
if (UPNPC_BUILD_SHARED) |
|
||||||
add_library (libminiupnpc-shared SHARED ${MINIUPNPC_SOURCES}) |
|
||||||
set_target_properties (libminiupnpc-shared PROPERTIES OUTPUT_NAME "miniupnpc") |
|
||||||
- set_target_properties (libminiupnpc-shared PROPERTIES VERSION ${MINIUPNPC_VERSION})
|
|
||||||
set_target_properties (libminiupnpc-shared PROPERTIES SOVERSION ${MINIUPNPC_API_VERSION}) |
|
||||||
target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private) |
|
||||||
target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS) |
|
||||||
|
|
||||||
- target_include_directories(libminiupnpc-static INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
+ target_include_directories(libminiupnpc-shared INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
if (WIN32) |
|
||||||
target_link_libraries(libminiupnpc-shared INTERFACE ws2_32 iphlpapi) |
|
||||||
endif() |
|
@ -1,169 +1,182 @@ |
|||||||
%global basepy3dir %(echo ../`basename %{py3dir}`) |
# Needed for RHEL/CentOS 8 |
||||||
%global major 17 |
%undefine __cmake_in_source_build |
||||||
%filter_provides_in %{python_sitearch}/.*\.so$ |
|
||||||
|
# Set a common one for all architectures and not _target_platform, fixes aarch64 |
||||||
|
%global __cmake_builddir build |
||||||
|
|
||||||
|
%filter_provides_in %{python3_sitearch}/.*\.so$ |
||||||
|
|
||||||
Summary: Library and tool to control NAT in UPnP-enabled routers |
Summary: Library and tool to control NAT in UPnP-enabled routers |
||||||
Name: miniupnpc |
Name: miniupnpc |
||||||
Version: 2.1 |
Version: 2.2.5 |
||||||
Release: 1%{?dist} |
Release: 3%{?dist} |
||||||
License: BSD |
License: BSD |
||||||
Group: System Environment/Libraries |
|
||||||
URL: http://miniupnp.free.fr/ |
URL: http://miniupnp.free.fr/ |
||||||
Source: https://miniupnp.tuxfamily.org/files/%{name}-%{version}.tar.gz |
|
||||||
BuildRequires: cmake |
BuildRequires: cmake >= 3.5.0 |
||||||
|
BuildRequires: gcc |
||||||
|
BuildRequires: make |
||||||
BuildRequires: python3-devel |
BuildRequires: python3-devel |
||||||
# Do not create libminiupnpc.so.%%{version} and libminiupnpc.so.%%{major} linking to it |
BuildRequires: python3-setuptools |
||||||
Patch0: %{name}-version.patch |
|
||||||
Source1: USAGE |
Source0: http://miniupnp.free.fr/files/%{name}-%{version}.tar.gz |
||||||
|
|
||||||
%description |
%description |
||||||
miniupnpc is an implementation of a UPnP client library, enabling |
miniupnpc is an implementation of a UPnP client library, enabling applications |
||||||
applications to access the services provided by an UPnP "Internet |
to access the services provided by an UPnP "Internet Gateway Device" present on |
||||||
Gateway Device" present on the network. In UPnP terminology, it is |
the network. In UPnP terminology, it is a UPnP Control Point. |
||||||
a UPnP Control Point. |
|
||||||
|
|
||||||
This package includes upnpc, a UPnP client application for configuring |
This package includes upnpc, a UPnP client application for configuring port |
||||||
port forwarding in UPnP enabled routers. |
forwarding in UPnP enabled routers. |
||||||
|
|
||||||
%package devel |
%package devel |
||||||
Summary: Development files for miniupnpc |
Summary: Development files for %{name} |
||||||
Group: Development/Libraries |
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release} |
Requires: %{name}%{?_isa} = %{version}-%{release} |
||||||
|
|
||||||
%description devel |
%description devel |
||||||
This package contains the header files and development documentation |
This package contains the header files and development documentation for |
||||||
for %{name}. |
%{name}. |
||||||
|
|
||||||
%package -n python3-%{name} |
%package -n python3-%{name} |
||||||
Summary: Python3 interface to %{name} |
Summary: Python3 interface to %{name} |
||||||
Group: System Environment/Libraries |
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release} |
|
||||||
BuildRequires: python3-devel |
|
||||||
|
|
||||||
%description -n python3-%{name} |
%description -n python3-%{name} |
||||||
This package contains python3 interfaces to %{name}. |
This package contains python3 interfaces to %{name}. |
||||||
|
|
||||||
%prep |
%prep |
||||||
%setup -q |
%autosetup -p2 |
||||||
%patch0 -p0 |
|
||||||
cp %{SOURCE1} . |
|
||||||
|
|
||||||
sed -i "s|\(\tMAKE=\$(MAKE) python3 setup.py install\)$|\1 --root=\$(DESTDIR)/|" Makefile |
# Use already built shared object for Python module |
||||||
|
# Unversioned link is not enough to avoid a rebuild |
||||||
|
sed -i -e 's|build/libminiupnpc.a|build/libminiupnpc.so.%{version}|g' setup.py |
||||||
|
|
||||||
%build |
%build |
||||||
mkdir -p build |
|
||||||
pushd build |
|
||||||
%cmake \ |
%cmake \ |
||||||
-DUPNPC_BUILD_STATIC=OFF \ |
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES \ |
||||||
-DUPNPC_BUILD_TESTS=ON \ |
-DCMAKE_SKIP_RPATH:BOOL=YES \ |
||||||
.. |
-DNO_GETADDRINFO=FALSE \ |
||||||
make upnpc-shared all |
-DUPNPC_BUILD_SAMPLE=TRUE \ |
||||||
popd |
-DUPNPC_BUILD_SHARED=TRUE \ |
||||||
make pythonmodule3 |
-DUPNPC_BUILD_STATIC=FALSE \ |
||||||
make upnpc-shared |
-DUPNPC_BUILD_TESTS=TRUE \ |
||||||
|
-DUPNPC_NO_INSTALL=FALSE |
||||||
|
|
||||||
|
%cmake_build |
||||||
|
%py3_build |
||||||
|
|
||||||
%install |
%install |
||||||
make install DESTDIR=$RPM_BUILD_ROOT -C build |
%cmake_install |
||||||
make DESTDIR=$RPM_BUILD_ROOT installpythonmodule3 |
%py3_install |
||||||
install -D -m644 man3/miniupnpc.3 $RPM_BUILD_ROOT/%{_mandir}/man3/miniupnpc.3 |
|
||||||
install -D -m 0755 upnpc-shared $RPM_BUILD_ROOT%{_bindir}/upnpc |
mv %{buildroot}%{_bindir}/upnpc-shared %{buildroot}%{_bindir}/upnpc |
||||||
|
mv %{buildroot}%{_bindir}/listdevices %{buildroot}%{_bindir}/upnp-listdevices |
||||||
|
rm -f %{buildroot}%{_bindir}/external-ip.sh |
||||||
|
|
||||||
%check |
%check |
||||||
make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check |
make CFLAGS="%{optflags} -DMINIUPNPC_SET_SOCKET_TIMEOUT" check |
||||||
|
|
||||||
%post -p /sbin/ldconfig |
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig |
|
||||||
|
|
||||||
%files |
%files |
||||||
%doc Changelog.txt |
%license LICENSE |
||||||
%doc LICENSE |
%doc Changelog.txt README |
||||||
%doc README |
|
||||||
%{_libdir}/libminiupnpc.so.%{major} |
|
||||||
%{_bindir}/upnpc |
%{_bindir}/upnpc |
||||||
%doc USAGE |
%{_bindir}/upnp-listdevices |
||||||
|
%{_libdir}/libminiupnpc.so.17 |
||||||
|
%{_libdir}/libminiupnpc.so.%{version} |
||||||
|
|
||||||
%files devel |
%files devel |
||||||
%{_includedir}/miniupnpc |
%{_includedir}/%{name} |
||||||
|
%{_libdir}/cmake/%{name}/libminiupnpc-shared-noconfig.cmake |
||||||
|
%{_libdir}/cmake/%{name}/libminiupnpc-shared.cmake |
||||||
|
%{_libdir}/cmake/%{name}/miniupnpc-config.cmake |
||||||
%{_libdir}/libminiupnpc.so |
%{_libdir}/libminiupnpc.so |
||||||
%{_mandir}/man3/miniupnpc.3* |
%{_libdir}/pkgconfig/%{name}.pc |
||||||
|
%{_mandir}/man3/%{name}.3* |
||||||
|
|
||||||
%files -n python3-%{name} |
%files -n python3-%{name} |
||||||
%{python3_sitearch}/miniupnpc-%{version}-py?.?.egg-info |
%{python3_sitearch}/miniupnpc-%{version}-py3.*.egg-info/ |
||||||
%{python3_sitearch}/miniupnpc*.so |
%{python3_sitearch}/miniupnpc*.so |
||||||
|
|
||||||
%changelog |
%changelog |
||||||
* Tue Oct 22 2019 r4sas <r4sas@i2pmail.org> - 2.1-1 |
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.5-3 |
||||||
- update to 2.1, remove python2 build rules |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild |
||||||
|
|
||||||
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 2.2.5-2 |
||||||
|
- Rebuilt for Python 3.12 |
||||||
|
|
||||||
|
* Wed Jun 14 2023 Simone Caronni <negativo17@gmail.com> - 2.2.5-1 |
||||||
|
- Update to 2.2.5. |
||||||
|
|
||||||
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.2.4-4 |
||||||
|
- Rebuilt for Python 3.12 |
||||||
|
|
||||||
|
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-3 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild |
||||||
|
|
||||||
|
* Fri Oct 28 2022 Simone Caronni <negativo17@gmail.com> - 2.2.4-2 |
||||||
|
- Restore test client binary. |
||||||
|
|
||||||
* Wed Jun 08 2016 François Kooman <fkooman@tuxed.net> - 2.0-1 |
* Tue Oct 25 2022 Simone Caronni <negativo17@gmail.com> - 2.2.4-1 |
||||||
- update to 2.0 |
- Update to 2.2.4. |
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-8 |
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.3-4 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild |
||||||
|
|
||||||
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-7 |
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.2.3-3 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 |
- Rebuilt for Python 3.11 |
||||||
|
|
||||||
* Sat Oct 31 2015 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.9-6 |
* Sat Jan 29 2022 Simone Caronni <negativo17@gmail.com> - 2.2.3-2 |
||||||
- Correct buffer overflow in XML parsing (#1270842, #1270182) |
- Build fixes. |
||||||
|
|
||||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-5 |
* Fri Jan 28 2022 Simone Caronni <negativo17@gmail.com> - 2.2.3-1 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild |
- Update to 2.2.3. |
||||||
|
- Update SPEC file (license, tabs/spaces, trim changelog, etc.) |
||||||
|
- Switch to CMake build. |
||||||
|
- Drop static libraries. |
||||||
|
- Drop test client and obsolete documentation. |
||||||
|
- Do not use static library when building Python module. |
||||||
|
|
||||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-4 |
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-4 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild |
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9-3 |
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-3 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild |
||||||
|
|
||||||
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.9-2 |
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.2.2-2 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 |
- Rebuilt for Python 3.10 |
||||||
|
|
||||||
* Wed Apr 16 2014 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.9-1 |
* Wed Mar 03 2021 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 2.2.2-1 |
||||||
- Update to latest upstream release (#1062206) |
- Update to version 2.2.2 |
||||||
- Correct possible DoS crash vector (patch already in tarball) (#1085618) |
|
||||||
|
|
||||||
* Tue Aug 13 2013 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.8-1 |
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-2 |
||||||
- Update to latest upstream release (#996357) |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild |
||||||
- Build extra python3 module |
|
||||||
|
|
||||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-10 |
* Fri Nov 13 2020 Kalev Lember <klember@redhat.com> - 2.2.0-1 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
- Update to 2.2.0 |
||||||
|
|
||||||
* Tue Mar 05 2013 Domingo Becker <domingobecker@gmail.com> - 1.6-9 |
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-7 |
||||||
- Added upnpc, a client side tool, to the main package. |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
||||||
- Added USAGE file with instructions on how to use upnpc. |
|
||||||
|
|
||||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-8 |
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.1-6 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
- Rebuilt for Python 3.9 |
||||||
|
|
||||||
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-7 |
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-5 |
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
||||||
|
|
||||||
* Wed May 30 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6-6 |
* Fri Nov 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1-4 |
||||||
- Add Changelog.txt to documentation. |
- Subpackage python2-miniupnpc has been removed |
||||||
- Correct package version in setup.py. |
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal |
||||||
- Correct rpmlint warning on source rpm. |
|
||||||
- Filter provides of private python shared object (817311#c19). |
|
||||||
|
|
||||||
* Sat May 26 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6-5 |
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1-3 |
||||||
- Build python module (817311#c14). |
- Rebuilt for Python 3.8 |
||||||
|
|
||||||
* Mon May 21 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6-4 |
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1-2 |
||||||
- Use %%name for source and patch names. |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
||||||
- Enable %%check. |
|
||||||
|
|
||||||
* Mon May 7 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6-3 |
* Wed Feb 06 2019 Kalev Lember <klember@redhat.com> - 2.1-1 |
||||||
- Prefer %%global over %%define. |
- Update to 2.1 |
||||||
- Add proper documentation to main package. |
|
||||||
- Ensure library is built before making simple test programs. |
|
||||||
|
|
||||||
* Wed May 2 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6-2 |
* Wed Feb 06 2019 Kalev Lember <klember@redhat.com> - 2.0-13 |
||||||
- Rename package to miniupnpc to match source tarball. |
- Fix FTBFS (#1604853) |
||||||
- Add patch to enable build of tests. |
|
||||||
- Include manual page to devel package. |
|
||||||
- Change License to match LICENSE file. |
|
||||||
|
|
||||||
* Sat Apr 28 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 1.6-1 |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0-12 |
||||||
- Initial libminiupnpc spec. |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild |
||||||
|
Loading…
Reference in new issue