Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-08-23 Thread Panu Matilainen
The problem here is that the cat is out of the bag and people are already using whatever in their specs. This is a bunch of random ponderings on the subject, rather than anything definitive on way or the other. If we limited it to UTC only, then the "UTC" part becomes waste of perfectly good

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-08-23 Thread Panu Matilainen
Dropping 4.15 milestone, this is just any old bug that's a regression and not release critical, and sorting out apparently needs more time than we have. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-08-02 Thread Panu Matilainen
This is turning into a whole lot of pain for bleeping little gain. Rpm is not in the business for its timezone knowledge, so we'll certainly not be incorporating our own timezone tables to accommodate for random timezone abbreviation preferences folks happen to have. -- You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-08-02 Thread ニール・ゴンパ
@pavlinamv Australian official eastern time designation is `AEST`. Australians do know this, and will use it when appropriate. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-31 Thread ニール・ゴンパ
@pavlinamv The `date` command can do exactly the same thing as this. ``` $ date --date='Wed 31 Jul 2019 09:02:40 AM EDT' +'%s' 1564578160 $ date --date='@1564578160' Wed 31 Jul 2019 09:02:40 AM EDT $ date --date='@1564578160' --utc Wed 31 Jul 2019 01:02:40 PM UTC ``` Cf.

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-29 Thread pavlinamv
>@pavlinamv So then, how does date in GNU Coreutils do it? rpm task: _input_: time in an arbitrary time zone, the time zone description _result_: the corresponding time in UTC. Command ```date``` _prints_ or _sets_ the system date and time. Neither _printing_, nor _setting_ is so complex (or

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-29 Thread ニール・ゴンパ
@pavlinamv So then, how does `date` in GNU Coreutils do it? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-29 Thread pavlinamv
>There is no reason to break support for this, @Conan-Kudo, @ignatenkobrain: The current situation is: rpm accepts arbitrary text as a time zone description in extended date format. If the time zone description is not "correct" rpm (silently) change it to UTC instead of the given time zone

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-21 Thread Igor Gnatenko
FYI, I do use CET vs CEST in all spec files. Don't break that :) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-20 Thread ニール・ゴンパ
@pavlinamv It is not true that the timezone short codes do not encode whether daylight saving time/summer time is in effect. For example, where I live, daylight saving time means Eastern Time is represented with `EDT`, whereas standard time is represented as `EST`. Europe has `CET` vs `CEST`,

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-24 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -44,7 +44,8 @@ static int dateToTimet(const char * datestr, time_t * secs, > int * date_words) struct tm time, ntime; const char * const * idx; char *p, *pe, *q, *date, *tz; -char tz_name[10]; /* name of timezone

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-24 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("time zone in %%changelog not in tz database:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-24 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -44,7 +44,8 @@ static int dateToTimet(const char * datestr, time_t * secs, > int * date_words) struct tm time, ntime; const char * const * idx; char *p, *pe, *q, *date, *tz; -char tz_name[10]; /* name of timezone

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-23 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("time zone in %%changelog not in tz database:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-23 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -44,7 +44,8 @@ static int dateToTimet(const char * datestr, time_t * secs, > int * date_words) struct tm time, ntime; const char * const * idx; char *p, *pe, *q, *date, *tz; -char tz_name[10]; /* name of timezone

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-17 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -44,7 +44,8 @@ static int dateToTimet(const char * datestr, time_t * secs, > int * date_words) struct tm time, ntime; const char * const * idx; char *p, *pe, *q, *date, *tz; -char tz_name[10]; /* name of timezone

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-17 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("time zone in %%changelog not in tz database:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-14 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("bogus TZ database name in %%changelog: %s\n"),

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-13 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("bogus TZ database name in %%changelog: %s\n"),

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-13 Thread pavlinamv
Warning instead of info is emitted (in the latest version). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-13 Thread pavlinamv
Corrected in the latest version. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/739#issuecomment-501619925___ Rpm-maint mailing

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-13 Thread Florian Festi
Looks good. Only thing left is a missing "g" in the commit message of 3rd patch. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-08 Thread pavlinamv
Panu's comments incorporated. Moreover I think about the problem again. The current implementation does not need further changes, but it needs to correct comments and add an info if the description of time zone is not correct. o the first commit in the PR is omitted and commit "Emit info if

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -130,8 +130,7 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0'; - if (((int)(pe-p) + 1) > 9 ) - goto exit; + tz_name =

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -130,8 +130,7 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) SKIPNONSPACE(pe); if (*pe != '\0') *pe++ = '\0'; - if (((int)(pe-p) + 1) > 9 ) - goto exit; + tz_name =

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -185,6 +184,8 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) rc = 0; exit: +if (tz_name) Don't bother testing for NULL, free() does it anyway so it ends up being just useless clutter. -- You are

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -30,10 +30,12 @@ static int sameDate(const struct tm *ot, const struct tm > *nt) ot->tm_wday == nt->tm_wday); } +#define TZ_MAX_LENGTH 80 Thank you. In the new version dynamic allocation is used. -- You are receiving this because

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread Panu Matilainen
pmatilai commented on this pull request. > @@ -30,10 +30,12 @@ static int sameDate(const struct tm *ot, const struct tm > *nt) ot->tm_wday == nt->tm_wday); } +#define TZ_MAX_LENGTH 80 Just use dynamic allocation to avoid arbitrary limits that need explanations :) -- You are

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread Igor Gnatenko
ignatenkobrain commented on this pull request. > @@ -30,10 +30,12 @@ static int sameDate(const struct tm *ot, const struct tm > *nt) ot->tm_wday == nt->tm_wday); } +#define TZ_MAX_LENGTH 80 It would be great if this number was described. I mean why not 67 or 93 :) -- You are

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread pavlinamv
Tests were added. Moreover they already help to show, that exit status 0 is returned when changelog order fails. Thus I add an additional commit that corrects this behaviour (regression). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread pavlinamv
@pavlinamv pushed 2 commits. 1b44c113b06574e24ae5cd1e92aa2ae132975081 Return non-zero exit status if changelog order fails e4dc76e450dd0277fe5f15d4b74df3935dc2ae58 Test effects of time zone in chanelog timestamp -- You are receiving this because you are subscribed to this thread. View it

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread Igor Gnatenko
it would be great to get it as a test so we don't break it at some point accidentally. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread pavlinamv
When building RPMs that have %changelog sections with changelog entries with full timestamps, RPM did not take the time zone into account. Now the timezone description is taken into account using function tzset(). It handles correctly timezone descriptions like: "Europe/London", "GMT-5", or