Hello community,
here is the log from the commit of package acct
checked in at Thu Feb 15 18:09:43 CET 2007.
--------
--- acct/acct.changes 2006-09-05 15:34:29.000000000 +0200
+++ /mounts/work_src_done/STABLE/acct/acct.changes 2007-02-14 15:01:13.000000000 +0100
@@ -1,0 +2,5 @@
+Wed Feb 14 14:46:17 CET 2007 - mkudlvasr@suse.cz
+
+- fixed ahz value problems [#244186]
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ acct.spec ++++++
--- /var/tmp/diff_new_pack.e10711/_old 2007-02-15 18:09:22.000000000 +0100
+++ /var/tmp/diff_new_pack.e10711/_new 2007-02-15 18:09:22.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package acct (Version 6.3.5)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,12 +11,12 @@
# norootforbuild
Name: acct
-License: GPL
+License: GNU General Public License (GPL)
Group: System/Base
PreReq: %insserv_prereq %fillup_prereq fileutils %install_info_prereq
Autoreqprov: on
Version: 6.3.5
-Release: 696
+Release: 718
Source: %{name}-%{version}.tar.bz2
Source1: rc.acct
Source2: logrotate.acct
@@ -39,7 +39,7 @@
Authors:
--------
- Noel Cragg
+ Noel Cragg
%prep
%setup -q
@@ -113,6 +113,8 @@
/usr/sbin/*
%changelog -n acct
+* Wed Feb 14 2007 - mkudlvasr@suse.cz
+- fixed ahz value problems [#244186]
* Tue Sep 05 2006 - anosek@suse.cz
- fixed compiler warning: old-style function definition
[#203115] (warning.patch)
++++++ acct-6.3.5-hz.patch ++++++
--- /var/tmp/diff_new_pack.e10711/_old 2007-02-15 18:09:22.000000000 +0100
+++ /var/tmp/diff_new_pack.e10711/_new 2007-02-15 18:09:22.000000000 +0100
@@ -1,14 +1,17 @@
--- lastcomm.c
+++ lastcomm.c
-@@ -47,6 +47,7 @@
- #endif
+@@ -48,6 +48,10 @@
#include
-+#include
++#ifdef HAVE_UNISTD_H
++#include
++#endif
++
#include "common.h"
#include "uid_hash.h"
-@@ -65,7 +66,7 @@
+ #include "dev_hash.h"
+@@ -65,7 +69,7 @@
int strict_match_flag = 0; /* Nonzero if each record has to match
all items on the command line */
int print_controls = 0; /* don't print control characters */
@@ -17,25 +20,29 @@
char *program_name; /* name of the program, for usage & errs */
-@@ -91,6 +92,10 @@
-
+@@ -88,7 +92,6 @@
+ int get_entry PARAMS((struct acct **));
+ int desired_entry PARAMS((char *, char *, char *));
+
+-
/* code */
-+#ifndef HZ
-+# define AHZ sysconf(_SC_CLK_TCK)
-+#endif
-+
void
- main (int argc, char *argv[])
- {
-@@ -98,6 +103,7 @@
- int other_pacct_file_specified = 0; /* nonzero if the user used the
- `-f' or `--file' flag */
-
-+ ahz = AHZ;
- program_name = argv[0];
-
- /* Tell the pacct reader that we want to do things backwards! */
+@@ -288,6 +291,14 @@
+ print_pacct_record (rec, stddebug);
+ }
+
++ if (!ahz) // if this is the first cycle run, ahz is not set yet
++ {
++ if (rec->ac_version == 3)
++ ahz = 100; // value AHZ = 100 is hardcoded in acct.h, but in #ifdef __KERNEL__ block. too bad
++ else
++ ahz = sysconf(_SC_CLK_TCK);
++ }
++
+ if (desired_entry (this_uid, this_dev, rec->ac_comm))
+ {
+ #ifdef HAVE_COMP_T
--- sa.c
+++ sa.c
@@ -174,7 +174,7 @@
@@ -47,20 +54,30 @@
#if defined(HAVE_ACUTIME) && defined(HAVE_ACSTIME)
-@@ -265,11 +265,16 @@
-
+@@ -262,7 +262,6 @@
+ int ask_if_junkable PARAMS((char *, int));
+
+
+-
/* code */
-+#ifndef HZ
-+# define AHZ sysconf(_SC_CLK_TCK)
-+#endif
-+
void
- main (int argc, char *argv[])
- {
- int c;
-
-+ ahz = AHZ;
- program_name = argv[0];
-
- /* Cache the page size of the machine for the PAGES_TO_KB macro */
+@@ -1116,6 +1115,18 @@
+ /* loop while there are entries to be had */
+ while ((rec = pacct_get_entry ()) != NULL)
+ {
++ if (!ahz) // if this is the first cycle run, ahz is not set yet
++ {
++ if (rec->ac_version == 3)
++ ahz = 100; // value AHZ = 100 is hardcoded in acct.h, but in #ifdef __KERNEL__ block. too bad
++ else
++ ahz = sysconf(_SC_CLK_TCK);
++
++ if (debugging_enabled)
++ {
++ fprintf (stddebug, "AHZ -> %d\n", ahz);
++ }
++ }
+ #ifdef HAVE_ACUTIME
+ # ifdef ACUTIME_COMPT
+ double ut = comp_t_2_double (rec->ac_utime) / (double) ahz;
++++++ acct-6.3.5-warning.patch ++++++
--- /var/tmp/diff_new_pack.e10711/_old 2007-02-15 18:09:22.000000000 +0100
+++ /var/tmp/diff_new_pack.e10711/_new 2007-02-15 18:09:22.000000000 +0100
@@ -1,5 +1,5 @@
---- mktime.c.save 1997-10-14 01:40:36.000000000 +0100
-+++ mktime.c 2006-08-31 09:18:15.000000000 +0100
+--- mktime.c
++++ mktime.c
@@ -124,9 +124,7 @@
#define localtime_r my_localtime_r
static struct tm *localtime_r __P ((const time_t *, struct tm *));
@@ -23,7 +23,7 @@
/* Compute intervening leap days correctly even if year is negative.
Take care to avoid int overflow. time_t overflow is OK, since
@@ -173,8 +169,7 @@
-
+
/* Convert *TP to a time_t value. */
time_t
-mktime (tp)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org