public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/
@ 2017-01-07 21:32 Robin H. Johnson
  0 siblings, 0 replies; 5+ messages in thread
From: Robin H. Johnson @ 2017-01-07 21:32 UTC (permalink / raw
  To: gentoo-commits

commit:     e5926f877e770d40534286630c96426885258393
Author:     Wim Muskee <wimmuskee <AT> gmail <DOT> com>
AuthorDate: Tue Dec 27 10:31:17 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Jan  7 21:32:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5926f87

sys-process/acct: initd implement checkpath, #603606

(cherry picked from commit 34607e7a775cc87873fd4710513f923b36ba75dc)
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 sys-process/acct/acct-6.5.5-r4.ebuild | 44 +++++++++++++++++++++++++++++++++
 sys-process/acct/acct-6.6.2-r1.ebuild | 46 +++++++++++++++++++++++++++++++++++
 sys-process/acct/files/acct.initd-r1  | 34 ++++++++++++++++++++++++++
 3 files changed, 124 insertions(+)

diff --git a/sys-process/acct/acct-6.5.5-r4.ebuild b/sys-process/acct/acct-6.5.5-r4.ebuild
new file mode 100644
index 00000000..0037b6d
--- /dev/null
+++ b/sys-process/acct/acct-6.5.5-r4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils autotools systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+src_prepare() {
+	epatch \
+		"${FILESDIR}"/${PN}-6.5.5-cross-compile.patch \
+		"${FILESDIR}"/${PN}-6.5.5-no-gets.patch
+	eautoreconf
+}
+
+src_configure() {
+	econf --enable-linux-multiformat
+}
+
+src_install() {
+	emake install DESTDIR="${D}" || die
+	dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
+	keepdir /var/account
+	newinitd "${FILESDIR}"/acct.initd-r1 acct || die
+	newconfd "${FILESDIR}"/acct.confd acct || die
+	systemd_dounit "${FILESDIR}"/acct.service
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/acct.logrotate acct || die
+
+	# sys-apps/sysvinit already provides this
+	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+	# accton in / is only a temp workaround for #239748
+	dodir /sbin
+	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}

diff --git a/sys-process/acct/acct-6.6.2-r1.ebuild b/sys-process/acct/acct-6.6.2-r1.ebuild
new file mode 100644
index 00000000..7e99af2
--- /dev/null
+++ b/sys-process/acct/acct-6.6.2-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools base systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.6.2-cross-compile.patch
+	"${FILESDIR}"/${PN}-6.6.1-no-gets.patch
+)
+
+src_prepare() {
+	base_src_prepare
+	eautoreconf
+}
+
+src_configure() {
+	econf --enable-linux-multiformat
+}
+
+src_install() {
+	default
+	keepdir /var/account
+	newinitd "${FILESDIR}"/acct.initd-r1 acct
+	newconfd "${FILESDIR}"/acct.confd acct
+	systemd_dounit "${FILESDIR}"/acct.service
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/acct.logrotate acct
+
+	# sys-apps/sysvinit already provides this
+	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+	# accton in / is only a temp workaround for #239748
+	dodir /sbin
+	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}

diff --git a/sys-process/acct/files/acct.initd-r1 b/sys-process/acct/files/acct.initd-r1
new file mode 100644
index 00000000..b895f22
--- /dev/null
+++ b/sys-process/acct/files/acct.initd-r1
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# 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}
+	checkpath -f -m 600 "${ACCT_LOG}"
+	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}"
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/
@ 2017-07-27 14:04 Thomas Deutschmann
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Deutschmann @ 2017-07-27 14:04 UTC (permalink / raw
  To: gentoo-commits

commit:     ce3320b8f7c1530d7438cd4774a72a75266e1c0b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 14:03:48 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 27 14:04:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce3320b8

sys-process/acct: Bump to v6.6.4

Ebuild changes:
===============
 - Migrated to EAPI=6

 - Dropped usage of base eclass which is no longer needed

 - *-no-gets.patch dropped which is no longer necessary since upstream
   updated gnulib in v6.6.1

 - Runscript improved

   - A running instance will now remember the accounting file

   - Make use of start_pre() function

 - Logrotate script will now work for systemd users as well (bug #508512)

Gentoo-Bug: https://bugs.gentoo.org/508512
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sys-process/acct/Manifest                          |   1 +
 sys-process/acct/acct-6.6.4.ebuild                 |  44 +++++
 .../acct/files/acct-6.6.4-cross-compile.patch      | 220 +++++++++++++++++++++
 sys-process/acct/files/acct.confd-r1               |  11 ++
 sys-process/acct/files/acct.initd-r2               |  65 ++++++
 sys-process/acct/files/acct.logrotate-r1           |  18 ++
 6 files changed, 359 insertions(+)

diff --git a/sys-process/acct/Manifest b/sys-process/acct/Manifest
index 81a3d0153a7..1b984e9bdce 100644
--- a/sys-process/acct/Manifest
+++ b/sys-process/acct/Manifest
@@ -1,3 +1,4 @@
 DIST acct-6.5.5.tar.gz 747225 SHA256 4163c87b9e92a73a65eaeadc6c41caa4626da782ff26d6e7a945edcc140a6fd5 SHA512 6a36548cfe0e68829c94780aac4053f8a5840c5a704b88a9562758408dc64b4e26965743aec51ef02f7780efcfbf42d20805fecb12a68e7e1f279a1259151fb0 WHIRLPOOL 30c431dfe3af181770e261470090528fd21d41b45a234181ef0f1a62226979d4de38f851b1d5e200feba5b08acf30d2fe18a517f6096f3fcbc8e32dca9630be4
 DIST acct-6.6.1.tar.gz 2869677 SHA256 554515611ef9299012b7510050868a48fc178ce1544947123ab46ec50230ffcb SHA512 4bc3d6b41aeafcf8acfdd020057f1b6f15eea3589981387bca7e57aa8fe71d058e8def97f139dd2c11a1ac39f2d8b95bd103d31caff042cf716dd961b9588f5d WHIRLPOOL 097b7c5f55aac40dd5d63b6ce80a1c2809241f3999c15d5c2c3d8f418f1e51b90ed3c5937655dafd9d702fc72b1d1a6faae870e0c2722c3716e097d5d3b98cd1
 DIST acct-6.6.2.tar.gz 852375 SHA256 8ed47b2f893b08f0d67720880adbb48b835a826c314fa52fd52af1cee6870101 SHA512 5942aa3d1faebb29bd6d6ff97c2ba8525dc5a9c85522c3f549ce0772042d3736e19126ddd7e10fe0681a6ac496b8d3aafda0894577a3b64c59f3b78fc222d2b3 WHIRLPOOL 135be28fb3b99ae5c4fb03d21d73a2bb2659d4e209a1444bb4741ae95761191ac74874f0476d3413c4221e2b321de2adf45240b2335b5cac92083d32ab547ebe
+DIST acct-6.6.4.tar.gz 853273 SHA256 4c15bf2b58b16378bcc83f70e77d4d40ab0b194acf2ebeefdb507f151faa663f SHA512 413aa446caece8fd773c92e2995bbaa034f63dd0ced521815a676c49f118e02982862b9c0ab7e60be5212c87d1e82ba6325bda212cf4857392a068d359a1e2c2 WHIRLPOOL 28c5405da1e19aa0690fef35e11bbae906e1b9f66724584edbc0b444fb138c71a1d0c9cc5738c249061e32ff0c84053168a0ffe743a0bf583395d4b47b4ae89f

diff --git a/sys-process/acct/acct-6.6.4.ebuild b/sys-process/acct/acct-6.6.4.ebuild
new file mode 100644
index 00000000000..46888474a25
--- /dev/null
+++ b/sys-process/acct/acct-6.6.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools systemd
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.6.4-cross-compile.patch
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf --enable-linux-multiformat
+}
+
+src_install() {
+	default
+	keepdir /var/account
+	newinitd "${FILESDIR}"/acct.initd-r2 acct
+	newconfd "${FILESDIR}"/acct.confd-r1 acct
+	systemd_dounit "${FILESDIR}"/acct.service
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/acct.logrotate-r1 acct
+
+	# sys-apps/sysvinit already provides this
+	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+	# accton in / is only a temp workaround for #239748
+	dodir /sbin
+	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
+}

diff --git a/sys-process/acct/files/acct-6.6.4-cross-compile.patch b/sys-process/acct/files/acct-6.6.4-cross-compile.patch
new file mode 100644
index 00000000000..c4938d956dd
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.4-cross-compile.patch
@@ -0,0 +1,220 @@
+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.
+
+Author:  Diego Elio Pettenò <flameeyes@gmail.com>
+Upstream: https://savannah.gnu.org/patch/?7473
+
+--- 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,97 +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_PROGRAM([[
+-#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
+-]], [[
+-  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);
+-]])],[. ./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
+@@ -363,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_OUTPUT
+--- a/files.h.in
++++ b/files.h.in
+@@ -30,6 +30,78 @@
+ 
+ #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_LOC@"
+ #define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
+ #define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"

diff --git a/sys-process/acct/files/acct.confd-r1 b/sys-process/acct/files/acct.confd-r1
new file mode 100644
index 00000000000..4a05da34bcc
--- /dev/null
+++ b/sys-process/acct/files/acct.confd-r1
@@ -0,0 +1,11 @@
+# /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-r2 b/sys-process/acct/files/acct.initd-r2
new file mode 100644
index 00000000000..4b3a5f3a50b
--- /dev/null
+++ b/sys-process/acct/files/acct.initd-r2
@@ -0,0 +1,65 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+ : ${ACCT_LOG:=/var/account/pacct}
+ : ${REPORT_OPTS:="--sort-real-time --list-all-names --percentage"}
+
+extra_started_commands="report"
+
+depend() {
+	need localmount
+}
+
+_checkconfig() {
+	if [ -z "${ACCT_LOG}" ]; then
+		eerror "No accounting file specified!"
+		return 1
+	fi
+
+	checkpath -f -m 600 "${ACCT_LOG}"
+}
+
+_get_service_value() {
+	local _name=$1
+
+	local _default_value=
+	if [ -n "${2}" ]; then
+		_default_value=$2
+	fi
+
+	local _service_value=$(service_get_value ${_name})
+	if [ -n "${_service_value}" ]; then
+		echo "${_service_value}"
+	else
+		echo "${_default_value}"
+	fi
+
+	return 0
+}
+
+ACCT_LOG=$(_get_service_value ACCT_LOG "${ACCT_LOG}")
+
+start_pre() {
+	_checkconfig || return 1
+}
+
+start() {
+	ebegin "Starting accounting"
+	accton "${ACCT_LOG}" >/dev/null
+	eend $?
+}
+
+start_post() {
+	service_set_value ACCT_LOG "${ACCT_LOG}"
+}
+
+stop() {
+	ebegin "Stopping accounting"
+	accton off >/dev/null
+	eend $?
+}
+
+report() {
+	sa ${REPORT_OPTS} "${ACCT_LOG}"
+}

diff --git a/sys-process/acct/files/acct.logrotate-r1 b/sys-process/acct/files/acct.logrotate-r1
new file mode 100644
index 00000000000..3587e5acfa6
--- /dev/null
+++ b/sys-process/acct/files/acct.logrotate-r1
@@ -0,0 +1,18 @@
+# Logrotate file for acct
+
+/var/account/pacct {
+	compress
+	delaycompress
+	notifempty
+	daily
+	rotate 31
+	create 0600 root root
+	missingok
+	postrotate
+		if type -p systemctl 2>&1 1>/dev/null && systemctl is-system-running 2>&1 1>/dev/null ; then
+			systemctl try-restart acct 1>/dev/null
+		else
+			/etc/init.d/acct --quiet --ifstarted restart
+		fi
+	endscript
+}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/
@ 2017-12-12 15:10 Lars Wendler
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Wendler @ 2017-12-12 15:10 UTC (permalink / raw
  To: gentoo-commits

commit:     8427a9e87b372c0b9dc9e8a91b9185ede4e4d1ec
Author:     Harri Nieminen <moikkis <AT> gmail <DOT> com>
AuthorDate: Sun Dec  3 07:19:09 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Dec 12 15:10:46 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8427a9e8

sys-process/acct: Remove old

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 sys-process/acct/Manifest                          |   3 -
 sys-process/acct/acct-6.5.5-r4.ebuild              |  43 ---
 sys-process/acct/acct-6.6.1.ebuild                 |  48 ---
 sys-process/acct/acct-6.6.2-r1.ebuild              |  45 ---
 sys-process/acct/acct-6.6.2.ebuild                 |  45 ---
 sys-process/acct/acct-6.6.4.ebuild                 |  44 ---
 .../acct/files/acct-6.5.5-cross-compile.patch      | 323 --------------------
 sys-process/acct/files/acct-6.5.5-no-gets.patch    |  22 --
 .../acct/files/acct-6.6.1-cross-compile.patch      | 324 ---------------------
 sys-process/acct/files/acct-6.6.1-math.patch       |  27 --
 sys-process/acct/files/acct-6.6.1-no-gets.patch    |  25 --
 .../acct/files/acct-6.6.1-texi-failure.patch       |  32 --
 .../acct/files/acct-6.6.2-cross-compile.patch      | 320 --------------------
 sys-process/acct/files/acct.confd                  |  13 -
 sys-process/acct/files/acct.initd                  |  36 ---
 sys-process/acct/files/acct.initd-r1               |  33 ---
 sys-process/acct/files/acct.logrotate              |  14 -
 17 files changed, 1397 deletions(-)

diff --git a/sys-process/acct/Manifest b/sys-process/acct/Manifest
index 917c33fe087..20b32d7064c 100644
--- a/sys-process/acct/Manifest
+++ b/sys-process/acct/Manifest
@@ -1,4 +1 @@
-DIST acct-6.5.5.tar.gz 747225 BLAKE2B 7e44b8a3ccbaf31511185717c00089cee6ce55fb571a34a808aa26f919ed3d1f153a76bb9fd6a449adf1a298cec08e166a80f824f5813b7fd09fbbe35e4e17cc SHA512 6a36548cfe0e68829c94780aac4053f8a5840c5a704b88a9562758408dc64b4e26965743aec51ef02f7780efcfbf42d20805fecb12a68e7e1f279a1259151fb0
-DIST acct-6.6.1.tar.gz 2869677 BLAKE2B 8d84200d235f12bda99213d4910a24958b7ac77b9c6bb060d85926cc1ba04b67776cd5e7e3f88076ffaa4fa3540f53ae012b2a8dbc9198bf137d0c24a701ae71 SHA512 4bc3d6b41aeafcf8acfdd020057f1b6f15eea3589981387bca7e57aa8fe71d058e8def97f139dd2c11a1ac39f2d8b95bd103d31caff042cf716dd961b9588f5d
-DIST acct-6.6.2.tar.gz 852375 BLAKE2B 34de3765ced8cf3f9e57428ce222c5e69a6c38b3d39be4c7f3482e9300713e0d7bff945fecf75a29ccc3056cda1558a3bf05b4e1b3413c2d5b3912f4c7208c9c SHA512 5942aa3d1faebb29bd6d6ff97c2ba8525dc5a9c85522c3f549ce0772042d3736e19126ddd7e10fe0681a6ac496b8d3aafda0894577a3b64c59f3b78fc222d2b3
 DIST acct-6.6.4.tar.gz 853273 BLAKE2B 2ee42ae849f8e7c5c6dbe33d45e944f945cef87a5fef0074ac31848547ab9b7068509bce3c4b47b35bfde49b02daf43ae812cc58284c50185e4bdc660dccae52 SHA512 413aa446caece8fd773c92e2995bbaa034f63dd0ced521815a676c49f118e02982862b9c0ab7e60be5212c87d1e82ba6325bda212cf4857392a068d359a1e2c2

diff --git a/sys-process/acct/acct-6.5.5-r4.ebuild b/sys-process/acct/acct-6.5.5-r4.ebuild
deleted file mode 100644
index fbfc364215c..00000000000
--- a/sys-process/acct/acct-6.5.5-r4.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=3
-inherit eutils autotools systemd
-
-DESCRIPTION="GNU system accounting utilities"
-HOMEPAGE="https://savannah.gnu.org/projects/acct/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-src_prepare() {
-	epatch \
-		"${FILESDIR}"/${PN}-6.5.5-cross-compile.patch \
-		"${FILESDIR}"/${PN}-6.5.5-no-gets.patch
-	eautoreconf
-}
-
-src_configure() {
-	econf --enable-linux-multiformat
-}
-
-src_install() {
-	emake install DESTDIR="${D}" || die
-	dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
-	keepdir /var/account
-	newinitd "${FILESDIR}"/acct.initd-r1 acct || die
-	newconfd "${FILESDIR}"/acct.confd acct || die
-	systemd_dounit "${FILESDIR}"/acct.service
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/acct.logrotate acct || die
-
-	# sys-apps/sysvinit already provides this
-	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
-
-	# accton in / is only a temp workaround for #239748
-	dodir /sbin
-	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
-}

diff --git a/sys-process/acct/acct-6.6.1.ebuild b/sys-process/acct/acct-6.6.1.ebuild
deleted file mode 100644
index f1852b70af1..00000000000
--- a/sys-process/acct/acct-6.6.1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools base systemd
-
-DESCRIPTION="GNU system accounting utilities"
-HOMEPAGE="https://savannah.gnu.org/projects/acct/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-PATCHES=(
-	"${FILESDIR}"/${P}-cross-compile.patch
-	"${FILESDIR}"/${P}-no-gets.patch
-	"${FILESDIR}"/${P}-texi-failure.patch
-	"${FILESDIR}"/${P}-math.patch
-)
-
-src_prepare() {
-	base_src_prepare
-	eautoreconf
-}
-
-src_configure() {
-	econf --enable-linux-multiformat
-}
-
-src_install() {
-	emake install DESTDIR="${D}"
-	dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
-	keepdir /var/account
-	newinitd "${FILESDIR}"/acct.initd acct
-	newconfd "${FILESDIR}"/acct.confd acct
-	systemd_dounit "${FILESDIR}"/acct.service
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/acct.logrotate acct
-
-	# sys-apps/sysvinit already provides this
-	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
-
-	# accton in / is only a temp workaround for #239748
-	dodir /sbin
-	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
-}

diff --git a/sys-process/acct/acct-6.6.2-r1.ebuild b/sys-process/acct/acct-6.6.2-r1.ebuild
deleted file mode 100644
index 22276e67c86..00000000000
--- a/sys-process/acct/acct-6.6.2-r1.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools base systemd
-
-DESCRIPTION="GNU system accounting utilities"
-HOMEPAGE="https://savannah.gnu.org/projects/acct/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.6.2-cross-compile.patch
-	"${FILESDIR}"/${PN}-6.6.1-no-gets.patch
-)
-
-src_prepare() {
-	base_src_prepare
-	eautoreconf
-}
-
-src_configure() {
-	econf --enable-linux-multiformat
-}
-
-src_install() {
-	default
-	keepdir /var/account
-	newinitd "${FILESDIR}"/acct.initd-r1 acct
-	newconfd "${FILESDIR}"/acct.confd acct
-	systemd_dounit "${FILESDIR}"/acct.service
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/acct.logrotate acct
-
-	# sys-apps/sysvinit already provides this
-	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
-
-	# accton in / is only a temp workaround for #239748
-	dodir /sbin
-	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
-}

diff --git a/sys-process/acct/acct-6.6.2.ebuild b/sys-process/acct/acct-6.6.2.ebuild
deleted file mode 100644
index 95199c408ee..00000000000
--- a/sys-process/acct/acct-6.6.2.ebuild
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit autotools base systemd
-
-DESCRIPTION="GNU system accounting utilities"
-HOMEPAGE="https://savannah.gnu.org/projects/acct/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.6.2-cross-compile.patch
-	"${FILESDIR}"/${PN}-6.6.1-no-gets.patch
-)
-
-src_prepare() {
-	base_src_prepare
-	eautoreconf
-}
-
-src_configure() {
-	econf --enable-linux-multiformat
-}
-
-src_install() {
-	default
-	keepdir /var/account
-	newinitd "${FILESDIR}"/acct.initd acct
-	newconfd "${FILESDIR}"/acct.confd acct
-	systemd_dounit "${FILESDIR}"/acct.service
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/acct.logrotate acct
-
-	# sys-apps/sysvinit already provides this
-	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
-
-	# accton in / is only a temp workaround for #239748
-	dodir /sbin
-	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
-}

diff --git a/sys-process/acct/acct-6.6.4.ebuild b/sys-process/acct/acct-6.6.4.ebuild
deleted file mode 100644
index 46888474a25..00000000000
--- a/sys-process/acct/acct-6.6.4.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools systemd
-
-DESCRIPTION="GNU system accounting utilities"
-HOMEPAGE="https://savannah.gnu.org/projects/acct/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.6.4-cross-compile.patch
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf --enable-linux-multiformat
-}
-
-src_install() {
-	default
-	keepdir /var/account
-	newinitd "${FILESDIR}"/acct.initd-r2 acct
-	newconfd "${FILESDIR}"/acct.confd-r1 acct
-	systemd_dounit "${FILESDIR}"/acct.service
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/acct.logrotate-r1 acct
-
-	# sys-apps/sysvinit already provides this
-	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
-
-	# accton in / is only a temp workaround for #239748
-	dodir /sbin
-	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
-}

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
deleted file mode 100644
index 2fb7bfa7bc2..00000000000
--- a/sys-process/acct/files/acct-6.5.5-cross-compile.patch
+++ /dev/null
@@ -1,323 +0,0 @@
-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
deleted file mode 100644
index 3478b66de9d..00000000000
--- a/sys-process/acct/files/acct-6.5.5-no-gets.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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
deleted file mode 100644
index 67ac7d56fad..00000000000
--- a/sys-process/acct/files/acct-6.6.1-cross-compile.patch
+++ /dev/null
@@ -1,324 +0,0 @@
-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
deleted file mode 100644
index a1d6fe72e75..00000000000
--- a/sys-process/acct/files/acct-6.6.1-math.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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
deleted file mode 100644
index f2f83975d58..00000000000
--- a/sys-process/acct/files/acct-6.6.1-no-gets.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-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
deleted file mode 100644
index aa9f3c3586b..00000000000
--- a/sys-process/acct/files/acct-6.6.1-texi-failure.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-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
deleted file mode 100644
index 70b0556fd48..00000000000
--- a/sys-process/acct/files/acct-6.6.2-cross-compile.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-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
deleted file mode 100644
index 133efabcf62..00000000000
--- a/sys-process/acct/files/acct.confd
+++ /dev/null
@@ -1,13 +0,0 @@
-# /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
deleted file mode 100644
index d6d9dfd6245..00000000000
--- a/sys-process/acct/files/acct.initd
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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.initd-r1 b/sys-process/acct/files/acct.initd-r1
deleted file mode 100644
index 09d9739fea2..00000000000
--- a/sys-process/acct/files/acct.initd-r1
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-extra_started_commands="report"
-
-depend() {
-	need localmount
-}
-
-checkconfig() {
-	export ACCT_LOG=${ACCT_LOG:-/var/account/pacct}
-	checkpath -f -m 600 "${ACCT_LOG}"
-	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
deleted file mode 100644
index af6213434cd..00000000000
--- a/sys-process/acct/files/acct.logrotate
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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
-}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/
@ 2021-10-03 11:28 David Seifert
  0 siblings, 0 replies; 5+ messages in thread
From: David Seifert @ 2021-10-03 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     c72f950cc703b57d854e42af6decef52be744307
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  3 11:28:03 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Oct  3 11:28:03 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c72f950c

sys-process/acct: drop 6.6.4-r1

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-process/acct/acct-6.6.4-r1.ebuild              |  46 -----
 .../acct/files/acct-6.6.4-cross-compile.patch      | 220 ---------------------
 2 files changed, 266 deletions(-)

diff --git a/sys-process/acct/acct-6.6.4-r1.ebuild b/sys-process/acct/acct-6.6.4-r1.ebuild
deleted file mode 100644
index 6b534384168..00000000000
--- a/sys-process/acct/acct-6.6.4-r1.ebuild
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools systemd
-
-DESCRIPTION="GNU system accounting utilities"
-HOMEPAGE="https://savannah.gnu.org/projects/acct/"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
-IUSE=""
-
-DEPEND="sys-apps/texinfo"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-6.6.4-cross-compile.patch
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf --enable-linux-multiformat
-}
-
-src_install() {
-	default
-	keepdir /var/account
-	newinitd "${FILESDIR}"/acct.initd-r2 acct
-	newconfd "${FILESDIR}"/acct.confd-r1 acct
-	systemd_dounit "${FILESDIR}"/acct.service
-	insinto /etc/logrotate.d
-	newins "${FILESDIR}"/acct.logrotate-r1 psacct
-
-	# sys-apps/sysvinit already provides this
-	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
-
-	# accton in / is only a temp workaround for #239748
-	dodir /sbin
-	mv "${ED}"/usr/sbin/accton "${ED}"/sbin/ || die
-}

diff --git a/sys-process/acct/files/acct-6.6.4-cross-compile.patch b/sys-process/acct/files/acct-6.6.4-cross-compile.patch
deleted file mode 100644
index c4938d956dd..00000000000
--- a/sys-process/acct/files/acct-6.6.4-cross-compile.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-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.
-
-Author:  Diego Elio Pettenò <flameeyes@gmail.com>
-Upstream: https://savannah.gnu.org/patch/?7473
-
---- 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,97 +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_PROGRAM([[
--#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
--]], [[
--  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);
--]])],[. ./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
-@@ -363,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_OUTPUT
---- a/files.h.in
-+++ b/files.h.in
-@@ -30,6 +30,78 @@
- 
- #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_LOC@"
- #define ACCT_FILE_LOC "@ACCT_FILE_LOC@"
- #define SAVACCT_FILE_LOC "@SAVACCT_FILE_LOC@"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/
@ 2024-03-01  7:55 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-03-01  7:55 UTC (permalink / raw
  To: gentoo-commits

commit:     038e31c37d6e59768ae7abf5083559a0950c308f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  1 06:08:16 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar  1 07:54:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=038e31c3

sys-process/acct: update EAPI 7 -> 8, fix _F_S=3 crash, fix startup

* EAPI 8
* Fix crash with _FORTIFY_SOURCE=3 (bug #925419)
* Use tmpfiles to create /var/accounts/pacct which fixes startup/use on new installs
* Drop ancient workaround (bug #239748)

Bug: https://bugs.gentoo.org/239748
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-process/acct/acct-6.6.4-r4.ebuild              | 55 ++++++++++++++++++++++
 ...-fortify-source-3-sprintf-buffer-overflow.patch | 15 ++++++
 sys-process/acct/files/acct.tmpfiles               |  1 +
 3 files changed, 71 insertions(+)

diff --git a/sys-process/acct/acct-6.6.4-r4.ebuild b/sys-process/acct/acct-6.6.4-r4.ebuild
new file mode 100644
index 000000000000..980c95891435
--- /dev/null
+++ b/sys-process/acct/acct-6.6.4-r4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd tmpfiles
+
+DESCRIPTION="GNU system accounting utilities"
+HOMEPAGE="https://savannah.gnu.org/projects/acct/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-acct )"
+BDEPEND="sys-apps/texinfo"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-6.6.4-cross-compile-fixed.patch
+	"${FILESDIR}"/${PN}-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	econf --enable-linux-multiformat
+}
+
+src_install() {
+	default
+
+	keepdir /var/account
+
+	newinitd "${FILESDIR}"/acct.initd-r2 acct
+	newconfd "${FILESDIR}"/acct.confd-r1 acct
+
+	systemd_dounit "${FILESDIR}"/acct.service
+
+	insinto /etc/logrotate.d
+	newins "${FILESDIR}"/acct.logrotate-r1 psacct
+
+	# sys-apps/sysvinit already provides this
+	rm "${ED}"/usr/bin/last "${ED}"/usr/share/man/man1/last.1 || die
+
+	newtmpfiles "${FILESDIR}"/acct.tmpfiles acct.conf
+}
+
+pkg_postinst() {
+	tmpfiles_process acct.conf
+}

diff --git a/sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch b/sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch
new file mode 100644
index 000000000000..83f6e33415e7
--- /dev/null
+++ b/sys-process/acct/files/acct-6.6.4-fortify-source-3-sprintf-buffer-overflow.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/925419
+https://bugzilla.redhat.com/2190057
+https://src.fedoraproject.org/rpms/psacct/blob/rawhide/f/psacct-6.6.4-sprintf-buffer-overflow.patch
+
+--- a/dev_hash.c
++++ b/dev_hash.c
+@@ -147,7 +147,7 @@ static void setup_devices(char *dirname)
+     {
+       char *fullname = (char *) alloca ((strlen (dirname)
+                                          + NAMLEN (dp)
+-                                         + 1) * sizeof (char));
++                                         + 2) * sizeof (char));  /* slash + null; Fedora BZ#2190057 */
+ 
+       (void)sprintf (fullname, "%s/%s", dirname, dp->d_name);
+       if (stat (fullname, &sp))

diff --git a/sys-process/acct/files/acct.tmpfiles b/sys-process/acct/files/acct.tmpfiles
new file mode 100644
index 000000000000..8f2b1e6f303c
--- /dev/null
+++ b/sys-process/acct/files/acct.tmpfiles
@@ -0,0 +1 @@
+f	/var/account/pacct	0600    -	-	-       -


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-01  7:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-07 21:32 [gentoo-commits] repo/gentoo:master commit in: sys-process/acct/, sys-process/acct/files/ Robin H. Johnson
  -- strict thread matches above, loose matches on Subject: below --
2017-07-27 14:04 Thomas Deutschmann
2017-12-12 15:10 Lars Wendler
2021-10-03 11:28 David Seifert
2024-03-01  7:55 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox