- Resolves: #575975 Build psacct with --enable-linux-multiformat
- remove obsolete change - fix sa problem with hzval variable
This commit is contained in:
parent
373795fd6f
commit
f2a9fc4a18
@ -1,79 +0,0 @@
|
||||
--- acct-6.3.2/sa.c 1998-03-10 17:54:28.000000000 +0000
|
||||
+++ acct-6.3.2.1/sa.c 2004-03-08 22:05:57.000000000 +0000
|
||||
@@ -233,7 +233,7 @@
|
||||
"***other" category */
|
||||
int always_yes = 0; /* nonzero means always answer yes to
|
||||
a query */
|
||||
-
|
||||
+static unsigned int hzval;
|
||||
|
||||
/* prototypes */
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
{
|
||||
int c;
|
||||
|
||||
+ hzval = sysconf(_SC_CLK_TCK);
|
||||
program_name = argv[0];
|
||||
|
||||
/* Cache the page size of the machine for the PAGES_TO_KB macro */
|
||||
@@ -551,7 +552,7 @@
|
||||
|
||||
if (debugging_enabled)
|
||||
{
|
||||
- fprintf (stddebug, "AHZ -> %d\n", AHZ);
|
||||
+ fprintf (stddebug, "hzval -> %d\n", hzval);
|
||||
fprintf (stddebug, "getpagesize() -> %d\n", getpagesize ());
|
||||
fprintf (stddebug, "system_page_size == %.2f\n", system_page_size);
|
||||
}
|
||||
@@ -901,7 +902,7 @@
|
||||
/* Christoph Badura <bad@flatlin.ka.sub.org> says:
|
||||
*
|
||||
* The k*sec statistic is computed as
|
||||
- * ((ac_utime+ac_stime)*pages_to_kbytes(ac_mem))/AHZ. Of course you
|
||||
+ * ((ac_utime+ac_stime)*pages_to_kbytes(ac_mem))/hzval. Of course you
|
||||
* need to expand the comp_t values.
|
||||
*
|
||||
* PAGES_TO_KBYTES(x) simply divides x by (getpagesize()/1024). Of
|
||||
@@ -1103,33 +1104,33 @@
|
||||
{
|
||||
#ifdef HAVE_ACUTIME
|
||||
# ifdef ACUTIME_COMPT
|
||||
- double ut = comp_t_2_double (rec->ac_utime) / (double) AHZ;
|
||||
+ double ut = comp_t_2_double (rec->ac_utime) / (double) hzval;
|
||||
# else
|
||||
- double ut = (double) rec->ac_utime / (double) AHZ;
|
||||
+ double ut = (double) rec->ac_utime / (double) hzval;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ACSTIME
|
||||
# ifdef ACSTIME_COMPT
|
||||
- double st = comp_t_2_double (rec->ac_stime) / (double) AHZ;
|
||||
+ double st = comp_t_2_double (rec->ac_stime) / (double) hzval;
|
||||
# else
|
||||
- double st = (double) rec->ac_stime / (double) AHZ;
|
||||
+ double st = (double) rec->ac_stime / (double) hzval;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ACETIME
|
||||
# ifdef ACETIME_COMPT
|
||||
- double et = comp_t_2_double (rec->ac_etime) / (double) AHZ;
|
||||
+ double et = comp_t_2_double (rec->ac_etime) / (double) hzval;
|
||||
# else
|
||||
- double et = (double) rec->ac_etime / (double) AHZ;
|
||||
+ double et = (double) rec->ac_etime / (double) hzval;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ACIO
|
||||
# ifdef ACIO_COMPT
|
||||
- double di = comp_t_2_double (rec->ac_io) / (double) AHZ;
|
||||
+ double di = comp_t_2_double (rec->ac_io) / (double) hzval;
|
||||
# else
|
||||
- double di = (double) rec->ac_io / (double) AHZ;
|
||||
+ double di = (double) rec->ac_io / (double) hzval;
|
||||
# endif
|
||||
#endif
|
||||
|
12
psacct-6.5.4-hzval.patch
Normal file
12
psacct-6.5.4-hzval.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up acct-6.5.4/sa.c.pom acct-6.5.4/sa.c
|
||||
--- acct-6.5.4/sa.c.pom 2010-02-12 02:24:11.000000000 +0100
|
||||
+++ acct-6.5.4/sa.c 2010-06-25 12:32:18.000000000 +0200
|
||||
@@ -280,7 +280,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
|
||||
- static unsigned int hzval;
|
||||
+ hzval = sysconf(_SC_CLK_TCK);
|
||||
program_name = argv[0];
|
||||
|
||||
/* Cache the page size of the machine for the PAGES_TO_KB macro */
|
14
psacct.spec
14
psacct.spec
@ -12,7 +12,7 @@
|
||||
Summary: Utilities for monitoring process activities
|
||||
Name: psacct
|
||||
Version: 6.5.4
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv3+
|
||||
Group: Applications/System
|
||||
URL: ftp://ftp.gnu.org/pub/gnu/acct/
|
||||
@ -27,6 +27,7 @@ Patch6: psacct-6.3.2-sa-manfix.patch
|
||||
Patch8: psacct-6.3.2-lastcomm_man.patch
|
||||
Patch9: acct-6.3.2-sa_manpage.patch
|
||||
Patch11: psacct-6.3.2-man-pages.patch
|
||||
Patch12: psacct-6.5.4-hzval.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Requires: /sbin/chkconfig /sbin/install-info
|
||||
@ -58,15 +59,14 @@ commands.
|
||||
%patch8 -p1 -b .man
|
||||
%patch9 -p1 -b .pct
|
||||
%patch11 -p1 -b .new
|
||||
%patch12 -p1 -b .hzval
|
||||
|
||||
%build
|
||||
%if ! %{FHS_compliant}
|
||||
autoconf
|
||||
%endif
|
||||
|
||||
%configure
|
||||
sed -e "s/\/\* #undef HAVE_LINUX_ACCT_H \*\//#define HAVE_LINUX_ACCT_H/" config.h > config.h.new
|
||||
sed -e "s;#define HAVE_ACIO 1;/* #undef HAVE_ACIO */;" config.h.new > config.h
|
||||
%configure --enable-linux-multiformat
|
||||
touch texinfo.tex
|
||||
make
|
||||
|
||||
@ -154,6 +154,12 @@ fi
|
||||
%{_infodir}/accounting.info.gz
|
||||
|
||||
%changelog
|
||||
* Fri Jun 18 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 6.5.4-4
|
||||
- Resolves: #575975
|
||||
Build psacct with --enable-linux-multiformat
|
||||
- remove obsolete change
|
||||
- fix sa problem with hzval variable
|
||||
|
||||
* Mon Apr 19 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 6.5.4-3
|
||||
- add force-reload action to init script
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user