logrotate-vl.spec 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. %bcond_with systemd
  2. Summary: Rotates, compresses, removes and mails system log files.
  3. Summary(ja): システムのログファイルを圧縮/削除するプログラム
  4. Name: logrotate
  5. Version: 3.21.0
  6. Release: 1%{?_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. * Wed Dec 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.21.0-1
  106. - new upstream release.
  107. * Fri May 27 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.1-2
  108. - fixed permission.
  109. - added systemd support (disabled as default).
  110. * Thu May 26 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.20.1-1
  111. - new upstream release.
  112. * Fri Jan 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.19.0-1
  113. - new upstream release.
  114. * Fri Apr 10 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.16.0-1
  115. - new upstream release.
  116. * Sun Jun 19 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.9.2-2
  117. - drop Patch0 (get the same effect by another way).
  118. * Sat Jun 18 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.9.2-1
  119. - new upstream release.
  120. - changed location of Source0.
  121. - imported Patch0 from rawhide.
  122. * Sun Jul 20 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.8.6-1
  123. - rebuild with VineSeed environment
  124. * Thu Oct 03 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.8.6-1
  125. - new upstream release
  126. * Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 3.7.9-1
  127. - new upstream release
  128. - add Url
  129. - add patches from fedora
  130. - fix #688520 - fixed CVE-2011-1154, CVE-2011-1155 and CVE-2011-1098
  131. - fix #671926 - fixed crash when tabooext is used in config file
  132. - fix #661181 - fixed SIGBUS when config file is empty or 4096 bytes
  133. - fix #666677 - preserve ACLs when rotating files
  134. - fix #644309 - mention all logrotate params in man page
  135. - fix #638629 - better size directive description
  136. - fixed AUTHORS in man page
  137. * Sun Jun 15 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.7.7-1
  138. - new upstream release
  139. - spec in UTF-8
  140. * Wed Jun 7 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.7.4-1vl1
  141. - based on 3.7.4-1 from Rawhide
  142. * Wed May 17 2006 Peter Vrabec <pvrabec@redhat.com> 3.7.4-1
  143. - add new "minsize" option (#173088)
  144. * Tue Mar 28 2006 Peter Vrabec <pvrabec@redhat.com> 3.7.3-3
  145. - correct man page "extension" option description (#185318)
  146. * Mon Nov 07 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.2-11
  147. - man description for "nodateext" option (#171577)
  148. - remove not working "pattern" option (#171577)
  149. * Wed Sep 07 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.2-3
  150. - even when sharedscript option used, do postrotate
  151. script before compress (#167575)
  152. * Wed Aug 17 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.2-2
  153. - allow yearly rotations(#134612)
  154. * Wed Jun 22 2005 Peter Vrabec <pvrabec@redhat.com> 3.7.1-12
  155. - enhance logrotate with "dateext", "maxage"
  156. * Fri Apr 11 2003 Ryoichi INAGAKI <ryo1@ueda.info.waseda.ac.jp> 3.6.8-1vl1
  157. - based on 3.6.8-1 from Rawhide
  158. - add Requires, BuildRequires popt
  159. * Mon Jan 20 2003 Elliot Lee <sopwith@redhat.com> 3.6.8-1
  160. - Old patch from pm@debian.org
  161. * Tue Jan 14 2003 Elliot Lee <sopwith@redhat.com> 3.6.7-1
  162. - Fixes from bugzilla
  163. * Fri Nov 15 2002 Elliot Lee <sopwith@redhat.com> 3.6.6-1
  164. - Commit patch from Fidelis Assis <fidelis@embratel.net.br>
  165. * Thu Jun 20 2002 Elliot Lee <sopwith@redhat.com> 3.6.5-1
  166. - Commit fix for #65299
  167. * Mon Apr 15 2002 Elliot Lee <sopwith@redhat.com> 3.6.4-1
  168. - Commit fix for #62560
  169. * Wed Mar 13 2002 Elliot Lee <sopwith@redhat.com> 3.6.3-1
  170. - Apply various bugfix patches from the openwall people
  171. * Tue Jan 29 2002 Elliot Lee <sopwith@redhat.com> 3.6.2-1
  172. - Fix bug #55809 (include logrotate.status in %files)
  173. - Fix bug #58328 (incorrect error detection when reading state file)
  174. - Allow 'G' size specifier from bug #57242
  175. * Wed Nov 28 2001 Preston Brown <pbrown@redhat.com> 3.6-1
  176. - patch from Alexander Kourakos <awk@awks.org> to stop the shared
  177. postrotate/prerotate scripts from running if none of the log(s) need
  178. rotating. All log files are now checked for rotation in one batch,
  179. rather than sequentially.
  180. - more fixes from Paul Martin <pm@debian.org>
  181. * Thu Oct 4 2001 IWAI Masaharu <iwaim@cc.mbn.or.jp> 3.5.4-1vl2
  182. - added noreplace flag (%%config file is not replaced)
  183. * Sun Jan 14 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
  184. - 3.5.4-1vl1
  185. - based on 3.5.4-1 from Rawhide
  186. - use better macros (%%{_tmppath}, %%{_sbindir})
  187. - added Japanese summary and description
  188. * Thu Jan 4 2001 Bill Nottingham <notting@redhat.com>
  189. - %defattr
  190. * Wed Jan 03 2001 Preston Brown <pbrown@redhat.com>
  191. - see CHANGES
  192. * Tue Aug 15 2000 Erik Troan <ewt@redhat.com>
  193. - see CHANGES
  194. * Sun Jul 23 2000 Erik Troan <ewt@redhat.com>
  195. - see CHANGES
  196. * Tue Jul 11 2000 Erik Troan <ewt@redhat.com>
  197. - support spaces in filenames
  198. - added sharedscripts
  199. * Sun Jun 18 2000 Matt Wilson <msw@redhat.com>
  200. - use %%{_mandir} for man pages
  201. * Thu Feb 24 2000 Erik Troan <ewt@redhat.com>
  202. - don't rotate lastlog
  203. * Thu Feb 03 2000 Erik Troan <ewt@redhat.com>
  204. - gzipped manpages