From 3944d7be8e6f2d457baf0bbb2e134fed24cf0d7e3611dc1bf263c0fe10580486 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 2 Jun 2023 13:55:23 +0000 Subject: [PATCH 1/5] Update to urlscan 1.0.0 OBS-URL: https://build.opensuse.org/package/show/utilities/urlscan?expand=0&rev=28 --- urlscan-0.9.10.tar.gz | 3 -- urlscan-1.0.0.tar.gz | 3 ++ urlscan.changes | 13 ++++++++ urlscan.spec | 70 +++++++++++++++++++++++++------------------ 4 files changed, 57 insertions(+), 32 deletions(-) delete mode 100644 urlscan-0.9.10.tar.gz create mode 100644 urlscan-1.0.0.tar.gz diff --git a/urlscan-0.9.10.tar.gz b/urlscan-0.9.10.tar.gz deleted file mode 100644 index 1c076d6..0000000 --- a/urlscan-0.9.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0fbaf7f820fc6ff20c6f1a429c98cb240f1da7eabceed5e3d88740558e81cd2d -size 34263 diff --git a/urlscan-1.0.0.tar.gz b/urlscan-1.0.0.tar.gz new file mode 100644 index 0000000..3987554 --- /dev/null +++ b/urlscan-1.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b12da2c3ee45ae21c80eed2fc40866b3b0b82a39e70ce1ad458b65af7334728a +size 34313 diff --git a/urlscan.changes b/urlscan.changes index 7f5c645..af7d5fa 100644 --- a/urlscan.changes +++ b/urlscan.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Fri Jun 2 13:50:51 UTC 2023 - Dr. Werner Fink + +- Update to urlscan 1.0.0 + * Fix search with -c flag. Fixes #131. + * Add support for IPv6 URLs. Closes #127 + * Mark items in url queue with a * + * Add version flag + * Update to pyproject.toml/hatch for builds +- Switch over to flavoured build + * Is there any way to have one major package e.g. for repeating + docs for the various flavoured sub packages? + ------------------------------------------------------------------- Tue Dec 6 13:06:46 UTC 2022 - Dirk Müller diff --git a/urlscan.spec b/urlscan.spec index 256b851..ab2ab4f 100644 --- a/urlscan.spec +++ b/urlscan.spec @@ -1,7 +1,7 @@ # # spec file for package urlscan # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define python_flavor python3 Name: urlscan -Version: 0.9.10 +Version: 1.0.0 Release: 0 Summary: An other URL extractor/viewer License: GPL-2.0-or-later @@ -26,16 +26,22 @@ Group: Productivity/Networking/Web/Browsers URL: https://github.com/firecat53/urlscan Source0: https://github.com/firecat53/urlscan/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: muttrc +BuildRequires: %{python_module base} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module hatch_vcs} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes -BuildRequires: python3-base -BuildRequires: python3-devel -BuildRequires: python3-rpm-macros -BuildRequires: python3-setuptools +BuildRequires: python-rpm-macros BuildRequires: sed -Requires: python3 -Requires: python3-base -Requires: python3-urwid +Recommends: %{name}-doc = %{version} +Requires: %{python_module base} +Requires: %{python_module urwid >= 1.2.1} BuildArch: noarch +%global myname %name +%python_subpackages %description The urlscan utility displays URLs found in an email message with @@ -45,33 +51,39 @@ quoted-printable and base64 encoding. %prep %setup -q +install -m 0644 %{SOURCE1} muttrc %build -%python3_build +SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +export SETUPTOOLS_SCM_PRETEND_VERSION +%pyproject_wheel %install -%python3_install -mkdir -p %{buildroot}%{_defaultdocdir}/%{name} -if test -e %{buildroot}%{_datadir}/doc/%{name}* +%pyproject_install +%python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname} +if test -e %{buildroot}%{_datadir}/doc/%{myname}* then - rm -vf %{buildroot}%{_datadir}/doc/%{name}*/COPYING - mv %{buildroot}%{_datadir}/doc/%{name}*/* \ - %{buildroot}%{_defaultdocdir}/%{name}/ + rm -f %{buildroot}%{_datadir}/doc/%{myname}*/LICENSE fi rm -rf %{buildroot}%{_datadir}/doc/%{name}* -install -m 0644 %{SOURCE1} %{buildroot}%{_defaultdocdir}/%{name} -chmod 755 %{buildroot}%{python_sitelib}/%{name}/__main__* -sed -ri '1 { s@(/usr/bin/)env *@\1@ }' %{buildroot}%{python_sitelib}/%{name}/__main__* -%fdupes %{buildroot} +%python_clone -a %{buildroot}%{_bindir}/%{myname} +%python_clone -a %{buildroot}%{_mandir}/man1/%{myname}.1 +%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{myname}/__main__* +%python_expand sed -ri '1 { s@(/usr/bin/)env *@\1@ }' %{buildroot}%{$python_sitelib}/%{myname}/__main__* +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%files -%license COPYING -%{_bindir}/%{name} -%{python_sitelib}/%{name} -%{python_sitelib}/%{name}-%{version}-py*.egg-info -%{_mandir}/man1/%{name}.1%{?ext_man} -%dir %{_defaultdocdir}/%{name}/ -%doc %{_defaultdocdir}/%{name}/muttrc -%doc %{_defaultdocdir}/%{name}/README.md +%post +%python_install_alternative %{myname} + +%postun +%python_uninstall_alternative %{myname} + +%files %{python_files} +%python_alternative %{_bindir}/%{myname} +%python_alternative %{_mandir}/man1/%{myname}.1%{?ext_man} +%{python_sitelib}/%{myname} +%{python_sitelib}/%{myname}-%{version}*-info +%license LICENSE +%doc README.md muttrc %changelog From 6dd1ba34334581a94c2d5be564c4ec87d16b86fd40d7fe6eb853b4e4bcedd3bd Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 12 Jun 2023 11:47:07 +0000 Subject: [PATCH 2/5] No multi python approach anymore OBS-URL: https://build.opensuse.org/package/show/utilities/urlscan?expand=0&rev=29 --- urlscan.changes | 13 +++++++++++++ urlscan.spec | 38 +++++++++++++++----------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/urlscan.changes b/urlscan.changes index af7d5fa..24d5f72 100644 --- a/urlscan.changes +++ b/urlscan.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Mon Jun 12 11:45:12 UTC 2023 - Dr. Werner Fink + +- Reintroduce removing /usr/bin/env from shebang lines as well as + duplicate files them selfs + +------------------------------------------------------------------- +Mon Jun 12 11:09:31 UTC 2023 - Dominique Leuenberger + +- Do not package this as multi-python flavors: urlscan is a simple + leaf application written in python. Its python code is not + consumed by others. + ------------------------------------------------------------------- Fri Jun 2 13:50:51 UTC 2023 - Dr. Werner Fink diff --git a/urlscan.spec b/urlscan.spec index ab2ab4f..cca98fb 100644 --- a/urlscan.spec +++ b/urlscan.spec @@ -16,7 +16,7 @@ # -%define python_flavor python3 +%define pythons python3 Name: urlscan Version: 1.0.0 Release: 0 @@ -26,22 +26,21 @@ Group: Productivity/Networking/Web/Browsers URL: https://github.com/firecat53/urlscan Source0: https://github.com/firecat53/urlscan/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: muttrc -BuildRequires: %{python_module base} -BuildRequires: %{python_module devel} -BuildRequires: %{python_module hatch_vcs} -BuildRequires: %{python_module hatchling} -BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: python3-base +BuildRequires: python3-devel +BuildRequires: python3-hatch_vcs +BuildRequires: python3-hatchling +BuildRequires: python3-pip +BuildRequires: python3-setuptools +BuildRequires: python3-wheel BuildRequires: sed Recommends: %{name}-doc = %{version} Requires: %{python_module base} Requires: %{python_module urwid >= 1.2.1} BuildArch: noarch %global myname %name -%python_subpackages %description The urlscan utility displays URLs found in an email message with @@ -61,26 +60,19 @@ export SETUPTOOLS_SCM_PRETEND_VERSION %install %pyproject_install %python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname} +%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{name}/__main__* +%python_expand sed -ri '1 { s@(/usr/bin/)env +@\1@ }' %{buildroot}%{$python_sitelib}/%{name}/__main__* +%python_expand %fdupes %{buildroot}%{$python_sitelib} +sed -ri '1 { s@(/usr/bin/)env +@\1@;s@(/python3)\.[[:digit:]]+@\1@ }' %{buildroot}%{_bindir}/%{name} if test -e %{buildroot}%{_datadir}/doc/%{myname}* then rm -f %{buildroot}%{_datadir}/doc/%{myname}*/LICENSE fi rm -rf %{buildroot}%{_datadir}/doc/%{name}* -%python_clone -a %{buildroot}%{_bindir}/%{myname} -%python_clone -a %{buildroot}%{_mandir}/man1/%{myname}.1 -%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{myname}/__main__* -%python_expand sed -ri '1 { s@(/usr/bin/)env *@\1@ }' %{buildroot}%{$python_sitelib}/%{myname}/__main__* -%python_expand %fdupes %{buildroot}%{$python_sitelib} -%post -%python_install_alternative %{myname} - -%postun -%python_uninstall_alternative %{myname} - -%files %{python_files} -%python_alternative %{_bindir}/%{myname} -%python_alternative %{_mandir}/man1/%{myname}.1%{?ext_man} +%files +%{_bindir}/%{myname} +%{_mandir}/man1/%{myname}.1%{?ext_man} %{python_sitelib}/%{myname} %{python_sitelib}/%{myname}-%{version}*-info %license LICENSE From 0c8ab2b90138697f4340914486647e7a2d44dffba2895aded135dfb7fdda90e5 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 12 Jun 2023 11:55:21 +0000 Subject: [PATCH 3/5] Remove Recommndes line for not existing doc package OBS-URL: https://build.opensuse.org/package/show/utilities/urlscan?expand=0&rev=30 --- urlscan.changes | 5 +++++ urlscan.spec | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/urlscan.changes b/urlscan.changes index 24d5f72..4295089 100644 --- a/urlscan.changes +++ b/urlscan.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 12 11:54:29 UTC 2023 - Dr. Werner Fink + +- Removed invalid Recommends line + ------------------------------------------------------------------- Mon Jun 12 11:45:12 UTC 2023 - Dr. Werner Fink diff --git a/urlscan.spec b/urlscan.spec index cca98fb..dce82e3 100644 --- a/urlscan.spec +++ b/urlscan.spec @@ -36,7 +36,6 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: sed -Recommends: %{name}-doc = %{version} Requires: %{python_module base} Requires: %{python_module urwid >= 1.2.1} BuildArch: noarch From 1d62a4bc968e5e757ce16612eff0ef4d1c5346e3e5e7e719513e62d82361ce99 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 12 Jun 2023 12:24:20 +0000 Subject: [PATCH 4/5] Accepting request 1092574 from home:dimstar:Factory Some minor cleanup Requires: must never reference python_module (in python single-spec, this translates to ALL python versions) python_expand can take more than one command OBS-URL: https://build.opensuse.org/request/show/1092574 OBS-URL: https://build.opensuse.org/package/show/utilities/urlscan?expand=0&rev=31 --- urlscan.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/urlscan.spec b/urlscan.spec index dce82e3..cc3e34c 100644 --- a/urlscan.spec +++ b/urlscan.spec @@ -36,8 +36,8 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: sed -Requires: %{python_module base} -Requires: %{python_module urwid >= 1.2.1} +Requires: python3-base} +Requires: python3-urwid >= 1.2.1} BuildArch: noarch %global myname %name @@ -58,10 +58,11 @@ export SETUPTOOLS_SCM_PRETEND_VERSION %install %pyproject_install -%python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname} -%python_expand chmod 755 %{buildroot}%{$python_sitelib}/%{name}/__main__* -%python_expand sed -ri '1 { s@(/usr/bin/)env +@\1@ }' %{buildroot}%{$python_sitelib}/%{name}/__main__* -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%{python_expand mkdir -p %{buildroot}%{_defaultdocdir}/%{$python_prefix}-%{myname} + chmod 755 %{buildroot}%{$python_sitelib}/%{name}/__main__* + sed -ri '1 { s@(/usr/bin/)env +@\1@ }' %{buildroot}%{$python_sitelib}/%{name}/__main__* + %fdupes %{buildroot}%{$python_sitelib} +} sed -ri '1 { s@(/usr/bin/)env +@\1@;s@(/python3)\.[[:digit:]]+@\1@ }' %{buildroot}%{_bindir}/%{name} if test -e %{buildroot}%{_datadir}/doc/%{myname}* then From 57e04fba9beb0f5bc7309b9d6b5bfda7b613753e8bf966fc30352a59a6ef1c87 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 12 Jun 2023 12:27:37 +0000 Subject: [PATCH 5/5] . OBS-URL: https://build.opensuse.org/package/show/utilities/urlscan?expand=0&rev=32 --- urlscan.changes | 5 +++++ urlscan.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/urlscan.changes b/urlscan.changes index 4295089..64bac16 100644 --- a/urlscan.changes +++ b/urlscan.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 12 12:26:37 UTC 2023 - Dr. Werner Fink + +- Also remove left over curly braces at the end of require lines + ------------------------------------------------------------------- Mon Jun 12 11:54:29 UTC 2023 - Dr. Werner Fink diff --git a/urlscan.spec b/urlscan.spec index cc3e34c..3d6ab1b 100644 --- a/urlscan.spec +++ b/urlscan.spec @@ -36,8 +36,8 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: sed -Requires: python3-base} -Requires: python3-urwid >= 1.2.1} +Requires: python3-base +Requires: python3-urwid >= 1.2.1 BuildArch: noarch %global myname %name