Compare commits
8 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| ed059060a6 | |||
| a0046d1bdf | |||
| 0b23da6665 | |||
|
|
b9b134b2f3 | ||
| 063b6793a9 | |||
|
|
ac5c7aaf4c | ||
| 63eb819f5a | |||
| e9acbbecf3 |
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 16 06:16:48 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyroject macros.
|
||||||
|
- No more greedy globs in %files.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 13 14:14:16 UTC 2025 - Sebastian Wagner <sebix@sebix.at>
|
||||||
|
|
||||||
|
- add patch remove-click-plugins.patch to remove the dependency on unmaintained click-plugins
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 14 08:46:22 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Thu Mar 14 08:46:22 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-shodan
|
# spec file for package python-shodan
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,26 +16,26 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%{!?license: %global license %doc}
|
%{!?license: %global license %doc}
|
||||||
Name: python-shodan
|
Name: python-shodan
|
||||||
Version: 1.31.0
|
Version: 1.31.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python library and command-line utility for Shodan
|
Summary: Python library and command-line utility for Shodan
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/achillean/shodan-python/
|
URL: https://github.com/achillean/shodan-python/
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/shodan/shodan-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/s/shodan/shodan-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM remove-click-plugins.patch -- remove dependency to unmaintained click-plugins
|
||||||
|
Patch0: https://github.com/achillean/shodan-python/pull/236.patch#/remove-click-plugins.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
Requires: python-XlsxWriter
|
Requires: python-XlsxWriter
|
||||||
Requires: python-click
|
Requires: python-click
|
||||||
Requires: python-click-plugins
|
|
||||||
Requires: python-colorama
|
Requires: python-colorama
|
||||||
Requires: python-requests >= 2.2.1
|
Requires: python-requests >= 2.2.1
|
||||||
Requires: python-setuptools
|
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
Recommends: python-curses
|
Recommends: python-curses
|
||||||
@@ -55,11 +55,11 @@ Shodan is a search engine for Internet-connected devices. Google lets you search
|
|||||||
HTML documentation on the API and examples for %{name}.
|
HTML documentation on the API and examples for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n shodan-%{version}
|
%autosetup -n shodan-%{version} -p1
|
||||||
sed -i '1s/^#!.*//' shodan/cli/worldmap.py
|
sed -i '1s/^#!.*//' shodan/cli/worldmap.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
pushd docs
|
pushd docs
|
||||||
%make_build html
|
%make_build html
|
||||||
rm -r _build/html/.buildinfo _build/html/_sources/
|
rm -r _build/html/.buildinfo _build/html/_sources/
|
||||||
@@ -67,7 +67,7 @@ rm -r _build/html/.buildinfo _build/html/_sources/
|
|||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shodan.1
|
install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shodan.1
|
||||||
%python_clone -a %{buildroot}%{_bindir}/shodan
|
%python_clone -a %{buildroot}%{_bindir}/shodan
|
||||||
%python_clone -a %{buildroot}%{_mandir}/man1/shodan.1
|
%python_clone -a %{buildroot}%{_mandir}/man1/shodan.1
|
||||||
@@ -88,7 +88,8 @@ install -Dm 644 docs/_build/man/shodan-python.1 %{buildroot}%{_mandir}/man1/shod
|
|||||||
%doc AUTHORS README.rst
|
%doc AUTHORS README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%python_alternative %{_bindir}/shodan
|
%python_alternative %{_bindir}/shodan
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/shodan
|
||||||
|
%{python_sitelib}/shodan-%{version}.dist-info
|
||||||
%python_alternative %{_mandir}/man1/shodan.1%{ext_man}
|
%python_alternative %{_mandir}/man1/shodan.1%{ext_man}
|
||||||
|
|
||||||
%files -n %{name}-doc
|
%files -n %{name}-doc
|
||||||
|
|||||||
54
remove-click-plugins.patch
Normal file
54
remove-click-plugins.patch
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
From ef910fdf33b735c55f14abce13bda2906fbb5f74 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sebastian Wagner <sebix@sebix.at>
|
||||||
|
Date: Tue, 13 May 2025 16:08:16 +0200
|
||||||
|
Subject: [PATCH] remove unmaintained click-plugins dependency
|
||||||
|
|
||||||
|
click-plugins is unmaintained for 6 years and incompatible with current
|
||||||
|
click 6.2.0 (https://github.com/click-contrib/click-plugins/issues/38)
|
||||||
|
|
||||||
|
click-plugins is not required to run shodan-python, only adds a
|
||||||
|
possibility for third parties to potentially hook into the cli interface.
|
||||||
|
if that's required, it needs to be done by other means
|
||||||
|
|
||||||
|
keeping the dependency to an unmaintained library is also a potential
|
||||||
|
security risk and prevents the usage of current versions of click itself
|
||||||
|
---
|
||||||
|
requirements.txt | 3 +--
|
||||||
|
shodan/__main__.py | 3 ---
|
||||||
|
2 files changed, 1 insertion(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/requirements.txt b/requirements.txt
|
||||||
|
index 2692414..8d682c4 100644
|
||||||
|
--- a/requirements.txt
|
||||||
|
+++ b/requirements.txt
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
click
|
||||||
|
-click-plugins
|
||||||
|
colorama
|
||||||
|
requests>=2.2.1
|
||||||
|
XlsxWriter
|
||||||
|
ipaddress;python_version<='2.7'
|
||||||
|
-tldextract
|
||||||
|
\ No newline at end of file
|
||||||
|
+tldextract
|
||||||
|
diff --git a/shodan/__main__.py b/shodan/__main__.py
|
||||||
|
index 4093b94..d7078e7 100644
|
||||||
|
--- a/shodan/__main__.py
|
||||||
|
+++ b/shodan/__main__.py
|
||||||
|
@@ -49,7 +49,6 @@
|
||||||
|
from shodan.cli.host import HOST_PRINT
|
||||||
|
|
||||||
|
# Allow 3rd-parties to develop custom commands
|
||||||
|
-from click_plugins import with_plugins
|
||||||
|
from pkg_resources import iter_entry_points
|
||||||
|
|
||||||
|
# Large subcommands are stored in separate modules
|
||||||
|
@@ -77,8 +76,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
# Define the main entry point for all of our commands
|
||||||
|
-# and expose a way for 3rd-party plugins to tie into the Shodan CLI.
|
||||||
|
-@with_plugins(iter_entry_points('shodan.cli.plugins'))
|
||||||
|
@click.group(context_settings=CONTEXT_SETTINGS)
|
||||||
|
def main():
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user