[csw-devel] SF.net SVN: gar:[15181] csw/mgar/pkg

igalic at users.sourceforge.net igalic at users.sourceforge.net
Fri Jul 22 01:48:38 CEST 2011


Revision: 15181
          http://gar.svn.sourceforge.net/gar/?rev=15181&view=rev
Author:   igalic
Date:     2011-07-21 23:48:37 +0000 (Thu, 21 Jul 2011)

Log Message:
-----------
Add logrotate base. Warning: This Makefile is as of yet untestet.

Modified Paths:
--------------
    csw/mgar/pkg/logrotate/trunk/Makefile
    csw/mgar/pkg/logrotate/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/logrotate/
    csw/mgar/pkg/logrotate/trunk/files/001-makefu.patch
    csw/mgar/pkg/logrotate/trunk/files/002-strndup.patch
    csw/mgar/pkg/logrotate/trunk/files/003-test.patch
    csw/mgar/pkg/logrotate/trunk/files/004-alloca.patch
    csw/mgar/pkg/logrotate/trunk/files/005-gzippath.patch
    csw/mgar/pkg/logrotate/trunk/files/006-mbrtowc_empty.patch
    csw/mgar/pkg/logrotate/trunk/files/007-warn-unreached.patch

Modified: csw/mgar/pkg/logrotate/trunk/Makefile
===================================================================
--- csw/mgar/pkg/template/trunk/Makefile	2011-07-21 22:40:34 UTC (rev 15180)
+++ csw/mgar/pkg/logrotate/trunk/Makefile	2011-07-21 23:48:37 UTC (rev 15181)
@@ -2,187 +2,64 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-## This file contains comments to guide you through various GAR settings.
-## Please remove unnecessary comments before committing your code to the code
-## repository. The comments to remove are marked with double hashes.
-## If you want to remove them all in-place, use:
-## gsed -i -e '/^##/d' Makefile
-##
-## For more information about GAR variables, please see:
-## https://sourceforge.net/apps/trac/gar/wiki/GAR%20Variable%20Reference
-##
-NAME = mypkg
-VERSION = 1.0
-##
-## The category that your software fits in. This is not a descriptive field, but
-## influences the build process. Depending on the CATEGORIES setting, different
-## Makefiles are included from gar/categories/ in your trunk directory, which
-## adjust the build settings for the respective category.
-##
-## Possible settings are:
-## apps, cpan, devel, gnome, java, kde, lang, lib, meta, net, python, server,
-## utils, x11, xfce, xorg, xtra
-CATEGORIES = lib
-##
-## A one-line description of the package, which will appear in the pkginfo.
-DESCRIPTION = <please fill in>
-##
-## A longer description of the package. This is only for descriptive purposes
-## inside the Makefile and is not used elsewhere.
+NAME = logrotate
+VERSION = 3.8.0
+CATEGORIES = apps
+
+DESCRIPTION = rotates, compresses, and mails system logs
+
 define BLURB
-  <please fill in>
+   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. 
 endef
-##
-## Upstream URL that should show up in the VENDOR field as well as on
-## http://opencsw.org/packages/<packagename>.
-SPKG_SOURCEURL =
-##
-## Whitespace-separated list of URLs to download the source package from.
-## There are presets: $(SF_MIRRORS), $(GNU_MIRRORS) and $(GOOGLE_MIRROR),
-## $(PYPI_MIRROR)
-MASTER_SITES =
-##
-## SF_PROJ is required if you set $(MASTER_SITES) to $(SF_MIRRORS) and the
-## Sourceforge project name differs from $(NAME). Specifies the Sourceforge
-## project name of the software you wish to download.
-## SF_PROJ =
-##
-## A list of space separated patch filenames from files/ that are to be applied
-## to the extracted software before the ./configure stage. Patches need to be
-## included in the DISTFILES variable as well.
-## PATCHFILES =
-##
-## Whitespace-separated list of files which comprise this build. mGAR will look
-## for the files in the $(FILEDIR) (trunk/files) directory and on the
-## $(MASTER_SITES).
+
+SPKG_SOURCEURL = https://fedorahosted.org/logrotate/
+MASTER_SITES = https://fedorahosted.org/releases/l/o/logrotate/
+
+PATCHFILES  = 001-makefu.patch
+PATCHFILES += 002-strndup.patch
+PATCHFILES += 003-test.patch
+PATCHFILES += 004-alloca.patch
+PATCHFILES += 005-gzippath.patch
+PATCHFILES += 006-mbrtowc_empty.patch
+PATCHFILES += 007-warn-unreached.patch
+
 DISTFILES  = $(NAME)-$(VERSION).tar.gz
-##
-## We define upstream file regex so we can be notifed of new upstream software
-## release
-## UFILES_REGEX = $(NAME)-(\d+(?:\.\d+)*).tar.gz
-##
-## Catalog name is the name to be used with pkg{-get,util} -i <pkgname>.
-## It is different from the system package name, which by convention is CSWpkgname.
-## CATALOGNAME =
-##
-## Set to 1 to mark the package as architecture-independent.
-## ARCHALL = 0
-##
-## A list of files / patterns that should be excluded from the package. Amends
-## the default list of excluded filenames $(MERGE_EXCLUDE_DEFAULT), which
-## contains things like libtool .la files and files with a leading ~.
-## EXTRA_MERGE_EXCLUDE_FILES =
-##
-## A list of space separated package names that should be marked as
-## incompatible with the current package. This will go into the depend file.
-## When a user has one of the incompatible packages installed and installs
-## your package, he will be prompted that the incompatible package must be
-## removed. He will however not be prevented to install your package without
-## removing the conflicting package first.
-## INCOMPATIBLE_PKGS =
-##
-##  The name of the license file that should be included in your package. Defaults
-##  to COPYING. See http://sourceforge.net/apps/trac/gar/wiki/CopyRight for details
-##  on including and displaying licenses.
-## LICENSE =
-##
-## A list of space separated package names that should be produced from your
-## Makefile. This is used when a software has different components that can be
-## packaged and used individually (think runtime libraries, client tools, server
-## files, development headers). You don't need to set this when you just want to
-## produce one package.
-##
-## When you set this variable to include more than one package, you also need to
-## set PKGFILES_CSWpkgname for each package (except for the first one in your
-## $(PACKAGES) list) to define which files go into each package. The first
-## package from $(PACKAGES) one will hold all files that are not matched by
-## PKGFILES_ for other packages.
-## PACKAGES =
-##
-## If specified, GAR feeds the almost-final package prototype file to
-## $(PROTOTYPE_FILTER) and reads the final package prototype file from it.
-## $(PROTOTYPE_FILTER) is usually a sed/awk/perl one-liner, which was mostly used
-## to prepare the prototype file for use with cswclassutils (see
-## $(SPKG_CLASSES)). Now that there are convenience variables for cswclassutils,
-## you will rarely have to use this. A still valid use case would be to change
-## the file permissions of a file to be set-UID.
-## See http://wiki.opencsw.org/cswclassutils-package for common usage information
-## PROTOTYPE_FILTER =
-##
-## cswclassutils settings
-##
-## A list of action classes. Possible values are:
-## none cswpreserveconf cswcpsampleconf cswpycompile cswusergroup cswinitsmf
-##	cswinetd cswetcservices
-## The class 'cswinitsmf' must be the last class listed. When you use cswclassutils,
-## you need to add CSWcswclassutils to RUNTIME_DEP_PKGS.
-## SPKG_CLASSES = none
-## Simplified settings for classes:
-## PRESERVECONF =
-## SAMPLECONF =
-## INITSMF =
-## USERGROUP =
-## ETCSERVICES = <file containing an entry for /etc/services>
-## INETDCONF = <file containing an inetd.conf formatted entry>
-## A list of runtime package dependencies in the form of CSWfoo.
-## RUNTIME_DEP_PKGS =
-##
-## A list of packages necessary to build this package
-## BUILD_DEP_PKGS = $(RUNTIME_DEP_PKGS)
-##
-## When using non-empty $(PACKAGES):
-## RUNTIME_DEP_PKGS_CSWpkgname =
-## SPKG_DESC_CSWpkgname =
-## PKGFILES_CSWpkgname =
-## CATALOGNAME_CSWpkgname =
-##
-## A list of space separated directories where objects should be stripped in
-## addition to the bin/ and sbin/ directories.
-## STRIP_DIRS =
-##
-## Define a custom target for the configure phase. When you set this, the target
-## that will be used instead of configure: target, is named
-## configure-$(CONFIGURE_SCRIPTS) and you will need to define it in your Makefile
-## after including gar/gar.include.mk. If you want to skip the configure phase
-## completely (for example when your software doesn't need to be compiled) assign
-## this variable an empty value. The procedure works for configure, build,
-## install and test steps.
-## CONFIGURE_SCRIPTS =
-## BUILD_SCRIPTS =
-## INSTALL_SCRIPTS =
-## TEST_SCRIPTS =
-##
-## Compilation settings
-##
-## The build directory.
-## WORKSRC = $(WORKDIR)/$(NAME)-$(VERSION)
-##
-## BUILD_ARGS is passed as an argument to gmake during the build phase. Use this
-## for example, if you need to override Makefile variables.
-## BUILD_ARGS =
-##
-## Arguments passed to the ./configure script.
-CONFIGURE_ARGS = $(DIRPATHS)
-##
-## BUILD64 =
-## CONFIGURE_ENV =
-## EXTRA_CFLAGS =
-## EXTRA_LDFLAGS =
-## EXTRA_INC =
-## EXTRA_LIB =
-## GARFLAVOR =
-## INSTALL_ARGS =
-## OPT_FLAGS_SOS = -xO3
-## OPT_FLAGS_GCC = -O2 -pipe
-##
-## The compiler to use. This can be also: SOS11, GCC3, GCC4.
-## Specifying GNU will default to GCC4, specifying SUN will default to SOS12
-## GARCOMPILER = SOS12
-##
-# Remove the following rules and uncomment the
-# include before building.
-all: .DEFAULT
-.DEFAULT:
-	@true
+DISTFILES += 001-makefu.patch
+DISTFILES += 002-strndup.patch
+DISTFILES += 003-test.patch
+DISTFILES += 005-gzippath.patch
+DISTFILES += 006-mbrtowc_empty.patch
+DISTFILES += 007-warn-unreached.patch
 
-#include gar/category.mk
+RUNTIME_DEP_PKGS = CSWlibpopt
+BUILD_DEP_PKGS   = $(RUNTIME_DEP_PKGS)
+
+CONFIGURE_SCRIPTS =
+TEST_TARGET = test
+
+# "optimize"
+NOISALIST = 1
+
+# Don't ask, it doesn't work otherwise.
+export EXTRA_CFLAGS = -I$(includedir)
+export EXTRA_LDFLAGS = -L$(libdir)
+export PREFIX = $(DESTDIR)
+export BASEDIR = $(prefix)
+export MANDIR = $(mandir)
+
+include gar/category.mk
+
+# This is a hack, as I have no idea what's going wrong.
+pre-test-modulated:
+        @( cd $(WORKSRC) ; \
+                rm -f .depend )
+
+pre-install-modulated:
+        @( cd $(WORKSRC) ; \
+                rm -f .depend )
+
+pre-build-modulated:
+        @( cd $(WORKSRC) ; \
+                rm -f .depend )

Modified: csw/mgar/pkg/logrotate/trunk/checksums
===================================================================
--- csw/mgar/pkg/template/trunk/checksums	2011-07-21 22:40:34 UTC (rev 15180)
+++ csw/mgar/pkg/logrotate/trunk/checksums	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,8 @@
+590f77c13077a4c384dbec7ca9c5f242 logrotate-3.8.0.tar.gz
+59ed81c960568f086b9e59388807f6a3  001-makefu.patch
+5603f2be02e6fd4bbd8d57a4f3e9dcd4  002-strndup.patch
+02f36862d4e190a7eb920bd816ca4927  003-test.patch
+e98fb00c0ea9c7c0102e2029292308dd  004-alloca.patch
+d6232a06412a2302a582abdc51607518  005-gzippath.patch
+27ac9259ade93a47f71779d396c6a096  006-mbrtowc_empty.patch
+384b011461b8aef679a884051dc25015  007-warn-unreached.patch

Added: csw/mgar/pkg/logrotate/trunk/files/001-makefu.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/001-makefu.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/001-makefu.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,40 @@
+--- logrotate-3.8.0/Makefile	2011-06-21 08:12:03.000000000 +0000
++++ logrotate-3.8.0-solfix/Makefile	2011-06-27 01:08:10.876632251 +0000
+@@ -41,16 +41,14 @@
+ 
+ # Solaris using gcc
+ ifeq ($(OS_NAME),SunOS)
+-    CFLAGS = -I/opt/baw/include -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
++    CFLAGS = -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" $(RPM_OPT_FLAGS) $(LFS)
+     CC ?= gcc
+     CPP = $(CC) -E -M
+     INSTALL = /usr/ucb/install
+     ifeq ($(CC),cc)
+         CPP = cc -xM
+     endif
+-	ifeq ($(BASEDIR),)
+-	BASEDIR = /usr/local
+-    endif
++    BASEDIR ?= /usr/local
+ endif
+ 
+ # Red Hat Linux
+@@ -83,7 +81,7 @@
+ endif
+ 
+ BINDIR = $(BASEDIR)/sbin
+-MANDIR = $(BASEDIR)/man
++MANDIR ?= $(BASEDIR)/man
+ 
+ #--------------------------------------------------------------------------
+ 
+@@ -95,6 +93,9 @@
+ LDFLAGS = -g
+ endif
+ 
++LDFLAGS += $(EXTRA_LDFLAGS) $(EXTRA_LIBS)
++CFLAGS  += $(EXTRA_CPPFLAGS) $(EXTRA_CFLAGS) 
++
+ ifeq (.depend,$(wildcard .depend))
+ TARGET=$(PROG)
+ else

Added: csw/mgar/pkg/logrotate/trunk/files/002-strndup.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/002-strndup.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/002-strndup.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,32 @@
+--- logrotate-3.8.0/config.c	Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/config.c	Sun Jun 26 22:54:39 2011
+@@ -74,6 +74,29 @@
+ 
+ #endif
+ 
++#if !defined(strndup)
++char *strndup(const char *s, size_t n)
++{
++	size_t nAvail;
++	char *p;
++	
++	if(!s)
++		return NULL;
++
++	/* min() */
++	nAvail = strlen(s) + 1;
++	if ( (n + 1) < nAvail)
++		nAvail = n + 1;
++
++	p = malloc(nAvail);
++	if (!p)
++		return NULL;
++	memcpy(p, s, nAvail);
++	p[nAvail - 1] = 0;
++	return p;
++}
++#endif
++
+ enum {
+ 	STATE_DEFAULT = 2,
+ 	STATE_SKIP_LINE = 4,

Added: csw/mgar/pkg/logrotate/trunk/files/003-test.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/003-test.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/003-test.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,117 @@
+diff -ur logrotate-3.8.0/test/test logrotate-3.8.0-solfix/test/test
+--- logrotate-3.8.0/test/test   Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test    Sun Jun 26 23:08:30 2011
+@@ -17,7 +17,7 @@
+     input=test-config.$1.in
+     output=test-config.$1
+     sed "s,&DIR&,$PWD,g" < $input > $output
+-    config_crc=$(md5sum $output)
++    config_crc=$(gmd5sum $output)
+ }
+ 
+ createlog() {
+@@ -118,7 +118,7 @@
+            echo expected: \'$expected\'
+            exit 2
+        fi
+-       echo "$config_crc" | md5sum -c - 2>&1 > /dev/null
++       echo "$config_crc" | gmd5sum -c - 2>&1 > /dev/null
+        if [ $? != 0 ]; then
+                echo "config file $output has been altered: MD5 sum mismatch"
+                exit 3
+diff -ur logrotate-3.8.0/test/test-config.11.in logrotate-3.8.0-solfix/test/test-config.11.in
+--- logrotate-3.8.0/test/test-config.11.in      Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.11.in       Sun Jun 26 23:02:28 2011
+@@ -11,7 +11,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.3.in logrotate-3.8.0-solfix/test/test-config.3.in
+--- logrotate-3.8.0/test/test-config.3.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.3.in        Sun Jun 26 23:03:29 2011
+@@ -8,7 +8,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.4.in logrotate-3.8.0-solfix/test/test-config.4.in
+--- logrotate-3.8.0/test/test-config.4.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.4.in        Sun Jun 26 23:03:39 2011
+@@ -9,7 +9,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.5.in logrotate-3.8.0-solfix/test/test-config.5.in
+--- logrotate-3.8.0/test/test-config.5.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.5.in        Sun Jun 26 23:03:51 2011
+@@ -9,7 +9,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.6.in logrotate-3.8.0-solfix/test/test-config.6.in
+--- logrotate-3.8.0/test/test-config.6.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.6.in        Sun Jun 26 23:04:09 2011
+@@ -10,7 +10,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.7.in logrotate-3.8.0-solfix/test/test-config.7.in
+--- logrotate-3.8.0/test/test-config.7.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.7.in        Sun Jun 26 23:04:23 2011
+@@ -10,7 +10,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.8.in logrotate-3.8.0-solfix/test/test-config.8.in
+--- logrotate-3.8.0/test/test-config.8.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.8.in        Sun Jun 26 23:04:36 2011
+@@ -11,7 +11,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }
+diff -ur logrotate-3.8.0/test/test-config.9.in logrotate-3.8.0-solfix/test/test-config.9.in
+--- logrotate-3.8.0/test/test-config.9.in       Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/test/test-config.9.in        Sun Jun 26 23:04:47 2011
+@@ -11,7 +11,7 @@
+ 
+     postrotate
+        touch scriptout
+-       echo $(cat scriptout) foo > foo
++       echo `cat scriptout` foo > foo
+        mv foo scriptout
+     endscript
+ }

Added: csw/mgar/pkg/logrotate/trunk/files/004-alloca.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/004-alloca.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/004-alloca.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,18 @@
+--- logrotate-3.8.0/config.c	Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/config.c	Sun Jun 26 23:54:28 2011
+@@ -1,5 +1,5 @@
+ #include <sys/queue.h>
+-#ifdef _ALLOCA_H
++#ifndef _ALLOCA_H
+ #include <alloca.h>
+ #else
+ #include <limits.h>
+--- logrotate-3.8.0/logrotate.c	Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/logrotate.c	Sun Jun 26 23:35:19 2011
+@@ -1,5 +1,5 @@
+ #include <sys/queue.h>
+-#ifdef _ALLOCA_H
++#ifndef _ALLOCA_H
+ #include <alloca.h>
+ #else
+ #include <limits.h>

Added: csw/mgar/pkg/logrotate/trunk/files/005-gzippath.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/005-gzippath.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/005-gzippath.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,16 @@
+diff -ur logrotate-3.8.0/config.h logrotate-3.8.0-sol10fix/config.h
+--- logrotate-3.8.0/config.h	2011-06-21 10:12:02.000000000 +0200
++++ logrotate-3.8.0-sol10fix/config.h	2011-07-22 01:37:57.603640585 +0200
+@@ -13,9 +13,9 @@
+ 
+ #ifdef SunOS
+ #define DEFAULT_MAIL_COMMAND "/usr/bin/mailx"
+-#define COMPRESS_COMMAND "/usr/local/bin/gzip"
+-#define UNCOMPRESS_COMMAND "/usr/local/bin/gunzip"
+-#define STATEFILE "/var/log/logrotate.status"
++#define COMPRESS_COMMAND "/opt/csw/bin/gzip"
++#define UNCOMPRESS_COMMAND "/opt/csw/bin/gunzip"
++#define STATEFILE "/var/opt/csw/log/logrotate.status"
+ #endif
+ 
+ #ifdef __NetBSD__

Added: csw/mgar/pkg/logrotate/trunk/files/006-mbrtowc_empty.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/006-mbrtowc_empty.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/006-mbrtowc_empty.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,11 @@
+--- logrotate-3.8.0/config.c	Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/config.c	Mon Jun 27 20:57:53 2011
+@@ -166,7 +166,7 @@
+ 
+ 	chptr = start;
+ 
+-	while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) {
++        while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 && strlen(chptr) != 0) {
+ 		if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || iswblank(pwc) ) {
+ 		    message(MESS_ERROR, "%s:%d bad %s path %s\n",
+ 			    configFile, lineNum, key, start);

Added: csw/mgar/pkg/logrotate/trunk/files/007-warn-unreached.patch
===================================================================
--- csw/mgar/pkg/logrotate/trunk/files/007-warn-unreached.patch	                        (rev 0)
+++ csw/mgar/pkg/logrotate/trunk/files/007-warn-unreached.patch	2011-07-21 23:48:37 UTC (rev 15181)
@@ -0,0 +1,35 @@
+--- logrotate-3.8.0/config.c    Tue Jun 21 08:12:02 2011
++++ logrotate-3.8.0-solfix/config.c     Mon Jun 27 20:29:25 2011
+@@ -1133,5 +1133,5 @@
+ 						}
+ 					}
+-					else continue;
++
+ #if 0
+ 					if (stat(newlog->oldDir, &sb)) {
+@@ -1178,5 +1178,4 @@
+ 						}
+ 					}
+-					else continue;
+ 
+ 					if (access(newlog->compress_prog, X_OK)) {
+@@ -1209,5 +1208,4 @@
+ 						}
+ 					}
+-					else continue;
+ 
+ 					if (access(newlog->uncompress_prog, X_OK)) {
+@@ -1245,5 +1243,5 @@
+ 							goto error;
+ 						}
+-					} else continue;
++					}
+ 
+ 					if (poptParseArgvString(options,
+@@ -1278,5 +1276,5 @@
+ 							goto error;
+ 						}
+-					} else continue;
++					}
+ 
+ 					message(MESS_DEBUG, "compress_ext is now %s\n",


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list