This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
您使用什么版本的 RPM?如果您使用的是较新的产品,我有一个可能对您有用的技巧。
较新版本的 RPM 有一个事务安全回滚选项;只需使用 --repackage 命令,它就会生成一个包,其中包含原始安装的所有特殊垃圾。请注意,您实际上必须做一些事情(例如 rpm -e --repackage rpm_goes_here 这将删除原始文件,同时制作一个您应该能够恢复的软件包(在您制作了副本之后),但是如果您期望它能完美地工作,我有一个你可能想买的桥),所以如果你没有完整的备份,这有点信仰的飞跃。
涉及一些配置,您需要先进行测试测试,然后再对关键的内容进行尝试,但这可能会起作用。
What version of RPM are you using? If you're using a newer one, I have a trick that might work for you.
Newer versions of RPM have a transaction safe rollback option; simply use the --repackage command, and it'll generate a package that includes all the idiosyncratic crap of the original install. Mind you, you'll have to actually DO something (e.g rpm -e --repackage rpm_goes_here which will ERASE the original, while making a package which you SHOULD be able to restore (after you've made a copy), but if you expect this to work perfectly, I have a BRIDGE you might want to buy), so it's a bit of a leap of faith if you don't have a full backup.
There is some configuration involved, and you need to test test test before you try this on something critical, but this may work.
基本上,您必须执行以下操作:
1] 创建一个包含所有标头的 .spec 文件 [ http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html ]
您必须使用 rpm -q --queryformat "" 从已安装的 rpm 中获取标头。
例如。
rpm -q --queryformat "Release: %{RELEASE}\n"installed_rpm
要获取文件填充
%files
部分,请使用rpm -ql < /代码> 命令。
2]运行
rpmbuild -bb specfile
生成rpm文件。Basically you will have to do the following:
1] Create a .spec file with all the headers [ http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html ]
You will have to use the rpm -q --queryformat "" to get the header from the already installed rpm.
Eg.
rpm -q --queryformat "Release: %{RELEASE}\n" installed_rpm
For getting the files to fill the
%files
Section use therpm -ql
command.2] run
rpmbuild -bb specfile
to generate the rpm file.重新创建 RPM 的最佳方法是从源 RPM 中进行。很棒的教程这里。
Best way to recreate an RPM, is to do it from the source RPM. Great tutorial here.
deltarpm 包可以做到这一点:
The deltarpm package can do that: