Bug 701037 - bad symbolic links created for tomcat-juli jar
Summary: bad symbolic links created for tomcat-juli jar
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat6
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Knox
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-30 14:06 UTC by John Dennis
Modified: 2015-11-02 00:16 UTC (History)
4 users (show)

Fixed In Version: tomcat6-6.0.26-27.fc14
Clone Of:
Environment:
Last Closed: 2011-10-20 09:54:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Dennis 2011-04-30 14:06:39 UTC
tomcat6-lib-6.0.26-16.fc14.noarch creates a bad nonsensical link for the tomcat-juli jars

The bogus link is:
/usr/share/java/tomcat6/tomcat-juli*

Note the wildcard * character is embedded in the link name and link target, these are NOT shell expansions. Link traversal is not subject to wildcard expansion in the kernel, wildcard expansion is a shell construct only.

In the following the file names are single quoted to protect them from shell expansion.

$ ls -l '/usr/share/java/tomcat6/tomcat-juli*'
lrwxrwxrwx. 1 root root 35 Apr 29 11:54 /usr/share/java/tomcat6/tomcat-juli* -> /usr/share/tomcat6/bin/tomcat-juli*

$ rpm -qf '/usr/share/java/tomcat6/tomcat-juli*'
tomcat6-lib-6.0.26-16.fc14.noarch

$ ls -l '/usr/share/tomcat6/bin/tomcat-juli*'
ls: cannot access /usr/share/tomcat6/bin/tomcat-juli*: No such file or directory

$ rpm -qf '/usr/share/tomcat6/bin/tomcat-juli*'
error: file /usr/share/tomcat6/bin/tomcat-juli*: No such file or directory


I believe this occurs because of this part of the spec file:

# Link the juli jars into /usr/share/java/tomcat6
pushd ${RPM_BUILD_ROOT}%{libdir}
%{__ln_s} %{bindir}/tomcat-juli* .
popd

I believe what is occurring is that %{bindir}/tomcat-juli* cannot be expanded by the shell because it's non-existent therefore the string is taken verbatim.

Comment 1 Stanislav Ochotnicky 2011-05-02 08:05:49 UTC
FYI this is already fixed in F15+ where the spec file has been reworked.

Comment 2 John Dennis 2011-05-02 12:43:38 UTC
I'm not sure what you mean by F15+, rawhide? The problem is visible in current git f15 version of the spec file and the latest updates testing package for f15.

Comment 3 Stanislav Ochotnicky 2011-05-02 13:56:30 UTC
F15+ means F15 and up so currently F15 and rawhide. 

This is the latest tomcat6 build for f15 as of now (currently in f15 testing)
http://koji.fedoraproject.org/koji/buildinfo?buildID=238903

-lib subpackage has correct symlink into /usr/share/tomcat6/bin as far as I can tell. 

The f15 spec has no "%{__ln_s} %{bindir}/tomcat-juli* .". Are you sure you are looking at correct spec versions?

Comment 4 David Knox 2011-05-02 15:27:16 UTC
working on this for tomcat6-6.0.26-21.fc14

Comment 5 John Dennis 2011-05-02 17:02:20 UTC
comment #1 was irrelevant, this is an f14 bug. I incorrectly referenced f15 in comment #2 due to comment #1. As per comment #4 David is addressing this for f14.

Comment 6 Fedora Update System 2011-05-02 18:56:01 UTC
tomcat6-6.0.26-21.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/tomcat6-6.0.26-21.fc14

Comment 7 Fedora Update System 2011-05-04 00:56:59 UTC
Package tomcat6-6.0.26-21.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing tomcat6-6.0.26-21.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/tomcat6-6.0.26-21.fc14
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2011-09-28 16:00:22 UTC
tomcat6-6.0.26-27.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/tomcat6-6.0.26-27.fc14

Comment 9 Fedora Update System 2011-10-20 09:54:52 UTC
tomcat6-6.0.26-27.fc14 has been pushed to the Fedora 14 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.