我已經安裝了一個名爲Rational Software Architect(RSA 9.5)的程序(在CentOS 7中),它是一個像Eclipse一樣運行的胖客戶端平臺,但實際上並沒有安裝RPM。 RSA附帶了一個安裝bash腳本,它幾乎只是將eclipse文件放到文件系統上。我的Eclipse可執行文件與/opt/IBM/SDP/eclipse
一起使用正常的Eclipse文件夾,例如同一級別的「插件」,「功能」和「下拉列表」。如何在規範文件「需要」行中要求不屬於RPM的文件?
我已經爲之前版本的「真正」Eclipse編寫了一個spec文件,它簡單地安裝了一些我作爲jar文件編寫的java插件,將它們放在「dropins」文件夾中,然後調用eclipse -clean -initialize
與Eclipse同步插件。這仍然適用於RSA。
我的問題歸結爲一個事實,即之前,我只想有類似規範文件一行
Requires: eclipse >= 4.4.2
因爲Eclipse安裝作爲RPM。現在RSA已經安裝,取代了Eclipse,並且沒有與之關聯的RPM,我需要找到一種方法來告訴spec文件在安裝RPM之前要求「dropins」文件夾存在。也許這樣的事情:
Requires: /opt/IBM/SDP/eclipse
我沒有用上述方法取得任何成功,並想知道是否可以根據文件而不是包來設置RPM要求?我找不到關於這個主題的任何文件,希望你們都能幫忙!提前致謝。
僅供參考...我在CentOS 7.2中使用rpm-build-4.11.3和rpmdevtools-8.3。
編輯:在規範當使用絕對路徑
[[email protected] trunk]# yum localinstall myplugin-1.1.6-rev1255.x86_64.rpm Loaded plugins: fastestmirror, langpacks, rhnplugin This system is receiving updates from RHN Classic or Red Hat Satellite. Examining myplugin-1.1.6-rev1255.x86_64.rpm: myplugin-1.1.6-rev1255.x86_64 Marking myplugin-1.1.6-rev1255.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package myplugin.x86_64 0:1.1.6-rev1255 will be installed --> Processing Dependency: /opt/IBM/SDP/eclipse for package: myplugin-1.1.6-rev1255.x86_64 Loading mirror speeds from cached hostfile --> Processing Dependency: /opt/IBM/SDP/eclipse for package: myplugin-1.1.6-rev1255.x86_64 --> Finished Dependency Resolution Error: Package: myplugin-1.1.6-rev1255.x86_64 (/myplugin-1.1.6-rev1255.x86_64) Requires: /opt/IBM/SDP/eclipse You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
[[email protected] trunk]# ll /opt/IBM/SDP/eclipse -rwxr-xr-x. 1 root root 74675 Jan 28 2015 /opt/IBM/SDP/eclipse
我敢肯定,你可以有一個絕對路徑。它會阻止你在沒有它的情況下進行安裝,但由於在任何RPM中都沒有找到它,因此'yum' /'dnf'將無法幫助你找到它。我之前已經完成了這個工作,以強制glibc 32位庫作爲RPM的一項要求。 –
@ AaronD.Marasco查看上面的修改。當使用絕對路徑(在文件上運行'ls -al'時可以看到存在),我仍然有問題。 – mstep91
使用模擬構建rpm時,可能會自動提取該需求。 –