]> git.pld-linux.org Git - packages/gitlab-ce.git/commitdiff
fixing logrotate gitlab-ce-8.12.4-0.76
authorElan Ruusamäe <glen@delfi.ee>
Tue, 11 Oct 2016 16:28:39 +0000 (19:28 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Tue, 11 Oct 2016 16:28:39 +0000 (19:28 +0300)
- use log dirs from gitlab-common
- update logrotate conf to restart services
- dropped common options defined in /etc/logrotate.conf

gitlab-ce.spec
gitlab.logrotate

index 6317089f95997b3cb9056b64f774b73615cd33c1..dbff60ddf8a926653256b337686ecc82733df174 100644 (file)
@@ -56,7 +56,7 @@ BuildRequires:        zlib-devel
 Requires(post,preun):  /sbin/chkconfig
 Requires:      apache-base
 Requires:      git-core >= 2.7.4
-Requires:      gitlab-common >= 8.12
+Requires:      gitlab-common >= 8.12-2
 Requires:      gitlab-shell >= %{shell_version}
 Requires:      gitlab-workhorse >= %{workhorse_version}
 Requires:      nodejs
@@ -166,7 +166,7 @@ install -d \
        $RPM_BUILD_ROOT%{_docdir}/gitlab \
        $RPM_BUILD_ROOT%{vardir}/public \
        $RPM_BUILD_ROOT%{cachedir}/tmp \
-       $RPM_BUILD_ROOT%{_localstatedir}/{run,log}/gitlab
+       $RPM_BUILD_ROOT%{_localstatedir}/run/gitlab
 
 # test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
 if cp -al VERSION $RPM_BUILD_ROOT/VERSION 2>/dev/null; then
@@ -234,7 +234,7 @@ install -p %{SOURCE5} $RPM_BUILD_ROOT/etc/rc.d/init.d/gitlab-unicorn
 
 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/gitlab.target
 cp -p %{SOURCE7} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/gitlab.conf
-cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/gitlab.logrotate
+cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/gitlab
 cp -p %{SOURCE8} $RPM_BUILD_ROOT/etc/httpd/webapps.d/gitlab.conf
 install -p %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/gitlab-rake
 install -p %{SOURCE11} $RPM_BUILD_ROOT%{_sbindir}/gitlab-ctl
@@ -299,7 +299,7 @@ fi
 
 %ghost %{_sysconfdir}/gitlab/skip-auto-migrations
 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/webapps.d/gitlab.conf
-/etc/logrotate.d/gitlab.logrotate
+/etc/logrotate.d/gitlab
 %attr(754,root,root) /etc/rc.d/init.d/gitlab-sidekiq
 %attr(754,root,root) /etc/rc.d/init.d/gitlab-unicorn
 %attr(755,root,root) %{_sbindir}/gitlab-rake
@@ -364,7 +364,6 @@ fi
 %attr(-,%{uname},%{gname}) %{cachedir}/cache
 %dir %attr(750,%{uname},%{gname}) %{cachedir}/artifacts
 
-%dir %attr(771,root,%{gname}) %{_localstatedir}/log/gitlab
 %dir %attr(771,root,%{gname}) %{_localstatedir}/run/gitlab
 
 %defattr(-,root,root,-)
index a1972dd15d0a25a00d9420715286960ead3d8350..996cd0559fa9fe40105f72134f50586f960062bd 100644 (file)
@@ -1,21 +1,18 @@
-/var/log/gitlab/application.log
-/var/log/gitlab/development.log
-/var/log/gitlab/githost.log
 /var/log/gitlab/production.log
 /var/log/gitlab/sidekiq.log
 /var/log/gitlab/unicorn.stderr.log
 /var/log/gitlab/unicorn.stdout.log
 {
-    rotate 7
-    daily
-    maxsize 10M
-    minsize 1M
-    missingok
-    notifempty
-    compress
-    delaycompress
-    sharedscripts
-    postrotate
-        invoke-rc.d gitlab restart > /dev/null
-    endscript
+       rotate 7
+       daily
+       maxsize 10M
+       minsize 1M
+       sharedscripts
+
+       olddir /var/log/archive/gitlab
+
+       postrotate
+               service gitlab-unicorn try-restart > /dev/null
+               service gitlab-sidekiq try-restart > /dev/null
+       endscript
 }
This page took 0.084373 seconds and 4 git commands to generate.