~alpine/aports

4 2

[alpine-aports] [PATCH] main/busybox: fix timezone adjustment in syslogd

Details
Message ID
<20170721222342.22201-1-oleg.omelyusik@gmail.com>
Sender timestamp
1500675822
DKIM signature
missing
Download raw message
Patch: +49 -0
---
 ...gd-fix-timezone-adjustment-implementation.patch | 47 ++++++++++++++++++++++
 main/busybox/APKBUILD                              |  2 +
 2 files changed, 49 insertions(+)
 create mode 100644 main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch

diff --git a/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
new file mode 100644
index 0000000000..f276bc3e57
--- /dev/null
+++ b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
@@ -0,0 +1,47 @@
From b09a292755943b3881aa3525c906989929c19fc8 Mon Sep 17 00:00:00 2001
From: Oleg Omelyusik <oleg.omelyusik@gmail.com>
Date: Fri, 21 Jul 2017 16:29:55 +0300
Subject: [PATCH] syslogd: fix timezone adjustment implementation

strptime() does not set year value which is needed for mktime().
Also need to take into account year value when operating with timestamps
to prevent invalid convertions for leap years (e.g. Feb 28 23:00:00 UTC to GMT+2).
---
 sysklogd/syslogd.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 1c67d1379..5ad50acd0 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -820,7 +820,8 @@ static void timestamp_and_log(int pri, char *msg, int len)
 {
 	char *timestamp;
 	time_t now;
-	struct tm nowtm = { .tm_isdst = 0 };
+	struct tm msgtm = { .tm_isdst = 0 };
+	struct tm nowtm = { 0 };
 
 	/* Jan 18 00:11:22 msg... */
 	/* 01234567890123456 */
@@ -830,8 +831,15 @@ static void timestamp_and_log(int pri, char *msg, int len)
 		now = time(NULL);
 		timestamp = ctime(&now) + 4; /* skip day of week */
 	} else {
-		if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) {
-			now = mktime(&nowtm) - timezone;
+		if (G.adjustTimezone && strptime(msg, "%b %e %T", &msgtm)) {
+			/* set message year as current or previous year */
+			now = time(NULL);
+			gmtime_r(&now, &nowtm);
+			msgtm.tm_year = nowtm.tm_year;
+			if (nowtm.tm_mon < msgtm.tm_mon)
+				--msgtm.tm_year;
+			/* adjust message timestamp */
+			now = mktime(&msgtm) - timezone;
 			timestamp = ctime(&now) + 4; /* skip day of week */
 		} else {
 			now = 0;
-- 
2.13.0

diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 0010854105..e2d61f8799 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -29,6 +29,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
	0009-sysklogd-add-Z-option-to-adjust-message-timezones.patch
	0010-udhcpc-Don-t-background-if-n-is-given.patch
	0011-testsuite-fix-cpio-tests.patch
	0012-syslogd-fix-timezone-adjustment-implementation.patch

	top-buffer-overflow.patch

@@ -179,6 +180,7 @@ baac796f8aa96fbeab19f96eea7787ace5737b182f49e02f1b1e911d0a927ae14f3c334daad42418
d1c375184f806f7550bac5c82ab5471bdb8085d845172c973724b22af05ab3759b3ce982e088b4c45815ade56b9adfb7a677d0c180e077545ac7ec003c8aa7c4  0009-sysklogd-add-Z-option-to-adjust-message-timezones.patch
9b5143d0be615b1604d82007628d59a62721f1e61a63cca7a4ffa5e60fa8da102bfc21fa20cc35c2f5a0a24bc8013598f8eff5888f9d0f3bcfa796343b5f5a91  0010-udhcpc-Don-t-background-if-n-is-given.patch
f4e00eb13fda752df13f300a7ed9b1320ca9f573c4309247f292c8710464d7be8740148f42e4aff16312335eadabce5a629dce4af58334b9199faf2fd658e4f9  0011-testsuite-fix-cpio-tests.patch
e6774045441a88bf6b1edb83865cac33ee1a51c2da510b190cf6d790f1d2e6f13dc386c992ef414810dad7b80686f772b28adc5c25171bdc14cddc256344cdff  0012-syslogd-fix-timezone-adjustment-implementation.patch
524e858b52cb31fb8d24e8c7f18606fff349aeab6a14da9cca3902641f6127980daed73c53586c6e8b41eecda06cdb29c40ff1dde2dc82a318c2649680458921  top-buffer-overflow.patch
a9b1403c844c51934637215307dd9e2adb9458921047acff0d86dcf229b6e0027f4b2c6cdaa25a58407aad9d098fb5685d58eb5ff8d2aa3de4912cdea21fe54c  acpid.logrotate
857dece10267a065e0e8c16dd6190656f890a5aff774e96321715673dda23e75a8e61148e81d6286b7bdfe737a0b99104f9b04deeb4f392c72b63d8e3d00e556  busyboxconfig
-- 
2.13.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20170724144937.1a2c8ca7@ncopa-desktop.copa.dup.pw>
In-Reply-To
<20170721222342.22201-1-oleg.omelyusik@gmail.com> (view parent)
Sender timestamp
1500900577
DKIM signature
missing
Download raw message
On Sat, 22 Jul 2017 01:23:42 +0300
Oleg Omelyusik <oleg.omelyusik@gmail.com> wrote:

> ---
>  ...gd-fix-timezone-adjustment-implementation.patch | 47 ++++++++++++++++++++++
>  main/busybox/APKBUILD                              |  2 +
>  2 files changed, 49 insertions(+)
>  create mode 100644 main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
> 
> diff --git a/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
> new file mode 100644
> index 0000000000..f276bc3e57
> --- /dev/null
> +++ b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
> @@ -0,0 +1,47 @@
> +From b09a292755943b3881aa3525c906989929c19fc8 Mon Sep 17 00:00:00 2001
> +From: Oleg Omelyusik <oleg.omelyusik@gmail.com>
> +Date: Fri, 21 Jul 2017 16:29:55 +0300
> +Subject: [PATCH] syslogd: fix timezone adjustment implementation
> +
> +strptime() does not set year value which is needed for mktime().
> +Also need to take into account year value when operating with timestamps
> +to prevent invalid convertions for leap years (e.g. Feb 28 23:00:00 UTC to GMT+2).

Was this patch sent upstream?

-nc

> +---
> + sysklogd/syslogd.c | 14 +++++++++++---
> + 1 file changed, 11 insertions(+), 3 deletions(-)
> +
> +diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
> +index 1c67d1379..5ad50acd0 100644
> +--- a/sysklogd/syslogd.c
> ++++ b/sysklogd/syslogd.c
> +@@ -820,7 +820,8 @@ static void timestamp_and_log(int pri, char *msg, int len)
> + {
> + 	char *timestamp;
> + 	time_t now;
> +-	struct tm nowtm = { .tm_isdst = 0 };
> ++	struct tm msgtm = { .tm_isdst = 0 };
> ++	struct tm nowtm = { 0 };
> + 
> + 	/* Jan 18 00:11:22 msg... */
> + 	/* 01234567890123456 */
> +@@ -830,8 +831,15 @@ static void timestamp_and_log(int pri, char *msg, int len)
> + 		now = time(NULL);
> + 		timestamp = ctime(&now) + 4; /* skip day of week */
> + 	} else {
> +-		if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) {
> +-			now = mktime(&nowtm) - timezone;
> ++		if (G.adjustTimezone && strptime(msg, "%b %e %T", &msgtm)) {
> ++			/* set message year as current or previous year */
> ++			now = time(NULL);
> ++			gmtime_r(&now, &nowtm);
> ++			msgtm.tm_year = nowtm.tm_year;
> ++			if (nowtm.tm_mon < msgtm.tm_mon)
> ++				--msgtm.tm_year;
> ++			/* adjust message timestamp */
> ++			now = mktime(&msgtm) - timezone;
> + 			timestamp = ctime(&now) + 4; /* skip day of week */
> + 		} else {
> + 			now = 0;
> +-- 
> +2.13.0
> +
> diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
> index 0010854105..e2d61f8799 100644
> --- a/main/busybox/APKBUILD
> +++ b/main/busybox/APKBUILD
> @@ -29,6 +29,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
>  	0009-sysklogd-add-Z-option-to-adjust-message-timezones.patch
>  	0010-udhcpc-Don-t-background-if-n-is-given.patch
>  	0011-testsuite-fix-cpio-tests.patch
> +	0012-syslogd-fix-timezone-adjustment-implementation.patch
>  
>  	top-buffer-overflow.patch
>  
> @@ -179,6 +180,7 @@ baac796f8aa96fbeab19f96eea7787ace5737b182f49e02f1b1e911d0a927ae14f3c334daad42418
>  d1c375184f806f7550bac5c82ab5471bdb8085d845172c973724b22af05ab3759b3ce982e088b4c45815ade56b9adfb7a677d0c180e077545ac7ec003c8aa7c4  0009-sysklogd-add-Z-option-to-adjust-message-timezones.patch
>  9b5143d0be615b1604d82007628d59a62721f1e61a63cca7a4ffa5e60fa8da102bfc21fa20cc35c2f5a0a24bc8013598f8eff5888f9d0f3bcfa796343b5f5a91  0010-udhcpc-Don-t-background-if-n-is-given.patch
>  f4e00eb13fda752df13f300a7ed9b1320ca9f573c4309247f292c8710464d7be8740148f42e4aff16312335eadabce5a629dce4af58334b9199faf2fd658e4f9  0011-testsuite-fix-cpio-tests.patch
> +e6774045441a88bf6b1edb83865cac33ee1a51c2da510b190cf6d790f1d2e6f13dc386c992ef414810dad7b80686f772b28adc5c25171bdc14cddc256344cdff  0012-syslogd-fix-timezone-adjustment-implementation.patch
>  524e858b52cb31fb8d24e8c7f18606fff349aeab6a14da9cca3902641f6127980daed73c53586c6e8b41eecda06cdb29c40ff1dde2dc82a318c2649680458921  top-buffer-overflow.patch
>  a9b1403c844c51934637215307dd9e2adb9458921047acff0d86dcf229b6e0027f4b2c6cdaa25a58407aad9d098fb5685d58eb5ff8d2aa3de4912cdea21fe54c  acpid.logrotate
>  857dece10267a065e0e8c16dd6190656f890a5aff774e96321715673dda23e75a8e61148e81d6286b7bdfe737a0b99104f9b04deeb4f392c72b63d8e3d00e556  busyboxconfig



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Details
Message ID
<CAFcjDku8Wnhv6-Uv5mf1tmDqjz37KSbjJ8LDG8OkoEx+B2vSEg@mail.gmail.com>
In-Reply-To
<20170724144937.1a2c8ca7@ncopa-desktop.copa.dup.pw> (view parent)
Sender timestamp
1500901582
DKIM signature
missing
Download raw message
Hello,

No it wasn't, since timezone adjustment is Alpine specific feature.
This is about '-Z' option added to syslogd (commit
318c497f003be1645152235d1b08005f7dfde3ee in aports repo).
I've also found related open bug in your tracker and updated it:
https://bugs.alpinelinux.org/issues/3694

Thanks,
Oleg

On 24 July 2017 at 15:49, Natanael Copa <ncopa@alpinelinux.org> wrote:
> On Sat, 22 Jul 2017 01:23:42 +0300
> Oleg Omelyusik <oleg.omelyusik@gmail.com> wrote:
>
>> ---
>>  ...gd-fix-timezone-adjustment-implementation.patch | 47 ++++++++++++++++++++++
>>  main/busybox/APKBUILD                              |  2 +
>>  2 files changed, 49 insertions(+)
>>  create mode 100644 main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
>>
>> diff --git a/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
>> new file mode 100644
>> index 0000000000..f276bc3e57
>> --- /dev/null
>> +++ b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
>> @@ -0,0 +1,47 @@
>> +From b09a292755943b3881aa3525c906989929c19fc8 Mon Sep 17 00:00:00 2001
>> +From: Oleg Omelyusik <oleg.omelyusik@gmail.com>
>> +Date: Fri, 21 Jul 2017 16:29:55 +0300
>> +Subject: [PATCH] syslogd: fix timezone adjustment implementation
>> +
>> +strptime() does not set year value which is needed for mktime().
>> +Also need to take into account year value when operating with timestamps
>> +to prevent invalid convertions for leap years (e.g. Feb 28 23:00:00 UTC to GMT+2).
>
> Was this patch sent upstream?
>
> -nc
>
>> +---
>> + sysklogd/syslogd.c | 14 +++++++++++---
>> + 1 file changed, 11 insertions(+), 3 deletions(-)
>> +
>> +diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
>> +index 1c67d1379..5ad50acd0 100644
>> +--- a/sysklogd/syslogd.c
>> ++++ b/sysklogd/syslogd.c
>> +@@ -820,7 +820,8 @@ static void timestamp_and_log(int pri, char *msg, int len)
>> + {
>> +     char *timestamp;
>> +     time_t now;
>> +-    struct tm nowtm = { .tm_isdst = 0 };
>> ++    struct tm msgtm = { .tm_isdst = 0 };
>> ++    struct tm nowtm = { 0 };
>> +
>> +     /* Jan 18 00:11:22 msg... */
>> +     /* 01234567890123456 */
>> +@@ -830,8 +831,15 @@ static void timestamp_and_log(int pri, char *msg, int len)
>> +             now = time(NULL);
>> +             timestamp = ctime(&now) + 4; /* skip day of week */
>> +     } else {
>> +-            if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) {
>> +-                    now = mktime(&nowtm) - timezone;
>> ++            if (G.adjustTimezone && strptime(msg, "%b %e %T", &msgtm)) {
>> ++                    /* set message year as current or previous year */
>> ++                    now = time(NULL);
>> ++                    gmtime_r(&now, &nowtm);
>> ++                    msgtm.tm_year = nowtm.tm_year;
>> ++                    if (nowtm.tm_mon < msgtm.tm_mon)
>> ++                            --msgtm.tm_year;
>> ++                    /* adjust message timestamp */
>> ++                    now = mktime(&msgtm) - timezone;
>> +                     timestamp = ctime(&now) + 4; /* skip day of week */
>> +             } else {
>> +                     now = 0;
>> +--
>> +2.13.0
>> +
>> diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
>> index 0010854105..e2d61f8799 100644
>> --- a/main/busybox/APKBUILD
>> +++ b/main/busybox/APKBUILD
>> @@ -29,6 +29,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
>>       0009-sysklogd-add-Z-option-to-adjust-message-timezones.patch
>>       0010-udhcpc-Don-t-background-if-n-is-given.patch
>>       0011-testsuite-fix-cpio-tests.patch
>> +     0012-syslogd-fix-timezone-adjustment-implementation.patch
>>
>>       top-buffer-overflow.patch
>>
>> @@ -179,6 +180,7 @@ baac796f8aa96fbeab19f96eea7787ace5737b182f49e02f1b1e911d0a927ae14f3c334daad42418
>>  d1c375184f806f7550bac5c82ab5471bdb8085d845172c973724b22af05ab3759b3ce982e088b4c45815ade56b9adfb7a677d0c180e077545ac7ec003c8aa7c4  0009-sysklogd-add-Z-option-to-adjust-message-timezones.patch
>>  9b5143d0be615b1604d82007628d59a62721f1e61a63cca7a4ffa5e60fa8da102bfc21fa20cc35c2f5a0a24bc8013598f8eff5888f9d0f3bcfa796343b5f5a91  0010-udhcpc-Don-t-background-if-n-is-given.patch
>>  f4e00eb13fda752df13f300a7ed9b1320ca9f573c4309247f292c8710464d7be8740148f42e4aff16312335eadabce5a629dce4af58334b9199faf2fd658e4f9  0011-testsuite-fix-cpio-tests.patch
>> +e6774045441a88bf6b1edb83865cac33ee1a51c2da510b190cf6d790f1d2e6f13dc386c992ef414810dad7b80686f772b28adc5c25171bdc14cddc256344cdff  0012-syslogd-fix-timezone-adjustment-implementation.patch
>>  524e858b52cb31fb8d24e8c7f18606fff349aeab6a14da9cca3902641f6127980daed73c53586c6e8b41eecda06cdb29c40ff1dde2dc82a318c2649680458921  top-buffer-overflow.patch
>>  a9b1403c844c51934637215307dd9e2adb9458921047acff0d86dcf229b6e0027f4b2c6cdaa25a58407aad9d098fb5685d58eb5ff8d2aa3de4912cdea21fe54c  acpid.logrotate
>>  857dece10267a065e0e8c16dd6190656f890a5aff774e96321715673dda23e75a8e61148e81d6286b7bdfe737a0b99104f9b04deeb4f392c72b63d8e3d00e556  busyboxconfig
>


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20170803153114.0a745ebb@ncopa-desktop.copa.dup.pw>
In-Reply-To
<CAFcjDku8Wnhv6-Uv5mf1tmDqjz37KSbjJ8LDG8OkoEx+B2vSEg@mail.gmail.com> (view parent)
Sender timestamp
1501767074
DKIM signature
missing
Download raw message
On Mon, 24 Jul 2017 16:06:22 +0300
Oleg Omelyusik <oleg.omelyusik@gmail.com> wrote:

> 
> On 24 July 2017 at 15:49, Natanael Copa <ncopa@alpinelinux.org> wrote:
> > On Sat, 22 Jul 2017 01:23:42 +0300
> > Oleg Omelyusik <oleg.omelyusik@gmail.com> wrote:
> >  
> >> ---
> >>  ...gd-fix-timezone-adjustment-implementation.patch | 47 ++++++++++++++++++++++
> >>  main/busybox/APKBUILD                              |  2 +
> >>  2 files changed, 49 insertions(+)
> >>  create mode 100644 main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
> >>
> >> diff --git a/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
> >> new file mode 100644
> >> index 0000000000..f276bc3e57
> >> --- /dev/null
> >> +++ b/main/busybox/0012-syslogd-fix-timezone-adjustment-implementation.patch
> >> @@ -0,0 +1,47 @@
> >> +From b09a292755943b3881aa3525c906989929c19fc8 Mon Sep 17 00:00:00 2001
> >> +From: Oleg Omelyusik <oleg.omelyusik@gmail.com>
> >> +Date: Fri, 21 Jul 2017 16:29:55 +0300
> >> +Subject: [PATCH] syslogd: fix timezone adjustment implementation
> >> +
> >> +strptime() does not set year value which is needed for mktime().
> >> +Also need to take into account year value when operating with timestamps
> >> +to prevent invalid convertions for leap years (e.g. Feb 28 23:00:00 UTC to GMT+2).  
> >
> > Was this patch sent upstream?
>
> No it wasn't, since timezone adjustment is Alpine specific feature.
> This is about '-Z' option added to syslogd (commit
> 318c497f003be1645152235d1b08005f7dfde3ee in aports repo).
> I've also found related open bug in your tracker and updated it:
> https://bugs.alpinelinux.org/issues/3694


Shiz: Can you please have a look at this?

-nc


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH v2] main/busybox: fix timezone adjustment in syslogd

Details
Message ID
<20170822115822.22421-1-oleg.omelyusik@gmail.com>
In-Reply-To
<20170803153114.0a745ebb@ncopa-desktop.copa.dup.pw> (view parent)
Sender timestamp
1503403102
DKIM signature
missing
Download raw message
Patch: +49 -0
---
Changes v1 -> v2:
  - rebased to the master branch

 ...gd-fix-timezone-adjustment-implementation.patch | 47 ++++++++++++++++++++++
 main/busybox/APKBUILD                              |  2 +
 2 files changed, 49 insertions(+)
 create mode 100644 main/busybox/0013-syslogd-fix-timezone-adjustment-implementation.patch

diff --git a/main/busybox/0013-syslogd-fix-timezone-adjustment-implementation.patch b/main/busybox/0013-syslogd-fix-timezone-adjustment-implementation.patch
new file mode 100644
index 0000000000..f276bc3e57
--- /dev/null
+++ b/main/busybox/0013-syslogd-fix-timezone-adjustment-implementation.patch
@@ -0,0 +1,47 @@
From b09a292755943b3881aa3525c906989929c19fc8 Mon Sep 17 00:00:00 2001
From: Oleg Omelyusik <oleg.omelyusik@gmail.com>
Date: Fri, 21 Jul 2017 16:29:55 +0300
Subject: [PATCH] syslogd: fix timezone adjustment implementation

strptime() does not set year value which is needed for mktime().
Also need to take into account year value when operating with timestamps
to prevent invalid convertions for leap years (e.g. Feb 28 23:00:00 UTC to GMT+2).
---
 sysklogd/syslogd.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 1c67d1379..5ad50acd0 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -820,7 +820,8 @@ static void timestamp_and_log(int pri, char *msg, int len)
 {
 	char *timestamp;
 	time_t now;
-	struct tm nowtm = { .tm_isdst = 0 };
+	struct tm msgtm = { .tm_isdst = 0 };
+	struct tm nowtm = { 0 };
 
 	/* Jan 18 00:11:22 msg... */
 	/* 01234567890123456 */
@@ -830,8 +831,15 @@ static void timestamp_and_log(int pri, char *msg, int len)
 		now = time(NULL);
 		timestamp = ctime(&now) + 4; /* skip day of week */
 	} else {
-		if (G.adjustTimezone && strptime(msg, "%b %e %T", &nowtm)) {
-			now = mktime(&nowtm) - timezone;
+		if (G.adjustTimezone && strptime(msg, "%b %e %T", &msgtm)) {
+			/* set message year as current or previous year */
+			now = time(NULL);
+			gmtime_r(&now, &nowtm);
+			msgtm.tm_year = nowtm.tm_year;
+			if (nowtm.tm_mon < msgtm.tm_mon)
+				--msgtm.tm_year;
+			/* adjust message timestamp */
+			now = mktime(&msgtm) - timezone;
 			timestamp = ctime(&now) + 4; /* skip day of week */
 		} else {
 			now = 0;
-- 
2.13.0

diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 63fc3369c6..97c5491b0c 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -32,6 +32,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
	0011-testsuite-fix-cpio-tests.patch
	0001-unzip-fix-regression-on-big-endian-machines.patch
	0012-microcom-segfault.patch
	0013-syslogd-fix-timezone-adjustment-implementation.patch

	top-buffer-overflow.patch

@@ -184,6 +185,7 @@ d1c375184f806f7550bac5c82ab5471bdb8085d845172c973724b22af05ab3759b3ce982e088b4c4
f4e00eb13fda752df13f300a7ed9b1320ca9f573c4309247f292c8710464d7be8740148f42e4aff16312335eadabce5a629dce4af58334b9199faf2fd658e4f9  0011-testsuite-fix-cpio-tests.patch
daa6732a95a52a194d2031f2d5af5f658b9da3e8669fc2206000faaab7da56966a62646eed615fd1cbc5f07d42c03bf19ff183ef6f933b7daaeef1d388e21874  0001-unzip-fix-regression-on-big-endian-machines.patch
a09a64b3bce8048c58a68dcd2dd9e63c911009c06195d6bb4e5aecfb5700e479c25b34635c60899127975fae32275ad51846ee75f840d612e00668ce9aba8322  0012-microcom-segfault.patch
e6774045441a88bf6b1edb83865cac33ee1a51c2da510b190cf6d790f1d2e6f13dc386c992ef414810dad7b80686f772b28adc5c25171bdc14cddc256344cdff  0013-syslogd-fix-timezone-adjustment-implementation.patch
524e858b52cb31fb8d24e8c7f18606fff349aeab6a14da9cca3902641f6127980daed73c53586c6e8b41eecda06cdb29c40ff1dde2dc82a318c2649680458921  top-buffer-overflow.patch
a9b1403c844c51934637215307dd9e2adb9458921047acff0d86dcf229b6e0027f4b2c6cdaa25a58407aad9d098fb5685d58eb5ff8d2aa3de4912cdea21fe54c  acpid.logrotate
857dece10267a065e0e8c16dd6190656f890a5aff774e96321715673dda23e75a8e61148e81d6286b7bdfe737a0b99104f9b04deeb4f392c72b63d8e3d00e556  busyboxconfig
-- 
2.13.5



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)