我有一个自定义软件和脚本包的rpm生成过程,在这个过程中,我试图通过尽可能多的通用自动化尽量减少重复工作。我几乎完成了,除了一个小的怪癖,它不是手动指定需要在rpm包中的大文件列表,我希望列表能够在运行时自动生成和捕获。这有可能吗?
例句:我正试着像下面的rpm规范中的file.In %文件部分那样做,然后它就爆炸了。文件部分非常长,因此我希望减少通过UNIX命令手动获取该列表,并将其粘贴到规范文件中。
# Author : Anand Kulkarni - 29/02/2020.
# Description : squirrel-client rpm specfile.
# Version : squirrel-client-1.0
Summary:squirrel linux client with mssql, sybase, oracle and mysql drivers for connectivity.
Name:squirrel-client
Version:1.0
Release:1
License:GPL
BuildArch:noarch
Group:Application/misc
Source:%{name}-%{version}.tar.gz
URL:www.github.com/anandkulkarnisg
Distribution:Fedora Linux 31
Vendor:Anand Kulkarni
Packager:Anand Kulkarni
%description
This rpm provides simply installable rpm package for squirrel linux client. It includes mssql, sybase and oracle drivers for connection installed.
%prep
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
tar -xzvf $RPM_BUILD_DIR/%{name}-%{version}.tar.gz
%setup
buildRpmMakeFile /opt/squirrel-client-1.0 installers/Makefile
%build
%install
cd installers
make buildroot
make install
%post
chown -R anand:anand /home/anand/.squirrel-sql/
%files
listFiles /opt/squirrel-client-1.0 f发布于 2020-03-03 21:32:05
您希望-f选项用于%files
-f选项用于指示RPM从指定文件中读取%文件列表。与规范文件中的%文件列表一样,使用-f选项命名的文件应该包含一行文件名,并包含本节中指定的任何指令。
从旧的,但仍然有效的最大RPM。
https://stackoverflow.com/questions/60491107
复制相似问题