Description of problem: I'm seeing issues with beakerlib in Fedora 19. [root@f19-1 ~]# . /usr/share/beakerlib/beakerlib.sh readlink: invalid option -- 'b' Try 'readlink --help' for more information. [root@f19-1 ~]# rlJournalStart Traceback (most recent call last): File "/usr/bin/beakerlib-journalling", line 717, in <module> sys.exit(main()) File "/usr/bin/beakerlib-journalling", line 655, in main return Journal.initializeJournal(options.test, options.package) File "/usr/bin/beakerlib-journalling", line 418, in initializeJournal return Journal.saveJournal(newdoc) File "/usr/bin/beakerlib-journalling", line 426, in saveJournal output.write(newdoc.toxml().encode('utf-8')) File "/usr/lib64/python2.7/xml/dom/minidom.py", line 46, in toxml return self.toprettyxml("", "", encoding) File "/usr/lib64/python2.7/xml/dom/minidom.py", line 61, in toprettyxml return writer.getvalue() File "/usr/lib64/python2.7/StringIO.py", line 271, in getvalue self.buf += ''.join(self.buflist) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 23: ordinal not in range(128) rlJournalStart: Failed to initialize the journal. Bailing out... I'm seeing this when I'm trying to setup a server to run IPA related tests, so the server was a minimal install and then freeipa-server (and all of it's dependencies) were installed. Version-Release number of selected component (if applicable): beakerlib-1.7-1.fc19.noarch How reproducible: always Steps to Reproduce: 1. install f19 to a VM on local desktop from Alpha release ISO here: http://mirror.pnl.gov/fedora/linux/releases/test/19-Alpha/Fedora/x86_64/iso/ 2. select minimal install with no other software selections 3. yum -y install freeipa-server 4. yum -y update --enablerepo=updates-testing 5. . /usr/share/beakerlib/beakerlib.sh 6. rlJournalStart Actual results: errors seen as shown above. Expected results: sourcing in beakerlib.sh at step 5 should not throw an error. rlJournalStart should not throw an error either. inst Additional info: I'm not sure what logs or other output to provide but, will gladly add that if needed. Could this be a result of me just missing some rpm? Thanks, Scott
The second problem is caused by the umlaut in F19 release name (Schroedinger), which is not ASCII-sanitized after fetch. I have a fix for that in koji and prepared for update: http://koji.fedoraproject.org/koji/buildinfo?buildID=417846 The first issue puzzles me, though. I can see no such usage anywhere in beakerlib. I do not see the issue on my F19, too. Can you confirm that there is no plugin (which are sourced too when you source in beakerlib), i.e. there are no files in /usr/share/beakerlib/plugins/ ?
Tested the update from koji and it looks like it fixed my problem. I don't see it in bohdi to give karma though. As for the first error: in /usr/share/beakerlib/beakerlib.sh: export BEAKERLIB=${BEAKERLIB:-"/usr/share/beakerlib"} ... . $BEAKERLIB/libraries.sh Then, [root@f19-1 beakerlib]# . $BEAKERLIB/libraries.sh readlink: invalid option -- 'b' Try 'readlink --help' for more information. So, looks like my issue is in /usr/share/beakerlib/libraries.sh Then from there., I see this when manually testing: [root@f19-1 beakerlib]# SOURCE="$(readlink -f $0)" readlink: invalid option -- 'b' Try 'readlink --help' for more information. [root@f19-1 beakerlib]# readlink -f $0 readlink: invalid option -- 'b' Try 'readlink --help' for more information. [root@f19-1 beakerlib]# echo $0 -bash [root@f19-1 beakerlib]# bash [root@f19-1 beakerlib]# echo $0 bash [root@f19-1 beakerlib]# readlink -f $0 /usr/share/beakerlib/bash [root@f19-1 beakerlib]# . $BEAKERLIB/libraries.sh [root@f19-1 beakerlib]# So, a difference in how the shell is executed by ssh maybe?
*** Bug 966019 has been marked as a duplicate of this bug. ***
So, any word on when this will hit F19?
(In reply to Scott Poore from comment #2) I seems like beakerlib is trying to find out where the script which uses it is located. If you source commands in the current shell $0 will contain name of the shell (instead of name of the script, since there's no script). In case of login shell the name is prefixed by '-'. But it does not make sense to run readlink on it anyway. I guess beakerlib should detect this as a special case. I often test things within the current shell as well.
Thanks for the hint, Mirek! I shall modify the code so that the readlink arg is checked for existence, that should be enough.
https://git.fedorahosted.org/cgit/beakerlib.git/commit/?id=5c51bb8193fa9a81b55b4635b2b1f633cbe91edc
(In reply to Petr Muller from comment #6) > Thanks for the hint, Mirek! I shall modify the code so that the readlink arg > is checked for existence, that should be enough. Be aware that you can easily get: # echo $0 /bin/bash Especially when running things in screen or similar.
Yeah. But the library search code is just a bunch of attempts, and the "traverse upwards from the script location" is just the last of them. It should not be harmful in any way.
beakerlib-1.8-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/beakerlib-1.8-1.fc19
Sorry this took so long.
Package beakerlib-1.8-1.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing beakerlib-1.8-1.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-10465/beakerlib-1.8-1.fc19 then log in and leave karma (feedback).
beakerlib-1.8-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 987100 has been marked as a duplicate of this bug. ***