* [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1
@ 2012-03-15 13:34 Robert Yang
2012-03-15 13:34 ` [PATCH 1/3] upgrade logrotate: split the old patch into 3 Robert Yang
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Robert Yang @ 2012-03-15 13:34 UTC (permalink / raw)
To: openembedded-core
Test info:
* Has been tested on qemux86, qemuppc, qemuarm.
// Robert
The following changes since commit 1e6dce3228a483b2367286e49c4aa8a71733dcbb:
ncurses: fix install error (2012-03-15 13:14:10 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/logrotate
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/logrotate
Robert Yang (3):
upgrade logrotate: split the old patch into 3
upgrade logrotate: update the recipe
upgrade logrotate: update the distro_tracking_fields.inc
.../conf/distro/include/distro_tracking_fields.inc | 6 +-
.../act-as-mv-when-rotate.patch} | 73 ++++----------------
.../disable-check-different-filesystems.patch | 34 +++++++++
.../logrotate-3.8.1/update-the-manual.patch | 42 +++++++++++
.../{logrotate_3.7.9.bb => logrotate_3.8.1.bb} | 11 ++-
5 files changed, 99 insertions(+), 67 deletions(-)
rename meta/recipes-extended/logrotate/{logrotate-3.7.9/allow-across-different-filesystems.patch => logrotate-3.8.1/act-as-mv-when-rotate.patch} (54%)
create mode 100644 meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
create mode 100644 meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
rename meta/recipes-extended/logrotate/{logrotate_3.7.9.bb => logrotate_3.8.1.bb} (72%)
--
1.7.4.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] upgrade logrotate: split the old patch into 3
2012-03-15 13:34 [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Robert Yang
@ 2012-03-15 13:34 ` Robert Yang
2012-03-15 13:34 ` [PATCH 2/3] upgrade logrotate: update the recipe Robert Yang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2012-03-15 13:34 UTC (permalink / raw)
To: openembedded-core
Split the old patch into 3 during upgrading, this makes it easier for
the future's upgrade.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
.../act-as-mv-when-rotate.patch} | 73 ++++----------------
.../disable-check-different-filesystems.patch | 34 +++++++++
.../logrotate-3.8.1/update-the-manual.patch | 42 +++++++++++
3 files changed, 89 insertions(+), 60 deletions(-)
rename meta/recipes-extended/logrotate/{logrotate-3.7.9/allow-across-different-filesystems.patch => logrotate-3.8.1/act-as-mv-when-rotate.patch} (54%)
create mode 100644 meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
create mode 100644 meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
diff --git a/meta/recipes-extended/logrotate/logrotate-3.7.9/allow-across-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
similarity index 54%
rename from meta/recipes-extended/logrotate/logrotate-3.7.9/allow-across-different-filesystems.patch
rename to meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
index 41df23f..c9fb1d2 100644
--- a/meta/recipes-extended/logrotate/logrotate-3.7.9/allow-across-different-filesystems.patch
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/act-as-mv-when-rotate.patch
@@ -1,67 +1,20 @@
-Allow rotate log across different filesystems
+Act as the "mv" command when rotate log
-* Remove the check for different filesystems
-* Act as the "mv" command when rotate log
-* Update the mannual
-* Fix a bug in the mannual(\f should be \fR)
+Act as the "mv" command when rotate log, first rename, if failed, then
+read and write.
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
- config.c | 8 --------
- logrotate.8 | 9 ++++-----
logrotate.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
- 3 files changed, 57 insertions(+), 19 deletions(-)
+ 1 files changed, 53 insertions(+), 6 deletions(-)
-diff --git a/config.c b/config.c
---- a/config.c
-+++ b/config.c
-@@ -1482,14 +1482,6 @@ duperror:
- dirName, strerror(errno));
- goto error;
- }
--
-- if (sb.st_dev != sb2.st_dev) {
-- message(MESS_ERROR,
-- "%s:%d olddir %s and log file %s "
-- "are on different devices\n", configFile,
-- lineNum, newlog->oldDir, newlog->files[i]);
-- goto error;
-- }
- }
- }
-
-diff --git a/logrotate.8 b/logrotate.8
---- a/logrotate.8
-+++ b/logrotate.8
-@@ -354,10 +354,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
- .TP
- \fBolddir \fIdirectory\fR
- Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
--must be on the same physical device as the log file being rotated,
--and is assumed to be relative to the directory holding the log file
--unless an absolute path name is specified. When this option is used all
--old versions of the log end up in \fIdirectory\fR. This option may be
-+is assumed to be relative to the directory holding the log file unless
-+an absolute path name is specified. When this option is used all old
-+versions of the log end up in \fIdirectory\fR. This option may be
- overridden by the \fBnoolddir\fR option.
-
- .TP
-@@ -415,7 +414,7 @@ Log files are rotated when they grow bigger than \fIsize\fR bytes. If
- \fIsize\fR is followed by \fIk\fR, the size is assumed to be in kilobytes.
- If the \fIM\fR is used, the size is in megabytes, and if \fIG\fR is used, the
- size is in gigabytes. So \fBsize 100\fR, \fIsize 100k\fR, \fIsize 100M\fR and
--\fIsize 100G\f are all valid.
-+\fIsize 100G\fR are all valid.
-
- .TP
- \fBsharedscripts\fR
diff --git a/logrotate.c b/logrotate.c
+index 537e8d6..b04482f 100644
--- a/logrotate.c
+++ b/logrotate.c
-@@ -625,6 +625,53 @@ int findNeedRotating(struct logInfo *log, int logNum)
+@@ -808,6 +808,53 @@ int findNeedRotating(struct logInfo *log, int logNum)
return 0;
}
@@ -115,7 +68,7 @@ diff --git a/logrotate.c b/logrotate.c
int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
struct logNames *rotNames)
{
-@@ -958,15 +1005,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+@@ -1148,15 +1195,15 @@ int prerotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
rotNames->baseName, i, fileext, compext);
message(MESS_DEBUG,
@@ -134,18 +87,18 @@ diff --git a/logrotate.c b/logrotate.c
oldName, newName, strerror(errno));
hasErrors = 1;
}
-@@ -1082,11 +1129,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
- log->files[logNum]);
+@@ -1286,11 +1333,11 @@ int rotateSingleLog(struct logInfo *log, int logNum, struct logState *state,
+ }
}
- #endif
+ #endif /* WITH_ACL */
- message(MESS_DEBUG, "renaming %s to %s\n", log->files[logNum],
-+ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
++ message(MESS_DEBUG, "moving %s to %s\n", log->files[logNum],
rotNames->finalName);
if (!debug && !hasErrors &&
- rename(log->files[logNum], rotNames->finalName)) {
- message(MESS_ERROR, "failed to rename %s to %s: %s\n",
-+ mvFile(log->files[logNum], rotNames->finalName, log)) {
-+ message(MESS_ERROR, "failed to move %s to %s: %s\n",
++ mvFile(log->files[logNum], rotNames->finalName, log)) {
++ message(MESS_ERROR, "failed to move %s to %s: %s\n",
log->files[logNum], rotNames->finalName,
strerror(errno));
hasErrors = 1;
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
new file mode 100644
index 0000000..5cb6038
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
@@ -0,0 +1,34 @@
+Disable the check for different filesystems
+
+The logrotate supports rotate log across different filesystems now, so
+disable the check for different filesystems.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ config.c | 8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/config.c b/config.c
+index a85d1df..24575b3 100644
+--- a/config.c
++++ b/config.c
+@@ -1453,14 +1453,6 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+ dirName, strerror(errno));
+ goto error;
+ }
+-
+- if (sb.st_dev != sb2.st_dev) {
+- message(MESS_ERROR,
+- "%s:%d olddir %s and log file %s "
+- "are on different devices\n", configFile,
+- lineNum, newlog->oldDir, newlog->files[i]);
+- goto error;
+- }
+ }
+ }
+
+--
+1.7.4.1
+
diff --git a/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch b/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
new file mode 100644
index 0000000..5cab649
--- /dev/null
+++ b/meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
@@ -0,0 +1,42 @@
+Update the manual
+
+* Update the mannual
+* Fix a bug in the mannual(\f should be \fR)
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ logrotate.8 | 9 ++++-----
+ 1 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/logrotate.8 b/logrotate.8
+index 8b34167..5f15432 100644
+--- a/logrotate.8
++++ b/logrotate.8
+@@ -374,10 +374,9 @@ Do not rotate the log if it is empty (this overrides the \fBifempty\fR option).
+ .TP
+ \fBolddir \fIdirectory\fR
+ Logs are moved into \fIdirectory\fR for rotation. The \fIdirectory\fR
+-must be on the same physical device as the log file being rotated,
+-and is assumed to be relative to the directory holding the log file
+-unless an absolute path name is specified. When this option is used all
+-old versions of the log end up in \fIdirectory\fR. This option may be
++is assumed to be relative to the directory holding the log file unless
++an absolute path name is specified. When this option is used all old
++versions of the log end up in \fIdirectory\fR. This option may be
+ overridden by the \fBnoolddir\fR option.
+
+ .TP
+@@ -435,7 +434,7 @@ Log files are rotated only if they grow bigger then \fIsize\fR bytes. If
+ \fIsize\fR is followed by \fIk\fR, the size is assumed to be in kilobytes.
+ If the \fIM\fR is used, the size is in megabytes, and if \fIG\fR is used, the
+ size is in gigabytes. So \fBsize 100\fR, \fIsize 100k\fR, \fIsize 100M\fR and
+-\fIsize 100G\f are all valid.
++\fIsize 100G\fR are all valid.
+
+ .TP
+ \fBsharedscripts\fR
+--
+1.7.4.1
+
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] upgrade logrotate: update the recipe
2012-03-15 13:34 [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Robert Yang
2012-03-15 13:34 ` [PATCH 1/3] upgrade logrotate: split the old patch into 3 Robert Yang
@ 2012-03-15 13:34 ` Robert Yang
2012-03-15 13:34 ` [PATCH 3/3] upgrade logrotate: update the distro_tracking_fields.inc Robert Yang
2012-03-19 16:19 ` [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Saul Wold
3 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2012-03-15 13:34 UTC (permalink / raw)
To: openembedded-core
update the recipe:
ogrotate_3.7.9.bb -> logrotate_3.8.1.bb
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
.../{logrotate_3.7.9.bb => logrotate_3.8.1.bb} | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
rename meta/recipes-extended/logrotate/{logrotate_3.7.9.bb => logrotate_3.8.1.bb} (72%)
diff --git a/meta/recipes-extended/logrotate/logrotate_3.7.9.bb b/meta/recipes-extended/logrotate/logrotate_3.8.1.bb
similarity index 72%
rename from meta/recipes-extended/logrotate/logrotate_3.7.9.bb
rename to meta/recipes-extended/logrotate/logrotate_3.8.1.bb
index 40d1a38..5a8156b 100644
--- a/meta/recipes-extended/logrotate/logrotate_3.7.9.bb
+++ b/meta/recipes-extended/logrotate/logrotate_3.8.1.bb
@@ -2,17 +2,20 @@ DESCRIPTION = "Rotates, compresses, removes and mails system log files"
SECTION = "console/utils"
HOMEPAGE = "https://fedorahosted.org/releases/l/o/logrotate"
LICENSE = "GPLv2"
-PR = "r2"
+PR = "r0"
DEPENDS="coreutils popt"
LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
SRC_URI = "https://fedorahosted.org/releases/l/o/logrotate/logrotate-${PV}.tar.gz \
- file://allow-across-different-filesystems.patch"
+ file://act-as-mv-when-rotate.patch \
+ file://disable-check-different-filesystems.patch \
+ file://update-the-manual.patch \
+ "
-SRC_URI[md5sum] = "eeba9dbca62a9210236f4b83195e4ea5"
-SRC_URI[sha256sum] = "080caf904e70e04da16b8dfa95a5a787ec7d722ee1af18ccea437d3ffdd6fec0"
+SRC_URI[md5sum] = "bd2e20d8dc644291b08f9215397d28a5"
+SRC_URI[sha256sum] = "c12471e70ae8bc923bd5c4f25e8fd6483b68c6301f3cd79f7cfe37bc5b370169"
EXTRA_OEMAKE = "CC='${CC}'"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] upgrade logrotate: update the distro_tracking_fields.inc
2012-03-15 13:34 [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Robert Yang
2012-03-15 13:34 ` [PATCH 1/3] upgrade logrotate: split the old patch into 3 Robert Yang
2012-03-15 13:34 ` [PATCH 2/3] upgrade logrotate: update the recipe Robert Yang
@ 2012-03-15 13:34 ` Robert Yang
2012-03-19 16:19 ` [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Saul Wold
3 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2012-03-15 13:34 UTC (permalink / raw)
To: openembedded-core
update the distro_tracking_fields.inc.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
.../conf/distro/include/distro_tracking_fields.inc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/conf/distro/include/distro_tracking_fields.inc b/meta/conf/distro/include/distro_tracking_fields.inc
index 8ad924b..ae758fa 100644
--- a/meta/conf/distro/include/distro_tracking_fields.inc
+++ b/meta/conf/distro/include/distro_tracking_fields.inc
@@ -78,10 +78,10 @@ RECIPE_LAST_UPDATE_pn-linux-firmware = "Dec 30, 2011"
RECIPE_MANUAL_CHECK_DATE_pn-linux-firmware = "Dec 30, 2011"
RECIPE_MAINTAINER_pn-linux-firmware = "Dongxiao Xu <dongxiao.xu@intel.com>"
-RECIPE_STATUS_pn-logrotate = "red"
+RECIPE_STATUS_pn-logrotate = "green"
RECIPE_LATEST_VERSION_pn-logrotate = "check"
-RECIPE_LAST_UPDATE_pn-logrotate = "Sep 1, 2010"
-RECIPE_MAINTAINER_pn-logrotate = "Xiaofeng.Yan <xiaofeng@windriver.com>"
+RECIPE_LAST_UPDATE_pn-logrotate = "Mar 14, 2012"
+RECIPE_MAINTAINER_pn-logrotate = "Robert Yang <liezhi.yang@windriver.com>"
RECIPE_STATUS_pn-loudmouth = "red"
RECIPE_LATEST_VERSION_pn-loudmouth = "check"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1
2012-03-15 13:34 [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Robert Yang
` (2 preceding siblings ...)
2012-03-15 13:34 ` [PATCH 3/3] upgrade logrotate: update the distro_tracking_fields.inc Robert Yang
@ 2012-03-19 16:19 ` Saul Wold
3 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-03-19 16:19 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 03/15/2012 06:34 AM, Robert Yang wrote:
> Test info:
>
> * Has been tested on qemux86, qemuppc, qemuarm.
>
> // Robert
>
> The following changes since commit 1e6dce3228a483b2367286e49c4aa8a71733dcbb:
>
> ncurses: fix install error (2012-03-15 13:14:10 +0000)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib robert/logrotate
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/logrotate
>
> Robert Yang (3):
> upgrade logrotate: split the old patch into 3
> upgrade logrotate: update the recipe
> upgrade logrotate: update the distro_tracking_fields.inc
>
> .../conf/distro/include/distro_tracking_fields.inc | 6 +-
> .../act-as-mv-when-rotate.patch} | 73 ++++----------------
> .../disable-check-different-filesystems.patch | 34 +++++++++
> .../logrotate-3.8.1/update-the-manual.patch | 42 +++++++++++
> .../{logrotate_3.7.9.bb => logrotate_3.8.1.bb} | 11 ++-
> 5 files changed, 99 insertions(+), 67 deletions(-)
> rename meta/recipes-extended/logrotate/{logrotate-3.7.9/allow-across-different-filesystems.patch => logrotate-3.8.1/act-as-mv-when-rotate.patch} (54%)
> create mode 100644 meta/recipes-extended/logrotate/logrotate-3.8.1/disable-check-different-filesystems.patch
> create mode 100644 meta/recipes-extended/logrotate/logrotate-3.8.1/update-the-manual.patch
> rename meta/recipes-extended/logrotate/{logrotate_3.7.9.bb => logrotate_3.8.1.bb} (72%)
>
Merged into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-19 16:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 13:34 [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Robert Yang
2012-03-15 13:34 ` [PATCH 1/3] upgrade logrotate: split the old patch into 3 Robert Yang
2012-03-15 13:34 ` [PATCH 2/3] upgrade logrotate: update the recipe Robert Yang
2012-03-15 13:34 ` [PATCH 3/3] upgrade logrotate: update the distro_tracking_fields.inc Robert Yang
2012-03-19 16:19 ` [PATCH 0/3] logrotate: upgrade from 3.7.9 to 3.8.1 Saul Wold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.