rpmbuild: using script files contained in the package in %pre script

前端 未结 2 1639
一个人的身影
一个人的身影 2020-12-20 07:15

I have to perform multiple elaborate \"sanity\" checks on target system before an RPM package installs/upgrades. I want to contain the procedure in a script (bash/python/php

2条回答
  •  [愿得一人]
    2020-12-20 07:37

    RPM doesn't have this functionality. As I see it, you have two options:

    1. Tar up the files, encode them to a text format (e.g. uuencode) and decode and untar them in the %pre. Ugly, but possible.

    2. Have a separate RPM, say sql-dependencies, that provides these files. Then in your existing RPM add the following:

      Requires(pre) : sql-dependencies.

提交回复
热议问题