diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-process/acct/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-process/acct/files')
-rw-r--r-- | sys-process/acct/files/acct-6.5.5-cross-compile.patch | 323 | ||||
-rw-r--r-- | sys-process/acct/files/acct-6.5.5-no-gets.patch | 22 | ||||
-rw-r--r-- | sys-process/acct/files/acct-6.6.1-cross-compile.patch | 324 | ||||
-rw-r--r-- | sys-process/acct/files/acct-6.6.1-math.patch | 27 | ||||
-rw-r--r-- | sys-process/acct/files/acct-6.6.1-no-gets.patch | 25 | ||||
-rw-r--r-- | sys-process/acct/files/acct-6.6.1-texi-failure.patch | 32 | ||||
-rw-r--r-- | sys-process/acct/files/acct-6.6.2-cross-compile.patch | 320 | ||||
-rw-r--r-- | sys-process/acct/files/acct.confd | 13 | ||||
-rw-r--r-- | sys-process/acct/files/acct.initd | 37 | ||||
-rw-r--r-- | sys-process/acct/files/acct.logrotate | 14 | ||||
-rw-r--r-- | sys-process/acct/files/acct.service | 14 |
11 files changed, 1151 insertions, 0 deletions
diff --git a/sys-process/acct/files/acct-6.5.5-cross-compile.patch b/sys-process/acct/files/acct-6.5.5-cross-compile.patch new file mode 100644 index 000000000000..2fb7bfa7bc25 --- /dev/null +++ b/sys-process/acct/files/acct-6.5.5-cross-compile.patch @@ -0,0 +1,323 @@ +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@gmail.com> +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 */ diff --git a/sys-process/acct/files/acct-6.5.5-no-gets.patch b/sys-process/acct/files/acct-6.5.5-no-gets.patch new file mode 100644 index 000000000000..3478b66de9db --- /dev/null +++ b/sys-process/acct/files/acct-6.5.5-no-gets.patch @@ -0,0 +1,22 @@ +hack until acct pulls a newer gnulib version + +From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001 +From: Eric Blake <eblake@redhat.com> +Date: Thu, 29 Mar 2012 13:30:41 -0600 +Subject: [PATCH] stdio: don't assume gets any more + +Gnulib intentionally does not have a gets module, and now that C11 +and glibc have dropped it, we should be more proactive about warning +any user on a platform that still has a declaration of this dangerous +interface. + +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -125,7 +125,6 @@ + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ + #undef gets +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/sys-process/acct/files/acct-6.6.1-cross-compile.patch b/sys-process/acct/files/acct-6.6.1-cross-compile.patch new file mode 100644 index 000000000000..67ac7d56fad0 --- /dev/null +++ b/sys-process/acct/files/acct-6.6.1-cross-compile.patch @@ -0,0 +1,324 @@ +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@gmail.com> +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. + +--- acct-6.6.1/configure.ac ++++ acct-6.6.1/configure.ac +@@ -228,102 +228,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__) || defined(__GLIBC__) +-# define WTMP_FILE "/var/log/account/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__) || defined(__GLIBC__) +-# define ACCT_FILE "/var/log/account/pacct" +-# else +-# if defined(__NetBSD__) +-# define ACCT_FILE "/var/log/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__) || defined(__GLIBC__) +-# define SAVACCT_FILE "/var/log/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__) || defined(__GLIBC__) +-# define USRACCT_FILE "/var/log/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 ]) +- + dnl types + AC_TYPE_PID_T dnl for sys/acct.h + AC_TYPE_UID_T dnl same as above +@@ -366,12 +270,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 +--- acct-6.6.1/files.h ++++ acct-6.6.1/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 */ +--- acct-6.6.1/files.h.in ++++ acct-6.6.1/files.h.in +@@ -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 */ +--- acct-6.6.1/Makefile.am ++++ acct-6.6.1/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" diff --git a/sys-process/acct/files/acct-6.6.1-math.patch b/sys-process/acct/files/acct-6.6.1-math.patch new file mode 100644 index 000000000000..a1d6fe72e758 --- /dev/null +++ b/sys-process/acct/files/acct-6.6.1-math.patch @@ -0,0 +1,27 @@ +https://savannah.gnu.org/bugs/?42973 +https://bugs.gentoo.org/519552 + +these files use frexp/ldexp which is in -lm + +--- a/Makefile.am ++++ b/Makefile.am +@@ -26,6 +26,7 @@ accton_SOURCES = accton.c common.c + + dump_acct_SOURCES = dump-acct.c common.c file_rd.c \ + pacct_rd.c ++dump_acct_LDADD = $(LDADD) -lm + + dump_utmp_SOURCES = dump-utmp.c common.c file_rd.c \ + utmp_rd.c +@@ -37,9 +38,11 @@ last_SOURCES = last.c common.c file_rd.c hashtab.c \ + + lastcomm_SOURCES = lastcomm.c common.c dev_hash.c file_rd.c \ + hashtab.c pacct_rd.c uid_hash.c ++lastcomm_LDADD = $(LDADD) -lm + + sa_SOURCES = sa.c common.c file_rd.c hashtab.c \ + pacct_rd.c uid_hash.c ++sa_LDADD = $(LDADD) -lm + + noinst_HEADERS = common.h config.h dev_hash.h file_rd.h hashtab.h \ + pacct_rd.h uid_hash.h utmp_rd.h al_share.cpp linux-acct.h diff --git a/sys-process/acct/files/acct-6.6.1-no-gets.patch b/sys-process/acct/files/acct-6.6.1-no-gets.patch new file mode 100644 index 000000000000..f2f83975d587 --- /dev/null +++ b/sys-process/acct/files/acct-6.6.1-no-gets.patch @@ -0,0 +1,25 @@ +hack until acct pulls a newer gnulib version + +From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001 +From: Eric Blake <eblake@redhat.com> +Date: Thu, 29 Mar 2012 13:30:41 -0600 +Subject: [PATCH] stdio: don't assume gets any more + +Gnulib intentionally does not have a gets module, and now that C11 +and glibc have dropped it, we should be more proactive about warning +any user on a platform that still has a declaration of this dangerous +interface. + +--- acct-6.6.1/lib/stdio.in.h ++++ acct-6.6.1/lib/stdio.in.h +@@ -699,10 +699,6 @@ + so any use of gets warrants an unconditional warning; besides, C11 + removed it. */ + #undef gets +-#if HAVE_RAW_DECL_GETS +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); +-#endif +- + + #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ + struct obstack; diff --git a/sys-process/acct/files/acct-6.6.1-texi-failure.patch b/sys-process/acct/files/acct-6.6.1-texi-failure.patch new file mode 100644 index 000000000000..aa9f3c3586b8 --- /dev/null +++ b/sys-process/acct/files/acct-6.6.1-texi-failure.patch @@ -0,0 +1,32 @@ +Description: Fix FTBFS with new texinfo. +Author: Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> + +--- acct-6.5.5.orig/accounting.texi ++++ acct-6.5.5/accounting.texi +@@ -66,7 +66,7 @@ approved by the Foundation. + @end titlepage + + @c ---------------------------------------------------------------------- +-@ifinfo ++@ifnottex + @node Top, Preface, (dir), (dir) + + Welcome to the GNU Accounting Utilities! If you don't have a clue about +@@ -77,7 +77,7 @@ program's name. + This is Edition @value{EDITION} of the documentation, updated + @value{UPDATED} for version @value{VERSION} of the GNU Accounting + Utilities. +-@end ifinfo ++@end ifnottex + + @menu + * Preface:: general information about the accounting utilities +@@ -468,7 +468,7 @@ overhead, it is forseeable that the entr + wrong order. GNU @code{ac} automatically compensates for this, but some + other @code{ac}s may not... beware. + +-@unnumberedsubsubsec The FTP Problem ++@unnumberedsubsec The FTP Problem + + I've tested the standard @code{ac} in Ultrix 4.2 (DECstation/DECsystem), + SunOS 4.1.1 (Sun3, Sun4, Sparc), Mach 2.5 (Omron/Luna), and DomainOS diff --git a/sys-process/acct/files/acct-6.6.2-cross-compile.patch b/sys-process/acct/files/acct-6.6.2-cross-compile.patch new file mode 100644 index 000000000000..70b0556fd486 --- /dev/null +++ b/sys-process/acct/files/acct-6.6.2-cross-compile.patch @@ -0,0 +1,320 @@ +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@gmail.com> +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 +@@ -69,11 +69,6 @@ SYS_LASTCOMM = @SYS_LASTCOMM@ + 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 +@@ -229,101 +229,6 @@ AC_CHECK_HEADER(sys/acct.h, + 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__) || defined(__GLIBC__) +-# define WTMP_FILE "/var/log/account/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__) || defined(__GLIBC__) +-# define ACCT_FILE "/var/log/account/pacct" +-# else +-# if defined(__NetBSD__) +-# define ACCT_FILE "/var/log/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__) || defined(__GLIBC__) +-# define SAVACCT_FILE "/var/log/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__) || defined(__GLIBC__) +-# define USRACCT_FILE "/var/log/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 ]) + + dnl types + AC_TYPE_PID_T dnl for sys/acct.h +@@ -367,12 +272,6 @@ AC_SUBST(ACCTON_MAN) + 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,120 @@ ++/* 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 defined __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__) || defined(__GLIBC__) ++# define WTMP_FILE "/var/log/account/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__) || defined(__GLIBC__) ++# define ACCT_FILE "/var/log/account/pacct" ++# else ++# if defined(__NetBSD__) ++# define ACCT_FILE "/var/log/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__) || defined(__GLIBC__) ++# define SAVACCT_FILE "/var/log/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__) || defined(__GLIBC__) ++# define USRACCT_FILE "/var/log/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 defined __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 */ diff --git a/sys-process/acct/files/acct.confd b/sys-process/acct/files/acct.confd new file mode 100644 index 000000000000..133efabcf62d --- /dev/null +++ b/sys-process/acct/files/acct.confd @@ -0,0 +1,13 @@ +# /etc/conf.d/acct + +# ACCT_LOG specifies the accounting logging file. +# Remember to create it manually if it doesn't yet exist. + +ACCT_LOG="/var/account/pacct" + +# REPORT_OPTS contains arguments for the "sa" command, +# used for console-reporting. +# Please run "sa --help" or "man sa" to get a description +# of available options. + +REPORT_OPTS="--sort-real-time --list-all-names --percentage" diff --git a/sys-process/acct/files/acct.initd b/sys-process/acct/files/acct.initd new file mode 100644 index 000000000000..a8f1d1ef205f --- /dev/null +++ b/sys-process/acct/files/acct.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="report" + +depend() { + need localmount +} + +checkconfig() { + export ACCT_LOG=${ACCT_LOG:-/var/account/pacct} + if [ ! -e "${ACCT_LOG}" ] ; then + touch "${ACCT_LOG}" + chmod 600 "${ACCT_LOG}" + fi + return 0 +} + +start() { + checkconfig || return 1 + + ebegin "Starting accounting" + accton "${ACCT_LOG}" >/dev/null + eend $? +} + +stop() { + ebegin "Stopping accounting" + accton off >/dev/null + eend $? +} + +report() { + sa ${REPORT_OPTS} "${ACCT_LOG}" +} diff --git a/sys-process/acct/files/acct.logrotate b/sys-process/acct/files/acct.logrotate new file mode 100644 index 000000000000..af6213434cd9 --- /dev/null +++ b/sys-process/acct/files/acct.logrotate @@ -0,0 +1,14 @@ +# Logrotate file for acct + +/var/account/pacct { + compress + delaycompress + notifempty + daily + rotate 31 + create 0600 root root + missingok + postrotate + /etc/init.d/acct --quiet --ifstarted restart + endscript +} diff --git a/sys-process/acct/files/acct.service b/sys-process/acct/files/acct.service new file mode 100644 index 000000000000..85a4cd3f7bcc --- /dev/null +++ b/sys-process/acct/files/acct.service @@ -0,0 +1,14 @@ +[Unit] +Description=Kernel process accounting +After=syslog.target +ConditionPathExists=/var/account + +[Service] +Type=oneshot +ExecStartPre=/bin/sh -c 'if [ ! -e /var/account/pacct ]; then /bin/touch /var/account/pacct ; /bin/chmod 0600 /var/account/pacct; fi' +ExecStart=/sbin/accton /var/account/pacct +ExecStop=/sbin/accton off +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target |