Description of problem: cpanspec writes out dates according to locale. If this output differs from POSIX the spec file will be rejected by rpmbuild. Version-Release number of selected component (if applicable): cpanspec-1.60-1.fc5 How reproducible: always Steps to Reproduce: 1. LC_ALL=nn_NO.UTF-8 cpanspec --verbose --packager="Roy-Magne Mo <rmo>" YAML 2. 3. Actual results: %changelog * lau mar 11 2006 Roy-Magne Mo <rmo> 0.58-1 # rpmbuild -ba perl-YAML.spec error: bad date in %changelog: lau mar 11 2006 Roy-Magne Mo <rmo> 0.58-1 Expected results: cpanspec should write the date according to POSIX (I guess) Additional info: I see two ways to solve this, the first is the attached patch which sets the locale for cpanspec as a whole, this will break localization. The other: 1. get current locale 2. store this in a variable 3. create the date with strftime() 4. restore locale
Created attachment 125996 [details] patch to set locale
Given that pretty much nothing in the generated spec is locale-aware, I'm inclined to agree with your fix. This will be fixed in 1.61, which I'm pushing out now.