我需要使用规格文件中的行。
命令:
rpmrebuild --edit-spec --notest-install --package <rpm-name>
Do you want to continue ? (y/N) y
result: <updated-rpm-name>
规格文件中的更改:
由 rpmbuild -ba&lt; spec -file&gt;
生成的旧规格文件:
Requires: python(abi) = 3.8
一旦运行rpmrebuild,它将打开VI编辑器,我需要在其中修改Spec File,例如这样:
### Comment out this line
# Requires: python(abi) = 3.8
### Add this line
Requires: rh-python38
问题
如何在非相互作用模式下运行?换句话说,我只想在不打开文件的情况下运行rpmrebuild ,而只需指定命令行本身的更改即可。类似:
rpmrebuild --replace-requires --old-requires=python(abi)=3.8 --new-requires=rh-python38 <rpm-name>
我看到rpmrebuild的插件:
,但我不确定如何在这里使用它。请告诉我。
I need to re-build an RPM using rpmrebuild where I need to modify the Requires:
lines in a spec file.
Commands:
rpmrebuild --edit-spec --notest-install --package <rpm-name>
Do you want to continue ? (y/N) y
result: <updated-rpm-name>
Changes in spec file:
Old Spec file generated by rpmbuild -ba <spec-file>
:
Requires: python(abi) = 3.8
Once I run rpmrebuild, it opens vi editor, where I need to modify the spec file like this:
### Comment out this line
# Requires: python(abi) = 3.8
### Add this line
Requires: rh-python38
Issue
How can I do run this in non-interactive mode? In other words, I just want to run rpmrebuild without opening the file and just specify the changes in command line itself. Something like:
rpmrebuild --replace-requires --old-requires=python(abi)=3.8 --new-requires=rh-python38 <rpm-name>
I see plugins for rpmrebuild: https://www.mankier.com/1/rpmrebuild#--change-spec-requires
But I am not sure how can I use it here. Please let me know.
发布评论
评论(1)
我发现了解决方案:
我们可以使用
sed
命令将其替换为- 更改spec-requires
如下:this 示例帮助我:
I figured out the solution:
We can use
sed
command to replace and pass it to--change-spec-requires
as follows:This example helped me: