logrotate-vl.spec 9.1 KB

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