Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You need to install glibc-devel packages. Your spec file is broke because it should ask you for this package as it's required.
Good shout, that enabled me to compile the RPM's...
However i've hit an issue when trying to install/use these RPM's...
It installs correctly, however the files wont execute.
On doing a "file" on one of the files, it gives me:
Quote:
$ file /usr/local/nagios/libexec/check_load
/usr/local/nagios/libexec/check_load: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
So am I right in assuming it hasn't correctly compiled it for i386 rather than x86_64???
Any ideas why?
The spec file looks like:
Code:
### RPM Spec File for Nagios Plugins - Modified by Gavin Williams for ACT usage.
%define _prefix /usr/local
%define _exec_prefix /usr/local
%define _sysconfdir /usr/local/nagios/etc
%define _datadir /usr/local/share
Name: nagios-plugins
Version: 1.4.13
Release: 1
Summary: Host/service/network monitoring program plugins for Nagios
Group: Applications/System
License: GPL
URL: http://nagiosplug.sourceforge.net/
Source0: http://dl.sf.net/sourceforge/nagiosplug/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Prefix: %{_prefix}/nagios/libexec
Packager: Gavin Williams <gavin.williams@card.co.uk>
Vendor: Nagios Plugin Development Group
Provides: nagios-plugins
%{!?custom:%global custom 0}
Obsoletes: nagios-plugins-custom nagios-plugins-extras
# Requires
%description
Nagios is a program that will monitor hosts and services on your
network, and to email or page you when a problem arises or is
resolved. Nagios runs on a unix server as a background or daemon
process, intermittently running checks on various services that you
specify. The actual service checks are performed by separate "plugin"
programs which return the status of the checks to Nagios. This package
contains those plugins.
%prep
%setup -q
%pre
if getent passwd nagios >/dev/null 2>&1 ;
then : ;
else /usr/sbin/useradd -d /home/nagios -r -s /bin/bash nagios >/dev/null 2>&1 || exit 1 ; fi
%build
./configure \
--prefix=%{_prefix} \
--exec-prefix=%{_exec_prefix} \
--libexecdir=%{_exec_prefix}/nagios/libexec \
--datadir=%{_datadir}
make
%install
rm -rf $RPM_BUILD_ROOT
make AM_INSTALL_PROGRAM_FLAGS="" DESTDIR=${RPM_BUILD_ROOT} install
install -d ${RPM_BUILD_ROOT}
#install -m 664 command.cfg ${RPM_BUILD_ROOT}/etc/nagios
%find_lang %{name}
%clean
rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,nagios,nagios)
#%config(missingok,noreplace) /etc/nagios/command.cfg
%doc CODING COPYING FAQ INSTALL LEGAL README REQUIREMENTS SUPPORT THANKS
%doc ChangeLog
%defattr(775,nagios,nagios)
%dir %{_exec_prefix}
%{_datadir}/locale/de/LC_MESSAGES/nagios-plugins.mo
%{_datadir}/locale/fr/LC_MESSAGES/nagios-plugins.mo
%{_exec_prefix}/nagios/libexec
%changelog
* Mon Dec 29 2008 Gavin Williams <gavin.williams@card.co.uk> - Modified for ACT Usage
* Mon May 23 2005 Sean Finney <seanius@seanius.net> - cvs head
- just include the nagios plugins directory, which will automatically include
all generated plugins (which keeps the build from failing on systems that
don't have all build-dependencies for every plugin)
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
- extensive rewrite to facilitate processing into various distro-compatible specs
* Tue Mar 04 2004 Karl DeBisschop <karl[AT]debisschop.net> - 1.4.0alpha1
- extensive rewrite to facilitate processing into various distro-compatible specs
From rpmbuild manpage. You will need to specify the target in either command line or spec file.
--target PLATFORM
When building the package, interpret PLATFORM as arch-vendor-os and set the macros %_target, %_target_cpu, and %_target_os accordingly.
cheers for the response, however as per my first post i am specifying the target arch of i386 in the build command... hence the first reason of the post...
anyone else?
cheers
gavin
Quote:
Originally Posted by kentyler
From rpmbuild manpage. You will need to specify the target in either command line or spec file.
--target PLATFORM
When building the package, interpret PLATFORM as arch-vendor-os and set the macros %_target, %_target_cpu, and %_target_os accordingly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.