eb9e5c
Summary: A utility for removing files based on when they were last accessed
eb9e5c
Name: tmpwatch
eb9e5c
Version: 2.11
eb9e5c
Release: 6%{?dist}
eb9e5c
URL: https://pagure.io/%{name}
eb9e5c
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2
eb9e5c
License: GPLv2
eb9e5c
Group: System Environment/Base
eb9e5c
Requires: psmisc
eb9e5c
Provides: bundled(gnulib)
eb9e5c
# configure is looking for /sbin/fuser
eb9e5c
BuildRequires: psmisc
eb9e5c
eb9e5c
%description
eb9e5c
The tmpwatch utility recursively searches through specified
eb9e5c
directories and removes files which have not been accessed in a
eb9e5c
specified period of time.  Tmpwatch is normally used to clean up
eb9e5c
directories which are used for temporarily holding files (for example,
eb9e5c
/tmp).  Tmpwatch ignores symlinks, won't switch filesystems and only
eb9e5c
removes empty directories and regular files.
eb9e5c
eb9e5c
%prep
eb9e5c
%setup -q
eb9e5c
eb9e5c
%build
eb9e5c
%configure --with-fuser=/usr/sbin/fuser
eb9e5c
make %{?_smp_mflags}
eb9e5c
eb9e5c
%install
eb9e5c
make DESTDIR=%{buildroot} INSTALL='install -p' install
eb9e5c
eb9e5c
mkdir -p %{buildroot}%{_bindir}
eb9e5c
# The $(...) computes /usr/bin => ../../
eb9e5c
ln -s $(echo %{_bindir} |sed 's,/[^/]\+,/..,g; s,^/,,')%{_sbindir}/tmpwatch \
eb9e5c
   %{buildroot}%{_bindir}/tmpwatch
eb9e5c
eb9e5c
%files
eb9e5c
%doc AUTHORS COPYING ChangeLog NEWS README
eb9e5c
%{_bindir}/tmpwatch
eb9e5c
%{_sbindir}/tmpwatch
eb9e5c
%{_mandir}/man8/tmpwatch.8*
eb9e5c
eb9e5c
%changelog
eb9e5c
* Mon Feb 18 2019 Jiri Kucera <jkucera@redhat.com> - 2.11-6
eb9e5c
- Added --fuser option support.
eb9e5c
- Fixed bad URL, Source0, and bogus date in spec.
eb9e5c
  Resolves: #1330328
eb9e5c
eb9e5c
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.11-5
eb9e5c
- Mass rebuild 2014-01-24
eb9e5c
eb9e5c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.11-4
eb9e5c
- Mass rebuild 2013-12-27
eb9e5c
eb9e5c
* Mon Feb 11 2013 Miloslav Trmač <mitr@redhat.com> - 2.11-3
eb9e5c
- Drop the cron.daily script, systemd default configuration handles the same
eb9e5c
  places.
eb9e5c
  Resolves: #906455
eb9e5c
eb9e5c
* Tue Aug 21 2012 Miloslav Trmač <mitr@redhat.com> - 2.11-3
eb9e5c
- Drop no longer necessary %%clean and %%defattr commands.
eb9e5c
eb9e5c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.11-2
eb9e5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
eb9e5c
eb9e5c
* Fri May 25 2012 Miloslav Trmač <mitr@redhat.com> - 2.11-1
eb9e5c
- Update to tmpwatch-2.11.
eb9e5c
  Resolves: #694838
eb9e5c
eb9e5c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10.3-2
eb9e5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
eb9e5c
eb9e5c
* Tue Jul 19 2011 Miloslav Trmač <mitr@redhat.com> - 2.10.3-1
eb9e5c
- Update to tmpwatch-2.10.3.
eb9e5c
  Resolves: #722856
eb9e5c
eb9e5c
* Thu Mar 31 2011 Miloslav Trmač <mitr@redhat.com> - 2.10.2-1
eb9e5c
- Update to tmpwatch-2.10.2.
eb9e5c
  Resolves: #585216
eb9e5c
eb9e5c
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10-4
eb9e5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
eb9e5c
eb9e5c
* Fri Feb  4 2011 Miloslav Trmač <mitr@redhat.com> - 2.10-3
eb9e5c
- Add Provides: bundled(gnulib)
eb9e5c
eb9e5c
* Sat Aug  7 2010 Miloslav Trmač <mitr@redhat.com> - 2.10-2
eb9e5c
- Document --exclude-pattern in more places
eb9e5c
  Related: #527425
eb9e5c
eb9e5c
* Tue Mar 23 2010 Miloslav Trmač <mitr@redhat.com> - 2.10-1
eb9e5c
- Update to tmpwatch-2.10.
eb9e5c
- Drop no longer neceessary references to BuildRoot:
eb9e5c
eb9e5c
* Mon Feb  1 2010 Miloslav Trmač <mitr@redhat.com> - 2.9.17-2
eb9e5c
- Ship COPYING
eb9e5c
  Resolves: #560690
eb9e5c
eb9e5c
* Tue Dec 22 2009 Miloslav Trmač <mitr@redhat.com> - 2.9.17-1
eb9e5c
- Update to tmpwatch-2.9.17.
eb9e5c
  Resolves: #548932
eb9e5c
eb9e5c
* Thu Oct 15 2009 Miloslav Trmač <mitr@redhat.com> - 2.9.16-1
eb9e5c
- Update to tmpwatch-2.9.16.
eb9e5c
- Exclude /tmp/hsperfdata_*.
eb9e5c
  Resolves: #527425
eb9e5c
- Preserve timestamps where possible.
eb9e5c
eb9e5c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.15-2
eb9e5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
eb9e5c
eb9e5c
* Fri May 22 2009 Miloslav Trmač <mitr@redhat.com> - 2.9.15-1
eb9e5c
- Update to tmpwatch-2.9.15.
eb9e5c
- Add a symlink to %%{_bindir}.
eb9e5c
  Resolves: #494239
eb9e5c
eb9e5c
* Mon Mar 23 2009 Miloslav Trmač <mitr@redhat.com> - 2.9.14-1
eb9e5c
- Update to tmpwatch-2.9.14.
eb9e5c
eb9e5c
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.13-3
eb9e5c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
eb9e5c
eb9e5c
* Sat Feb 23 2008 Miloslav Trmač <mitr@redhat.com> - 2.9.13-2
eb9e5c
- Package the new documentation files.
eb9e5c
eb9e5c
* Sat Feb 23 2008 Miloslav Trmač <mitr@redhat.com> - 2.9.13-1
eb9e5c
- New home page at https://fedorahosted.org/tmpwatch/ .
eb9e5c
- tmpwatch is now licensed under GPLv2.
eb9e5c
- Address issues from reviews by Adel Gadllah and Jason Tibbitts:
eb9e5c
  - Run (make) with %%{?_smp_mflags}
eb9e5c
  - Add a comment describing the origin of the tarball to the spec file
eb9e5c
  - Use a better BuildRoot:
eb9e5c
eb9e5c
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.9.12-3
eb9e5c
- Autorebuild for GCC 4.3
eb9e5c
eb9e5c
* Fri Dec 14 2007 Miloslav Trmač <mitr@redhat.com> - 2.9.12-2
eb9e5c
- --atime is -u.  Doh.
eb9e5c
eb9e5c
* Fri Dec 14 2007 Miloslav Trmač <mitr@redhat.com> - 2.9.12-1
eb9e5c
- Fix --nosymlinks description in the man page
eb9e5c
- Use the maximum of atime, mtime and ctime when checking whether a file is
eb9e5c
  obsolete
eb9e5c
  Resolves: #373301
eb9e5c
eb9e5c
* Tue Oct 16 2007 Miloslav Trmač <mitr@redhat.com> - 2.9.11-2
eb9e5c
- Update License:
eb9e5c
eb9e5c
* Sat Mar 31 2007 Miloslav Trmac <mitr@redhat.com> - 2.9.11-1
eb9e5c
- Fix a misleading message in --test
eb9e5c
  Resolves: 234596
eb9e5c
- Compress the tarball using bzip2
eb9e5c
- Move the cron.daily script to a separate source file
eb9e5c
eb9e5c
* Sun Nov  5 2006 Miloslav Trmac <mitr@redhat.com> - 2.9.10-1
eb9e5c
- Reallow --exclude with nonexistent paths
eb9e5c
  Resolves: 214034
eb9e5c
eb9e5c
* Thu Nov  2 2006 Miloslav Trmac <mitr@redhat.com> - 2.9.9-1
eb9e5c
- Exclude aquota.group and aquota.user files
eb9e5c
  Resolves: 206258
eb9e5c
- Don't require the user-specified paths to be absolute
eb9e5c
eb9e5c
* Wed Nov  1 2006 Miloslav Trmac <mitr@redhat.com> - 2.9.8-1
eb9e5c
- Add optional unit suffix to the "hours" (now "time") parameter (original
eb9e5c
  patch by Alan J Rosenthal <flaps@dgp.toronto.edu>)
eb9e5c
- Fix some format string vs. arguments mismatches
eb9e5c
- Fix some rpmlint warnings
eb9e5c
eb9e5c
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.9.7-1.1
eb9e5c
- rebuild
eb9e5c
eb9e5c
* Sat May  6 2006 Miloslav Trmac <mitr@redhat.com> - 2.9.7-1
eb9e5c
- Add --nosymlinks (#190691)
eb9e5c
eb9e5c
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.9.6-1.2.1
eb9e5c
- bump again for double-long bug on ppc(64)
eb9e5c
eb9e5c
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.9.6-1.2
eb9e5c
- rebuilt for new gcc4.1 snapshot and glibc changes
eb9e5c
eb9e5c
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
eb9e5c
- rebuilt
eb9e5c
eb9e5c
* Tue Nov 29 2005 Miloslav Trmac <mitr@redhat.com> - 2.9.6-1
eb9e5c
- Add --exclude-user (original patch by Brett Pemberton)
eb9e5c
- Fix too long line in /etc/cron.daily/tmpwatch
eb9e5c
eb9e5c
* Fri Nov 11 2005 Miloslav Trmac <mitr@redhat.com> - 2.9.5-1
eb9e5c
- Fix GPL reference in usage message (#163531, patch by Ville Skyttä)
eb9e5c
- Convert changelog to UTF-8
eb9e5c
eb9e5c
* Mon Jun 20 2005 Miloslav Trmac <mitr@redhat.com> - 2.9.4-1
eb9e5c
- Add --dirmtime (#91096)
eb9e5c
- Handle fchdir () failures
eb9e5c
eb9e5c
* Sat Apr 16 2005 Miloslav Trmac <mitr@redhat.com> - 2.9.3-1
eb9e5c
- Silently ignore ENOENT if somebody removes files faster than us (#154960)
eb9e5c
- Handle failures to exec fuser
eb9e5c
- Fix check for negative grace periods
eb9e5c
eb9e5c
* Sat Mar  5 2005 Miloslav Trmac <mitr@redhat.com> - 2.9.2-2
eb9e5c
- Rebuild with gcc 4
eb9e5c
eb9e5c
* Wed Dec 22 2004 Miloslav Trmac <mitr@redhat.com> - 2.9.2-1
eb9e5c
- Mention skipping of lost+found in the man page (#143526)
eb9e5c
eb9e5c
* Sat Aug 14 2004 Miloslav Trmac <mitr@redhat.com> - 2.9.1-1
eb9e5c
- Add --exclude, use it to preserve X socket directories (#107069)
eb9e5c
- Allow multiple directory arguments with relative paths (#91097)
eb9e5c
- Don't manually strip the binary
eb9e5c
eb9e5c
* Fri May 30 2003 Mike A. Harris <mharris@redhat.com> 2.9.0-1
eb9e5c
- Added Solaris/HPUX support to tmpwatch via patch from Paul Gear (#71288)
eb9e5c
- Rebuild in rawhide as 2.9.0-1
eb9e5c
eb9e5c
* Mon Feb 10 2003 Nalin Dahyabhai <nalin@redhat.com> 2.8.4-5
eb9e5c
- rebuild
eb9e5c
eb9e5c
* Fri Feb  7 2003 Nalin Dahyabhai <nalin@redhat.com> 2.8.4-2
eb9e5c
- rebuild
eb9e5c
eb9e5c
* Tue Oct  8 2002 Mike A. Harris <mharris@redhat.com> 2.8.4-4
eb9e5c
- All-arch rebuild
eb9e5c
eb9e5c
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
eb9e5c
- automated rebuild
eb9e5c
eb9e5c
* Sun May 26 2002 Tim Powers <timp@redhat.com>
eb9e5c
- automated rebuild
eb9e5c
eb9e5c
* Tue May 21 2002 Mike A. Harris <mharris@redhat.com> 2.8.4-1
eb9e5c
- Bump release and rebuild in new environment
eb9e5c
eb9e5c
* Sat Apr 13 2002 Mike A. Harris <mharris@redhat.com> 2.8.3-1
eb9e5c
- Added support for large files with 64bit offsets by adding to CFLAGS
eb9e5c
  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 bug (#56961)
eb9e5c
eb9e5c
* Sun Jan 27 2002 Mike A. Harris <mharris@redhat.com> 2.8.2-1
eb9e5c
- Added newlines to logfile messages as per bug #58912
eb9e5c
eb9e5c
* Thu Nov  8 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- define default SBINDIR in Makefile
eb9e5c
- incorrect boolean comparison fix
eb9e5c
eb9e5c
* Wed Aug 29 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- cron script fix (#52785)
eb9e5c
eb9e5c
* Tue Aug 28 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- rebuild for 5.x, 6.x, 7.x errata
eb9e5c
eb9e5c
* Mon Aug 27 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- noreplace /etc/cron.daily/tmpwatch
eb9e5c
eb9e5c
* Mon Aug  6 2001 Preston Brown <pbrown@redhat.com> 2.8-1
eb9e5c
- added a "nodirs" option which inhibits removal of empty directories.
eb9e5c
- Integrated race condition fixes from Martin Macok (#50148)
eb9e5c
- do not try to remove ext3 journal files (#50522)
eb9e5c
eb9e5c
* Tue Jul  3 2001 Preston Brown <pbrown@redhat.com> 2.7.4-1
eb9e5c
- fix typo in cron script
eb9e5c
eb9e5c
* Mon Jul  2 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- better checking for directory existence cleaning man cache dirs (#44117)
eb9e5c
eb9e5c
* Fri May 11 2001 Trond Eivind Glomsrød <teg@redhat.com>
eb9e5c
- Handle directories with large files
eb9e5c
- fix some warnings during compilation
eb9e5c
eb9e5c
* Thu Mar 29 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- fixed longstanding bug where directories removed while in test mode.
eb9e5c
eb9e5c
* Fri Mar  9 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- Patch from enrico.scholz@informatik.tu-chemnitz.de allows concurrent 
eb9e5c
  usage of mtime, ctime, and atime checking (#19550).
eb9e5c
eb9e5c
* Fri Jan 05 2001 Preston Brown <pbrown@redhat.com>
eb9e5c
- increased interval for removal to 30 days for /var/tmp per FHS (#19951)
eb9e5c
eb9e5c
* Tue Sep 12 2000 Nalin Dahyabhai <nalin@redhat.com>
eb9e5c
- use execle() instead of system() to get the correct return code, fixes from
eb9e5c
  Jeremy Katz <katzj@linuxpower.org>
eb9e5c
eb9e5c
* Thu Sep  7 2000 Nalin Dahyabhai <nalin@redhat.com>
eb9e5c
- rework to not have to fork() (#17286)
eb9e5c
- set utime() after we're done reading a directory
eb9e5c
eb9e5c
* Sat Jun 17 2000 Matt Wilson <msw@redhat.com>
eb9e5c
- defattr
eb9e5c
eb9e5c
* Tue Jun 13 2000 Preston Brown <pbrown@redhat.com>
eb9e5c
- FHS compliance
eb9e5c
eb9e5c
* Thu May 18 2000 Preston Brown <pbrown@redhat.com>
eb9e5c
- don't complain about failure to remove non-empty directories.
eb9e5c
- fix man page path
eb9e5c
eb9e5c
* Wed May 17 2000 Preston Brown <pbrown@redhat.com>
eb9e5c
- support /var/cache/man and /var/catman (FHS 2.1 compliance).
eb9e5c
eb9e5c
* Fri May 05 2000 Preston Brown <pbrown@redhat.com>
eb9e5c
- support for CTIME from jik@kamens.brookline.ma.us
eb9e5c
- fixes for fuser checks from Ian Burrell <iburrell@digital-integrity.com>.
eb9e5c
- remove directories when empty without --all flag, to be consistent w/docs.
eb9e5c
eb9e5c
* Mon Feb 14 2000 Preston Brown <pbrown@redhat.com>
eb9e5c
- option to use fuser to see if file in use before removing
eb9e5c
eb9e5c
* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
eb9e5c
- fix description
eb9e5c
- man pages are compressed
eb9e5c
eb9e5c
* Tue Jan 18 2000 Preston Brown <pbrown@redhat.com>
eb9e5c
- null terminal opt struct (#7836)
eb9e5c
- test flag implies verbose (#2383)
eb9e5c
eb9e5c
* Wed Jan 12 2000 Paul Gear <paulgear@bigfoot.com>
eb9e5c
- HP-UX port (including doco update)
eb9e5c
- Tweaked Makefile to allow installation into different base directory
eb9e5c
- Got rid of GETOPT_... defines which didn't do anything, so that short
eb9e5c
  equivalents for all long options could be defined.
eb9e5c
- Fixed bug in message() where 'where' file handle was set but unused
eb9e5c
- Changed most fprintf() calls to message()
eb9e5c
eb9e5c
* Mon Aug 30 1999 Preston Brown <pbrown@redhat.com>
eb9e5c
- skip lost+found directories
eb9e5c
- option to use file's atime instead of mtime (# 4178)
eb9e5c
eb9e5c
* Mon Jun  7 1999 Jeff Johnson <jbj@redhat.com>
eb9e5c
- cleanup more man pages, this time adding in cvs (#224).
eb9e5c
eb9e5c
* Thu Apr 08 1999 Preston Brown <pbrown@redhat.com>
eb9e5c
- I am the new maintainer
eb9e5c
- fixed cleanup of directories
eb9e5c
- added --quiet flag
eb9e5c
- freshen manpage
eb9e5c
- nice patch from Kevin Vajk <kvajk@ricochet.net> integrated
eb9e5c
eb9e5c
* Wed Jun 10 1998 Erik Troan <ewt@redhat.com>
eb9e5c
- make /etc/cron.daily/tmpwatch executable
eb9e5c
eb9e5c
* Tue Jan 13 1998 Erik Troan <ewt@redhat.com>
eb9e5c
- version 1.5
eb9e5c
- fixed flags passing
eb9e5c
- cleaned up message()
eb9e5c
eb9e5c
* Wed Oct 22 1997 Erik Troan <ewt@redhat.com>
eb9e5c
- added man page to package
eb9e5c
- uses a buildroot and %%attr
eb9e5c
- fixed error message generation for directories
eb9e5c
- fixed flag propagation
eb9e5c
eb9e5c
* Mon Mar 24 1997 Erik Troan <ewt@redhat.com>
eb9e5c
- Don't follow symlinks which are specified on the command line
eb9e5c
- Added a man page
eb9e5c
eb9e5c
* Sun Mar 09 1997 Erik Troan <ewt@redhat.com>
eb9e5c
- Rebuilt to get right permissions on the Alpha (though I have no idea
eb9e5c
  how they ended up wrong).