Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Mike Frysinger (vapier)" <vapier@g.o>
Subject: gentoo-x86 commit in sys-process/acct/files: acct-6.5.5-cross-compile.patch acct.initd
Date: Thu, 20 Oct 2011 05:07:52 +0000 (UTC)
vapier      11/10/20 05:07:52

  Modified:             acct.initd
  Added:                acct-6.5.5-cross-compile.patch
  Log:
  Add arm love.  Add cross-compile fix by Diego Elio Pettenò.  Clean up init.d script #367815 by Robert Trace.
  
  (Portage version: 2.2.0_alpha65/cvs/Linux x86_64)

Revision  Changes    Path
1.3                  sys-process/acct/files/acct.initd

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct.initd?r1=1.2&r2=1.3

Index: acct.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- acct.initd	26 Jan 2011 05:36:22 -0000	1.2
+++ acct.initd	20 Oct 2011 05:07:52 -0000	1.3
@@ -1,12 +1,12 @@
 #!/sbin/runscript
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v 1.2 2011/01/26 05:36:22 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/acct/files/acct.initd,v 1.3 2011/10/20 05:07:52 vapier Exp $
 
-opts="report reload"
+extra_started_commands="report"
 
 depend() {
-    need localmount
+	need localmount
 }
 
 checkconfig() {
@@ -22,24 +22,16 @@
 	checkconfig || return 1
 
 	ebegin "Starting accounting"
-	accton "${ACCT_LOG}"
+	accton "${ACCT_LOG}" >/dev/null
 	eend $?
 }
 
 stop() {
 	ebegin "Stopping accounting"
-	accton off
+	accton off >/dev/null
 	eend $?
 }
 
 report() {
 	sa ${REPORT_OPTS} "${ACCT_LOG}"
 }
-
-reload() {
-	service_started "${SVCNAME}" || return
-	svc_stop
-	svc_start
-}
-
-# vim:ts=4 sw=4:



1.1                  sys-process/acct/files/acct-6.5.5-cross-compile.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct-6.5.5-cross-compile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/acct/files/acct-6.5.5-cross-compile.patch?rev=1.1&content-type=text/plain

Index: acct-6.5.5-cross-compile.patch
===================================================================
https://savannah.gnu.org/patch/?7473

From 8958c3cb7b77ec50d8dae0490d8c80dee798e20d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@...>
Date: Fri, 18 Feb 2011 06:13:20 +0100
Subject: [PATCH] Don't generate files.h at build-time using an execution test.

The *_LOC variables are never used in the build itself, but only in the
built code; this means that they don't need to be known to ./configure at
all.

Since the previous method made acct not cross-compilable at all, this is
much preferred.

--- a/Makefile.am
+++ b/Makefile.am
@@ -66,11 +66,6 @@
 SYS_AC = @SYS_AC@
 SYS_SA = @SYS_SA@
 
-WTMP_FILE_LOC = @WTMP_FILE_LOC@
-ACCT_FILE_LOC = @ACCT_FILE_LOC@
-SAVACCT_FILE_LOC = @SAVACCT_FILE_LOC@
-USRACCT_FILE_LOC = @USRACCT_FILE_LOC@
-
 compare-ac: ac
 	@echo
 	@echo "Running tests for ac"
--- a/configure.ac
+++ b/configure.ac
@@ -159,101 +159,6 @@
 		AC_EGREP_HEADER([comp_t],[sys/acct.h],[AC_DEFINE(HAVE_COMP_T, 1, Define if <sys/acct.h> uses the COMP_T type.)])
   ) ]
 )
-dnl
-dnl find out where utmp/pacct are stored
-dnl
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <stdint.h>	/* GNU/kFreeBSD */
-#include <sys/acct.h>
-#include <utmp.h>
-
-#ifndef WTMP_FILE
-#  if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
-        || defined(__FreeBSD_kernel__)
-#    define WTMP_FILE "/var/log/wtmp"
-#  else
-#    if defined(sun) || defined(AMIX)
-#      define WTMP_FILE "/var/adm/wtmp"
-#    else
-#      if defined(sgi) || defined(SVR4)
-#        define WTMP_FILE "/usr/adm/wtmp"
-#      else
-#        define WTMP_FILE "/usr/adm/wtmp"
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifndef ACCT_FILE
-#  if defined(__FreeBSD__) || defined(__linux__) \
-        || defined(__FreeBSD_kernel__)
-#    define ACCT_FILE "/var/account/pacct"
-#  else
-#    if defined(__NetBSD__)
-#      define ACCT_FILE "/var/account/acct"
-#    else
-#      if defined(sun) || defined(AMIX)
-#        define ACCT_FILE "/var/adm/pacct"
-#      else
-#        if defined(sgi) || defined(SVR4) || defined(M_XENIX)
-#          define ACCT_FILE "/usr/adm/pacct"
-#        else
-#          define ACCT_FILE "/usr/adm/acct"
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifndef SAVACCT_FILE
-#  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
-        || defined(__FreeBSD_kernel__)
-#    define SAVACCT_FILE "/var/account/savacct"
-#  else
-#    if defined(sun) || defined(AMIX)
-#      define SAVACCT_FILE "/var/adm/savacct"
-#    else
-#      if defined(sgi) || defined(SVR4)
-#        define SAVACCT_FILE "/usr/adm/savacct"
-#      else
-#        define SAVACCT_FILE "/usr/adm/savacct"
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifndef USRACCT_FILE
-#  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
-        || defined(__FreeBSD_kernel__)
-#    define USRACCT_FILE "/var/account/usracct"
-#  else
-#    if defined(sun) || defined(AMIX)
-#      define USRACCT_FILE "/var/adm/usracct"
-#    else
-#      if defined(sgi) || defined(SVR4)
-#        define USRACCT_FILE "/usr/adm/usracct"
-#      else
-#        define USRACCT_FILE "/usr/adm/usracct"
-#      endif
-#    endif
-#  endif
-#endif
-
-main ()
-{
-  FILE *fp;
-  fp = fopen ("locs", "w");
-  fprintf (fp, "WTMP_FILE_LOC=%s\n", WTMP_FILE);
-  fprintf (fp, "ACCT_FILE_LOC=%s\n", ACCT_FILE);
-  fprintf (fp, "SAVACCT_FILE_LOC=%s\n", SAVACCT_FILE);
-  fprintf (fp, "USRACCT_FILE_LOC=%s\n", USRACCT_FILE);
-  fclose (fp);
-  exit(0);
-}
-]])],[. ./locs; rm locs],[echo "Error -- could not locate your wtmp and acct files."; exit 1],[echo "Sorry -- you cannot cross-compile this package (FIXME)."; exit 1 ])
 AC_TYPE_PID_T dnl for sys/acct.h
 AC_TYPE_UID_T dnl same as above
 AC_TYPE_SIZE_T
@@ -366,12 +271,6 @@
 AC_SUBST(LASTCOMM_MAN)
 AC_SUBST(SA_MAN)
 
-dnl Substitutions for file locations
-AC_SUBST(WTMP_FILE_LOC)
-AC_SUBST(ACCT_FILE_LOC)
-AC_SUBST(SAVACCT_FILE_LOC)
-AC_SUBST(USRACCT_FILE_LOC)
-
 dnl Dump the makefiles and etc.
-AC_CONFIG_FILES([Makefile lib/Makefile files.h version.h])
+AC_CONFIG_FILES([Makefile lib/Makefile version.h])
 AC_OUTPUT
--- /dev/null
+++ b/files.h
@@ -0,0 +1,123 @@
+/* files.h
+ *
+ * file locations
+ *
+ */
+
+#ifndef FILES_H
+#define FILES_H
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <stdint.h>	/* GNU/kFreeBSD */
+
+#ifdef LINUX_MULTIFORMAT
+# include "linux-acct.h"
+#else
+# include <stdint.h> /* GNU/kFreeBSD */
+# include <sys/acct.h>
+# if defined __FreeBSD__ || defined __FreeBSD_kernel__
+#  include <osreldate.h>
+#  if __FreeBSD_kernel__
+#   define __FreeBSD_version __FreeBSD_kernel_version
+#  endif /* __FreeBSD_kernel__ */
+#  if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
+#   define acct acctv2
+#   define ac_flag ac_flagx
+#  endif
+# endif
+#endif
+
+#include <utmp.h>
+
+#ifndef WTMP_FILE
+#  if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__linux__) \
+        || defined(__FreeBSD_kernel__)
+#    define WTMP_FILE "/var/log/wtmp"
+#  else
+#    if defined(sun) || defined(AMIX)
+#      define WTMP_FILE "/var/adm/wtmp"
+#    else
+#      if defined(sgi) || defined(SVR4)
+#        define WTMP_FILE "/usr/adm/wtmp"
+#      else
+#        define WTMP_FILE "/usr/adm/wtmp"
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifndef ACCT_FILE
+#  if defined(__FreeBSD__) || defined(__linux__) \
+        || defined(__FreeBSD_kernel__)
+#    define ACCT_FILE "/var/account/pacct"
+#  else
+#    if defined(__NetBSD__)
+#      define ACCT_FILE "/var/account/acct"
+#    else
+#      if defined(sun) || defined(AMIX)
+#        define ACCT_FILE "/var/adm/pacct"
+#      else
+#        if defined(sgi) || defined(SVR4) || defined(M_XENIX)
+#          define ACCT_FILE "/usr/adm/pacct"
+#        else
+#          define ACCT_FILE "/usr/adm/acct"
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifndef SAVACCT_FILE
+#  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+        || defined(__FreeBSD_kernel__)
+#    define SAVACCT_FILE "/var/account/savacct"
+#  else
+#    if defined(sun) || defined(AMIX)
+#      define SAVACCT_FILE "/var/adm/savacct"
+#    else
+#      if defined(sgi) || defined(SVR4)
+#        define SAVACCT_FILE "/usr/adm/savacct"
+#      else
+#        define SAVACCT_FILE "/usr/adm/savacct"
+#      endif
+#    endif
+#  endif
+#endif
+
+#ifndef USRACCT_FILE
+#  if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__linux__) \
+        || defined(__FreeBSD_kernel__)
+#    define USRACCT_FILE "/var/account/usracct"
+#  else
+#    if defined(sun) || defined(AMIX)
+#      define USRACCT_FILE "/var/adm/usracct"
+#    else
+#      if defined(sgi) || defined(SVR4)
+#        define USRACCT_FILE "/usr/adm/usracct"
+#      else
+#        define USRACCT_FILE "/usr/adm/usracct"
+#      endif
+#    endif
+#  endif
+#endif
+
+#define WTMP_FILE_LOC WTMP_FILE
+#define ACCT_FILE_LOC ACCT_FILE
+#define SAVACCT_FILE_LOC SAVACCT_FILE
+#define USRACCT_FILE_LOC USRACCT_FILE
+
+/* Workaround for a kernel includes problem */
+#if defined(__linux__) && defined(__alpha__)
+#undef AHZ
+#define AHZ 1024
+#endif
+
+#ifndef AHZ
+#define AHZ 64
+#endif
+
+#endif /* ! FILES_H */
--- a/files.h.in
+++ /dev/null
@@ -1,48 +0,0 @@
-/* files.h.in
- *
- * file locations
- *
- */
-
-#ifndef FILES_H
-#define FILES_H
-
-#include "config.h"
-
-#include <sys/types.h>
-
-#ifdef LINUX_MULTIFORMAT
-# include "linux-acct.h"
-#else
-# include <stdint.h> /* GNU/kFreeBSD */
-# include <sys/acct.h>
-# if defined __FreeBSD__ || defined __FreeBSD_kernel__
-#  include <osreldate.h>
-#  if __FreeBSD_kernel__
-#   define __FreeBSD_version __FreeBSD_kernel_version
-#  endif /* __FreeBSD_kernel__ */
-#  if __FreeBSD_version >= 700100 /* FreeBSD 7.0-STABLE */
-#   define acct acctv2
-#   define ac_flag ac_flagx
-#  endif
-# endif
-#endif
-
-#include <utmp.h>
-
-#define WTMP_FILE_LOC "@WTMP_FILE_LOC@"
-#define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
-#define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"
-#define USRACCT_FILE_LOC "@USRACCT_FILE_LOC@"
-
-/* Workaround for a kernel includes problem */
-#if defined(__linux__) && defined(__alpha__)
-#undef AHZ
-#define AHZ 1024
-#endif
-
-#ifndef AHZ
-#define AHZ 64
-#endif
-
-#endif /* ! FILES_H */





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in sys-devel/libtool: libtool-2.4-r4.ebuild ChangeLog libtool-2.4.2.ebuild libtool-9999.ebuild libtool-2.4-r3.ebuild
Next by thread:
gentoo-x86 commit in sys-process/acct: acct-6.5.5-r2.ebuild ChangeLog
Previous by date:
gentoo-x86 commit in sys-devel/libtool: libtool-2.4-r4.ebuild ChangeLog libtool-2.4.2.ebuild libtool-9999.ebuild libtool-2.4-r3.ebuild
Next by date:
gentoo-x86 commit in sys-process/acct: acct-6.5.5-r2.ebuild ChangeLog


Updated Jun 26, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.