diff --git a/README.md b/README.md deleted file mode 100644 index 7342728d557c602f51c6d278bba9f3dd9faaf356..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -Anolis OS -======================================= -# 代码仓库说明 -## 分支说明 ->进行代码开发工作时,请注意选择当前版本对应的分支 -* aX分支为对应大版本的主分支,如a8分支对应当前最新版本 -* aX.Y分支为对应小版本的维护分支,如a8.2分支对应8.2版本 -## 开发流程 -1. 首先fork目标分支到自己的namespace -2. 在自己的fork分支上做出修改 -3. 向对应的仓库中提交merge request,源分支为fork分支 diff --git a/logrotate-3.19.0.tar.xz b/logrotate-3.19.0.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..24355bda1aa4fb16ae7d0fcf4a62399ce3326ca8 Binary files /dev/null and b/logrotate-3.19.0.tar.xz differ diff --git a/logrotate.spec b/logrotate.spec new file mode 100644 index 0000000000000000000000000000000000000000..c92b739b295e4dcfd708627a88a7994230c1e240 --- /dev/null +++ b/logrotate.spec @@ -0,0 +1,77 @@ +Name: logrotate +Version: 3.19.0 +Release: 1%{?dist} +Summary: Rotates, compresses, removes and mails system log files + +License: GPLv2+ +URL: https://github.com/logrotate/logrotate +Source0: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz + +BuildRequires: acl automake gcc libacl-devel libselinux-devel make popt-devel systemd-rpm-macros +Requires: coreutils +Requires(post): systemd +Requires(preun): systemd + +%description +The logrotate utility is designed to simplify the administration of +log files on a system which generates a lot of log files. Logrotate +allows for the automatic rotation compression, removal and mailing of +log files. Logrotate can be set to handle a log file daily, weekly, +monthly or when the log file gets to a certain size. + +Install the logrotate package if you need a utility to deal with the +log files on your system. + +%prep +%autosetup + +%build +%configure --with-state-file-path=%{_localstatedir}/lib/logrotate/logrotate.status +%make_build -s check + + +%install +rm -rf $RPM_BUILD_ROOT +%make_install + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +mkdir -p $RPM_BUILD_ROOT%{_unitdir} +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/logrotate + +install -p -m 644 examples/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/ +install -p -m 644 examples/{b,w}tmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ +install -p -m 644 examples/logrotate.{service,timer} $RPM_BUILD_ROOT%{_unitdir}/ + +%pre +if [ ! -d %{_localstatedir}/lib/logrotate/ -a -f %{_localstatedir}/lib/logrotate.status ]; then + mkdir -p %{_localstatedir}/lib/logrotate + cp -a %{_localstatedir}/lib/logrotate.status %{_localstatedir}/lib/logrotate +fi + +%post +%systemd_post logrotate.{service,timer} + +%triggerin -- logrotate < 3.14.0-5 +[ -e %{_sysconfdir}/crontab -o -e %{_sysconfdir}/anacrontab -o -e %{_sysconfdir}/fcrontab ] \ + && %{_bindir}/systemctl enable --now logrotate.timer &>/dev/null || : + + +%preun +%systemd_preun logrotate.{service,timer} + +%files +%license COPYING +%doc ChangeLog.md +%{_sbindir}/logrotate +%{_unitdir}/logrotate.{service,timer} +%{_mandir}/man8/logrotate.8* +%{_mandir}/man5/logrotate.conf.5* +%config(noreplace) %{_sysconfdir}/logrotate.conf +%dir %{_sysconfdir}/logrotate.d +%config(noreplace) %{_sysconfdir}/logrotate.d/{b,w}tmp +%dir %{_localstatedir}/lib/logrotate +%ghost %verify(not size md5 mtime) %attr(0644, root, root) %{_localstatedir}/lib/logrotate/logrotate.status + +%changelog +* Thu Mar 10 2022 forrest_ly - 1.19.0-1 +- Init for Anolis OS 23