Hide Forgot
Description of problem: Perhaps since last update (to fix #1262571) the report got wrong content type Version-Release number of selected component (if applicable): amanda-3.3.8-1.fc23.x86_64 How reproducible: Configure sending report by e-mail Actual results: ... User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: application/octet-stream Content-Transfer-Encoding: 8bit ... Expected results: (from Amanda 3.3.3 on EL7) ... User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit ... Additional info: content application/octet stream e-mails are not displayed but can be downloaded as attachment only contents can be only viewed displaying raw e-mail contents
Further analysis shows that this issue is caused by LANG which is not en_US and as result the displayed date is not displayed in 7bit ascii. $ echo $LANG de_DE.UTF-8 $ amreport backuphost Hostname: amandahost Org : backuphost Config : backuphost Date : M�rz 21, 2016 <-!!! Proper output with LANG=C $ LC_TIME=C amreport backuphost Hostname: amandahost Org : backuphost Config : backuphost Date : March 21, 2016 => in case sent by e-mail then contents is displayed proper As Amanda/Report/human.pm only supports English LC_TIME should be proper set somewhere before entering my $date = POSIX::strftime('%B %e, %Y', 0, 0, 0, $day, $month - 1, $year - 1900); %B is the problematic placeholder Following patch would fix the bug: --- vendor_perl/Amanda/Report/human.pm.orig 2016-02-09 10:44:43.000000000 +0100 +++ vendor_perl/Amanda/Report/human.pm 2016-03-24 22:01:08.671869798 +0100 @@ -24,7 +24,7 @@ use warnings; use Carp; -use POSIX; +use POSIX qw(locale_h strftime); use Data::Dumper; use Amanda::Config qw(:getconf config_dir_relative); @@ -377,6 +377,7 @@ # TODO: this should be a shared method somewhere my $timestamp = $report->get_timestamp(); my ($year, $month, $day) = ($timestamp =~ m/^(\d\d\d\d)(\d\d)(\d\d)/); + setlocale(LC_TIME, "C"); my $date = POSIX::strftime('%B %e, %Y', 0, 0, 0, $day, $month - 1, $year - 1900); $date =~ s/ / /g; # get rid of intervening space
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This problem was reported to upstream. Their previous suggestion for this issue is change LOCAL variable settings in system. I have posted them patch from #c1. We should wait for their response.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. 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 EOL if it remains open with a Fedora 'version' of '23'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
amanda-3.4.2-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0ac18bda03
amanda-3.4.2-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-41e61e4f94
amanda-3.4.2-4 has not a fix for this problem included /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm is unchanged :-(
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. 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 EOL if it remains open with a Fedora 'version' of '25'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
still not fixed in amanda-3.4.5-5.fc27.x86_64
Any new status from upstream? What about an intermediate patch until they finally fix this? Patch is still the same, only line numbers are slighly different from #c1 --- /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm.orig 2017-08-02 19:52:23.000000000 +0200 +++ /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm 2018-03-01 20:15:06.206915377 +0100 @@ -25,7 +25,7 @@ use warnings; use Carp; -use POSIX; +use POSIX qw(locale_h strftime); use Data::Dumper; use Amanda::Config qw(:getconf config_dir_relative); @@ -399,6 +399,7 @@ # TODO: this should be a shared method somewhere my $timestamp = $report->get_timestamp(); my ($year, $month, $day) = ($timestamp =~ m/^(\d\d\d\d)(\d\d)(\d\d)/); + setlocale(LC_TIME, "C"); my $date = POSIX::strftime('%B %e, %Y', 0, 0, 0, $day, $month - 1, $year - 1900); $date =~ s/ / /g; # get rid of intervening space
This ticket was filed before I started helping with Amanda maintenance so I never really looked at it. Also, upstream doesn't have any kind of public bug tracker so I can't easily check to see if this is has been reported. I don't think anything has changed in version 3.5.1 which would help this, so I'm sending a message upstream just in case they haven't been given a heads up about this before. And perhaps they will agree with forcing the locale, because the rest of the report isn't going to be translated so showing just the date in the current locale seems odd. But the issue with that is that Amanda isn't really doing anything wrong; the issue is in mailx. Try running the following, substituting your address: LANG=de_DE.UTF-8 perl -MPOSIX -e 'print POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 19, 1, 95, 2 ), "\n";' | mailx -s foo your@address LANG=de_DE.UTF-8 perl -MPOSIX -e 'print POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 19, 2, 95, 2 ), "\n";' | mailx -s foo your@address (have to have glibc-langpack-de installed for this to work). For me, one message is fine and the other shows up with content-type: application/octet-stream. I don't know if mailx has any option which could be set to make things better; adding -S encoding=quoted-printable makes no difference.
Now I'm thinking this isn't a mailx problem, either. Run this on el7 and Fedora: LANG=de_DE.utf8 perl -MPOSIX -e 'print POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 19, 2, 95, 2 ), "\n"; EL7: Dienstag, März 19, 1995 F27: Sonntag, M�rz 19, 1995 So, I mean, I just don't know what to say. Obviously the way Perl handles strftime has changed at some point. I was just using the example from the perldoc POSIX page. In any case, I think that somehow newer Perl versions sometimes need to be told that stdout can handle utf8. Can you try just adding binmode(STDOUT, ":utf8"); near the top of the amreport script (and undoing your change to force the locale)? For me this fixes the problem on F27, but breaks the output (because of course it does) on EL7.
I can confirm that there is no related issue on EL7, but here it's displaying the date regulary in "C": Hostname: *** Org : *** Config : *** Date : March 2, 2018 No specific settings on that EL7 system # set |egrep '(LANG|LC_TIME)' LANG=de_DE.utf8 # env |egrep '(LANG|LC_TIME)' LANG=de_DE.utf8 perl -MPOSIX -e 'print POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 19, 2, 95, 2 ), "\n"; Dienstag, März 19, 1995 /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm is not adjusted there As it also can be discussed whether it should make sense to display the date in local format while all of the rest of the report is in English I still prefer to enforce the LC_TIME=C before strftime.
On EL7 the Amanda code is significantly older and honestly I haven't looked at what it does. I was specifically investigating the Perl behavior on different platforms, and testing in your environment with the binmode fix would be useful information to pass to upstream. I did raise both options (binmode and forcing the locale before calling strftime() in my message to upstream but have not yet received a response. I would provide a link to the thread but sourceforge is offline so amanda.org does not currently respond. If you want to search it should be the most recent message sent to amanda-hackers.
Better searching turns up https://marc.info/?l=amanda-hackers&m=151994863417010&w=2
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. 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 EOL if it remains open with a Fedora 'version' of '27'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
Still not fixed in amanda-3.5.1-16.fc29.x86_64
Unfortunately you never tested my proposed fix using binmode (from comment #12), so... I don't know what to tell you. If you had tested that (and it had worked) then this would have been fixed long ago.
Sorry, looks like I have forgotten to test your proposed fix mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1317122#c12 tried it now: --- /usr/sbin/amreport-3.5.1-16.fc29 2019-02-07 06:12:22.000000000 +0100 +++ /usr/sbin/amreport 2019-03-08 19:59:48.198981310 +0100 @@ -23,6 +23,8 @@ use strict; use warnings; +binmode(STDOUT, ":utf8"); + use Getopt::Long; use IPC::Open3; use Cwd qw( abs_path ); Result: Content-Transfer-Encoding: 8bit Message-Id: <***> From: Amanda user <amandabackup@***> Hostname: *** Org : *** Config : *** Date : März 8, 2019 but as mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1317122#c13, the whole contents of the report is in English, so why should then be the date in local language? I still vote for applying patch from https://bugzilla.redhat.com/show_bug.cgi?id=1317122#c10
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. 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 EOL if it remains open with a Fedora 'version' of '29'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.
still happen in Fedora 31 rpm -qf /usr/sbin/amreport amanda-server-3.5.1-20.fc31.x86_64 and as mentioned above, the "inmode" fix is imho not well enough because it displays the month in local language, but all the other contents is in English only. Here latest patch: --- /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm-3.5.1-20.fc31 2020-03-08 11:47:02.459583088 +0100 +++ /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm 2020-03-08 11:47:50.277036336 +0100 @@ -25,7 +25,7 @@ use warnings; use Carp; -use POSIX; +use POSIX qw(locale_h strftime); use Data::Dumper; use Amanda::Config qw(:getconf config_dir_relative); @@ -399,6 +399,7 @@ # TODO: this should be a shared method somewhere my $timestamp = $report->get_timestamp(); my ($year, $month, $day) = ($timestamp =~ m/^(\d\d\d\d)(\d\d)(\d\d)/); + setlocale(LC_TIME, "C"); my $date = POSIX::strftime('%B %e, %Y', 0, 0, 0, $day, $month - 1, $year - 1900); $date =~ s/ / /g; # get rid of intervening space
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. 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 EOL if it remains open with a Fedora 'version' of '31'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. 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.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.