diff --git a/.gitignore b/.gitignore index 39e0aaf..18442e6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ tree-1.5.2.1.tgz tree-1.5.2.2.tgz tree-1.5.3.tgz /tree-1.6.0.tgz +/tree-1.7.0.tgz diff --git a/sources b/sources index 2d9adf4..78ccd63 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -04e967a3f4108d50cde3b4b0e89e970a tree-1.6.0.tgz +abe3e03e469c542d8e157cdd93f4d8a6 tree-1.7.0.tgz diff --git a/tree-fixbufsiz.patch b/tree-fixbufsiz.patch deleted file mode 100644 index 7c5ad71..0000000 --- a/tree-fixbufsiz.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff -up tree-1.6.0/hash.c.fixbufsiz tree-1.6.0/hash.c ---- tree-1.6.0/hash.c.fixbufsiz 2011-06-24 15:25:18.000000000 +0100 -+++ tree-1.6.0/hash.c 2013-07-04 11:35:29.909472389 +0100 -@@ -25,11 +25,11 @@ struct xtable *gtable[256], *utable[256] - #define inohash(x) ((x)&255) - struct inotable *itable[256]; - --char *uidtoname(int uid) -+char *uidtoname(uid_t uid) - { - struct xtable *o, *p, *t; - struct passwd *ent; -- char ubuf[6]; -+ char ubuf[11]; - int uent = HASH(uid); - - for(o = p = utable[uent]; p ; p=p->nxt) { -@@ -41,7 +41,7 @@ char *uidtoname(int uid) - t = xmalloc(sizeof(struct xtable)); - if ((ent = getpwuid(uid)) != NULL) t->name = scopy(ent->pw_name); - else { -- sprintf(ubuf,"%d",uid); -+ snprintf(ubuf, sizeof (ubuf), "%u", uid); - t->name = scopy(ubuf); - } - t->xid = uid; -@@ -51,11 +51,11 @@ char *uidtoname(int uid) - return t->name; - } - --char *gidtoname(int gid) -+char *gidtoname(gid_t gid) - { - struct xtable *o, *p, *t; - struct group *ent; -- char gbuf[6]; -+ char gbuf[11]; - int gent = HASH(gid); - - for(o = p = gtable[gent]; p ; p=p->nxt) { -@@ -67,7 +67,7 @@ char *gidtoname(int gid) - t = xmalloc(sizeof(struct xtable)); - if ((ent = getgrgid(gid)) != NULL) t->name = scopy(ent->gr_name); - else { -- sprintf(gbuf,"%d",gid); -+ snprintf(gbuf, sizeof (gbuf), "%u", gid); - t->name = scopy(gbuf); - } - t->xid = gid; -diff -up tree-1.6.0/tree.h.fixbufsiz tree-1.6.0/tree.h ---- tree-1.6.0/tree.h.fixbufsiz 2011-06-24 13:55:58.000000000 +0100 -+++ tree-1.6.0/tree.h 2013-07-04 11:34:07.486808236 +0100 -@@ -168,7 +168,7 @@ const char *getcharset(void); - void initlinedraw(int); - - /* hash.c */ --char *gidtoname(int), *uidtoname(int); -+char *gidtoname(gid_t), *uidtoname(uid_t); - int findino(ino_t, dev_t); - void saveino(ino_t, dev_t); - diff --git a/tree-no-color-by-default.patch b/tree-no-color-by-default.patch index 374add4..c04e797 100644 --- a/tree-no-color-by-default.patch +++ b/tree-no-color-by-default.patch @@ -1,13 +1,13 @@ -diff -up tree-1.6.0/tree.c.no-color-by-default tree-1.6.0/tree.c ---- tree-1.6.0/tree.c.no-color-by-default 2011-06-27 16:14:14.190548385 +0100 -+++ tree-1.6.0/tree.c 2011-06-27 16:14:27.257295243 +0100 -@@ -79,7 +79,8 @@ int main(int argc, char **argv) +diff -up tree-1.7.0/tree.c.no-color-by-default tree-1.7.0/tree.c +--- tree-1.7.0/tree.c.no-color-by-default 2014-04-25 16:18:58.034525513 +0100 ++++ tree-1.7.0/tree.c 2014-04-25 16:20:04.953855799 +0100 +@@ -94,7 +94,8 @@ int main(int argc, char **argv) q = p = dtotal = ftotal = 0; aflag = dflag = fflag = lflag = pflag = sflag = Fflag = uflag = gflag = FALSE; Dflag = qflag = Nflag = Qflag = Rflag = hflag = Hflag = siflag = cflag = FALSE; -- noindent = force_color = nocolor = xdev = noreport = nolinks = FALSE; -+ noindent = force_color = xdev = noreport = nolinks = FALSE; +- noindent = force_color = nocolor = xdev = noreport = nolinks = reverse = FALSE; ++ noindent = force_color = xdev = noreport = nolinks = reverse = FALSE; + nocolor = TRUE; - dirsfirst = nosort = inodeflag = devflag = Xflag = FALSE; + ignorecase = matchdirs = dirsfirst = inodeflag = devflag = Xflag = Jflag = FALSE; duflag = pruneflag = FALSE; flimit = 0; diff --git a/tree-no-strip.patch b/tree-no-strip.patch deleted file mode 100644 index 5f46ada..0000000 --- a/tree-no-strip.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up tree-1.6.0/Makefile.no-strip tree-1.6.0/Makefile ---- tree-1.6.0/Makefile.no-strip 2011-06-24 15:25:27.000000000 +0100 -+++ tree-1.6.0/Makefile 2011-07-04 11:11:17.662036666 +0100 -@@ -32,7 +32,7 @@ OBJS=tree.o unix.o html.o xml.o hash.o c - # Linux defaults: - #CFLAGS=-ggdb -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 - CFLAGS=-O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --LDFLAGS=-s -+LDFLAGS= - - # Uncomment for FreeBSD: - #CFLAGS=-O2 -Wall -fomit-frame-pointer -@@ -97,7 +97,7 @@ install: tree - install -d $(BINDIR) - install -d $(MANDIR) - if [ -e $(TREE_DEST) ]; then \ -- install -s $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \ -+ install $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \ - fi - install doc/$(MAN) $(MANDIR)/$(MAN) - diff --git a/tree-size-field-len.patch b/tree-size-field-len.patch index 72331cc..2fcae7a 100644 --- a/tree-size-field-len.patch +++ b/tree-size-field-len.patch @@ -1,13 +1,14 @@ -diff -up tree-1.6.0/tree.c.size-field-len tree-1.6.0/tree.c ---- tree-1.6.0/tree.c.size-field-len 2013-08-16 16:06:00.993593417 +0100 -+++ tree-1.6.0/tree.c 2013-08-16 16:09:05.153455440 +0100 -@@ -1106,7 +1106,7 @@ int psize(char *buf, off_t size) +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 +@@ -1248,8 +1248,8 @@ int psize(char *buf, off_t size) + if (hflag || siflag) { for (idx=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", size); + } else return sprintf(buf, sizeof(off_t) == sizeof(long long)? " %11lld" : " %9ld", (long long int)size); } diff --git a/tree.spec b/tree.spec index bb3db73..66ac5c1 100644 --- a/tree.spec +++ b/tree.spec @@ -1,16 +1,14 @@ Summary: File system tree viewer Name: tree -Version: 1.6.0 -Release: 11%{?dist} +Version: 1.7.0 +Release: 1%{?dist} Group: Applications/File License: GPLv2+ Url: http://mama.indstate.edu/users/ice/tree/ Source: ftp://mama.indstate.edu/linux/tree/tree-%{version}.tgz -Patch1: tree-no-strip.patch Patch2: tree-preserve-timestamps.patch Patch3: tree-no-color-by-default.patch Patch4: tree-args.patch -Patch5: tree-fixbufsiz.patch Patch6: tree-dircolors-ec.patch Patch7: tree-size-field-len.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -22,8 +20,6 @@ utility. %prep %setup -q -# Don't strip binary in the Makefile -- let rpmbuild do it. -%patch1 -p1 -b .no-strip # Preserve timestamp on man page. %patch2 -p1 -b .preserve-timestamps @@ -34,9 +30,6 @@ utility. # Document --du and --prune options in help output (bug #948991). %patch4 -p1 -b .args -# Handle large UID/GID values (bug #980945). -%patch5 -p1 -b .fixbufsiz - # Use correct default for dircolors "ec" field (bug #812934). %patch6 -p1 -b .dircolors-ec @@ -67,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT %doc README LICENSE %changelog +* Fri Apr 25 2014 Tim Waugh - 1.7.0-1 +- 1.7.0 (bug #1040293). + * Fri Aug 16 2013 Tim Waugh - 1.6.0-11 - Keep file size field length constant regardless of whether SI units are used (bug #997937).