Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
bc4c65b9d7
!17 [sync] PR-15: FIX tree option not displayed
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-07-25 02:35:42 +00:00
xueyamao
1c0542dbe3 add --du and --prune description in usage()
In usage(),"--du" and "--prune" options are supported, but the description of them is not given.

Signed-off-by: xueyamao <xueyamao@kylinos.cn>
(cherry picked from commit bffdefafb79edb984742902c46b0dc17b28be113)
2022-07-25 09:58:30 +08:00
openeuler-ci-bot
e7c3bd6562
!14 [sync] PR-7: tree delete -S git from %autosetup, and delete BuildRequires git
Merge pull request !14 from openeuler-sync-bot/sync-pr7--to-openEuler-20.03-LTS-SP3
2022-01-14 01:44:19 +00:00
chenyanpanHW
4583ce78da delete -S git from %autosetup, and delete BuildRequires git
(cherry picked from commit 512d3d04e9b5bfc0766efdf5abbd359628352c54)
2022-01-13 17:40:49 +08:00
openeuler-ci-bot
de3812c3fa !6 upgrade to 1.8.0
Merge pull request !6 from zhangyouming/upgrade_lts
2020-07-31 15:12:14 +08:00
geruijun
4055f678f7 upgrade_to_lts 2020-07-29 17:20:08 +08:00
wangjun196@huawei.com
899509aea2 upgrade 2020-07-16 15:07:13 +08:00
openeuler-ci-bot
f9468a4469 !4 add yaml file for ci
Merge pull request !4 from liuzhiqiang/master
2020-07-02 17:21:19 +08:00
Zhiqiang Liu
429a1aa120 add yaml file for ci
add yaml file for ci

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
2020-07-02 11:21:30 +08:00
openeuler-ci-bot
ebe71af823 !3 Repackage
Merge pull request !3 from hy/work
2020-01-09 14:23:15 +08:00
eulerstorage
b0b17c5169 Repackage 2020-01-08 15:44:53 +08:00
8 changed files with 63 additions and 65 deletions

View File

@ -0,0 +1,39 @@
From 894f81c355d80445d9117194d458381b73da989f Mon Sep 17 00:00:00 2001
From: xueyamao <xueyamao@kylinos.cn>
Date: Sun, 24 Jul 2022 18:29:29 -0700
Subject: [PATCH]tree:add --du and --prune description in usage()
In usage(), '--du' and "--prune" options are supported,
but the description of them is not given.
So we add --du and --prune description in usage().
Signed-off-by: xueyamao xueyamao@kylinos.cn
---
tree.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tree.c b/tree.c
index a633c57..e235853 100644
--- a/tree.c
+++ b/tree.c
@@ -632,7 +632,7 @@ void usage(int n)
"\t[-L level [-R]] [-P pattern] [-I pattern] [-o filename] [--version]\n"
"\t[--help] [--inodes] [--device] [--noreport] [--nolinks] [--dirsfirst]\n"
"\t[--charset charset] [--filelimit[=]#] [--si] [--timefmt[=]<f>]\n"
- "\t[--sort[=]<name>] [--matchdirs] [--ignore-case] [--fromfile] [--]\n"
+ "\t[--sort[=]<name>] [--matchdirs] [--ignore-case] [--fromfile] [--du] [--prune] [--]\n"
"\t[<directory list>]\n");
if (n < 2) return;
fprintf(stdout,
@@ -653,6 +653,8 @@ void usage(int n)
" --filelimit # Do not descend dirs with more than # files in them.\n"
" --timefmt <f> Print and format time according to the format <f>.\n"
" -o filename Output to file instead of stdout.\n"
+ " --du Print directory sizes.\n"
+ " --prune Prune empty directories from the output.\n"
" ------- File options -------\n"
" -q Print non-printable characters as '?'.\n"
" -N Print non-printable characters as is.\n"
--
1.8.3.1

View File

@ -1,15 +0,0 @@
diff -up tree-1.6.0/Makefile.preserve-timestamps tree-1.6.0/Makefile
--- tree-1.6.0/Makefile.preserve-timestamps 2011-06-27 16:11:26.000000000 +0100
+++ tree-1.6.0/Makefile 2011-06-27 16:12:36.394443602 +0100
@@ -97,9 +97,9 @@ install: tree
install -d $(BINDIR)
install -d $(MANDIR)
if [ -e $(TREE_DEST) ]; then \
- install $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
+ install -p $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
fi
- install doc/$(MAN) $(MANDIR)/$(MAN)
+ install -p doc/$(MAN) $(MANDIR)/$(MAN)
distclean:
if [ -f tree.o ]; then rm *.o; fi

View File

@ -1,12 +0,0 @@
diff -up tree-1.6.0/tree.c.args tree-1.6.0/tree.c
--- tree-1.6.0/tree.c.args 2013-04-11 11:53:47.676572649 +0100
+++ tree-1.6.0/tree.c 2013-04-11 11:56:10.962350448 +0100
@@ -536,6 +536,8 @@ void usage(int n)
" --filelimit # Do not descend dirs with more than # files in them.\n"
" --timefmt <f> Print and format time according to the format <f>.\n"
" -o filename Output to file instead of stdout.\n"
+ " --du Print directory sizes.\n"
+ " --prune Prune empty directories from the output.\n"
" -------- File options ---------\n"
" -q Print non-printable characters as '?'.\n"
" -N Print non-printable characters as is.\n"

View File

@ -1,12 +0,0 @@
diff -up tree-1.6.0/color.c.dircolors-ec tree-1.6.0/color.c
--- tree-1.6.0/color.c.dircolors-ec 2013-07-09 13:29:19.431819355 +0100
+++ tree-1.6.0/color.c 2013-07-09 13:29:48.820987889 +0100
@@ -190,7 +190,7 @@ void parse_dir_colors()
if (!norm_flgs) norm_flgs = scopy("00");
if (!endcode) {
- sprintf(buf,"%s%s%s",leftcode,norm_flgs,rightcode);
+ sprintf(buf,"%s0%s",leftcode,rightcode);
endcode = scopy(buf);
}

View File

@ -1,14 +0,0 @@
diff -up tree-1.7.0/tree.c.size-field-len tree-1.7.0/tree.c
--- tree-1.7.0/tree.c.size-field-len 2014-04-25 16:30:51.539046882 +0100
+++ tree-1.7.0/tree.c 2014-04-25 16:32:20.098483921 +0100
@@ -1247,8 +1247,8 @@ int psize(char *buf, off_t size)
if (hflag || siflag) {
for (idx=size<usize?0:1; size >= (usize*usize); idx++,size/=usize);
- if (!idx) return sprintf(buf, " %4d", (int)size);
- else return sprintf(buf, ((size/usize) >= 10)? " %3.0f%c" : " %3.1f%c" , (float)size/(float)usize,unit[idx]);
+ if (!idx) return sprintf(buf, " %5d", (int)size);
+ else return sprintf(buf, ((size/usize) >= 10)? " %4.0f%c" : " %4.1f%c" , (float)size/(float)usize,unit[idx]);
} else return sprintf(buf, sizeof(off_t) == sizeof(long long)? " %11lld" : " %9ld", (long long int)size);
}

Binary file not shown.

BIN
tree-1.8.0.tgz Normal file

Binary file not shown.

View File

@ -1,18 +1,15 @@
Name: tree
Version: 1.7.0
Release: 17
Version: 1.8.0
Release: 3
Summary: Tree file viewer tool
License: GPLv2+
URL: http://mama.indstate.edu/users/ice/tree/
Source0: ftp://mama.indstate.edu/linux/tree/%{name}-%{version}.tgz
Patch0: 0000-tree-preserve-timestamps.patch
Patch1: 0001-tree-args.patch
Patch2: 0002-tree-dircolors-ec.patch
Patch3: 0003-tree-size-field-len.patch
BuildRequires: gcc git
BuildRequires: gcc
# Document --du and --prune options in help output.
Patch0: 0000-Fix-tree-args-option-displayed-incomplete.patch
%description
Tree is a recursive directory listing command that produces a depth indented
@ -28,7 +25,7 @@ Requires: man
This contains man files for the using of tree.
%prep
%autosetup -n %{name}-%{version} -p1 -S git
%autosetup -n %{name}-%{version} -p1
#fix non-ASCII characters abnormal display
sed -e 's/LINUX/__linux__/' -i tree.c
@ -49,11 +46,26 @@ install -D -m 644 doc/tree.1 $RPM_BUILD_ROOT%{_mandir}/man1/tree.1
%{_mandir}/man1/*
%changelog
* Wed Aug 21 2019 zhanghaibo <ted.zhang@huawei.com> - 1.7.0-17
- Type:enhancemnet
* Tue Jul 12 2022 xueyamao <xueyamao@kylinos.cn> - 1.8.0-3
- DESC: Document --du and --prune options in help output
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.8.0-2
- DESC: delete -S git from %autosetup, and delete BuildRequires git
* Thu Jul 16 2020 zhangyouming <zhangyouming4@huawei.com> - 1.8.0-1
upgrade package from 1.7.0 to 1.8.0
* Wed Jan 8 2020 openEuler BuildTeam <buildteam@openeuler.org> - 1.7.0-18
- Type:enhancement
- ID:NA
- SUG:NA
- DESCi:openEuler Debranding
- DESC:Repackage
* Wed Aug 21 2019 zhanghaibo <ted.zhang@huawei.com> - 1.7.0-17
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:openEuler Debranding
* Tue Aug 20 2019 huangzheng <huangzheng22@huawei.com> - 1.7.0-16
- Type:enhancement