Changeset 17879


Ignore:
Timestamp:
2009-10-05T15:28:31+02:00 (7 years ago)
Author:
nico
Message:

[packages] logrotate: update to v3.7.8

Location:
packages/utils/logrotate
Files:
3 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • packages/utils/logrotate/Makefile

    r15480 r17879  
    99 
    1010PKG_NAME:=logrotate 
    11 PKG_VERSION:=3.7.1 
     11PKG_VERSION:=3.7.8 
    1212PKG_RELEASE:=1 
    1313 
     
    1818        http://ftp.fr.debian.org/debian/pool/main/l/logrotate \ 
    1919        http://ftp.us.debian.org/debian/pool/main/l/logrotate 
    20 PKG_MD5SUM:=552639142e163745f6bcd4f1f3816d8a 
     20PKG_MD5SUM:=b3589bea6d8d5afc8a84134fddaae973 
    2121 
    2222include $(INCLUDE_DIR)/package.mk 
     
    5454define Package/logrotate/install         
    5555        $(INSTALL_DIR) $(1)/usr/sbin 
    56         $(CP) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/ 
     56        $(INSTALL_BIN) ${PKG_BUILD_DIR}/logrotate $(1)/usr/sbin/ 
    5757        $(INSTALL_DIR) $(1)/etc 
    58         $(CP) ./files/logrotate.conf $(1)/etc/ 
     58        $(INSTALL_DATA) ./files/logrotate.conf $(1)/etc/ 
    5959        $(INSTALL_DIR) $(1)/etc/logrotate.d 
    6060endef 
  • packages/utils/logrotate/patches/002-datehack.patch

    r6526 r17879  
    1 diff -u -ruN logrotate-3.7.1.orig/logrotate.c logrotate-3.7.1/logrotate.c 
    2 --- logrotate-3.7.1.orig/logrotate.c    2004-10-19 17:41:24.000000000 -0400 
    3 +++ logrotate-3.7.1/logrotate.c 2005-05-24 12:12:26.000000000 -0400 
    4 @@ -1002,7 +1002,7 @@ 
     1--- a/logrotate.c 
     2+++ b/logrotate.c 
     3@@ -1505,7 +1505,7 @@ static int readState(char *stateFilename 
    54        } 
    6          
     5  
    76        /* Hack to hide earlier bug */ 
    87-       if ((year != 1900) && (year < 1996 || year > 2100)) { 
    98+       if ((year != 1900) && (year < 1970 || year > 2100)) { 
    10             message(MESS_ERROR, "bad year %d for file %s in state file %s\n", 
    11                     year, argv[0], stateFilename); 
    12             fclose(f); 
     9            message(MESS_ERROR, 
     10                    "bad year %d for file %s in state file %s\n", year, 
     11                    argv[0], stateFilename); 
  • packages/utils/logrotate/patches/003-ignore_hidden.patch

    r6526 r17879  
    1 --- logrotate-3.7/config.c.orig 2005-04-26 22:57:53.000000000 -0400 
    2 +++ logrotate-3.7/config.c      2005-04-26 22:59:36.000000000 -0400 
    3 @@ -142,6 +142,11 @@ 
    4         (!fname[1] || (fname[1] == '.' && !fname[2]))) 
    5         return 0; 
     1--- a/config.c 
     2+++ b/config.c 
     3@@ -160,8 +160,9 @@ static int checkFile(const char *fname) 
     4        int i; 
     5        char pattern[PATH_MAX]; 
    66  
    7 +    /* Don't include 'hidden' files either; this breaks Gentoo  
    8 +       portage config file management http://bugs.gentoo.org/87683 */ 
    9 +    if (fname[0] == '.') 
    10 +       return 0; 
    11 + 
    12      /* Check if fname is ending in a taboo-extension; if so, return 
    13         false */ 
    14      for (i = 0; i < tabooCount; i++) { 
     7-       /* Check if fname is '.' or '..'; if so, return false */ 
     8-       if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2]))) 
     9+       /* Don't include 'hidden' files either; this breaks Gentoo  
     10+          portage config file management http://bugs.gentoo.org/87683 */ 
     11+       if (fname[0] == '.') 
     12                return 0; 
     13  
     14        /* Check if fname is ending in a taboo-extension; if so, return false */ 
  • packages/utils/logrotate/patches/006-weekly.patch

    r6526 r17879  
    1 --- logrotate-3.7.1-old/logrotate.c     2004-10-19 23:41:24.000000000 +0200 
    2 +++ logrotate-3.7.1-new/logrotate.c     2005-10-02 17:29:22.380767321 +0200 
    3 @@ -424,12 +424,15 @@ int findNeedRotating(logInfo * log, int  
    4          switch (log->criterium) { 
    5            case ROT_WEEKLY: 
    6              /* rotate if: 
    7 -                  1) the current weekday is before the weekday of the 
    8 -                     last rotation 
    9 +                  1) the day of the week is the same as the day of the week of 
    10 +                     the previous rotation but not the same day of the year 
    11 +                     this will rotate it on the same day every week, but not 
    12 +                     twice a day. 
    13                    2) more then a week has passed since the last 
    14                       rotation */ 
    15 -            state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) || 
    16 -                              ((mktime(&now) - mktime(&state->lastRotated)) > 
    17 +            state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday && 
    18 +                               now.tm_yday != state->lastRotated.tm_yday) || 
    19 +                               ((mktime(&now) - mktime(&state->lastRotated)) > 
    20                                 (7 * 24 * 3600))); 
    21              break; 
    22            case ROT_MONTHLY: 
     1--- a/logrotate.c 
     2+++ b/logrotate.c 
     3@@ -567,9 +567,14 @@ int findNeedRotating(struct logInfo *log 
     4            /* rotate if: 
     5               1) the current weekday is before the weekday of the 
     6               last rotation 
     7+              1) the day of the week is the same as the day of the week of 
     8+              the previous rotation but not the same day of the year 
     9+              this will rotate it on the same day every week, but not 
     10+              twice a day. 
     11               2) more then a week has passed since the last 
     12               rotation */ 
     13-           state->doRotate = ((now.tm_wday < state->lastRotated.tm_wday) 
     14+           state->doRotate = ((now.tm_wday == state->lastRotated.tm_wday 
     15+                                    && now.tm_yday != state->lastRotated.tm_yday) 
     16                               || 
     17                               ((mktime(&now) - 
     18                                 mktime(&state->lastRotated)) > 
Note: See TracChangeset for help on using the changeset viewer.