【发布时间】:2013-09-18 04:47:48
【问题描述】:
我正在尝试构建一个 RPM 来安装 ACE-TAO 的“开发”包。
我知道 ACE-TAO 的 RPM 已经存在,但对于我们的应用程序来说它们是不够的。要求开发者编译 ACE+TAO 容易出错。
无论如何,我构建了一个规范文件来执行此操作:
%define _topdir %(echo $PWD)/
%define _builddir %(echo $PWD/BUILD)/
Summary: Shortens the manually installation process of ACE+TAO
Name: ace-tao-amg
Version: 6.1.7
Release: 1
Source: ACE+TAO+CIAO-src-%{version}.tar.gz
License: GLP
Group: Applications/JARSS
Vendor: <<removed>>
Packager: <<removed>>
BuildRoot: %_topdir/BUILDROOT
%define debug_package %{nil}
%description
Shortens the install process for ACE+TAO
%prep
# explicitly remove the last one and setup the new one
rm -Rf %_builddir/ACE_wrappers
%setup -q -n ACE_wrappers
%build
# we want to build ACE first
export ACE_ROOT=%_builddir/ACE_wrappers
touch $ACE_ROOT/ace/config.h
echo "#include \"ace/config-linux.h\"" >> $ACE_ROOT/ace/config.h
touch $ACE_ROOT/include/makeinclude/platform_macros.GNU
echo "include %_builddir/ACE_wrappers/include/makeinclude/platform_linux.GNU" >> $ACE_ROOT/include/makeinclude/platform_macros.GNU
#export $LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/lib
$ACE_ROOT/bin/mwc.pl -type gnuace ACE.mwc --exclude tests --exclude examples
make -j 8
# and then we want to build TAO
export TAO_ROOT=$ACE_ROOT/TAO
cd $TAO_ROOT
$ACE_ROOT/bin/mwc.pl -type gnuace TAO.mwc --exclude tests --exclude examples
make -j 8
%install
mkdir -p $RPM_BUILD_ROOT/usr/local
cp -Rf %_builddir/ACE_wrappers $RPM_BUILD_ROOT/usr/local
%files
%defattr(-,root,root,-)
/usr/local/ACE_wrappers
%post
touch /etc/ld.so.conf.d/ace-6.1.7.conf
touch /etc/ld.so.conf.d/tao-6.1.7.conf
echo "/usr/local/ACE_wrappers/lib" > /etc/ld.so.conf.d/ace-6.1.7.conf
echo "/usr/local/ACE_wrappers/TAO/lib" > /etc/ld.so.conf.d/tao-6.1.7.conf
/sbin/ldconfig
# and update the config linux and platform_linux with the correct wildcard paths
echo -e "include \$(ACE_ROOT)/include/makeinclude/platform_linux.GNU" > /usr/local/ACE_wrappers/include/makeinclude/platform_macros.GNU
%postun
rm -Rf /usr/local/ACE_wrappers
rm -Rf /etc/ld.so.conf.d/ace-6.1.7.conf
rm -Rf /etc/ld.so.conf.d/tao-6.1.7.conf
/sbin/ldconfig
所有这一切都试图做的就是将一个已编译的 ACE+TAO 复制到 /usr/local。但是,当我尝试安装它时,出现以下错误:
error: Failed dependencies:
/pkg/gnu/bin//perl is needed by ace-tao-amg-6.1.7-1.x86_64
/pkg/gnu/bin//perl5 is needed by ace-tao-amg-6.1.7-1.x86_64
perl(CORBA) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(CosNotification::NotificationServiceMonitorControl) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Net::Telnet) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::ActiveEventChannelNames) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelConsumerNames) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelCreationTime) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelFactoryNames) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelOldestEvent) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelQueueElementCount) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelQueueSize) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelSlowestConsumers) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::EventChannelSupplierNames) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(NotifyMonitoringExt::InactiveEventChannelNames) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(PerlACE::Run_Test) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Process) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Tk) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Tk::DialogBox) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Tk::ROText) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Tk::Tree) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(VmsProcess) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(Win32::Process) is needed by ace-tao-amg-6.1.7-1.x86_64
perl(XML::DOM) is needed by ace-tao-amg-6.1.7-1.x86_64
即使我的系统上没有perl,也可以在没有这些的情况下构建 RPM。
那么,我的问题就在这里:是否可以明确告诉 RPM 您不需要这些依赖项?我不确定它们是从哪里表现出来的,我知道它们不会影响安装的环境。
谢谢!
【问题讨论】:
-
我们用于在 OBS 上编译 RPM 的规范文件位于软件包的 rpmbuild 目录中。如果您有改进建议,请在 ACE 邮件列表中发布。
-
哇!强尼W!我在这段代码中看到了你的名字。我没有任何具体的改进。我基本上想捆绑编译的 ACE+TAO 代码,就像
make进程没有make install。我不知道您已经为 ACE 制作了规范文件。我去看看。