The iprutils init.d scripts require the redhat-lsb on RHEL 6 in order
to function. Add this as a dependency.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
When I pushed commit 855e7fd ("iprutils: Enable editor choice for new log system")
I had to manually merge them and ended up missing a couple of files which didn't get
pushed. This fixes that up.
Reported-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Yet another patch to the spec file. This time we add some defaults for
PowerKVM that was missing in my last patch. It fixes some issues we
were having with daemons in this distro.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Adding support for SuSE supportconfig plugin to the iprutils spec file.
Signed-off-by: Daniel Kreling <dbkreling@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Revamps the spec file, do some cleanup, and avoid reinventing the
wheel in some places.
The iprutils spec file in OBS also included some fixes that are not
upstream. Updates the spec file in the repository to include those
fixes.
Mostly trivial changes, but all listed below:
* Setup a distro specific section to select switches for each distro.
* No longer issue systemctl/service calls by hand, instead we use the
the utils macros available for each distro.
* Use --with{systemd,initscripts} to only install the correct
set of daemons for each distro.
* Remove soft links for daemons and service files because they are
generated directly into the correct directory.
* Use %{?_smp_mflags} in %make to perform parallel build.
* Use %{_initrddir} instead of hardcoded path %{sysconfig}/etc/init.d.
* Remove %clean section.
* Replace make with %{__make}.
* Replace %make_install with %{__make} DESTDIR=<path> install.
* Remove %ifarch conditionals.
* Make sure the daemons are started AND enabled after update, install
and removed after uninstall.
This was tested on RHEL6, RHEL7, SLES11 and SLES12.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
There is no point in installing spec file. Remove it.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Statically linking is discouraged. Although, there are situations in
which it is required. This commit includes some required dependency
checks to enable building a statically linked version of iprconfig. It
includes a new flag in the Autotools Build System,
'--enable-build-static' to support this option. To keep static linked
binary to a minimum inside iprutils, only iprconfig has a static
version in this patch.
This also includes a new subpackage in the spec file to hold the static
binary. To generate this subpackage, one must call rpmbuild passing
'--with static'. The static version will be installed as
'iprconfig-static' and will not conflict with iprutils package.
Be aware that static building requires the static version of ncurses and
glibc packages. Otherwise, iprconfig-static build will fail.
Since dependency order matters a lot when statically linking, this patch
depends heavily on my last fix, ("Fail on libncurses if ncurses-devel is
missing."), which is not upstream yet. I made sure this one will not
even apply cleanly without it. For testing purposes, make sure you have
that patch applied.
This was tested on F21, RHEL7x and SLES12.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Introduce an autocomplete system for iprconfig in bash. Provide
completion for devices and iprconfig commands, depending on the current
context.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Adding sosreport support through iprutils.py plugin. To accomodate such
addition, changes to iprconfig.spec, configure.ac and Makefile.am were
implemented. Python macro AM_PATH_PYTHON was added in order to have the
plugin copied python site-packages/sos/plugins directory, and python-devel
was added as a new dependency, in order to properly translate
%{python_sitelib} to '/usr/lib/python2.X/site-packages'.
This new feature will collect IPR adapter information along with
system details and log messages from the user's environment.
Signed-off-by: Daniel Kreling <kreling@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
This patch fixes up the %preun hook at iprutils.spec file. The elif block was
hanging loose, as the if was mistakenly being closed before it. Because of
that, "rpm -e" was unable to perform and the package was not being uninstalled.
Sign-off-by: Daniel Kreling <kreling@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Fix up the spec file to make the daemons to start at package installation and
update. Also, a redundant if hook was removed from %post and %preun blocks.
The if clauses were changed to verify the presence of systemctl, instead of a
macro defined path %{_unitdir}. Finally, all redirections to /dev/null were
removed in order to make installation more verbose.
Signed-off-by: Daniel Kreling <kreling@linux.vnet.ibm.com>
Reviewed-by : Gabriel K. Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Changing some white spaces for tabs on spec file
Signed-off-by: Daniel Kreling <kreling@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Spec file had a bug where it would fail to package and install on
systems that don't have systemd, i.e. those who still use init scripts.
This patch applies a fix that verifies whether we are using systemd or
init files before installing the correct daemon starter.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <Brian King brking@linux.vnet.ibm.com>
This commit adapts the spec to use the autotools build system.
Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
iprutils daemon files (iprdump.service, iprinit.service and
iprupdate.service) were created and housed on systemd directory.
In the file system, they should be sent to /usr/lib/systemd/system.
iprutils.spec was adapted to support the changes and manage
those service files.
Signed-off-by: Daniel Kreling <kreling@imap.linux.ibm.com>
Criated iprinit.service, iprdump.service and iprupdate.service files to
provide support to distros using systemd instead of init.d. Also by doing
that, we're bumping to version 2.4.2.
Signed-off by: Daniel Kreling <dkreling@imap.linux.ibm.com>
The rpm spec file had a wrong date format on the %changelog section,
generating errors when compiling the package. This patch fixes the date
format.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Not all distros provide an interface to install_initd and remove_initd
that is compliant to the LSB specification, requiring more parameters
to be given than just the path to the init script. In such cases, it is
preferred to use chkconfig when available.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>