From ed39e9c7fcc9e88975c7edac7f0f114693419395 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jul 04 2013 11:14:47 +0000 Subject: import tree-1.6.0-8.el7.src.rpm --- diff --git a/.tree.metadata b/.tree.metadata new file mode 100644 index 0000000..c968e7f --- /dev/null +++ b/.tree.metadata @@ -0,0 +1 @@ +350f851f68859a011668362dd0e7ee81fd1b713a SOURCES/tree-1.6.0.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/tree-args.patch b/SOURCES/tree-args.patch new file mode 100644 index 0000000..5fa5dd2 --- /dev/null +++ b/SOURCES/tree-args.patch @@ -0,0 +1,12 @@ +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 Print and format time according to the format .\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" diff --git a/SOURCES/tree-fixbufsiz.patch b/SOURCES/tree-fixbufsiz.patch new file mode 100644 index 0000000..7c5ad71 --- /dev/null +++ b/SOURCES/tree-fixbufsiz.patch @@ -0,0 +1,61 @@ +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/SOURCES/tree-no-color-by-default.patch b/SOURCES/tree-no-color-by-default.patch new file mode 100644 index 0000000..374add4 --- /dev/null +++ b/SOURCES/tree-no-color-by-default.patch @@ -0,0 +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) + 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; ++ nocolor = TRUE; + dirsfirst = nosort = inodeflag = devflag = Xflag = FALSE; + duflag = pruneflag = FALSE; + flimit = 0; diff --git a/SOURCES/tree-no-strip.patch b/SOURCES/tree-no-strip.patch new file mode 100644 index 0000000..5f46ada --- /dev/null +++ b/SOURCES/tree-no-strip.patch @@ -0,0 +1,21 @@ +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/SOURCES/tree-preserve-timestamps.patch b/SOURCES/tree-preserve-timestamps.patch new file mode 100644 index 0000000..2e432a5 --- /dev/null +++ b/SOURCES/tree-preserve-timestamps.patch @@ -0,0 +1,15 @@ +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 diff --git a/SPECS/tree.spec b/SPECS/tree.spec new file mode 100644 index 0000000..bc92a85 --- /dev/null +++ b/SPECS/tree.spec @@ -0,0 +1,255 @@ +Summary: File system tree viewer +Name: tree +Version: 1.6.0 +Release: 8%{?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 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +The tree utility recursively displays the contents of directories in a +tree-like format. Tree is basically a UNIX port of the DOS tree +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 + +# Disable color output by default. +%patch3 -p1 -b .no-color-by-default + +# 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 + +%build +make CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS)" %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_bindir} + +make BINDIR=$RPM_BUILD_ROOT%{_bindir} \ + MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 \ + install + +chmod -x $RPM_BUILD_ROOT%{_mandir}/man1/tree.1 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_bindir}/tree +%{_mandir}/man1/tree.1* +%doc README LICENSE + +%changelog +* Thu Jul 4 2013 Tim Waugh - 1.6.0-8 +- Handle large UID/GID values (bug #980945). + +* Thu Apr 11 2013 Tim Waugh - 1.6.0-7 +- Document --du and --prune options in help output (bug #948991). + +* Fri Feb 15 2013 Fedora Release Engineering - 1.6.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 1.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 1.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Dec 5 2011 Tim Waugh 1.6.0-3 +- Put LFS_CFLAGS in CFLAGS not CPPFLAGS so they actually get used + (bug #769655). + +* Mon Jul 4 2011 Tim Waugh 1.6.0-2 +- Don't strip the binary too early (bug #718456). + +* Mon Jun 27 2011 Tim Waugh 1.6.0-1 +- 1.6.0 (bug #716879). + +* Fri May 20 2011 Tim Waugh 1.5.3-4 +- Fixed memory leak spotted by coverity (bug #704570). + +* Wed Feb 09 2011 Fedora Release Engineering - 1.5.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Mar 3 2010 Tim Waugh 1.5.3-2 +- Added comments to all patches. + +* Fri Nov 27 2009 Tim Waugh 1.5.3-1 +- 1.5.3 (bug #517342, bug #541255). + +* Sun Jul 26 2009 Fedora Release Engineering - 1.5.2.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 10 2009 Tim Waugh 1.5.2.2-3 +- Reinstate no-color-by-default patch (bug #504245). + +* Wed Feb 25 2009 Fedora Release Engineering - 1.5.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jan 27 2009 Tim Waugh 1.5.2.2-1 +- 1.5.2.2. + +* Mon Nov 24 2008 Tim Waugh 1.5.2.1-2 +- Better summary. + +* Tue Sep 2 2008 Tim Waugh 1.5.2.1-1 +- Removed patch fuzz. +- 1.5.2.1. + +* Mon Jun 16 2008 Tim Waugh 1.5.2-1 +- 1.5.2. +- Dropped no-colour patch. + +* Thu Jun 5 2008 Tim Waugh 1.5.1.2-1 +- 1.5.1.2. + +* Fri Apr 25 2008 Tim Waugh 1.5.1.1-1 +- 1.5.1.1. + +* Mon Feb 11 2008 Tim Waugh 1.5.0-9 +- Rebuild for GCC 4.3. + +* Wed Aug 29 2007 Tim Waugh 1.5.0-8 +- More specific license tag. + +* Wed Feb 7 2007 Tim Waugh 1.5.0-7 +- Current version no longer ships binary, so don't try removing + it (bug #226503). + +* Tue Feb 6 2007 Tim Waugh 1.5.0-6 +- Preserve timestamps on install (bug #226503). +- Added SMP flags (bug #226503). +- Removed Prefix: tag (bug #226503). +- Removed bogus mkdir call (bug #226503). +- Ship the LICENSE file (bug #226503). +- Fixed summary (bug #226503). + +* Fri Dec 15 2006 Tim Waugh 1.5.0-5 +- Fixed '--charset' option (bug #188884). + +* Fri Jul 14 2006 Jesse Keating - 1.5.0-4 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 1.5.0-3.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.5.0-3.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Mar 2 2005 Tim Waugh 1.5.0-3 +- Rebuild for new GCC. + +* Sun Dec 05 2004 Florian La Roche +- add quotes around CPPFLAGS + +* Mon Sep 13 2004 Tim Waugh 1.5.0-1 +- 1.5.0 (bug #131854). +- No longer need utf8 or gcc34 patches. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Feb 5 2004 Tim Waugh 1.4b3-2 +- Fixed compilation with GCC 3.4. + +* Wed Aug 13 2003 Tim Waugh 1.4b3-1 +- Upgraded (bug #88525). + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Fri Nov 8 2002 Tim Waugh 1.2-21 +- Assume -N except if -q is given (bug #77517). + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Apr 23 2002 Tim Waugh 1.2-18 +- Don't explicitly strip binaries (bug #62569). +- Fix malloc/realloc problems (bug #56858). + +* Fri Mar 22 2002 Tim Waugh 1.2-17 +- Large file support (bug #61456). + +* Wed Feb 27 2002 Tim Waugh 1.2-16 +- Rebuild in new environment. + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Fri Oct 5 2001 Tim Waugh 1.2-14 +- Fix size format (bug #54298). +- Don't use colours by default (bug #25389). + +* Mon Jul 30 2001 Tim Waugh 1.2-13 +- Change Copyright: to License:. +- Don't dump core if LS_COLORS is too big (bug #50016). + +* Wed May 30 2001 Tim Waugh 1.2-12 +- Sync description with specspo. + +* Tue Oct 10 2000 Tim Waugh 1.2-11 +- Don't blabber about carrots in the man page (bug #18823) +- Use RPM_OPT_FLAGS while building + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Sun Jun 11 2000 Bill Nottingham +- rebuild, FHS stuff + +* Thu Feb 3 2000 Bernhard Rosenkraenzer +- remove executable bit from man page (Bug #9035) +- deal with rpm compressing man pages + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 6) + +* Thu Dec 17 1998 Michael Maher +- built package for 6.0 + +* Mon Aug 10 1998 Jeff Johnson +- build root + +* Tue May 05 1998 Prospector System +- translations modified for de, fr, tr + +* Wed Apr 29 1998 Cristian Gafton +- installing in /usr/bin + +* Mon Oct 20 1997 Otto Hammersmith +- updated version +- fixed src url + +* Fri Jul 18 1997 Erik Troan +- built against glibc