logrotate-vl.spec 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. %bcond_with systemd
  2. Summary: Rotates, compresses, removes and mails system log files.
  3. Summary(ja): システムのログファイルを圧縮/削除するプログラム
  4. Name: logrotate
  5. Version: 3.20.1
  6. Release: 2%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: GPL
  11. Url: https://fedorahosted.org/logrotate/
  12. Source: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. BuildRequires: acl libacl-devel popt-devel
  15. Requires: coreutils >= 5.92
  16. Requires: popt
  17. %description
  18. The logrotate utility is designed to simplify the administration of
  19. log files on a system which generates a lot of log files. Logrotate
  20. allows for the automatic rotation compression, removal and mailing of
  21. log files. Logrotate can be set to handle a log file daily, weekly,
  22. monthly or when the log file gets to a certain size. Normally,
  23. logrotate runs as a daily cron job.
  24. Install the logrotate package if you need a utility to deal with the
  25. log files on your system.
  26. %description -l ja
  27. logrotate ユーティリティは,ログファイルを大量に生成するシステムでの
  28. ログファイル管理を楽にする目的で作られています.
  29. logrotate はログファイルを古いものから順にリネームしたり,
  30. 圧縮したり,メールで送ったりすることが出来ます.
  31. logrotate の処理は,毎日/毎週/毎月といった単位でも設定出来ますし,
  32. ログファイルが一定サイズに達した時に処理する様にすることも出来ます.
  33. 通常は logrotate は cron によって毎日実行される様になっています.
  34. システム上のログファイルを管理するツールが必要なら
  35. logrotate パッケージをインストールして下さい.
  36. %debug_package
  37. %prep
  38. %setup -q
  39. #perl -pi -e 's|/usr/sbin/logrotate|/usr/sbin/logrotate -l syslog|' examples/logrotate.cron
  40. %build
  41. ./autogen.sh
  42. %configure --with-state-file-path=/var/lib/logrotate/logrotate.status
  43. make %{?_smp_mflags}
  44. %check
  45. make test
  46. %install
  47. rm -rf $RPM_BUILD_ROOT
  48. make install DESTDIR=$RPM_BUILD_ROOT
  49. mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d
  50. mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/logrotate
  51. install -p -m 644 examples/logrotate.conf $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.conf
  52. install -p -m 644 examples/{b,w}tmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/
  53. touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/logrotate/logrotate.status
  54. %if %{with systemd}
  55. mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
  56. install -p -m 644 examples/logrotate.{service,timer} $RPM_BUILD_ROOT%{_unitdir}/
  57. %else
  58. mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily
  59. install -p -m 755 examples/logrotate.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/logrotate
  60. %endif
  61. %clean
  62. rm -rf $RPM_BUILD_ROOT
  63. %pre
  64. # If /var/lib/logrotate/logrotate.status does not exist, create it and copy
  65. # the /var/lib/logrotate.status in it (if it exists). We have to do that in pre
  66. # script, otherwise the /var/lib/logrotate/logrotate.status would not be there,
  67. # because during the update, it is removed/renamed.
  68. if [ ! -d %{_localstatedir}/lib/logrotate/ -a -f %{_localstatedir}/lib/logrotate.status ]; then
  69. mkdir -p %{_localstatedir}/lib/logrotate
  70. cp -a %{_localstatedir}/lib/logrotate.status %{_localstatedir}/lib/logrotate
  71. fi
  72. %post
  73. chmod 0640 %{_localstatedir}/lib/logrotate/logrotate.status ||:
  74. %if %{with systemd}
  75. %systemd_post logrotate.{service,timer}
  76. %endif
  77. %if %{with systemd}
  78. %preun
  79. %systemd_preun logrotate.{service,timer}
  80. %triggerin -- logrotate < %{version}-%{release}
  81. if [ -e %{_sysconfdir}/crontab -o -e %{_sysconfdir}/anacrontab ]; then
  82. if [ -e %{_sysconfdir}/cron.daily/logrotate ]; then
  83. /bin/systemctl enable --now logrotate.timer &>/dev/null || :
  84. fi
  85. fi
  86. %endif
  87. %files
  88. %defattr(-,root,root)
  89. %{!?_licensedir:%global license %%doc}
  90. %license COPYING
  91. %doc CHANGES
  92. %attr(0755, root, root) %{_sbindir}/logrotate
  93. %attr(0644, root, root) %{_mandir}/man8/logrotate.8*
  94. %attr(0644, root, root) %{_mandir}/man5/logrotate.conf.5*
  95. %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/logrotate.conf
  96. %attr(0755, root, root) %dir %{_sysconfdir}/logrotate.d
  97. %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/logrotate.d/{b,w}tmp
  98. %attr(0640, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate/logrotate.status
  99. %if %{with systemd}
  100. %{_unitdir}/logrotate.*
  101. %else
  102. %attr(0755, root, root) %{_sysconfdir}/cron.daily/logrotate
  103. %endif
  104. %changelog
  105. * Fri May 27 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.1-2
  106. - fixed permission.
  107. - added systemd support (disabled as default).
  108. * Thu May 26 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.1-1
  109. - new upstream release.
  110. * Fri Jan 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.19.0-1
  111. - new upstream release.
  112. * Fri Apr 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.16.0-1
  113. - new upstream release.
  114. * Sun Jun 19 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.9.2-2
  115. - drop Patch0 (get the same effect by another way).
  116. * Sat Jun 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.9.2-1
  117. - new upstream release.
  118. - changed location of Source0.
  119. - imported Patch0 from rawhide.
  120. * Sun Jul 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.6-1
  121. - rebuild with VineSeed environment
  122. * Thu Oct 03 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.8.6-1
  123. - new upstream release
  124. * Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.7.9-1
  125. - new upstream release
  126. - add Url
  127. - add patches from fedora
  128. - fix #688520 - fixed CVE-2011-1154, CVE-2011-1155 and CVE-2011-1098
  129. - fix #671926 - fixed crash when tabooext is used in config file
  130. - fix #661181 - fixed SIGBUS when config file is empty or 4096 bytes
  131. - fix #666677 - preserve ACLs when rotating files
  132. - fix #644309 - mention all logrotate params in man page
  133. - fix #638629 - better size directive description
  134. - fixed AUTHORS in man page
  135. * Sun Jun 15 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.7.7-1
  136. - new upstream release
  137. - spec in UTF-8
  138. * Wed Jun 7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.7.4-1vl1
  139. - based on 3.7.4-1 from Rawhide
  140. * Wed May 17 2006 Peter Vrabec <pvrabec@redhat.com> 3.7.4-1
  141. - add new "minsize" option (#173088)
  142. * Tue Mar 28 2006 Peter Vrabec <pvrabec@redhat.com> 3.7.3-3
  143. - correct man page "extension" option description (#185318)
  144. * Mon Nov 07 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.2-11
  145. - man description for "nodateext" option (#171577)
  146. - remove not working "pattern" option (#171577)
  147. * Wed Sep 07 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.2-3
  148. - even when sharedscript option used, do postrotate
  149. script before compress (#167575)
  150. * Wed Aug 17 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.2-2
  151. - allow yearly rotations(#134612)
  152. * Wed Jun 22 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.1-12
  153. - enhance logrotate with "dateext", "maxage"
  154. * Fri Apr 11 2003 Ryoichi INAGAKI <ryo1@ueda.info.waseda.ac.jp> 3.6.8-1vl1
  155. - based on 3.6.8-1 from Rawhide
  156. - add Requires, BuildRequires popt
  157. * Mon Jan 20 2003 Elliot Lee <sopwith@redhat.com> 3.6.8-1
  158. - Old patch from pm@debian.org
  159. * Tue Jan 14 2003 Elliot Lee <sopwith@redhat.com> 3.6.7-1
  160. - Fixes from bugzilla
  161. * Fri Nov 15 2002 Elliot Lee <sopwith@redhat.com> 3.6.6-1
  162. - Commit patch from Fidelis Assis <fidelis@embratel.net.br>
  163. * Thu Jun 20 2002 Elliot Lee <sopwith@redhat.com> 3.6.5-1
  164. - Commit fix for #65299
  165. * Mon Apr 15 2002 Elliot Lee <sopwith@redhat.com> 3.6.4-1
  166. - Commit fix for #62560
  167. * Wed Mar 13 2002 Elliot Lee <sopwith@redhat.com> 3.6.3-1
  168. - Apply various bugfix patches from the openwall people
  169. * Tue Jan 29 2002 Elliot Lee <sopwith@redhat.com> 3.6.2-1
  170. - Fix bug #55809 (include logrotate.status in %files)
  171. - Fix bug #58328 (incorrect error detection when reading state file)
  172. - Allow 'G' size specifier from bug #57242
  173. * Wed Nov 28 2001 Preston Brown <pbrown@redhat.com> 3.6-1
  174. - patch from Alexander Kourakos <awk@awks.org> to stop the shared
  175. postrotate/prerotate scripts from running if none of the log(s) need
  176. rotating. All log files are now checked for rotation in one batch,
  177. rather than sequentially.
  178. - more fixes from Paul Martin <pm@debian.org>
  179. * Thu Oct 4 2001 IWAI Masaharu <iwaim@cc.mbn.or.jp> 3.5.4-1vl2
  180. - added noreplace flag (%%config file is not replaced)
  181. * Sun Jan 14 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  182. - 3.5.4-1vl1
  183. - based on 3.5.4-1 from Rawhide
  184. - use better macros (%%{_tmppath}, %%{_sbindir})
  185. - added Japanese summary and description
  186. * Thu Jan 4 2001 Bill Nottingham <notting@redhat.com>
  187. - %defattr
  188. * Wed Jan 03 2001 Preston Brown <pbrown@redhat.com>
  189. - see CHANGES
  190. * Tue Aug 15 2000 Erik Troan <ewt@redhat.com>
  191. - see CHANGES
  192. * Sun Jul 23 2000 Erik Troan <ewt@redhat.com>
  193. - see CHANGES
  194. * Tue Jul 11 2000 Erik Troan <ewt@redhat.com>
  195. - support spaces in filenames
  196. - added sharedscripts
  197. * Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
  198. - use %%{_mandir} for man pages
  199. * Thu Feb 24 2000 Erik Troan <ewt@redhat.com>
  200. - don't rotate lastlog
  201. * Thu Feb 03 2000 Erik Troan <ewt@redhat.com>
  202. - gzipped manpages