Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 214788

Summary: Broken symlinks and missing file permissions for installed TPTP plugins using an update site
Product: z_Archived Reporter: Arthur Baars <abaars>
Component: TPTPAssignee: Joel Cayne <jcayne>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: barrettboy, dkhodges, jkubasta, john, kendricw, rashraf, rene, tristan_schmelcher, xubing
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: closed460
Bug Depends on: 221372    
Bug Blocks:    
Attachments:
Description Flags
org.eclipse.tptp.platform.ac.linux_em64t p2.inf
none
org.eclipse.tptp.platform.ac.linux_ia32 p2.inf
none
org.eclipse.tptp.platform.jvmti.runtime p2.inf
none
org.eclipse.hyades.probekit p2.inf
none
org.eclipse.tptp.platform.ac.linux_em64t p2.inf
none
org.eclipse.tptp.platform.ac.linux_ia32 p2.inf none

Description Arthur Baars CLA 2008-01-09 13:30:16 EST
I downloaded and installed Eclipse and installed the tptp extension using the Europa Discovery Site. However the lib-file of the agentcontroller contains several very small .so-files . These files contain the names  of other .so-files, so I guess they are supposed to be symbolic links. I seems that somehow these files are extracted as regular text files instead of symbolic links. To me this seems like a bug in the (tar?) archives or in the unarchiver used by Eclipse.

Below I include a snippet of the output of "ls -l" on the lib directory of the integrated agentcontroller.

 ls -l /opt/eclipse/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200709261752/agent_controller/lib/

...
-rw-r--r-- 1 root root      19 2008-01-09 07:22 libnamedPipeTL.so
-rw-r--r-- 1 root root      23 2008-01-09 07:22 libnamedPipeTL.so.4
-rw-r--r-- 1 root root   23451 2008-01-09 07:22 libnamedPipeTL.so.4.4.0
...

Above you can see that the first two files are small and no real symbolic links.
For example "cat libnamedPipeTL.so" yields the text: "libnamedPipeTL.so.4" .

Below is how it should be:

lrwxrwxrwx 1 root root      21 2008-01-09 12:20 libnamedPipeTL.so ->  libjavaBaseAgent.so.4
lrwxrwxrwx 1 root root      25 2008-01-09 12:20 libnamedPipeTL.so.4 -> libjavaBaseAgent.so.4.4.0
-rw-r--r-- 1 root root  154665 2008-01-09 07:22 libnamedPipeTL.so.4.4.0

I experienced this problem on both Fedora Core 7 and Ubuntu 7.10
Comment 1 Joel Cayne CLA 2008-02-26 13:40:36 EST
I tested on linux and verified the symbolic links are not being created. After investigation, this appears to be caused by signing.
Comment 2 Bing Xu CLA 2008-03-06 11:00:14 EST
*** Bug 220197 has been marked as a duplicate of this bug. ***
Comment 3 Bing Xu CLA 2008-03-07 17:00:14 EST
Joel, before the signing was fixed, could we provide a temporary solution like creating a script to generate the symbolic links.  I'd then try to run that script before start the IAC.   
Comment 4 Joel Cayne CLA 2008-03-10 12:14:07 EDT
In addition to the symbolic links being missing, the execute permissions are removed. I could create a script, but it would not be able to run without user interaction to set the execute permissions first on the bin directory.
Comment 5 Tristan Schmelcher CLA 2008-04-05 22:39:43 EDT
Still exists in 4.4.1.v200802050100.
Comment 6 Bing Xu CLA 2008-04-15 11:18:59 EDT
*** Bug 219534 has been marked as a duplicate of this bug. ***
Comment 7 Rob CLA 2008-04-16 17:54:06 EDT
*** Bug 214019 has been marked as a duplicate of this bug. ***
Comment 8 jkubasta CLA 2008-04-23 09:36:51 EDT
Any update on this Joel?
Comment 9 Joel Cayne CLA 2008-04-23 12:18:23 EDT
The p2 team is adding support for an inf file to describe the symbolic links. Once this functionality becomes available, I will test that the installation process maintains the symbolic links based on the inf file and work on adding it to the affected plug-ins.
Comment 10 Joel Cayne CLA 2008-04-29 14:48:00 EDT
Created attachment 98040 [details]
org.eclipse.tptp.platform.ac.linux_em64t p2.inf

Created p2.inf files for plug-ins requiring chmod and ln after installation.
Comment 11 Joel Cayne CLA 2008-04-29 14:48:31 EDT
Created attachment 98041 [details]
org.eclipse.tptp.platform.ac.linux_ia32 p2.inf
Comment 12 Joel Cayne CLA 2008-04-29 14:48:57 EDT
Created attachment 98042 [details]
org.eclipse.tptp.platform.jvmti.runtime p2.inf
Comment 13 Joel Cayne CLA 2008-04-29 14:49:19 EDT
Created attachment 98043 [details]
org.eclipse.hyades.probekit p2.inf
Comment 14 Joel Cayne CLA 2008-04-30 10:11:33 EDT
Created attachment 98163 [details]
org.eclipse.tptp.platform.ac.linux_em64t p2.inf
Comment 15 Joel Cayne CLA 2008-04-30 10:12:07 EDT
Created attachment 98164 [details]
org.eclipse.tptp.platform.ac.linux_ia32 p2.inf
Comment 16 Joel Cayne CLA 2008-04-30 11:59:11 EDT
The process used to create an update site will need to include the generation of p2 metadata using the steps described at http://wiki.eclipse.org/Equinox_p2_Metadata_Generator#Generating_metadata_from_an_update_manager_site for the p2.inf changes to be applied at install using the update site scenario.
Comment 17 Joel Cayne CLA 2008-04-30 12:42:04 EDT
Kendric,

Please review the attached patches and process.
Comment 18 Joel Cayne CLA 2008-04-30 14:45:42 EDT
*** Bug 221738 has been marked as a duplicate of this bug. ***
Comment 19 Kendric Wang CLA 2008-04-30 16:17:43 EDT
Patch looks good. Installation from updatesite provides symlinks and proper permissions in the specified files.
Comment 20 jkubasta CLA 2008-05-01 10:52:09 EDT
defect approved by PMC. Please check in patch and spin new candidate
Comment 21 Joel Cayne CLA 2008-05-01 13:43:35 EDT
Patch checked into HEAD.

Testing completed by doing the following steps on a Unix system:
1. Download TPTP driver and update META-INF folder with p2.inf
2. Create TPTP update site
3. Create p2 metadata on TPTP update site using http://wiki.eclipse.org/Equinox_p2_Metadata_Generator#Generating_metadata_from_an_update_manager_site
4. Setup workbench with dependencies
5. Install TPTP using update site with p2 enabled metadata
6. Verify links and permissions are set
Comment 22 Paul Slauenwhite CLA 2009-06-30 12:10:41 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 23 Tristan Schmelcher CLA 2009-07-01 01:13:18 EDT
(In reply to comment #22)
> As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality
> by resolving relevant enhancements/defects and increasing test coverage through
> test creation, automation, Build Verification Tests (BVTs), and expanded
> run-time execution. As part of the TPTP Bugzilla housecleaning process (see
> http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this
> enhancement/defect is verified/closed by the Project Lead since this
> enhancement/defect has been resolved and unverified for more than 1 year and
> considered to be fixed. If this enhancement/defect is still unresolved and
> reproducible in the latest TPTP release
> (http://www.eclipse.org/tptp/home/downloads/), please re-open.
> 

Please re-open this bug. (It doesn't give me an option to do it myself.) This
problem still affects TPTP 4.6. I installed it fresh in Eclipse 3.3.2 and the problem is still there, hence preventing it from working:

$ ls -al /opt/eclipse-3.3.2/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.200.v200906121434/agent_controller/lib
total 16564
drwxr-xr-x  2 root root    4096 2009-06-30 20:28 .
drwxr-xr-x 10 root root    4096 2009-06-30 20:28 ..
-rw-r--r--  1 root root      21 2009-06-30 20:28 libbaseTransport.so
-rw-r--r--  1 root root      25 2009-06-30 20:28 libbaseTransport.so.4
-rw-r--r--  1 root root    9051 2009-06-30 20:28 libbaseTransport.so.4.5.0
-rw-r--r--  1 root root  143696 2009-06-30 20:28 libcbe.so
-rw-r--r--  1 root root      16 2009-06-30 20:28 libcompSupp.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libcompSupp.so.4
-rw-r--r--  1 root root   29219 2009-06-30 20:28 libcompSupp.so.4.5.0
-rw-r--r--  1 root root      13 2009-06-30 20:28 libhcbnd.so
-rw-r--r--  1 root root      17 2009-06-30 20:28 libhcbnd.so.4
-rw-r--r--  1 root root   18758 2009-06-30 20:28 libhcbnd.so.4.5.0
-rw-r--r--  1 root root      14 2009-06-30 20:28 libhcclco.so
-rw-r--r--  1 root root      18 2009-06-30 20:28 libhcclco.so.4
-rw-r--r--  1 root root   33489 2009-06-30 20:28 libhcclco.so.4.5.0
-rw-r--r--  1 root root      14 2009-06-30 20:28 libhccldt.so
-rw-r--r--  1 root root      18 2009-06-30 20:28 libhccldt.so.4
-rw-r--r--  1 root root    5548 2009-06-30 20:28 libhccldt.so.4.5.0
-rw-r--r--  1 root root      14 2009-06-30 20:28 libhcclsm.so
-rw-r--r--  1 root root      18 2009-06-30 20:28 libhcclsm.so.4
-rw-r--r--  1 root root   43224 2009-06-30 20:28 libhcclsm.so.4.5.0
-rw-r--r--  1 root root      13 2009-06-30 20:28 libhccls.so
-rw-r--r--  1 root root      17 2009-06-30 20:28 libhccls.so.4
-rw-r--r--  1 root root   12134 2009-06-30 20:28 libhccls.so.4.5.0
-rw-r--r--  1 root root      14 2009-06-30 20:28 libhcjbnd.so
-rw-r--r--  1 root root      18 2009-06-30 20:28 libhcjbnd.so.4
-rw-r--r--  1 root root   26805 2009-06-30 20:28 libhcjbnd.so.4.5.0
-rw-r--r--  1 root root      16 2009-06-30 20:28 libhclaunch.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libhclaunch.so.4
-rw-r--r--  1 root root   15429 2009-06-30 20:28 libhclaunch.so.4.5.0
-rw-r--r--  1 root root      16 2009-06-30 20:28 libhcthread.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libhcthread.so.4
-rw-r--r--  1 root root   14064 2009-06-30 20:28 libhcthread.so.4.5.0
-rw-r--r--  1 root root      21 2009-06-30 20:28 libjavaBaseAgent.so
-rw-r--r--  1 root root      25 2009-06-30 20:28 libjavaBaseAgent.so.4
-rw-r--r--  1 root root   36940 2009-06-30 20:28 libjavaBaseAgent.so.4.5.0
-rw-r--r--  1 root root      19 2009-06-30 20:28 libnamedPipeTL.so
-rw-r--r--  1 root root      23 2009-06-30 20:28 libnamedPipeTL.so.4
-rw-r--r--  1 root root   22330 2009-06-30 20:28 libnamedPipeTL.so.4.5.0
-rw-r--r--  1 root root      15 2009-06-30 20:28 libpiAgent.so
-rw-r--r--  1 root root      19 2009-06-30 20:28 libpiAgent.so.4
-rw-r--r--  1 root root  160258 2009-06-30 20:28 libpiAgent.so.4.5.0
-rw-r--r--  1 root root      26 2009-06-30 20:28 libprocessControlUtil.so
-rw-r--r--  1 root root      30 2009-06-30 20:28 libprocessControlUtil.so.4
-rw-r--r--  1 root root   20308 2009-06-30 20:28 libprocessControlUtil.so.4.5.0
-rw-r--r--  1 root root      19 2009-06-30 20:28 libsharedMemTL.so
-rw-r--r--  1 root root      23 2009-06-30 20:28 libsharedMemTL.so.4
-rw-r--r--  1 root root   15033 2009-06-30 20:28 libsharedMemTL.so.4.5.0
-rw-r--r--  1 root root      16 2009-06-30 20:28 libsocketTL.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libsocketTL.so.4
-rw-r--r--  1 root root   27512 2009-06-30 20:28 libsocketTL.so.4.5.0
-rw-r--r--  1 root root   23060 2009-06-30 20:28 libswt-atk-gtk-3550.so
-rw-r--r--  1 root root    3612 2009-06-30 20:28 libswt-awt-gtk-3550.so
-rw-r--r--  1 root root   40640 2009-06-30 20:28 libswt-cairo-gtk-3550.so
-rw-r--r--  1 root root   10080 2009-06-30 20:28 libswt-glx-gtk-3550.so
-rw-r--r--  1 root root   10432 2009-06-30 20:28 libswt-gnome-gtk-3550.so
-rw-r--r--  1 root root   11456 2009-06-30 20:28 libswt-gtk-3550.so
-rw-r--r--  1 root root   99480 2009-06-30 20:28 libswt-mozilla-gcc3-gtk-3550.so
-rw-r--r--  1 root root   98376 2009-06-30 20:28 libswt-mozilla-gtk-3550.so
-rw-r--r--  1 root root  354996 2009-06-30 20:28 libswt-pi-gtk-3550.so
-rw-r--r--  1 root root   27500 2009-06-30 20:28 libswt-xpcominit-gtk-3550.so
-rw-r--r--  1 root root   85020 2009-06-30 20:28 libswt-xulrunner-gtk-3550.so
-rw-r--r--  1 root root      16 2009-06-30 20:28 libtptpACTL.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libtptpACTL.so.4
-rw-r--r--  1 root root   51023 2009-06-30 20:28 libtptpACTL.so.4.5.0
-rw-r--r--  1 root root      21 2009-06-30 20:28 libtptpAgentBase.so
-rw-r--r--  1 root root      25 2009-06-30 20:28 libtptpAgentBase.so.4
-rw-r--r--  1 root root   85789 2009-06-30 20:28 libtptpAgentBase.so.4.5.0
-rw-r--r--  1 root root      16 2009-06-30 20:28 libtptpCCTL.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libtptpCCTL.so.4
-rw-r--r--  1 root root   99707 2009-06-30 20:28 libtptpCCTL.so.4.5.0
-rw-r--r--  1 root root      18 2009-06-30 20:28 libtptpClient.so
-rw-r--r--  1 root root      22 2009-06-30 20:28 libtptpClient.so.4
-rw-r--r--  1 root root  240956 2009-06-30 20:28 libtptpClient.so.4.5.0
-rw-r--r--  1 root root      19 2009-06-30 20:28 libtptpCmdExtr.so
-rw-r--r--  1 root root      23 2009-06-30 20:28 libtptpCmdExtr.so.4
-rw-r--r--  1 root root   23022 2009-06-30 20:28 libtptpCmdExtr.so.4.5.0
-rw-r--r--  1 root root      18 2009-06-30 20:28 libtptpConfig.so
-rw-r--r--  1 root root      22 2009-06-30 20:28 libtptpConfig.so.4
-rw-r--r--  1 root root   63347 2009-06-30 20:28 libtptpConfig.so.4.5.0
-rw-r--r--  1 root root      16 2009-06-30 20:28 libtptpJava.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libtptpJava.so.4
-rw-r--r--  1 root root    7861 2009-06-30 20:28 libtptpJava.so.4.5.0
-rw-r--r--  1 root root      16 2009-06-30 20:28 libTptpJSSE.so
-rw-r--r--  1 root root      20 2009-06-30 20:28 libTptpJSSE.so.4
-rw-r--r--  1 root root   17601 2009-06-30 20:28 libTptpJSSE.so.4.5.0
-rw-r--r--  1 root root      20 2009-06-30 20:28 libtptpLogUtils.so
-rw-r--r--  1 root root      24 2009-06-30 20:28 libtptpLogUtils.so.4
-rw-r--r--  1 root root   12404 2009-06-30 20:28 libtptpLogUtils.so.4.5.0
-rw-r--r--  1 root root      17 2009-06-30 20:28 libtptpUtils.so
-rw-r--r--  1 root root      21 2009-06-30 20:28 libtptpUtils.so.4
-rw-r--r--  1 root root  101481 2009-06-30 20:28 libtptpUtils.so.4.5.0
-rw-r--r--  1 root root      24 2009-06-30 20:28 libtransportSupport.so
-rw-r--r--  1 root root      28 2009-06-30 20:28 libtransportSupport.so.4
-rw-r--r--  1 root root   32737 2009-06-30 20:28 libtransportSupport.so.4.5.0
-rw-r--r--  1 root root 4256959 2009-06-30 20:28 libxerces-c.so
-rw-r--r--  1 root root 4256959 2009-06-30 20:28 libxerces-c.so.26
-rw-r--r--  1 root root 4256959 2009-06-30 20:28 libxerces-c.so.26.0
-rw-r--r--  1 root root  547893 2009-06-30 20:28 libxerces-depdom.so
-rw-r--r--  1 root root  547893 2009-06-30 20:28 libxerces-depdom.so.26
-rw-r--r--  1 root root  547893 2009-06-30 20:28 libxerces-depdom.so.26.0
$ cat /opt/eclipse-3.3.2/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.200.v200906121434/agent_controller/lib/libtransportSupport.so
libtransportSupport.so.4

As you can see, the symlinks are still being created as files.
Comment 24 Tristan Schmelcher CLA 2009-07-01 01:59:44 EDT
Nevermind, they're correctly created as symlinks on Eclipse 3.5. Only old versions of Eclipse have the problem. So it's fixed after all.
Comment 25 Joel Cayne CLA 2009-07-03 08:58:26 EDT
(In reply to comment #24)
> Nevermind, they're correctly created as symlinks on Eclipse 3.5. Only old
> versions of Eclipse have the problem. So it's fixed after all.
> 

Hi Tristan,

p2 was introduced in Eclipse 3.4.0 and so the fix provided would only be applicable to 3.4.x+ (TPTP 4.4.x+) releases. Similar functionality was not available in update manager.