Hi all,

  It has been a long time since we first posted a message about a Server
Monitoring package. Once we have finished our exams we have allmost
finished it.

  OK, if we install all the packages directly we get a perfectly
functioning software (both in 4.1.2 and 4.0) but we cant generate the
rpm file :(

  We have followed Kirrily's howto about making an e-smith rpm.

  We have the following files:

        /etc/e-smith/web/functions/monitor
        /etc/cron.d/monitor
        /usr/bin/cpuinfo.pl
        /usr/bin/creabases
        /usr/bin/hdinfo.pl
        /usr/bin/meminfo.pl
        /usr/bin/netinfo.pl

  We make the tar file and compress it.

  We modify the specs file from e-smith

  Just to things:

        Requires: sysstat >= 3.3.2
        Requires: rrdtool >= 1.0.28

  We don't know how to put both dependencies so we just wrote it two
times. Is this correct?

  In the %post we have:

        ln -s /etc/e-smith/web/functions/monitor
/etc/e-smith/web/panels/manager/cgi-bin/monitor
        mkdir /var/lib/rrd
        /usr/bin/creabases
        rm /usr/bin/creabases
        /etc/rc.d/init.d/crond restart

  We do:

        rpm -bp e-smith-monitor-0.5.spec and get no error

  and:

        rpm -ba e-smith-monitor-0.5.spec and get the following message:

        File must begin with "/":
        File not found: /usr/bin/creabases
        PreReq: /bin/sh
        Requires: sysstat >=3.3.2 rrdtool >= 1.0.28

  Whats going on with the first two lines?

  Please, give us a hand. The software is allmost done and we would like
to give it to e-smith community.

  BTW, please could somebody from e-smith contact me to get some ftp
space :)

  Thanks all.

  PD. This is the whole spec file, I dont know if I can attach files to
this list so i just place it here :)

%define name e-smith-monitor

Name: %{name}

%define version 0.5
%define release 01
Version: %{version}
Release: %{release}

# The copyright should be "GPL" for any contrib module you hope to 
# make available for other e-smith users
Copyright: GPL

Group: Aplications/System

# This is the name of the source file to use.  Notice how we generate it
# based on the name and version we set earlier? 
Source: %{name}-%{version}.tar.gz


# The Packager is the name and email address of the person who packaged
# this software for e-smith, who may be a different person to the one 
# who originally wrote it.
Packager: Juan J. Prieto <[EMAIL PROTECTED]>
 Jaime Nebrera <[EMAIL PROTECTED]>

BuildArchitectures: noarch

# What software is required for the RPM to run correctly once it's
# installed on a system?  This has the same format as BuildRequires
Requires: sysstat >= 3.3.2 
Requires: rrdtool >= 1.0.28

AutoReqProv: no

# The description is a slightly more verbose version of the summary
%description
e-smith-monitor is an application for monitoring an e-smith server from
the web manager. Currently you can monitor CPU load, RAM load, SWAP
load,
HD usage and eth0 traffic. Sorry, at this moment the web page is in
spanish
and the code in spanglish :)

# The changelog records changes made with each version.  Make sure these
# are in exactly the right format, otherwise the RPM will not build.

%changelog

# The pre section lists commands to run prior to installing the software
# on the e-smith system.  This may mean things like signalling e-smith
# events or running action scripts
%pre

# The post section lists commands to run after installing the software
# on the e-smith system. This may mean things like signalling e-smith
# events or running action scripts
%post
ln -s /etc/e-smith/web/functions/monitor
/etc/e-smith/web/panels/manager/cgi-bin/monitor;
mkdir /var/lib/rrd;
/usr/bin/creabases;
rm /usr/bin/creabases;
/etc/rc.d/init.d/crond restart;

# Now we have to list all the files that are part of our installed RPM
# The %files statement lets us refer to an external file list that we
# just generated, which is easier than trying to list them all by hand

%files -f %{name}-%{version}-filelist

# The following line lets us specify attributes for the files to
# be installed.  Specifically, we can specify the mode (permissions),
# owner, and group.  If we want any of them to default to whatever's
# already in the build root, we can just use a dash.  In most cases,
# you'll want to leave the permissions as they are, but make the files
# owned by user and group root
%defattr(-,root,root)

--
Please report bugs to [EMAIL PROTECTED]
Please mail [EMAIL PROTECTED] (only) to discuss security issues
Support for registered customers and partners to [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Archives by mail and http://www.mail-archive.com/devinfo%40lists.e-smith.org

Reply via email to