app-admin/logrotate: Drops old files
authorChema Alonso Josa <nimiux@gentoo.org>
Sat, 22 Apr 2017 21:34:51 +0000 (23:34 +0200)
committerChema Alonso Josa <nimiux@gentoo.org>
Sat, 22 Apr 2017 21:34:51 +0000 (23:34 +0200)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

12 files changed:
app-admin/logrotate/files/logrotate-3.10.0-Werror.patch [deleted file]
app-admin/logrotate/files/logrotate-3.10.0-atomic-create.patch [deleted file]
app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch [deleted file]
app-admin/logrotate/files/logrotate-3.10.0-ignore-hidden.patch [deleted file]
app-admin/logrotate/files/logrotate-3.10.0-lfs.patch [deleted file]
app-admin/logrotate/files/logrotate-3.10.0-noasprintf.patch [deleted file]
app-admin/logrotate/files/logrotate-3.9.2-Werror.patch [deleted file]
app-admin/logrotate/files/logrotate-3.9.2-atomic-create.patch [deleted file]
app-admin/logrotate/files/logrotate-3.9.2-fbsd.patch [deleted file]
app-admin/logrotate/files/logrotate-3.9.2-ignore-hidden.patch [deleted file]
app-admin/logrotate/files/logrotate-3.9.2-lfs.patch [deleted file]
app-admin/logrotate/files/logrotate-3.9.2-noasprintf.patch [deleted file]

diff --git a/app-admin/logrotate/files/logrotate-3.10.0-Werror.patch b/app-admin/logrotate/files/logrotate-3.10.0-Werror.patch
deleted file mode 100644 (file)
index 86b45a4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -Nuar a/Makefile.am b/Makefile.am
---- a/Makefile.am      2016-08-03 12:25:47.000000000 +0200
-+++ b/Makefile.am      2016-08-03 23:28:16.420071763 +0200
-@@ -1,4 +1,4 @@
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- sbin_PROGRAMS = logrotate
- logrotate_SOURCES = basenames.c config.c log.c logrotate.c \
-                   basenames.h config.h log.h logrotate.h queue.h
diff --git a/app-admin/logrotate/files/logrotate-3.10.0-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.10.0-atomic-create.patch
deleted file mode 100644 (file)
index 46c36b8..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c      2016-08-03 23:20:52.900062834 +0200
-+++ b/logrotate.c      2016-08-03 23:25:18.080068173 +0200
-@@ -368,15 +368,18 @@
- int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode)
- {
-     int fd;
--      struct stat sb_create;
--      int acl_set = 0;
--
--      fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW),
--              (S_IRUSR | S_IWUSR) & sb->st_mode);
-+    int acl_set = 0;
-+    struct stat sb_create;
-+    char template[PATH_MAX + 1];
-+    mode_t umask_value;
-+    snprintf(template, PATH_MAX, "%s/logrotate_temp.XXXXXX", ourDirName(fileName));
-+    umask_value = umask(0000);
-+    fd = mkostemp(template, (flags | O_EXCL | O_NOFOLLOW));
-+    umask(umask_value);
- 
-     if (fd < 0) {
--      message(MESS_ERROR, "error creating output file %s: %s\n",
--              fileName, strerror(errno));
-+       message(MESS_ERROR, "error creating unique temp file: %s\n",
-+       strerror(errno));
-       return -1;
-     }
-     if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) {
-@@ -427,6 +430,13 @@
-               }
-       }
- 
-+    if (rename(template, fileName)) {
-+        message(MESS_ERROR, "error renaming temp file to %s: %s\n",
-+        fileName, strerror(errno));
-+        close(fd);
-+        return -1;
-+    }
-+
-     return fd;
- }
- 
diff --git a/app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.10.0-fbsd.patch
deleted file mode 100644 (file)
index 4952ab8..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2016-08-03 23:19:33.730061240 +0200
-+++ b/config.c 2016-08-03 23:20:31.200062397 +0200
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* Alloca is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -24,6 +24,10 @@
- #include <fnmatch.h>
- #include <sys/mman.h>
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "basenames.h"
- #include "log.h"
- #include "logrotate.h"
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c      2016-08-03 12:25:47.000000000 +0200
-+++ b/logrotate.c      2016-08-03 23:20:52.900062834 +0200
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* alloca() is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -26,6 +27,10 @@
- #include <limits.h>
- #endif
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "basenames.h"
- #include "log.h"
- #include "logrotate.h"
-diff -Nuar a/Makefile.legacy b/Makefile.legacy
---- a/Makefile.legacy  2016-08-03 12:25:47.000000000 +0200
-+++ b/Makefile.legacy  2016-08-03 23:21:07.370063125 +0200
-@@ -22,7 +22,9 @@
- 
- ifeq ($(WITH_ACL),yes)
- CFLAGS += -DWITH_ACL
-+ifneq ($(OS_NAME),FreeBSD)
- LOADLIBES += -lacl
-+endif
- # See pretest
- TEST_ACL=1
- else
diff --git a/app-admin/logrotate/files/logrotate-3.10.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.10.0-ignore-hidden.patch
deleted file mode 100644 (file)
index 3496a6d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2016-08-03 12:25:47.000000000 +0200
-+++ b/config.c 2016-08-03 23:19:33.730061240 +0200
-@@ -359,7 +359,9 @@
-       char *pattern;
- 
-       /* Check if fname is '.' or '..'; if so, return false */
--      if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+    /* Don't include 'hidden' files either; this breaks Gentoo
-+       portage config file management http://bugs.gentoo.org/87683 */
-+    if (fname[0] == '.')
-               return 0;
- 
-       /* Check if fname is ending in a taboo-extension; if so, return false */
diff --git a/app-admin/logrotate/files/logrotate-3.10.0-lfs.patch b/app-admin/logrotate/files/logrotate-3.10.0-lfs.patch
deleted file mode 100644 (file)
index 9c7b360..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nuar a/configure.ac b/configure.ac
---- a/configure.ac     2016-08-03 12:25:47.000000000 +0200
-+++ b/configure.ac     2016-08-03 23:29:44.540073537 +0200
-@@ -9,6 +9,7 @@
- AC_PROG_CC_STDC
- AC_STRUCT_ST_BLKSIZE
- AC_STRUCT_ST_BLOCKS
-+AC_SYS_LARGEFILE
- 
- AC_CHECK_LIB([popt],[poptParseArgvString],,
-   AC_MSG_ERROR([libpopt required but not found]))
diff --git a/app-admin/logrotate/files/logrotate-3.10.0-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.10.0-noasprintf.patch
deleted file mode 100644 (file)
index 608a109..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2016-08-03 23:20:31.200062397 +0200
-+++ b/config.c 2016-08-03 23:22:52.830065248 +0200
-@@ -49,39 +49,6 @@
- #include "asprintf.c"
- #endif
- 
--#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
--#include <stdarg.h>
--
--int asprintf(char **string_ptr, const char *format, ...)
--{
--      va_list arg;
--      char *str;
--      int size;
--      int rv;
--
--      va_start(arg, format);
--      size = vsnprintf(NULL, 0, format, arg);
--      size++;
--      va_start(arg, format);
--      str = malloc(size);
--      if (str == NULL) {
--              va_end(arg);
--              /*
--               * Strictly speaking, GNU asprintf doesn't do this,
--               * but the caller isn't checking the return value.
--               */
--              fprintf(stderr, "failed to allocate memory\\n");
--              exit(1);
--      }
--      rv = vsnprintf(str, size, format, arg);
--      va_end(arg);
--
--      *string_ptr = str;
--      return (rv);
--}
--
--#endif
--
- #if !defined(strndup)
- char *strndup(const char *s, size_t n)
- {
-diff -Nuar a/logrotate.h b/logrotate.h
---- a/logrotate.h      2016-08-03 12:25:47.000000000 +0200
-+++ b/logrotate.h      2016-08-03 23:23:15.220065699 +0200
-@@ -80,8 +80,5 @@
- extern int debug;
- 
- int readAllConfigPaths(const char **paths);
--#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
--int asprintf(char **string_ptr, const char *format, ...);
--#endif
- 
- #endif
diff --git a/app-admin/logrotate/files/logrotate-3.9.2-Werror.patch b/app-admin/logrotate/files/logrotate-3.9.2-Werror.patch
deleted file mode 100644 (file)
index 659a66c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nuar a/Makefile.am b/Makefile.am
---- a/Makefile.am      2016-01-20 10:47:36.000000000 +0100
-+++ b/Makefile.am      2016-01-25 20:04:28.270050499 +0100
-@@ -1,7 +1,7 @@
- MAN = logrotate.8
- MAN5 = logrotate.conf.5
- 
--AM_CFLAGS = -Wall -Werror
-+AM_CFLAGS = -Wall
- sbin_PROGRAMS = logrotate
- logrotate_SOURCES = logrotate.c log.c config.c basenames.c
- 
diff --git a/app-admin/logrotate/files/logrotate-3.9.2-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.9.2-atomic-create.patch
deleted file mode 100644 (file)
index 3914e65..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c      2016-01-25 19:55:46.740039999 +0100
-+++ b/logrotate.c      2016-01-25 20:03:15.290049030 +0100
-@@ -367,15 +367,18 @@
- int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode)
- {
-     int fd;
--      struct stat sb_create;
--      int acl_set = 0;
--
--      fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW),
--              (S_IRUSR | S_IWUSR) & sb->st_mode);
-+    int acl_set = 0;
-+    struct stat sb_create;
-+    char template[PATH_MAX + 1];
-+    mode_t umask_value;
-+    snprintf(template, PATH_MAX, "%s/logrotate_temp.XXXXXX", ourDirName(fileName));
-+    umask_value = umask(0000);
-+    fd = mkostemp(template, (flags | O_EXCL | O_NOFOLLOW));
-+    umask(umask_value);
- 
-     if (fd < 0) {
--      message(MESS_ERROR, "error creating output file %s: %s\n",
--              fileName, strerror(errno));
-+       message(MESS_ERROR, "error creating unique temp file: %s\n",
-+       strerror(errno));
-       return -1;
-     }
-     if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) {
-@@ -425,6 +428,12 @@
-               return -1;
-               }
-       }
-+    if (rename(template, fileName)) {
-+        message(MESS_ERROR, "error renaming temp file to %s: %s\n",
-+        fileName, strerror(errno));
-+        close(fd);
-+        return -1;
-+    }
- 
-     return fd;
- }
diff --git a/app-admin/logrotate/files/logrotate-3.9.2-fbsd.patch b/app-admin/logrotate/files/logrotate-3.9.2-fbsd.patch
deleted file mode 100644 (file)
index 5f60596..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2016-01-25 19:50:48.840034001 +0100
-+++ b/config.c 2016-01-25 19:54:37.170038598 +0100
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* Alloca is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -24,6 +24,10 @@
- #include <fnmatch.h>
- #include <sys/mman.h>
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "basenames.h"
- #include "log.h"
- #include "logrotate.h"
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c      2016-01-20 10:47:36.000000000 +0100
-+++ b/logrotate.c      2016-01-25 19:55:46.740039999 +0100
-@@ -1,6 +1,6 @@
- #include "queue.h"
- /* alloca() is defined in stdlib.h in NetBSD */
--#ifndef __NetBSD__
-+#if !defined(__NetBSD__) && !defined(__FreeBSD__)
- #include <alloca.h>
- #endif
- #include <limits.h>
-@@ -26,6 +26,10 @@
- #include <limits.h>
- #endif
- 
-+#if !defined(PATH_MAX) && defined(__FreeBSD__)
-+#include <sys/param.h>
-+#endif
-+
- #include "basenames.h"
- #include "log.h"
- #include "logrotate.h"
-diff -Nuar a/Makefile b/Makefile
---- a/Makefile 2016-01-20 10:47:36.000000000 +0100
-+++ b/Makefile 2016-01-25 19:56:43.380041139 +0100
-@@ -22,7 +22,9 @@
- 
- ifeq ($(WITH_ACL),yes)
- CFLAGS += -DWITH_ACL
-+ifneq ($(OS_NAME),FreeBSD)
- LOADLIBES += -lacl
-+endif
- # See pretest
- TEST_ACL=1
- else
diff --git a/app-admin/logrotate/files/logrotate-3.9.2-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.9.2-ignore-hidden.patch
deleted file mode 100644 (file)
index df1ed8d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2016-01-20 10:47:36.000000000 +0100
-+++ b/config.c 2016-01-25 19:50:48.840034001 +0100
-@@ -359,7 +359,10 @@
-       char *pattern;
- 
-       /* Check if fname is '.' or '..'; if so, return false */
--      if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+   /* Don't include 'hidden' files either; this breaks Gentoo
-+      portage config file management http://bugs.gentoo.org/87683 */
-+   if (fname[0] == '.')
-+
-               return 0;
- 
-       /* Check if fname is ending in a taboo-extension; if so, return false */
diff --git a/app-admin/logrotate/files/logrotate-3.9.2-lfs.patch b/app-admin/logrotate/files/logrotate-3.9.2-lfs.patch
deleted file mode 100644 (file)
index 66ea73f..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nuar a/configure.ac b/configure.ac
---- a/configure.ac     2016-01-20 10:47:36.000000000 +0100
-+++ b/configure.ac     2016-01-25 20:05:49.310052130 +0100
-@@ -10,6 +10,8 @@
- AC_STRUCT_ST_BLKSIZE
- AC_STRUCT_ST_BLOCKS
- 
-+AC_SYS_LARGEFILE
-+
- AC_CHECK_LIB([popt],[poptParseArgvString],,
-   AC_MSG_ERROR([libpopt required but not found]))
- 
diff --git a/app-admin/logrotate/files/logrotate-3.9.2-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.9.2-noasprintf.patch
deleted file mode 100644 (file)
index f9e0769..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2016-01-25 19:54:37.170038598 +0100
-+++ b/config.c 2016-01-25 19:58:56.040043810 +0100
-@@ -49,39 +49,6 @@
- #include "asprintf.c"
- #endif
-
--#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
--#include <stdarg.h>
--
--int asprintf(char **string_ptr, const char *format, ...)
--{
--      va_list arg;
--      char *str;
--      int size;
--      int rv;
--
--      va_start(arg, format);
--      size = vsnprintf(NULL, 0, format, arg);
--      size++;
--      va_start(arg, format);
--      str = malloc(size);
--      if (str == NULL) {
--              va_end(arg);
--              /*
--               * Strictly speaking, GNU asprintf doesn't do this,
--               * but the caller isn't checking the return value.
--               */
--              fprintf(stderr, "failed to allocate memory\\n");
--              exit(1);
--      }
--      rv = vsnprintf(str, size, format, arg);
--      va_end(arg);
--
--      *string_ptr = str;
--      return (rv);
--}
--
--#endif
--
- #if !defined(strndup)
- char *strndup(const char *s, size_t n)
- {
-diff -Nuar a/logrotate.h b/logrotate.h
---- a/logrotate.h      2016-01-20 10:47:36.000000000 +0100
-+++ b/logrotate.h      2016-01-25 19:59:39.760044690 +0100
-@@ -80,8 +80,5 @@
- extern int debug;
- 
- int readAllConfigPaths(const char **paths);
--#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
--int asprintf(char **string_ptr, const char *format, ...);
--#endif
- 
- #endif