diff --git a/which-2.21-coverity-fixes.patch b/which-2.21-coverity-fixes.patch deleted file mode 100644 index 0be9e3f..0000000 --- a/which-2.21-coverity-fixes.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up which-2.21/tilde/tilde.c.me which-2.21/tilde/tilde.c ---- which-2.21/tilde/tilde.c.me 2018-07-23 14:32:47.002225732 +0200 -+++ which-2.21/tilde/tilde.c 2018-07-23 14:49:06.363623898 +0200 -@@ -196,7 +196,8 @@ tilde_expand (string) - int result_size, result_index; - - result_index = result_size = 0; -- if (result = strchr (string, '~')) -+ result = strchr (string, '~'); -+ if (result) - result = (char *)xmalloc (result_size = (strlen (string) + 16)); - else - result = (char *)xmalloc (result_size = (strlen (string) + 1)); -diff -up which-2.21/which.c.me which-2.21/which.c -diff -up which-2.21/which.c.me which-2.21/which.c ---- which-2.21/which.c.me 2018-07-23 15:09:04.355222509 +0200 -+++ which-2.21/which.c 2018-07-25 14:57:43.696309701 +0200 -@@ -671,6 +671,9 @@ int main(int argc, char *argv[]) - } - } - -+ if (abs_path) -+ free(abs_path); -+ - return fail_count; - } - diff --git a/which.spec b/which.spec index 04c4a49..8f52059 100644 --- a/which.spec +++ b/which.spec @@ -1,13 +1,10 @@ Name: which Version: 2.21 -Release: 13 +Release: 14 Summary: Show the full path of commands License: GPLv3 URL: https://savannah.gnu.org/projects/which/ Source0: http://ftp.gnu.org/gnu/which/%{name}-%{version}.tar.gz -Source1: which2.sh -Source2: which2.csh -Patch0: which-2.21-coverity-fixes.patch BuildRequires: gcc git @@ -31,13 +28,10 @@ Contains documents and manuals files for which %install %make_install -mkdir -p %{buildroot}/%{_sysconfdir}/profile.d -install -p -m 0644 %{SOURCE1} %{SOURCE2} %{buildroot}/%{_sysconfdir}/profile.d rm -f %{buildroot}/%{_datadir}/info/dir %files %license COPYING AUTHORS -%{_sysconfdir}/profile.d/%{name}* %{_bindir}/%{name} %files help @@ -46,6 +40,12 @@ rm -f %{buildroot}/%{_datadir}/info/dir %{_datadir}/info/%{name}.info.gz %changelog +* Wed Jan 8 2020 openEuler Buildteam - 2.21-14 +- Type: enhancement +- ID: NA +- SUG: NA +- DESC: remove unnecessary files + * Wed Oct 10 2019 luhuaxin - 2.21-13 - Type: enhancement - ID: NA diff --git a/which2.csh b/which2.csh deleted file mode 100644 index da9655e..0000000 --- a/which2.csh +++ /dev/null @@ -1,3 +0,0 @@ -# Initialization script for csh - -# alias which 'alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' diff --git a/which2.sh b/which2.sh deleted file mode 100644 index d7e5373..0000000 --- a/which2.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Initialization script for bash and sh - -if [ "$0" = ksh ] ; then - alias which='(alias; typeset -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot' -else - alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot' -fi