Quote:
Originally Posted by RedMan1001001
zabbix-agent.x86_64 5.0.19-1.el7
|
This is not the official RPM package from EPEL for EL7, the latter is called
zabbix50-agent.x86_64 5.0.18-1.el7 (the version 5.0.19 is currently in
epel-testing). This begs the question: where did you get the package from?
Quote:
Originally Posted by enigma9o7
If you want commands to run during installation, you put them under "%install" in the SPEC file, don't call external scripts.
|
An RPM package is supposed to be installed on many systems. Custom configuration (IP address) cannot go into
%install as that part is executed on builder's host when package is being built. Rather, like
pan64 suggests
Quote:
Originally Posted by pan64
You need to check the %post section in the spec file.
|
EPEL provides an
rpmrebuild tool, but honestly, creating a small wrapper package as
pan64 suggested above would probably be easier for you. An additional benefit is that the wrapper package won't get upgraded when EPEL ships a new version of Zabbix, potentially overwriting your custom changes.
You'll have to install
rpm-build. I also recommend installing
rpmdevtools and using
rpmdev-newspec to generate the spec file template. Alternatively, some editors provide support for RPM spec files. I'm pretty sure Eclipse does. I myself use Vim. CentOS 7 ships Vim with a spec file template that will be used when you create a new file with .spec suffix. That functionality has been disabled in recent Fedora releases because of
rhbz#1724126, but can be trivially re-enabled.