Re: confused about %config file directive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 2, 2010 at 7:40 PM,  <Greg_Swift@xxxxxxxxxxxxxxxxx> wrote:
>> I want to create two RPMs.  The first RPM install apache and I call it
>> my-apache.rpm and a second my-apache-config.rpm.  my-apache.rpm
>> installs apache and my-apache-config.rpm adds some files like
>> /usr/local/apache/conf/extra/my.conf but I also want it to overwrite
>> my-apache.rpm's /usr/local/apache/conf/httpd.conf with a custom
>> httpd.conf
Long ago I wrote a generator rpm configuration from a local root that
contains the configuration files, marked noreplace, to be replaced.
Today I use it occasionally. I never released to the public, because
probably is an hackery. The man page says


NAME
       rpm-gen-rpm-configuration.sh - Generate a rpm configuration
spec file from a fakeroot

SYNOPSIS
       rpm-gen-rpm-configuration.sh -f fileconf

DESCRIPTION
       This manual page describes the rpm-gen-rpm-configuration.sh script.

       This script is primarily used for generate a rpm configuration
spec file from a fakeroot. It automatically generate the required
Requi-
       site and the Verify script section of the Spec file, via MD5
checksum of the original files.

       You have to define a fileconf (bash script) which contain at
least the following variables:

       PKG             --- the package name to configure. e.g. sudo

       PKG_NAME        --- the final package name e.g. sudo-conf

       PKG_VERSION     --- version e.g 1.0

       PKG_RELEASE     --- release e.g 1

       PKG_PACKAGER    --- packager name in %changelog format. e.g.
John <John@xxxxxxxxxxx>

       PKG_FAKEROOT    --- the directory that contain the fakeroot

       PKG_DESTSPEC    --- spec file name

       Optionally if you define the variable PKG_SERVICENAME the
generated rpm also restart the desidered services via /sbin/service.
In  this
       case the verify include the service status control. In the last
remove it "condrestart" the service: so be warned and review the
gener-
       ated specfile.

       Also it is possible to define an host allowed list via the
variabile PKG_HOST_ALLOWED: only on  these  host(s)  will  be
possibile  to
       install the RPM.

AUTHOR
       The script was written by Elia Pinto <pinto.elia@xxxxxxxxx>

                                  2006061409   rpm-gen-rpm-configuration.sh(1)

I enclose a sample spec if it can be useful. Why it works is left as
an exercise for the reader

Regards

Attachment: capp-audit-eal4-ibm-conf-1.0-1.spec
Description: Binary data

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux