fdupes/fdupes.spec
wk333 06c59e20d8 Update to 2.3.0 for fix CVE-2022-48682
(cherry picked from commit acf9aac6ba72dcb4f5222bf3f5b1eda2c14bfa4b)
2024-04-28 11:16:04 +08:00

99 lines
3.1 KiB
RPMSpec

%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; /bin/echo $d)
%global macrosname macros.%{name}
Name: fdupes
Epoch: 1
Version: 2.3.0
Release: 1
Summary: Identifying duplicate files residing within specified directories
License: MIT
URL: https://github.com/adrianlopezroche/%{name}
Source0: https://github.com/adrianlopezroche/fdupes/releases/download/v%{version}/fdupes-%{version}.tar.gz
Source1: %{macrosname}
BuildRequires: gcc
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: ncurses-devel
BuildRequires: pcre2-devel
BuildRequires: sqlite-devel
%description
FDUPES is a program for identifying duplicate files residing within specified
directories.
%package_help
%prep
%autosetup -p 1
# From README.
%{__cat} << EOF > LICENSE
FDUPES Copyright (c) 1999 Adrian Lopez
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
EOF
autoreconf -fiv
%build
%configure
%make_build
%install
%make_install BIN_DIR=%{_bindir} MAN_BASE_DIR=%{_mandir}
install -Dpm 0644 %{SOURCE1} %{buildroot}%{macrosdir}/%{macrosname}
%check
./%{name} testdir
./%{name} --omitfirst testdir
./%{name} --recurse testdir
./%{name} --size testdir
%files
%license CONTRIBUTORS LICENSE
%{_bindir}/%{name}
%{macrosdir}/%{macrosname}
%files help
%doc CHANGES README
%doc %{_mandir}/man1/%{name}.1*
%{_mandir}/man7/%{name}*.7*
%changelog
* Sun Apr 28 2024 wangkai <13474090681@163.com> - 1:2.3.0-1
- Update to 2.3.0 for fix CVE-2022-48682
- Add ncurses mode for interactive file deletion (plain mode still available via --plain or ./configure).
- Add --minsize --maxsize --time --order=ctime --log --deferconfirmation --cache option.
- Use configure script for installation (Autotools/Automake).
- Rename cs command ("clear all selections") from cs to csel.
- Rename igs command ("invert selections") from igs to isel.
- Add "prune" command as synonym for DELETE key.
- Clear selections after deleting files via prune/DELETE.
- Fix dependency issues when fdupes is configured to not use ncurses.
- Do not enter ncurses mode when --immediate option given.
* Tue Dec 3 2019 mengxian <mengxian@huawei.com> - 1:1.6.1-6
- Package init