Created attachment 348342 [details] Sample program to show the failure Description of problem: The attached code fragment returns the wrong value when TZ is set to "foo/bar" Version-Release number of selected component (if applicable): glibc-2.10.1-2.x86_64 How reproducible: 100% on F11 Steps to Reproduce: 1. compile code fragment: g++ time.cpp -o time 2. run it: ./time Actual results: Debugging Information ======================== tZone: foo/bar false || (true && false) == true strcmp(tzname[0], tZone): -1 strcmp(tZone, "UTC"): 1 strcmp(tzname[0], "UTC"): 1 tzname[0]: foo, tzname[1]: Expected results: F9 returns: Bad Timezone set. foo/bar is not a valid timezone Debugging Information ======================== tZone: foo/bar tzname[0]: foo/bar, tzname[1]: true || (true && false) == false strcmp(tzname[0], tZone): 0 strcmp(tZone, "UTC"): 1 strcmp(tzname[0], "UTC"): 1 Additional info: tzset(3) man page says: If the TZ variable does appear in the environment but its value is empty or its value cannot be interpreted using any of the formats specified below, Coordinated Universal Time (UTC) is used.
The F9 behaviour was actually the wrong one since a timezone name can only contain alphabetic characters.
Aren't they both wrong since it should be UTC?
It is like UTC, except it uses the user requested timezone name. I don't see anything wrong with it.
Okay. So taskjuggler (which ships with Fedora 11) is trying to figure out a standard way to tell if a user has passed a bad timezone. It runs this check to do it: if (strcmp(tzname[0], tZone) == 0 || (strcmp(tZone, "UTC") != 0 && strcmp(tzname[0], "UTC") == 0)) So it is check to see if the passed timezone is the same as the returned timezone, and if it is, whether the passed timezone was UTC. This worked for prior versions of glibc, but does not in the version in F11. taskjuggler won't compile on Fedora 11 until either glibc changes behavior or a better failure check can be written. Since glibc's behavior changed, and appears wrong (to me at least) I filed the bug against glibc. How should an application tell if it received an invalid timezone? Any test should work with the old behavior and other libcs, of course.
There is no way to tell. This check would have failed with TZ="foo,bar" on F9 as well, anyway.
The problematic code in taskjuggler is at: taskjuggler-2.4.1/taskjuggler/Utility.cpp:181 The failing test is: taskjuggler-2.4.1/TestSuite/Syntax/Errors/Timezone.tjp Taskjuggler can no longer compile on F11.
Thanks for reassigning, that's really something what should be handled within taskjuggler and not in glibc. Rawhide taskjuggler already removes that test in spec file as workaround - as I spoted that failure when building 2.4.2 beta1/2 few weeks ago, that check was already reported as fragile to upstream (even if it was for tj3). (http://www.taskjuggler.org/FUDforum2/index.php?t=msg&goto=9515&rid=0&S=b7cea9cddfb7732ca0fa1010c0603682&srch=timezone.tjp#msg_9515)
could you please tell me how can I workaround this via spec file? I didnt find any relevent part to uncomment or remove regarding timezone test in that specific file.
in %build section just add (just before make): #/foo/bar timezone is completely valid and interpreted as UTC,skipping test rm -f TestSuite/Syntax/Errors/Timezone.tjp Anyway - it should be handled other way in source code, skiping/removing that test is just temporary workaround.
oh you remove it directly, I'll do it other way hacking debian/rules file. Thanks for the help.
This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This is fixed. I guess it stayed open for some reason.
AFAIK it was still opened because: 1) Removing/skipping the test is not good solution and I had no time to further investigate the issue before I gave away maintainance of taskjuggler. 2) It was solved only in F-12+ Radek, could you please check current status?
Yes, the bug is still present in F-11, in F12+ is the affected check disabled, so the package compiles properly.