Commit 2c695d00 authored by Jondy Zhao's avatar Jondy Zhao

Apply slapos.recipe.cmmi in the commponent logrotate.

parent a29c16dc
...@@ -3,21 +3,20 @@ extends = ...@@ -3,21 +3,20 @@ extends =
../popt/buildout.cfg ../popt/buildout.cfg
parts = logrotate parts = logrotate
[logrotate-3.7.9-O_CLOEXEC.optional.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum = 6beac248c978b767d4bccc1b7eebe6bd
filename = ${:_buildout_section_name_}
[logrotate] [logrotate]
recipe = hexagonit.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.7.9.tar.gz url = https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.7.9.tar.gz
md5sum = eeba9dbca62a9210236f4b83195e4ea5 md5sum = eeba9dbca62a9210236f4b83195e4ea5
patch-options = -p1 patch-options = -p1
patches = patches=
${logrotate-3.7.9-O_CLOEXEC.optional.patch:location}/${logrotate-3.7.9-O_CLOEXEC.optional.patch:filename} ${:_profile_base_location_}/logrotate-3.7.9-O_CLOEXEC.optional.patch
configure-command = true configure-command = true
make-options = PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
[x86-linux-logrotate]
environment = environment =
POPT_DIR=${popt:location}/include -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib POPT_DIR=${popt:location}/include -L${popt:location}/lib -Wl,-rpath=${popt:location}/lib
[x86-cygwin-logrotate]
patches =
${logrotate:patches}
${:_profile_base_location_}/logrotate-3.7.9-cygwin.patch
diff --git a/config.c b/config.c
index e6d5d1d..a526d64 100644
--- a/config.c
+++ b/config.c
@@ -547,7 +547,7 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
length = sb.st_size;
buf = mmap(NULL, (size_t)(length + 2), PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_POPULATE, fd, (off_t) 0);
+ MAP_PRIVATE, fd, (off_t) 0);
if (buf == MAP_FAILED) {
message(MESS_ERROR, "Error mapping config file %s: %s\n",
configFile, strerror(errno));
@@ -559,7 +559,7 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
buf[length + 1] = '\0';
buf[length] = '\n';
madvise(buf, (size_t)(length + 2),
- MADV_SEQUENTIAL | MADV_WILLNEED | MADV_DONTFORK);
+ MADV_SEQUENTIAL | MADV_WILLNEED);
message(MESS_DEBUG, "reading config file %s\n", configFile);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment