使用 unix 命令在 redhat 包管理规范文件中自动生成 %files 部分
auto generation of %files section in redhat package management spec file using a unix command
我的自定义软件和脚本包有一个 rpm 生成过程,我试图通过通用自动化尽可能减少重复工作。我几乎完成了,除了一个小怪癖,而不是手动指定需要在 rpm 包中的大文件列表,我希望列表自动生成并在 运行 时间以某种方式捕获。这可能吗 ?
Ex:- 我试图在 rpm 规范 file.In %files 部分中像下面那样做,但它爆炸了。
文件部分很长,因此我想减少手动获取该列表的次数
通过 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
您想要 %files
的 -f
选项:
The -f option is used to direct RPM to read the %files list from the named file. Like the %files list in a spec file, the file named using the -f option should contain one filename per line and also include any of the directives named in this section.
来自较旧但仍然有效的 Maximum RPM。
我的自定义软件和脚本包有一个 rpm 生成过程,我试图通过通用自动化尽可能减少重复工作。我几乎完成了,除了一个小怪癖,而不是手动指定需要在 rpm 包中的大文件列表,我希望列表自动生成并在 运行 时间以某种方式捕获。这可能吗 ?
Ex:- 我试图在 rpm 规范 file.In %files 部分中像下面那样做,但它爆炸了。 文件部分很长,因此我想减少手动获取该列表的次数 通过 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
您想要 %files
的 -f
选项:
The -f option is used to direct RPM to read the %files list from the named file. Like the %files list in a spec file, the file named using the -f option should contain one filename per line and also include any of the directives named in this section.
来自较旧但仍然有效的 Maximum RPM。