Bug 1060513 - conf files are not found
Summary: conf files are not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: unrtf
Version: 20
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Rahul Sundaram
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1105090 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-02 08:27 UTC by Martin Tarenskeen
Modified: 2014-06-09 15:36 UTC (History)
4 users (show)

Fixed In Version: unrtf-0.21.5-2.el6
Clone Of:
Environment:
Last Closed: 2014-05-29 23:27:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to unrtf.spec that builds newer unrtf with proper runtime config path (1.50 KB, patch)
2014-05-07 17:25 UTC, "FeRD" (Frank Dana)
no flags Details | Diff

Description Martin Tarenskeen 2014-02-02 08:27:18 UTC
Description of problem:
conf files are not found in /etc/unrtf

Version-Release number of selected component (if applicable):
unrtf-0.21.4-2.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. # unrtf document.rtf
2. # unrtf --text document.rtf

Actual results:
1. error message: failed to find html.conf in search path dirs
2. error message: failed to find text.conf in search path dirs

Expected results:
1. convert content of document.rtf to html
2. convert content of document.rtf to text

Additional info:
In the Fedora package the *.conf files are located in /etc/unrtf
As a workaround I did
# sudo ln -s /etc/unrtf/* /usr/share/unrtf/
which fixed the problem for me. But it should work out-of-the-box without the need for such a work-around.

Comment 1 "FeRD" (Frank Dana) 2014-05-07 17:25:31 UTC
Created attachment 893404 [details]
Patch to unrtf.spec that builds newer unrtf with proper runtime config path

This bug is still present in the latest rawhide 0.21.5-1.fc21 build.

The issue is caused by recent releases of unrtf no longer using the "hard coded path for looking for config files" mentioned (and worked around) in the rpm spec. They've sort of[*] moved control over that path into autoconf.

The install destination and runtime path are now settable at configure time, controlled by the $(pkgdatadir) configure variable.

The attached patch against unrtf.spec (from 0.21.5-1.fc21.src.rpm) properly builds unrtf to use /etc/unrtf as its config dir. (The /usr/share/unrtf dir is no longer created at all.)


[*] - I say "sort of" moved it into autoconf because, honestly, the solution currently implemented, while an improvement, is still a bit broken and weird. In fact, I'd argue that it qualifies as autoconf abuse — the presence of the line:

AM_CPPFLAGS = -DPKGDATADIR=\"$(pkgdatadir)\"

in src/Makefile.am is ample evidence of that. This is Not The Way™ to do configure-time path management, but at least it's a step in the right direction.

Comment 2 Ken Dreyer 2014-05-14 18:06:07 UTC
Now that upstream is using autoconf, I'm thinking Fedora should stop shipping the config files in /etc. If upstream wanted us to use /etc they would have used sysconfdir in their make files.

I'm thinking it would be appropriate to just let upstream's build system install the configs into datadir and not do the move operation to %{_sysconfdir} during %install.

Another item in favor of datadir is that I suspect the majority of unrtf users would probably never modify these files.

Rahul, do you feel strongly about keeping the files in /etc, or are you ok with leaving them in datadir going forward?

Comment 3 Rahul Sundaram 2014-05-18 17:18:54 UTC
These changes were done before autoconf usage by upstream and before I took over as maintainer and I don't have any strong inclinations to retain those changes.  On the contrary, I prefer that any brokenness in upstream be fixed there rather than having a workaround at the distribution level.  Also, I prefer the model of upstream supplied configuration in datadir vs user modifications in /etc which override them.  For these reasons, I have pushed a build for rawhide that drops all non-upstream changes.  I will leave this bug report open.  If anyone wants me to push this change for Fedora 20 as well, do let me know.  Otherwise, I will close this one in a couple of days.  Thanks!

Comment 4 "FeRD" (Frank Dana) 2014-05-20 06:24:03 UTC
Thanks, Rahul. I installed unrtf-0.21.5-2.fc21.x86_64 from rawhide, all looks good.

Please do push to F20 also, if you wouldn't mind, as unrtf is currently broken there (unless the user manually sets the config dir on the command line).

Comment 5 Martin Tarenskeen 2014-05-20 06:40:38 UTC
(In reply to "FeRD" (Frank Dana) from comment #4)
> Thanks, Rahul. I installed unrtf-0.21.5-2.fc21.x86_64 from rawhide, all
> looks good.
> 
> Please do push to F20 also, if you wouldn't mind, as unrtf is currently
> broken there (unless the user manually sets the config dir on the command
> line).

+1

Comment 6 Fedora Update System 2014-05-20 14:13:36 UTC
unrtf-0.21.5-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/unrtf-0.21.5-2.fc20

Comment 7 Fedora Update System 2014-05-21 23:18:36 UTC
Package unrtf-0.21.5-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing unrtf-0.21.5-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6547/unrtf-0.21.5-2.fc20
then log in and leave karma (feedback).

Comment 8 Rahul Sundaram 2014-05-21 23:32:26 UTC
Now that the update has reached updates testing repository, if you can test and provide some feedback via the link above, it will expedite the process for the update reaching the stable repository.  Thanks

Comment 9 Ken Dreyer 2014-05-23 21:51:35 UTC
Thanks Rahul. I'm going to push this to epel-testing as well.

Comment 10 Fedora Update System 2014-05-23 22:21:35 UTC
unrtf-0.21.5-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/unrtf-0.21.5-2.el6

Comment 11 Fedora Update System 2014-05-29 23:27:06 UTC
unrtf-0.21.5-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Ken Dreyer 2014-06-07 01:50:57 UTC
*** Bug 1105090 has been marked as a duplicate of this bug. ***

Comment 13 Fedora Update System 2014-06-09 15:36:47 UTC
unrtf-0.21.5-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.