]> git.pld-linux.org Git - packages/logrotate.git/commitdiff
- rel 2; prefix output with config name: https://fedorahosted.org/logrotate/ticket/37 auto/th/logrotate-3.8.7-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 Oct 2014 12:05:16 +0000 (14:05 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 Oct 2014 12:05:16 +0000 (14:05 +0200)
logrotate-print-prog-name.patch [new file with mode: 0644]
logrotate.spec

diff --git a/logrotate-print-prog-name.patch b/logrotate-print-prog-name.patch
new file mode 100644 (file)
index 0000000..0a2d7ca
--- /dev/null
@@ -0,0 +1,50 @@
+Index: /trunk/logrotate.c\r
+===================================================================\r
+--- /trunk/logrotate.c (revision 454)\r
++++ /trunk/logrotate.c (revision 455)\r
+@@ -523,4 +523,7 @@\r
+     int i;\r
+     int status;\r
++      int compressPipe[2];\r
++      char buff[4092];\r
++      int error_printed = 0;\r
\r
+     message(MESS_DEBUG, "compressing log with: %s\n", log->compress_prog);\r
+@@ -567,4 +570,12 @@\r
+     }\r
\r
++      if (pipe(compressPipe) < 0) {\r
++              message(MESS_ERROR, "error opening pipe for compress: %s",\r
++                              strerror(errno));\r
++              close(inFile);\r
++              close(outFile);\r
++              return 1;\r
++      }\r
++\r
+     if (!FORK_OR_VFORK()) {\r
+       dup2(inFile, 0);\r
+@@ -572,4 +583,7 @@\r
+       dup2(outFile, 1);\r
+       close(outFile);\r
++      dup2(compressPipe[1], 2);\r
++      close(compressPipe[0]);\r
++      close(compressPipe[1]);\r
\r
+       if (switch_user_permanently(log) != 0) {\r
+@@ -581,4 +595,15 @@\r
+     }\r
\r
++    close(compressPipe[1]);\r
++      while ((i = read(compressPipe[0], buff, sizeof(buff) - 1)) > 0) {\r
++              if (!error_printed) {\r
++                      error_printed = 1;\r
++                      message(MESS_ERROR, "Compressing program wrote following message "\r
++                                      "to stderr when compressing log %s:\n", name);\r
++              }\r
++              buff[i] = '\0';\r
++              fprintf(stderr, "%s", buff);\r
++      }\r
++      close(compressPipe[0]);\r
+     wait(&status);\r
\r
+\r
index e3250e5d686fb600969c82ba36b9d4a2bf66c109..f212f76fe9ee1e80beecc8320275598b2035acb2 100644 (file)
@@ -20,7 +20,7 @@ Summary(tr.UTF-8):    Sistem günlüklerini yönlendirir, sıkıştırır ve mektup
 Summary(uk.UTF-8):     Ротує, компресує, видаляє та відправляє поштою лог-файли
 Name:          logrotate
 Version:       3.8.7
-Release:       1
+Release:       2
 License:       GPL v2
 Group:         Applications/System
 Source0:       https://fedorahosted.org/releases/l/o/logrotate/%{name}-%{version}.tar.gz
@@ -31,6 +31,7 @@ Source3:      %{name}.cron
 Source4:       %{name}.crontab
 Patch1:                %{name}-man.patch
 Patch2:                tabooext.patch
+Patch3:                logrotate-print-prog-name.patch
 URL:           https://fedorahosted.org/logrotate/
 %{?with_acl:BuildRequires:     acl-devel}
 %if %{with selinux}
@@ -117,11 +118,12 @@ Logrotate призначений для полегшення адміністр
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p2
 
 %build
 %{__make} \
        CC="%{__cc}" \
-       RPM_OPT_FLAGS="%{rpmcflags}" \
+       RPM_OPT_FLAGS="%{rpmcflags} %{rpmcppflags}" \
        WITH_ACL=%{?with_acl:yes}%{!?with_acl:no} \
        WITH_SELINUX=%{?with_selinux:yes}%{!?with_selinux:no} \
        STATEFILE="%{statdir}/logrotate.status"
This page took 0.209397 seconds and 4 git commands to generate.