diff options
Diffstat (limited to 'sys-process')
358 files changed, 13309 insertions, 0 deletions
diff --git a/sys-process/acct/Manifest b/sys-process/acct/Manifest new file mode 100644 index 000000000000..81a3d0153a76 --- /dev/null +++ b/sys-process/acct/Manifest @@ -0,0 +1,3 @@ +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 diff --git a/sys-process/acct/acct-6.5.5-r3.ebuild b/sys-process/acct/acct-6.5.5-r3.ebuild new file mode 100644 index 000000000000..2d11b5144d53 --- /dev/null +++ b/sys-process/acct/acct-6.5.5-r3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2013 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 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 new file mode 100644 index 000000000000..665f7897d912 --- /dev/null +++ b/sys-process/acct/acct-6.6.1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 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}"/${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.ebuild b/sys-process/acct/acct-6.6.2.ebuild new file mode 100644 index 000000000000..e28e724c187e --- /dev/null +++ b/sys-process/acct/acct-6.6.2.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2014 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 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-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 diff --git a/sys-process/acct/metadata.xml b/sys-process/acct/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-process/acct/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/anacron/Manifest b/sys-process/anacron/Manifest new file mode 100644 index 000000000000..b5eb761d83de --- /dev/null +++ b/sys-process/anacron/Manifest @@ -0,0 +1 @@ +DIST anacron-2.3.tar.gz 24140 SHA256 5ceee6f22cd089bdaf1c0841200dbe5726babaf9e2c432bb17c1fc95da5ca99f SHA512 27bbbfad5bc35ddc68e4345c3a3acefd0a6f794aaba890f7c75ec42b2e4c4200fbb1667e75b2e344afb7722bdc9ba3dc5a7db66d3369808bc9f483ea3509849c WHIRLPOOL 119193e7a44855ab3844755ac0d912bc14d6ee55638a2979d7a107f99062c5f0f2bd27f45a429dcf0b8bfc3187c33b10374a0f6a83303a9539dd1eae95fd3d00 diff --git a/sys-process/anacron/anacron-2.3-r2.ebuild b/sys-process/anacron/anacron-2.3-r2.ebuild new file mode 100644 index 000000000000..73102c1c6a3f --- /dev/null +++ b/sys-process/anacron/anacron-2.3-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils + +DESCRIPTION="a periodic command scheduler" +HOMEPAGE="http://anacron.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="amd64 ~arm ppc x86" +IUSE="" + +DEPEND=">=sys-apps/sed-4 + sys-process/cronbase" +RDEPEND="virtual/mta + virtual/cron" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-compile-fix-from-debian.patch + sed -i "s:^CFLAGS =:CFLAGS = $CFLAGS:" Makefile +} + +src_compile() { + emake || die +} + +src_install() { + #this does not work if the directory exists already + diropts -m0750 -o root -g cron + keepdir /var/spool/anacron + + doman anacrontab.5 anacron.8 + + newinitd "${FILESDIR}"/anacron.rc6 anacron + + dodoc ChangeLog README TODO + + insinto /usr/sbin + insopts -o root -g root -m 0750 ; doins anacron + + insinto /etc + doins "${FILESDIR}"/anacrontab +} + +pkg_postinst() { + einfo "Schedule the command \"anacron -s\" as a daily cron-job (preferably" + einfo "at some early morning hour). This will make sure that jobs are run" + einfo "when the systems is left running for a night." + einfo "" + einfo "Update /etc/anacrontab to include what you want anacron to run." + + echo + einfo "You may wish to read the Gentoo Linux Cron Guide, which can be" + einfo "found online at:" + einfo " http://www.gentoo.org/doc/en/cron-guide.xml" + echo +} diff --git a/sys-process/anacron/files/anacron-2.3-compile-fix-from-debian.patch b/sys-process/anacron/files/anacron-2.3-compile-fix-from-debian.patch new file mode 100644 index 000000000000..174a975f0ca3 --- /dev/null +++ b/sys-process/anacron/files/anacron-2.3-compile-fix-from-debian.patch @@ -0,0 +1,11 @@ +--- anacron-2.3/gregor.c 2000-06-23 02:00:14.000000000 +0200 ++++ anacron-2.3-maks/gregor.c 2004-03-26 20:45:13.000000000 +0100 +@@ -65,7 +65,7 @@ + { + int dn; + int i; +- const int isleap; /* save three calls to leap() */ ++ int isleap; /* save three calls to leap() */ + + /* Some validity checks */ + diff --git a/sys-process/anacron/files/anacron.rc6 b/sys-process/anacron/files/anacron.rc6 new file mode 100755 index 000000000000..4e4a0a78e903 --- /dev/null +++ b/sys-process/anacron/files/anacron.rc6 @@ -0,0 +1,15 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use logger + need clock hostname +} + +start() { + ebegin "Running anacron" + /usr/sbin/anacron -s >>/var/log/cron.log 2>&1 + eend $? +} diff --git a/sys-process/anacron/files/anacrontab b/sys-process/anacron/files/anacrontab new file mode 100644 index 000000000000..c279929fcb65 --- /dev/null +++ b/sys-process/anacron/files/anacrontab @@ -0,0 +1,11 @@ +SHELL=/bin/sh +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +# format: period delay job-identifier command +## +## If you turn any of the following on, make sure that the +## regular cron daemon does not run them also. This could +## lead to double execution of the jobs. +#1 5 cron.daily run-parts /etc/cron.daily +#7 10 cron.weekly run-parts /etc/cron.weekly +#30 15 cron.monthly run-parts /etc/cron.monthly + diff --git a/sys-process/anacron/metadata.xml b/sys-process/anacron/metadata.xml new file mode 100644 index 000000000000..9ac2d4e1c668 --- /dev/null +++ b/sys-process/anacron/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cron</herd> + <upstream> + <remote-id type="sourceforge">anacron</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/at/Manifest b/sys-process/at/Manifest new file mode 100644 index 000000000000..9414db555d7d --- /dev/null +++ b/sys-process/at/Manifest @@ -0,0 +1,2 @@ +DIST at_3.1.14.orig.tar.gz 122865 SHA256 cd092bf05d29c25b286f55a960ce8b8c3c5beb571d86ed8eb1dfb3b61291b3ae SHA512 06c0e66062a4e96a4a86c7a01d4ec93d47a1a40f7bc0649b3ddb1775b47a2d32d5e6ec9f9f4bdd044ed72e8c327f85128b19f7dc5e467d406d2d106a6952f7b2 WHIRLPOOL 3c6ca09e46531a12eda7f99710cf461f6831c3a1fd48d67b24e631362149b760b4906852b3bd5f6c03cfae6ce0f21eb5bd386ec7f8e3e1ea1cf3d960577a6036 +DIST at_3.1.16.orig.tar.gz 123174 SHA256 cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1 SHA512 d63132536d01153c4b38499b316c8a7980cd47a75b00fb5edc6e41f24345f97b55b20e5801d50f1bde2f337acc7bdb7e318456c241415e7b7bddee7e51e68ad5 WHIRLPOOL 7ad8a15e53afc915d0cf52b1b42d810876538317665e05232a3b898244558cdb76cad727e2479db3437249e3e63dab2c824c30bb94bd28e6f65edbd5848d2e2c diff --git a/sys-process/at/at-3.1.14.ebuild b/sys-process/at/at-3.1.14.ebuild new file mode 100644 index 000000000000..1aafee53b70f --- /dev/null +++ b/sys-process/at/at-3.1.14.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic pam user systemd + +DESCRIPTION="Queues jobs for later execution" +HOMEPAGE="http://packages.qa.debian.org/a/at.html" +SRC_URI="mirror://debian/pool/main/a/at/${PN}_${PV}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86" +IUSE="pam selinux" + +DEPEND="virtual/mta + >=sys-devel/autoconf-2.64 + sys-devel/bison + >=sys-devel/flex-2.5.4a + pam? ( virtual/pam )" +RDEPEND="virtual/mta + virtual/logger + selinux? ( sec-policy/selinux-at )" + +pkg_setup() { + enewgroup at 25 + enewuser at 25 -1 /var/spool/at/atjobs at +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.1.8-more-deny.patch + epatch "${FILESDIR}"/${PN}-3.1.14-Makefile.patch + # fix parallel make issues, bug #244884 + epatch "${FILESDIR}"/${PN}-3.1.10.2-Makefile.in-parallel-make-fix.patch + epatch "${FILESDIR}"/${PN}-3.1.13-configure.in-fix-PAM-automagick-dep.patch + # Fix parallel make issue (bug #408375) + epatch "${FILESDIR}"/${PN}-3.1.13-parallel-make-fix.patch + epatch "${FILESDIR}"/${PN}-3.1.13-getloadavg.patch + + eautoconf +} + +src_configure() { + use pam || my_conf="--without-pam" + econf \ + --sysconfdir=/etc/at \ + --with-jobdir=/var/spool/at/atjobs \ + --with-atspool=/var/spool/at/atspool \ + --with-etcdir=/etc/at \ + --with-daemon_username=at \ + --with-daemon_groupname=at \ + ${my_conf} +} + +src_install() { + emake install IROOT="${D}" + + newinitd "${FILESDIR}"/atd.rc7 atd + newconfd "${FILESDIR}"/atd.confd atd + newpamd "${FILESDIR}"/at.pamd-3.1.13-r1 atd + + # Preserve existing .SEQ files (bug #386625) + local seq_file="${ROOT}/var/spool/at/atjobs/.SEQ" + if [ -f "${seq_file}" ] ; then + einfo "Preserving existing .SEQ file (bug #386625)." + cp -p "${seq_file}" "${D}"/var/spool/at/atjobs/ || die + fi + + systemd_dounit "${FILESDIR}/atd.service" +} + +pkg_postinst() { + einfo "Forcing correct permissions on /var/spool/at" + chown at:at "${ROOT}/var/spool/at/atjobs" + chmod 1770 "${ROOT}/var/spool/at/atjobs" + chown at:at "${ROOT}/var/spool/at/atjobs/.SEQ" + chmod 0600 "${ROOT}/var/spool/at/atjobs/.SEQ" + chown at:at "${ROOT}/var/spool/at/atspool" + chmod 1770 "${ROOT}/var/spool/at/atspool" +} diff --git a/sys-process/at/at-3.1.16-r1.ebuild b/sys-process/at/at-3.1.16-r1.ebuild new file mode 100644 index 000000000000..0f7bed4d0e20 --- /dev/null +++ b/sys-process/at/at-3.1.16-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic pam user systemd + +DESCRIPTION="Queues jobs for later execution" +HOMEPAGE="http://packages.qa.debian.org/a/at.html" +SRC_URI="mirror://debian/pool/main/a/at/${PN}_${PV}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="pam selinux" + +DEPEND="virtual/mta + >=sys-devel/autoconf-2.64 + sys-devel/bison + >=sys-devel/flex-2.5.4a + pam? ( virtual/pam )" +RDEPEND="virtual/mta + virtual/logger + selinux? ( sec-policy/selinux-at )" + +pkg_setup() { + enewgroup at 25 + enewuser at 25 -1 /var/spool/at/atjobs at +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.1.8-more-deny.patch + epatch "${FILESDIR}"/${PN}-3.1.14-Makefile.patch + # fix parallel make issues, bug #244884 + epatch "${FILESDIR}"/${PN}-3.1.10.2-Makefile.in-parallel-make-fix.patch + epatch "${FILESDIR}"/${PN}-3.1.13-configure.in-fix-PAM-automagick-dep.patch + # Fix parallel make issue (bug #408375) + epatch "${FILESDIR}"/${PN}-3.1.13-parallel-make-fix.patch + epatch "${FILESDIR}"/${PN}-3.1.13-getloadavg.patch + + eautoconf +} + +src_configure() { + use pam || my_conf="--without-pam" + econf \ + --sysconfdir=/etc/at \ + --with-jobdir=/var/spool/at/atjobs \ + --with-atspool=/var/spool/at/atspool \ + --with-etcdir=/etc/at \ + --with-daemon_username=at \ + --with-daemon_groupname=at \ + ${my_conf} +} + +src_install() { + emake install IROOT="${D}" + + newinitd "${FILESDIR}"/atd.rc8 atd + newconfd "${FILESDIR}"/atd.confd atd + newpamd "${FILESDIR}"/at.pamd-3.1.13-r1 atd + + # Preserve existing .SEQ files (bug #386625) + local seq_file="${ROOT}/var/spool/at/atjobs/.SEQ" + if [ -f "${seq_file}" ] ; then + einfo "Preserving existing .SEQ file (bug #386625)." + cp -p "${seq_file}" "${D}"/var/spool/at/atjobs/ || die + fi + + systemd_dounit "${FILESDIR}/atd.service" +} + +pkg_postinst() { + einfo "Forcing correct permissions on /var/spool/at" + chown at:at "${ROOT}/var/spool/at/atjobs" + chmod 1770 "${ROOT}/var/spool/at/atjobs" + chown at:at "${ROOT}/var/spool/at/atjobs/.SEQ" + chmod 0600 "${ROOT}/var/spool/at/atjobs/.SEQ" + chown at:at "${ROOT}/var/spool/at/atspool" + chmod 1770 "${ROOT}/var/spool/at/atspool" +} diff --git a/sys-process/at/at-3.1.16.ebuild b/sys-process/at/at-3.1.16.ebuild new file mode 100644 index 000000000000..55b2506c423d --- /dev/null +++ b/sys-process/at/at-3.1.16.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic pam user systemd + +DESCRIPTION="Queues jobs for later execution" +HOMEPAGE="http://packages.qa.debian.org/a/at.html" +SRC_URI="mirror://debian/pool/main/a/at/${PN}_${PV}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86" +IUSE="pam selinux" + +DEPEND="virtual/mta + >=sys-devel/autoconf-2.64 + sys-devel/bison + >=sys-devel/flex-2.5.4a + pam? ( virtual/pam )" +RDEPEND="virtual/mta + virtual/logger + selinux? ( sec-policy/selinux-at )" + +pkg_setup() { + enewgroup at 25 + enewuser at 25 -1 /var/spool/at/atjobs at +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.1.8-more-deny.patch + epatch "${FILESDIR}"/${PN}-3.1.14-Makefile.patch + # fix parallel make issues, bug #244884 + epatch "${FILESDIR}"/${PN}-3.1.10.2-Makefile.in-parallel-make-fix.patch + epatch "${FILESDIR}"/${PN}-3.1.13-configure.in-fix-PAM-automagick-dep.patch + # Fix parallel make issue (bug #408375) + epatch "${FILESDIR}"/${PN}-3.1.13-parallel-make-fix.patch + epatch "${FILESDIR}"/${PN}-3.1.13-getloadavg.patch + + eautoconf +} + +src_configure() { + use pam || my_conf="--without-pam" + econf \ + --sysconfdir=/etc/at \ + --with-jobdir=/var/spool/at/atjobs \ + --with-atspool=/var/spool/at/atspool \ + --with-etcdir=/etc/at \ + --with-daemon_username=at \ + --with-daemon_groupname=at \ + ${my_conf} +} + +src_install() { + emake install IROOT="${D}" + + newinitd "${FILESDIR}"/atd.rc7 atd + newconfd "${FILESDIR}"/atd.confd atd + newpamd "${FILESDIR}"/at.pamd-3.1.13-r1 atd + + # Preserve existing .SEQ files (bug #386625) + local seq_file="${ROOT}/var/spool/at/atjobs/.SEQ" + if [ -f "${seq_file}" ] ; then + einfo "Preserving existing .SEQ file (bug #386625)." + cp -p "${seq_file}" "${D}"/var/spool/at/atjobs/ || die + fi + + systemd_dounit "${FILESDIR}/atd.service" +} + +pkg_postinst() { + einfo "Forcing correct permissions on /var/spool/at" + chown at:at "${ROOT}/var/spool/at/atjobs" + chmod 1770 "${ROOT}/var/spool/at/atjobs" + chown at:at "${ROOT}/var/spool/at/atjobs/.SEQ" + chmod 0600 "${ROOT}/var/spool/at/atjobs/.SEQ" + chown at:at "${ROOT}/var/spool/at/atspool" + chmod 1770 "${ROOT}/var/spool/at/atspool" +} diff --git a/sys-process/at/files/at-3.1.10.2-Makefile.in-parallel-make-fix.patch b/sys-process/at/files/at-3.1.10.2-Makefile.in-parallel-make-fix.patch new file mode 100644 index 000000000000..8fd82e639b05 --- /dev/null +++ b/sys-process/at/files/at-3.1.10.2-Makefile.in-parallel-make-fix.patch @@ -0,0 +1,12 @@ +diff -Naur at-3.1.10.2.orig/Makefile.in at-3.1.10.2/Makefile.in +--- at-3.1.10.2.orig/Makefile.in 2009-01-31 15:38:54.000000000 +0100 ++++ at-3.1.10.2/Makefile.in 2009-01-31 15:39:22.000000000 +0100 +@@ -78,7 +78,7 @@ + y.tab.c y.tab.h: parsetime.y + $(YACC) -d parsetime.y + +-lex.yy.c: parsetime.l ++lex.yy.c: parsetime.l y.tab.h + $(LEX) -i parsetime.l + + atrun: atrun.in diff --git a/sys-process/at/files/at-3.1.13-configure.in-fix-PAM-automagick-dep.patch b/sys-process/at/files/at-3.1.13-configure.in-fix-PAM-automagick-dep.patch new file mode 100644 index 000000000000..ee24b7f13147 --- /dev/null +++ b/sys-process/at/files/at-3.1.13-configure.in-fix-PAM-automagick-dep.patch @@ -0,0 +1,22 @@ +--- at-3.1.13/configure.ac ++++ at-3.1.13/configure.ac +@@ -82,10 +82,15 @@ + AC_FUNC_VPRINTF + AC_FUNC_GETLOADAVG + AC_CHECK_FUNCS(getcwd mktime strftime setreuid setresuid sigaction waitpid) +-AC_CHECK_HEADERS(security/pam_appl.h, [ +- PAMLIB="-lpam" +- AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support]) +-]) ++AC_ARG_WITH([pam], AS_HELP_STRING([--without-pam], ++ [Build without PAM support(default: enabled)])) ++ ++if test "x$with_pam" != "xno"; then ++ AC_CHECK_HEADERS(security/pam_appl.h, [ ++ PAMLIB="-lpam" ++ AC_DEFINE(HAVE_PAM, 1, [Define to 1 for PAM support]) ++ ]) ++fi + + dnl Checking for programs + diff --git a/sys-process/at/files/at-3.1.13-getloadavg.patch b/sys-process/at/files/at-3.1.13-getloadavg.patch new file mode 100644 index 000000000000..7de085dcd84b --- /dev/null +++ b/sys-process/at/files/at-3.1.13-getloadavg.patch @@ -0,0 +1,19 @@ +diff --git a/getloadavg.c b/getloadavg.c +index cf5869f..c7e2b27 100644 +--- a/getloadavg.c ++++ b/getloadavg.c +@@ -69,8 +69,12 @@ Boston, MA 02110-1301 USA */ + #include <config.h> + #endif + +-#include "lisp.h" +-#include "sysfile.h" /* for encapsulated open, close, read, write */ ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> ++ ++//#include "lisp.h" ++//#include "sysfile.h" /* for encapsulated open, close, read, write */ + + #ifndef HAVE_GETLOADAVG + diff --git a/sys-process/at/files/at-3.1.13-parallel-make-fix.patch b/sys-process/at/files/at-3.1.13-parallel-make-fix.patch new file mode 100644 index 000000000000..dec02e42310c --- /dev/null +++ b/sys-process/at/files/at-3.1.13-parallel-make-fix.patch @@ -0,0 +1,11 @@ +--- at-3.1.13_orig/Makefile.in 2011-06-25 14:43:14.000000000 +0200 ++++ at-3.1.13/Makefile.in 2012-03-16 17:23:26.210267660 +0100 +@@ -73,7 +73,7 @@ + atd: $(RUNOBJECTS) + $(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB) + +-y.tab.c y.tab.h: parsetime.y ++%.tab.c %.tab.h: parsetime.y + $(YACC) -d parsetime.y + + lex.yy.c: parsetime.l diff --git a/sys-process/at/files/at-3.1.14-Makefile.patch b/sys-process/at/files/at-3.1.14-Makefile.patch new file mode 100644 index 000000000000..1e28619d9a82 --- /dev/null +++ b/sys-process/at/files/at-3.1.14-Makefile.patch @@ -0,0 +1,18 @@ +# - install into Gentoo/FHS doc dir + +--- at-3.1.14/Makefile.in ++++ at-3.1.14/Makefile.in +@@ -12,8 +12,11 @@ + man1dir = $(mandir)/man1 + man5dir = $(mandir)/man5 + man8dir = $(mandir)/man8 +-docdir = $(prefix)/doc +-atdocdir = $(docdir)/at ++ifndef PF ++PF = at-$(VERSION) ++endif ++docdir = $(prefix)/share/doc ++atdocdir = $(docdir)/$(PF) + etcdir = @ETCDIR@ + systemdsystemunitdir = @systemdsystemunitdir@ + diff --git a/sys-process/at/files/at-3.1.8-more-deny.patch b/sys-process/at/files/at-3.1.8-more-deny.patch new file mode 100644 index 000000000000..006713b97269 --- /dev/null +++ b/sys-process/at/files/at-3.1.8-more-deny.patch @@ -0,0 +1,20 @@ +--- at.deny ++++ at.deny +@@ -10,6 +10,8 @@ + lp + mail + man ++mysql ++news + nobody + operator + proxy +@@ -19,6 +21,8 @@ + qmailq + qmailr + qmails ++squid + sync + sys ++uucp + www-data diff --git a/sys-process/at/files/at.pamd-3.1.13-r1 b/sys-process/at/files/at.pamd-3.1.13-r1 new file mode 100644 index 000000000000..5c529c16180e --- /dev/null +++ b/sys-process/at/files/at.pamd-3.1.13-r1 @@ -0,0 +1,9 @@ +# +# The PAM configuration file for the at daemon +# + +auth required pam_env.so +auth include system-services +account include system-services +session include system-services + diff --git a/sys-process/at/files/atd.confd b/sys-process/at/files/atd.confd new file mode 100644 index 000000000000..c2bd584dc62e --- /dev/null +++ b/sys-process/at/files/atd.confd @@ -0,0 +1,8 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Define startup options for atd(8). +# For example: ATD_OPTS="-l 3.0 -b 5" +ATD_OPTS="" diff --git a/sys-process/at/files/atd.rc7 b/sys-process/at/files/atd.rc7 new file mode 100755 index 000000000000..0080df718859 --- /dev/null +++ b/sys-process/at/files/atd.rc7 @@ -0,0 +1,13 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/var/run/atd.pid" +command="/usr/sbin/atd" +command_args="${ATD_OPTS}" +start_stop_daemon_args="--pidfile ${pidfile}" + +depend() { + need clock logger +} diff --git a/sys-process/at/files/atd.rc8 b/sys-process/at/files/atd.rc8 new file mode 100755 index 000000000000..1b01d9321488 --- /dev/null +++ b/sys-process/at/files/atd.rc8 @@ -0,0 +1,14 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/var/run/atd.pid" +command="/usr/sbin/atd" +command_args="${ATD_OPTS}" +start_stop_daemon_args="--pidfile ${pidfile}" + +depend() { + need clock + use logger +} diff --git a/sys-process/at/files/atd.service b/sys-process/at/files/atd.service new file mode 100644 index 000000000000..164fc2c0cb74 --- /dev/null +++ b/sys-process/at/files/atd.service @@ -0,0 +1,13 @@ +[Unit] +Description=at (job queue) daemon +After=networking.target + +[Service] +Type=forking +ExecStart=/usr/sbin/atd +PIDFile=/run/atd.pid +StandardOutput=syslog +StandardError=syslog + +[Install] +WantedBy=multi-user.target diff --git a/sys-process/at/metadata.xml b/sys-process/at/metadata.xml new file mode 100644 index 000000000000..750528bcaa7c --- /dev/null +++ b/sys-process/at/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cron</herd> + <maintainer> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> +</pkgmetadata> diff --git a/sys-process/atop/Manifest b/sys-process/atop/Manifest new file mode 100644 index 000000000000..dedcd00a971b --- /dev/null +++ b/sys-process/atop/Manifest @@ -0,0 +1,4 @@ +DIST atop-1.27-3.tar.gz 159521 SHA256 bce36e0b50f0e03995d86d25dbc9ab4a289f6755ce3558844f96d41b0bba563f SHA512 59100b61ff14ff49d8daf815abdbf5e9f905767fe8532b0043f3a63acc4d37975201879a93634f6e77edd307e8b6e7d0bf1a3caff1a3cdce8240e92e46023003 WHIRLPOOL 51ceae010e8cd9172d55ab970fcfe90db1ac6d831db14ece17598dba8395c2f8a7e840513e4d07f5f7ad12e28cfc956a8d04619d4e73d7009a6c5a52a62be7d2 +DIST atop-2.0.2.tar.gz 166887 SHA256 a620dbe0de7c7ee004949b201bed27559a8dd6cbdee651c7a3e15fc584723409 SHA512 c02b1c2ebf5c49fb0ad17bbcf0b86af8e5623c8d0b6ba8b1096d9b592cbb358e011933142cdebc90f619221785e859aaa009a338f3682d8bfa4340a50b308471 WHIRLPOOL 1f650210c7f0d79545ad268d5482f950d080aaff51a6045fa710ffc4c359f786cf27ebf88a1dfca87a402b63f8ea9dc7d0542e1949096744a30ca3620708e575 +DIST atop-2.1-1.tar.gz 181301 SHA256 39a2d4febc338dd4147904b1496d1aa9513da0d22ad0602b66023452bdc7989f SHA512 89b33c9a299213faa42c8ee4393c9588c0dbe7940f8709a617d51d6202525a7e7385299242c8c032d573dea9fa631e705d8edfb4685414d35169b773e1290613 WHIRLPOOL 9f02afd797d25a28e873c25f6f03a2607628d60a7ef493b034a63707bc4b5fcd7d4d2d2f2c18b69312f19c5104639176e4816ebfd7282d53dd819786e45280d5 +DIST atop-2.2-3.tar.gz 194168 SHA256 c785b8a2355be28b3de6b58a8ea4c4fcab8fadeaa57a99afeb03c66fac8e055d SHA512 34076e35004367bbfd63f3aac1e786dab566633799b5d4f2c4d45f343642d145027f6298aa40d5e83c1356f502e3c51faa58da07cea58f2960bfacd78cf77915 WHIRLPOOL 2798ebaf5affc9d929a0b5663c1caa6d64a52e00d20f496373f34e48c592fe168c8c20c9df3c309a3057f9eb7baa3409f2cbfbedf110adb9fef51d0774d8d3e2 diff --git a/sys-process/atop/atop-1.27_p3.ebuild b/sys-process/atop/atop-1.27_p3.ebuild new file mode 100644 index 000000000000..52881a7bd799 --- /dev/null +++ b/sys-process/atop/atop-1.27_p3.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" + +inherit eutils toolchain-funcs + +MY_PV=${PV//_p/-} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Resource-specific view of processes" +HOMEPAGE="http://www.atoptool.nl/" +SRC_URI="http://www.atoptool.nl/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm hppa ~mips ppc ~ppc64 x86" +IUSE="" + +DEPEND="sys-process/acct" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + sed -i \ + -e '/^CFLAGS/s: = -O : += :' \ + -e '/^LDFLAGS/s: = : += :' \ + -e 's:\<cc\>:$(CC):' \ + Makefile + tc-export CC + cp "${FILESDIR}"/atop.rc atop.init + chmod a+rx atop.init + sed -i 's: root : :' atop.cron #191926 +} + +src_install() { + emake DESTDIR="${D}" INIPATH=/etc/init.d install || die + # useless -${PV} copies ? + rm -f "${D}"/usr/bin/atop*-${PV} + dodoc README "${D}"/etc/cron.d/* + rm -r "${D}"/etc/cron.d || die +} diff --git a/sys-process/atop/atop-2.0.2.ebuild b/sys-process/atop/atop-2.0.2.ebuild new file mode 100644 index 000000000000..95292a97e777 --- /dev/null +++ b/sys-process/atop/atop-2.0.2.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +MY_PV=${PV//_p/-} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Resource-specific view of processes" +HOMEPAGE="http://www.atoptool.nl/" +SRC_URI="http://www.atoptool.nl/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + sys-libs/ncurses + sys-process/acct +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.0.2-build.patch + tc-export CC PKG_CONFIG + cp "${FILESDIR}"/atop.rc atop.init + chmod a+rx atop.init + sed -i 's: root : :' atop.cron #191926 + # prefixify + sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile +} + +src_install() { + default + # useless -${PV} copies ? + rm -f "${ED}"/usr/bin/atop*-${PV} + dodoc "${ED}"/etc/cron.d/* + rm -r "${ED}"/etc/cron.d || die +} diff --git a/sys-process/atop/atop-2.1.ebuild b/sys-process/atop/atop-2.1.ebuild new file mode 100644 index 000000000000..73713a42b599 --- /dev/null +++ b/sys-process/atop/atop-2.1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +MY_PV=${PV//_p/-} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Resource-specific view of processes" +HOMEPAGE="http://www.atoptool.nl/" +SRC_URI="http://www.atoptool.nl/download/${MY_P}-1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + sys-libs/ncurses + sys-process/acct +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.1-build.patch + tc-export CC PKG_CONFIG + cp "${FILESDIR}"/atop.rc atop.init + chmod a+rx atop.init + sed -i 's: root : :' atop.cron #191926 + # prefixify + sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile +} + +src_install() { + default + # useless -${PV} copies ? + rm -f "${ED}"/usr/bin/atop*-${PV} + dodoc "${ED}"/etc/cron.d/* + rm -r "${ED}"/etc/cron.d || die +} diff --git a/sys-process/atop/atop-2.2.ebuild b/sys-process/atop/atop-2.2.ebuild new file mode 100644 index 000000000000..baa583b9bbf0 --- /dev/null +++ b/sys-process/atop/atop-2.2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +MY_PV=${PV//_p/-} +MY_P=${PN}-${MY_PV}-3 + +DESCRIPTION="Resource-specific view of processes" +HOMEPAGE="http://www.atoptool.nl/" +SRC_URI="http://www.atoptool.nl/download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + sys-libs/ncurses + sys-process/acct +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.2-build.patch + tc-export CC PKG_CONFIG + sed -i 's: root : :' atop.cronsysv || die #191926 + # prefixify + sed -i "s:/\(usr\|etc\|var\):${EPREFIX}/\1:g" Makefile +} + +src_install() { + emake DESTDIR="${D}" genericinstall + # useless -${PV} copies ? + rm -f "${ED}"/usr/bin/atop*-${MY_PV} + newinitd "${FILESDIR}"/${PN}.rc-r1 ${PN} + newinitd "${FILESDIR}"/atopacct.rc atopacct + dodoc atop.cronsysv AUTHOR ChangeLog README +} diff --git a/sys-process/atop/files/atop-2.0.2-build.patch b/sys-process/atop/files/atop-2.0.2-build.patch new file mode 100644 index 000000000000..a2a6b43a44cf --- /dev/null +++ b/sys-process/atop/files/atop-2.0.2-build.patch @@ -0,0 +1,20 @@ +--- a/Makefile ++++ b/Makefile +@@ -15,7 +15,7 @@ ROTPATH = /etc/logrotate.d + PMPATH1 = /usr/lib/pm-utils/sleep.d + PMPATH2 = /usr/lib64/pm-utils/sleep.d + +-CFLAGS += -O2 -I. -Wall # -DHTTPSTATS ++CFLAGS += -I. -Wall # -DHTTPSTATS + OBJMOD0 = version.o + OBJMOD1 = various.o deviate.o procdbase.o + OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o +@@ -28,7 +28,7 @@ + all: atop atopsar + + atop: atop.o $(ALLMODS) Makefile +- $(CC) atop.o $(ALLMODS) -o atop -lncurses -lm -lz -lrt ++ $(CC) $(CFLAGS) $(LDFLAGS) atop.o $(ALLMODS) -o atop $(shell ${PKG_CONFIG} --libs ncurses) -lm -lz -lrt + + atopsar: atop + ln -sf atop atopsar diff --git a/sys-process/atop/files/atop-2.1-build.patch b/sys-process/atop/files/atop-2.1-build.patch new file mode 100644 index 000000000000..8a1fb76cbf62 --- /dev/null +++ b/sys-process/atop/files/atop-2.1-build.patch @@ -0,0 +1,36 @@ +--- atop-2.1/Makefile ++++ atop-2.1/Makefile +@@ -17,7 +17,7 @@ + PMPATH1 = /usr/lib/pm-utils/sleep.d + PMPATH2 = /usr/lib64/pm-utils/sleep.d + +-CFLAGS += -O2 -I. -Wall # -DHTTPSTATS ++CFLAGS += -I. -Wall # -DHTTPSTATS + OBJMOD0 = version.o + OBJMOD1 = various.o deviate.o procdbase.o + OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o +@@ -30,13 +30,13 @@ + all: atop atopsar atopacctd + + atop: atop.o $(ALLMODS) Makefile +- $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) atop.o $(ALLMODS) -o atop $(shell ${PKG_CONFIG} --libs ncurses) -lz -lm -lrt + + atopsar: atop + ln -sf atop atopsar + + atopacctd: atopacctd.o netlink.o +- $(CC) atopacctd.o netlink.o -o atopacctd $(LDFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) atopacctd.o netlink.o -o atopacctd + + netlink.o: netlink.c + $(CC) -I. -Wall -c netlink.c +@@ -49,6 +49,8 @@ + then mkdir -p $(DESTDIR)$(LOGPATH); fi + if [ ! -d $(DESTDIR)$(BINPATH) ]; \ + then mkdir -p $(DESTDIR)$(BINPATH); fi ++ if [ ! -d $(DESTDIR)$(SBINPATH) ]; \ ++ then mkdir -p $(DESTDIR)$(SBINPATH); fi + if [ ! -d $(DESTDIR)$(SCRPATH) ]; \ + then mkdir -p $(DESTDIR)$(SCRPATH); fi + if [ ! -d $(DESTDIR)$(MAN1PATH) ]; \ diff --git a/sys-process/atop/files/atop-2.2-build.patch b/sys-process/atop/files/atop-2.2-build.patch new file mode 100644 index 000000000000..70840a25330a --- /dev/null +++ b/sys-process/atop/files/atop-2.2-build.patch @@ -0,0 +1,27 @@ +--- atop-2.2-3/Makefile ++++ atop-2.2-3/Makefile +@@ -19,7 +19,7 @@ + PMPATH2 = /usr/lib64/pm-utils/sleep.d + PMPATHD = /usr/lib/systemd/system-sleep + +-CFLAGS += -O2 -I. -Wall # -DHTTPSTATS ++CFLAGS += -I. -Wall # -DHTTPSTATS + OBJMOD0 = version.o + OBJMOD1 = various.o deviate.o procdbase.o + OBJMOD2 = acctproc.o photoproc.o photosyst.o rawlog.o ifprop.o parseable.o +@@ -32,13 +32,13 @@ + all: atop atopsar atopacctd + + atop: atop.o $(ALLMODS) Makefile +- $(CC) atop.o $(ALLMODS) -o atop -lncurses -lz -lm -lrt $(LDFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) atop.o $(ALLMODS) -o atop $(shell ${PKG_CONFIG} --libs ncurses) -lz -lm -lrt + + atopsar: atop + ln -sf atop atopsar + + atopacctd: atopacctd.o netlink.o +- $(CC) atopacctd.o netlink.o -o atopacctd $(LDFLAGS) ++ $(CC) $(CFLAGS) $(LDFLAGS) atopacctd.o netlink.o -o atopacctd + + netlink.o: netlink.c + $(CC) -I. -Wall -c netlink.c diff --git a/sys-process/atop/files/atop.rc b/sys-process/atop/files/atop.rc new file mode 100644 index 000000000000..19db6e2b08cb --- /dev/null +++ b/sys-process/atop/files/atop.rc @@ -0,0 +1,16 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +start() { + ebegin "Starting atop" + start-stop-daemon --start --quiet --exec /etc/atop/atop.daily + eend $? +} + +stop() { + ebegin "Stopping atop" + start-stop-daemon --stop --exec /usr/bin/atop --pidfile /var/run/atop.pid + eend $? +} diff --git a/sys-process/atop/files/atop.rc-r1 b/sys-process/atop/files/atop.rc-r1 new file mode 100644 index 000000000000..ba20f3a071a7 --- /dev/null +++ b/sys-process/atop/files/atop.rc-r1 @@ -0,0 +1,15 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="Resource-specific view of processes" +pidfile="/var/run/atop.pid" +command="/usr/bin/atop" + +start() { + ebegin "Starting atop" + start-stop-daemon --start --pidfile ${pidfile} \ + --exec /etc/atop/atop.daily + eend $? +} diff --git a/sys-process/atop/files/atopacct.rc b/sys-process/atop/files/atopacct.rc new file mode 100644 index 000000000000..f70f0395409b --- /dev/null +++ b/sys-process/atop/files/atopacct.rc @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="Resource-specific view of processes" +command="/usr/sbin/atopacctd" +lockfile="/var/lock/subsys/atopacctd" + +start_pre() { + # Check if process accounting already in use via psacct + for PACCTFILE in /var/account/pacct /var/log/pacct ; do + if [ -f "${PACCTFILE}" ] ; then + BEFORSIZE=$(stat -c %s "${PACCTFILE}") + AFTERSIZE=$(stat -c %s "${PACCTFILE}") + + # verify if accounting file grows, so is in use + if [ ${BEFORSIZE} -lt ${AFTERSIZE} ] ; then + ewarn "Process accounting already used by psacct!" + return 1 + fi + fi + done + + checkpath -d -q ${lockfile%/*} || return 1 +} + +start() { + ebegin "Starting atopacctd" + start-stop-daemon --start --exec ${command} + touch ${lockfile} + eend $? +} + +stop() { + ebegin "Stopping atopacctd" + start-stop-daemon --stop --exec ${command} + rm ${lockfile} + eend $? +} + diff --git a/sys-process/atop/metadata.xml b/sys-process/atop/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-process/atop/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/audit/Manifest b/sys-process/audit/Manifest new file mode 100644 index 000000000000..20b843b5291d --- /dev/null +++ b/sys-process/audit/Manifest @@ -0,0 +1,6 @@ +DIST audit-1.7.18.tar.gz 1566698 SHA256 c3e9e7df9e0776c3f90acfde7432ed362ff3ae5c40488391789bc8262f97f17c SHA512 15d27602dcb8d5a0dac2eb299a96d4d34b36fd303c90bd1cee6d6151bc1c6b83f09e7437029bee54f4435afd1386be0a1351bde1fb705ac24749b9e31c75919f WHIRLPOOL fc38a5668fdd72c11269000f384abb1d783bbec36c20df9bd266a4dfccd0363d9616bff46c708882c3b66520d141f298346add3637ae1a5db5e646a7bd1db539 +DIST audit-2.0.5.tar.gz 810519 SHA256 1ef85e606a0fda21596577f5c205c0df7eb56d7cffbb84aeeeb72ce44e61a83b SHA512 5e5e7f6af79792aa4f8577b6a5975440167b19e35d555c7c60c51d0af20f6bfeafb78a89f8b546efe9b9c79296ee5872fa0056f34a61650c66f34ceedc8b15c4 WHIRLPOOL d5ec4d00555858f8d8e5d42400ce0775b9db1d7fc1efc995dbfb45fc59c34d2b0268879d2fd35b60af3b07498e166b2afc6dbbc23f5943a50e1da9898d7aeb4b +DIST audit-2.1.3.tar.gz 833647 SHA256 1c61858d8ed299128aa6bd8e85bac758bfe33e61358d259e52acb7d961fee90e SHA512 0f5c02ee3eb35687e85cfea0cae2bc11c35d2de5c44347f8f3cde4d268aeef215547cfb4b577afffc737ce5944219f46b4594ac122479d8b2e185efe3cdb069b WHIRLPOOL c83ac2bf929f524c4bc34ffcd503db9687a2c8affe3b5bb0a908e40ba8e98beced6fee6f3212db7267cf11cef3dbd13915a1ee09334f2cf58a686a1acfff0946 +DIST audit-2.2.2.tar.gz 907066 SHA256 8bc2b45a5f08f5df6cebcd5543f24b7e68e28b64da4b23f08de2c6616384302b SHA512 98d83162e69816611dfac3d3ecc19235403ea5809d7a5cd9f13444c2085f03e46657802addb58ee31c251749f89417926ae40bcd99a77d64f062712830fde9bb WHIRLPOOL f127d3b9645d4e679a83767d688b83c7d59d4a35a166bc9f5038df89852768b695bc0c30e26fea0930aa29fed4583aa5218a42d5898d2a7c542e04cf58b9a9e9 +DIST audit-2.4.1.tar.gz 942147 SHA256 059346fa0e922faf4dcc054382b21f4845cd8c4942e82cfd0d4cd52bd2b03026 SHA512 4ca29ee2c784861f75f9e05f5c4dfc3d3ebb9d51e454e8a069ef4d08db3754fb19189714935351e70b26ed44347a266ae6c31e68361d5e9efd89f657f91dbd50 WHIRLPOOL 49ecfdd2363eb8bcf25d40b36bf228c8bd31611804b284dde004d42a250a39c387bd0abff223cf4041f62805d5bb189a19375f5806385344ca219d823d267f2e +DIST audit-2.4.3.tar.gz 998974 SHA256 9c914704fecc602e143e37152f3efbab2469692684c1a8cc1b801c1b49c7abc6 SHA512 2bbaa11ed5e2d8138711df325ec1997c4eb955123699fd330b5272b7f3475ca61c9753e1c103abfc9c49e1fc8aaf52dbd55545e3f1874214979ddece64ad79aa WHIRLPOOL 1a0c0a273fddc49d15322a2423d4038488738d6597d0641182befab91646355bbee393a5d09d446dc4cf2f4579dd7ea99928cadd77bc72c355db0a10d4964da5 diff --git a/sys-process/audit/audit-1.7.18.ebuild b/sys-process/audit/audit-1.7.18.ebuild new file mode 100644 index 000000000000..672d390460e8 --- /dev/null +++ b/sys-process/audit/audit-1.7.18.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" +PYTHON_DEPEND="2" + +inherit autotools eutils multilib toolchain-funcs python eutils + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="ldap" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap )" +DEPEND="${RDEPEND} + dev-lang/swig + >=sys-kernel/linux-headers-2.6.23" +# Do not use os-headers as this is linux specific + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + # Old patch applies fine + #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch + + # Applied by upstream + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch + + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac + sed -i \ + -e 's,system-config-audit,,g' \ + -e '/^SUBDIRS/s,\\$,,g' \ + "${S}"/Makefile.am + rm -rf "${S}"/system-config-audit + + # Probably goes away in 1.6.9 + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-1.7.17-python.patch + # bug #405887 + epatch "${FILESDIR}"/audit-1.7.18-as-needed.patch + epatch "${FILESDIR}"/audit-1.7.18-missing_headers.patch + + # Regenerate autotooling + eautoreconf + + # Disable byte-compilation of Python modules. + echo "#!/bin/sh" > py-compile + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +src_configure() { + #append-flags -D'__attribute__(x)=' + econf --sbindir=/sbin --without-prelude +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/* + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-1.7.17 auditd + newconfd "${FILESDIR}"/auditd-conf.d-1.2.3 auditd + + # things like shadow use this so we need to be in / + dodir /$(get_libdir) + mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)/ || die + gen_usr_ldscript libaudit.so libauparse.so + + # remove RedHat garbage + rm -r "${D}"/etc/{rc.d,sysconfig} || die + + # Gentoo rules + insinto /etc/audit/ + doins "${FILESDIR}"/audit.rules* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + # Don't install .la files in Python directories. + python_clean_installation_image +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + python_mod_optimize audit.py +} + +pkg_postrm() { + python_mod_cleanup audit.py +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.0.5.ebuild b/sys-process/audit/audit-2.0.5.ebuild new file mode 100644 index 000000000000..dba3a642c549 --- /dev/null +++ b/sys-process/audit/audit-2.0.5.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" + +inherit autotools multilib toolchain-funcs python linux-info eutils + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="ldap prelude" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + prelude? ( dev-libs/libprelude ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + dev-lang/swig + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +CONFIG_CHECK="~AUDIT" + +pkg_setup() { + linux-info_pkg_setup + python_pkg_setup + PYTHON_DIRS="bindings/python swig" +} + +src_prepare() { + # Old patch applies fine + #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch + + # Applied by upstream + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch + + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + -e '/^SUBDIRS/s,\\$,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + # Probably goes away in 1.6.9 + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${P}-python.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS =/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Disable byte-compilation of Python modules. + echo "#!/bin/sh" > py-compile + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +src_configure() { + #append-flags -D'__attribute__(x)=' + econf --sbindir=/sbin $(use_with prelude) +} + +src_compile() { + default + + python_copy_sources ${PYTHON_DIRS} + + building() { + emake \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" + } + local dir + for dir in ${PYTHON_DIRS}; do + python_execute_function -s --source-dir ${dir} building + done +} + +src_install() { + emake DESTDIR="${D}" install || die + + installation() { + emake \ + DESTDIR="${D}" \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" \ + install + } + local dir + for dir in ${PYTHON_DIRS}; do + python_execute_function -s --source-dir ${dir} installation + done + + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/* + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-1.7.17 auditd + newconfd "${FILESDIR}"/auditd-conf.d-1.2.3 auditd + + # things like shadow use this so we need to be in / + dodir /$(get_libdir) + mv "${D}"/usr/$(get_libdir)/lib*.so* "${D}"/$(get_libdir)/ || die + gen_usr_ldscript libaudit.so libauparse.so + + # remove RedHat garbage + rm -r "${D}"/etc/{rc.d,sysconfig} || die + + # Gentoo rules + insinto /etc/audit/ + doins "${FILESDIR}"/audit.rules* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + # Don't install .la files in Python directories. + python_clean_installation_image +} + +pkg_preinst() { + default + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + python_mod_optimize audit.py + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0 +} + +pkg_postrm() { + python_mod_cleanup audit.py +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.1.3-r1.ebuild b/sys-process/audit/audit-2.1.3-r1.ebuild new file mode 100644 index 000000000000..a812ccf98a05 --- /dev/null +++ b/sys-process/audit/audit-2.1.3-r1.ebuild @@ -0,0 +1,189 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" + +inherit autotools multilib toolchain-funcs python linux-info eutils + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 s390 sparc x86" +IUSE="ldap prelude python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + prelude? ( dev-libs/libprelude ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +CONFIG_CHECK="~AUDIT" +PYTHON_DIRS="bindings/python swig" + +pkg_setup() { + linux-info_pkg_setup + use python && python_pkg_setup +} + +src_prepare() { + # Old patch applies fine + #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch + + # Applied by upstream + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch + + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + # Probably goes away in 1.6.9 + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-2.1.3-python.patch + + # glibc/kernel upstreams suck with both defining ia64_fpreg + # This patch is a horribly workaround that is only valid as long as you + # don't need the OTHER definitions in fpu.h. + epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Disable byte-compilation of Python modules. + echo "#!/bin/sh" > py-compile + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +src_configure() { + #append-flags -D'__attribute__(x)=' + econf --sbindir=/sbin $(use_with prelude) +} + +src_compile_python() { + python_copy_sources ${PYTHON_DIRS} + + building() { + emake \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" + } + local dir + for dir in ${PYTHON_DIRS}; do + python_execute_function -s --source-dir ${dir} building + done +} + +src_compile() { + default + use python && src_compile_python +} + +src_install_python() { + installation() { + emake \ + DESTDIR="${D}" \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" \ + install + } + local dir + for dir in ${PYTHON_DIRS}; do + python_execute_function -s --source-dir ${dir} installation + done +} + +src_install() { + emake DESTDIR="${D}" install || die + use python && src_install_python + + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/{*.rules,avc_snap,skeleton.c} + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + + [ -f "${D}"/sbin/audisp-remote ] && \ + dodir /usr/sbin && \ + mv "${D}"/{sbin,usr/sbin}/audisp-remote || die + + # remove RedHat garbage + rm -r "${D}"/etc/{rc.d,sysconfig} || die + + # Gentoo rules + insinto /etc/audit/ + newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules + doins "${FILESDIR}"/audit.rules.stop* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + # Don't install .la files in Python directories. + use python && python_clean_installation_image +} + +pkg_preinst() { + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + use python && python_mod_optimize audit.py + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0 +} + +pkg_postrm() { + use python && python_mod_cleanup audit.py +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.2.2-r2.ebuild b/sys-process/audit/audit-2.2.2-r2.ebuild new file mode 100644 index 000000000000..a6737b53e699 --- /dev/null +++ b/sys-process/audit/audit-2.2.2-r2.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="ldap prelude python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + prelude? ( dev-libs/libprelude ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +CONFIG_CHECK="~AUDIT" + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + # Old patch applies fine + #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch + + # Applied by upstream + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch + + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + # Probably goes away in 1.6.9 + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-2.1.3-python.patch + + # glibc/kernel upstreams suck with both defining ia64_fpreg + # This patch is a horribly workaround that is only valid as long as you + # don't need the OTHER definitions in fpu.h. + epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +multilib_src_configure() { + local ECONF_SOURCE=${S} + #append-flags -D'__attribute__(x)=' + econf \ + --sbindir=/sbin \ + --enable-systemd \ + --without-python \ + $(multilib_native_use_with prelude) + + if multilib_is_native_abi; then + python_configure() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + econf --with-python + } + + use python && python_foreach_impl python_configure + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + + python_compile() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + LIBS="${native_build}/lib/libaudit.la" + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_compile + else + emake -C lib + emake -C auparse + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install + + python_install() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + DESTDIR="${D}" install + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + DESTDIR="${D}" install + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_install + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + else + emake -C lib DESTDIR="${D}" install + emake -C auparse DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/{*.rules,avc_snap,skeleton.c} + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + [ -f "${D}"/sbin/audisp-remote ] && \ + dodir /usr/sbin && \ + mv "${D}"/{sbin,usr/sbin}/audisp-remote || die + + # Gentoo rules + insinto /etc/audit/ + newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules + doins "${FILESDIR}"/audit.rules.stop* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + prune_libtool_files --modules +} + +pkg_preinst() { + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0 +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.2.2-r3.ebuild b/sys-process/audit/audit-2.2.2-r3.ebuild new file mode 100644 index 000000000000..bce83e4c08b9 --- /dev/null +++ b/sys-process/audit/audit-2.2.2-r3.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="ldap prelude python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + prelude? ( dev-libs/libprelude ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +CONFIG_CHECK="~AUDIT" + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + # Old patch applies fine + #EPATCH_OPTS="-p0 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-build.patch + + # Applied by upstream + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/${PN}-1.5.4-swig-gcc-attribute.patch + + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + # Probably goes away in 1.6.9 + #EPATCH_OPTS="-p1 -d${S}" epatch "${FILESDIR}"/audit-1.6.8-subdirs-fix.patch + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-2.1.3-python.patch + + # glibc/kernel upstreams suck with both defining ia64_fpreg + # This patch is a horribly workaround that is only valid as long as you + # don't need the OTHER definitions in fpu.h. + epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +multilib_src_configure() { + local ECONF_SOURCE=${S} + #append-flags -D'__attribute__(x)=' + econf \ + --sbindir=/sbin \ + --enable-systemd \ + --without-python \ + $(multilib_native_use_with prelude) + + if multilib_is_native_abi; then + python_configure() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + econf --with-python + } + + use python && python_foreach_impl python_configure + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + + python_compile() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + LIBS="${native_build}/lib/libaudit.la" + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_compile + else + emake -C lib + emake -C auparse + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install + + python_install() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + DESTDIR="${D}" install + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + DESTDIR="${D}" install + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_install + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + else + emake -C lib DESTDIR="${D}" install + emake -C auparse DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/{*.rules,avc_snap,skeleton.c} + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + [ -f "${D}"/sbin/audisp-remote ] && \ + dodir /usr/sbin && \ + mv "${D}"/{sbin,usr/sbin}/audisp-remote || die + + # Gentoo rules + insinto /etc/audit/ + newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules + doins "${FILESDIR}"/audit.rules.stop* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + prune_libtool_files --modules +} + +pkg_preinst() { + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libaudit.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libaudit.so.0 +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.4.1-r1.ebuild b/sys-process/audit/audit-2.4.1-r1.ebuild new file mode 100644 index 000000000000..8e1780999402 --- /dev/null +++ b/sys-process/audit/audit-2.4.1-r1.ebuild @@ -0,0 +1,187 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="ldap python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( ${PYTHON_DEPS} + dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CONFIG_CHECK="~AUDIT" + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-2.4.1-python.patch + + # glibc/kernel upstreams suck with both defining ia64_fpreg + # This patch is a horribly workaround that is only valid as long as you + # don't need the OTHER definitions in fpu.h. + epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +multilib_src_configure() { + local ECONF_SOURCE=${S} + #append-flags -D'__attribute__(x)=' + econf \ + --sbindir=/sbin \ + --enable-systemd \ + --without-python + + if multilib_is_native_abi; then + python_configure() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + econf --with-python + } + + use python && python_foreach_impl python_configure + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + + python_compile() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + LIBS="${native_build}/lib/libaudit.la" + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_compile + else + emake -C lib + emake -C auparse + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install + + python_install() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + DESTDIR="${D}" install + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + DESTDIR="${D}" install + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_install + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + else + emake -C lib DESTDIR="${D}" install + emake -C auparse DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/{*.rules,avc_snap,skeleton.c} + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + [ -f "${D}"/sbin/audisp-remote ] && \ + dodir /usr/sbin && \ + mv "${D}"/{sbin,usr/sbin}/audisp-remote || die + + # Gentoo rules + insinto /etc/audit/ + newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules + doins "${FILESDIR}"/audit.rules.stop* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + prune_libtool_files --modules +} + +pkg_preinst() { + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libaudit.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libaudit.so.0 +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.4.1.ebuild b/sys-process/audit/audit-2.4.1.ebuild new file mode 100644 index 000000000000..7c701a7080a3 --- /dev/null +++ b/sys-process/audit/audit-2.4.1.ebuild @@ -0,0 +1,187 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="ldap python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( ${PYTHON_DEPS} + dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CONFIG_CHECK="~AUDIT" + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-2.4.1-python.patch + + # glibc/kernel upstreams suck with both defining ia64_fpreg + # This patch is a horribly workaround that is only valid as long as you + # don't need the OTHER definitions in fpu.h. + epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch + + # Python bindings are built/installed manually. + sed -e "/^SUBDIRS =/s/ python//" -i bindings/Makefile.am + sed -e "/^SUBDIRS .*=/s/ swig//" -i Makefile.am + + # Regenerate autotooling + eautoreconf + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +multilib_src_configure() { + local ECONF_SOURCE=${S} + #append-flags -D'__attribute__(x)=' + econf \ + --sbindir=/sbin \ + --enable-systemd \ + --without-python + + if multilib_is_native_abi; then + python_configure() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + econf --with-python + } + + use python && python_foreach_impl python_configure + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + + python_compile() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + LIBS="${native_build}/lib/libaudit.la" + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_compile + else + emake -C lib + emake -C auparse + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install + + python_install() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + DESTDIR="${D}" install + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + DESTDIR="${D}" install + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_install + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + else + emake -C lib DESTDIR="${D}" install + emake -C auparse DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/{*.rules,avc_snap,skeleton.c} + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + [ -f "${D}"/sbin/audisp-remote ] && \ + dodir /usr/sbin && \ + mv "${D}"/{sbin,usr/sbin}/audisp-remote || die + + # Gentoo rules + insinto /etc/audit/ + newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules + doins "${FILESDIR}"/audit.rules.stop* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + prune_libtool_files --modules +} + +pkg_preinst() { + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libau{dit,parse}.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libau{dit,parse}.so.0 +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/audit-2.4.3.ebuild b/sys-process/audit/audit-2.4.3.ebuild new file mode 100644 index 000000000000..9111f4af777c --- /dev/null +++ b/sys-process/audit/audit-2.4.3.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) + +inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd + +DESCRIPTION="Userspace utilities for storing and processing auditing records" +HOMEPAGE="http://people.redhat.com/sgrubb/audit/" +SRC_URI="http://people.redhat.com/sgrubb/audit/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="ldap python" +# Testcases are pretty useless as they are built for RedHat users/groups and +# kernels. +RESTRICT="test" + +RDEPEND="ldap? ( net-nds/openldap ) + sys-libs/libcap-ng" +DEPEND="${RDEPEND} + python? ( ${PYTHON_DEPS} + dev-lang/swig ) + >=sys-kernel/linux-headers-2.6.34" +# Do not use os-headers as this is linux specific + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +CONFIG_CHECK="~AUDIT" + +pkg_setup() { + linux-info_pkg_setup +} + +src_prepare() { + epatch_user + + # Do not build GUI tools + sed -i \ + -e '/AC_CONFIG_SUBDIRS.*system-config-audit/d' \ + "${S}"/configure.ac || die + sed -i \ + -e 's,system-config-audit,,g' \ + "${S}"/Makefile.am || die + rm -rf "${S}"/system-config-audit + + if ! use ldap; then + sed -i \ + -e '/^AC_OUTPUT/s,audisp/plugins/zos-remote/Makefile,,g' \ + "${S}"/configure.ac || die + sed -i \ + -e '/^SUBDIRS/s,zos-remote,,g' \ + "${S}"/audisp/plugins/Makefile.am || die + fi + + # Don't build static version of Python module. + epatch "${FILESDIR}"/${PN}-2.4.3-python.patch + + # glibc/kernel upstreams suck with both defining ia64_fpreg + # This patch is a horribly workaround that is only valid as long as you + # don't need the OTHER definitions in fpu.h. + epatch "${FILESDIR}"/${PN}-2.1.3-ia64-compile-fix.patch + + # there is no --without-golang conf option + sed -e "/^SUBDIRS =/s/ @gobind_dir@//" -i bindings/Makefile.am || die + + # Regenerate autotooling + eautoreconf + + # Bug 352198: Avoid parallel build fail + cd "${S}"/src/mt + [[ ! -s private.h ]] && ln -s ../../lib/private.h . +} + +multilib_src_configure() { + local ECONF_SOURCE=${S} + econf \ + --sbindir=/sbin \ + --enable-systemd \ + --without-python \ + --without-python3 + + if multilib_is_native_abi; then + python_configure() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + + if python_is_python3; then + econf --without-python --with-python3 + else + econf --with-python --without-python3 + fi + } + + use python && python_foreach_impl python_configure + fi +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + + python_compile() { + local pysuffix pydef + if python_is_python3; then + pysuffix=3 + pydef='USE_PYTHON3=true' + else + pysuffix=2 + pydef='HAVE_PYTHON=true' + fi + + emake -C "${BUILD_DIR}"/bindings/swig \ + VPATH="${native_build}/lib" \ + LIBS="${native_build}/lib/libaudit.la" \ + _audit_la_LIBADD="${native_build}/lib/libaudit.la" \ + _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \ + ${pydef} + emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \ + VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \ + auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \ + ${pydef} + } + + local native_build="${BUILD_DIR}" + use python && python_foreach_impl python_compile + else + emake -C lib + emake -C auparse + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install + + python_install() { + local pysuffix pydef + if python_is_python3; then + pysuffix=3 + pydef='USE_PYTHON3=true' + else + pysuffix=2 + pydef='HAVE_PYTHON=true' + fi + + emake -C "${BUILD_DIR}"/bindings/swig \ + VPATH="${native_build}/lib" \ + LIBS="${native_build}/lib/libaudit.la" \ + _audit_la_LIBADD="${native_build}/lib/libaudit.la" \ + _audit_la_DEPENDENCIES="${S}/lib/libaudit.h ${native_build}/lib/libaudit.la" \ + ${pydef} \ + DESTDIR="${D}" install + emake -C "${BUILD_DIR}"/bindings/python/python${pysuffix} \ + VPATH="${S}/bindings/python/python${pysuffix}:${native_build}/bindings/python/python${pysuffix}" \ + auparse_la_LIBADD="${native_build}/auparse/libauparse.la ${native_build}/lib/libaudit.la" \ + ${pydef} \ + DESTDIR="${D}" install + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_install + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + else + emake -C lib DESTDIR="${D}" install + emake -C auparse DESTDIR="${D}" install + fi +} + +multilib_src_install_all() { + dodoc AUTHORS ChangeLog README* THANKS TODO + docinto contrib + dodoc contrib/{*.rules,avc_snap,skeleton.c} + docinto contrib/plugin + dodoc contrib/plugin/* + + newinitd "${FILESDIR}"/auditd-init.d-2.1.3 auditd + newconfd "${FILESDIR}"/auditd-conf.d-2.1.3 auditd + + [ -f "${D}"/sbin/audisp-remote ] && \ + dodir /usr/sbin && \ + mv "${D}"/{sbin,usr/sbin}/audisp-remote || die + + # Gentoo rules + insinto /etc/audit/ + newins "${FILESDIR}"/audit.rules-2.1.3 audit.rules + doins "${FILESDIR}"/audit.rules.stop* + + # audit logs go here + keepdir /var/log/audit/ + + # Security + lockdown_perms "${D}" + + prune_libtool_files --modules +} + +pkg_preinst() { + # Preserve from the audit-1 series + preserve_old_lib /$(get_libdir)/libaudit.so.0 +} + +pkg_postinst() { + lockdown_perms "${ROOT}" + # Preserve from the audit-1 series + preserve_old_lib_notify /$(get_libdir)/libaudit.so.0 +} + +lockdown_perms() { + # upstream wants these to have restrictive perms + basedir="$1" + chmod 0750 "${basedir}"/sbin/au{ditctl,report,dispd,ditd,search,trace} 2>/dev/null + chmod 0750 "${basedir}"/var/log/audit/ 2>/dev/null + chmod 0640 "${basedir}"/etc/{audit/,}{auditd.conf,audit.rules*} 2>/dev/null +} diff --git a/sys-process/audit/files/audit-1.7.17-python.patch b/sys-process/audit/files/audit-1.7.17-python.patch new file mode 100644 index 000000000000..13fed4a803f8 --- /dev/null +++ b/sys-process/audit/files/audit-1.7.17-python.patch @@ -0,0 +1,12 @@ +--- swig/Makefile.am ++++ swig/Makefile.am +@@ -28,7 +28,8 @@ + pyexec_PYTHON = audit.py + pyexec_LTLIBRARIES = _audit.la + pyexec_SOLIBRARIES = _audit.so +-_audit_la_LDFLAGS = -module -avoid-version ++_audit_la_CFLAGS = -shared ++_audit_la_LDFLAGS = -module -avoid-version -shared + _audit_la_HEADERS: $(top_builddir)/config.h + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + nodist__audit_la_SOURCES = audit_wrap.c diff --git a/sys-process/audit/files/audit-1.7.18-as-needed.patch b/sys-process/audit/files/audit-1.7.18-as-needed.patch new file mode 100644 index 000000000000..2e951d07bb72 --- /dev/null +++ b/sys-process/audit/files/audit-1.7.18-as-needed.patch @@ -0,0 +1,30 @@ +--- audit-1.7.13.orig/src/Makefile.in ++++ audit-1.7.13/src/Makefile.in +@@ -273,10 +273,10 @@ + AM_CFLAGS = -D_REENTRANT -D_GNU_SOURCE + noinst_HEADERS = auditd-config.h auditd-event.h auditd-listen.h ausearch-llist.h ausearch-options.h auditctl-llist.h aureport-options.h ausearch-parse.h aureport-scan.h ausearch-lookup.h ausearch-int.h auditd-dispatch.h ausearch-string.h ausearch-nvpair.h ausearch-common.h ausearch-avc.h ausearch-time.h ausearch-lol.h + auditd_SOURCES = auditd.c auditd-event.c auditd-config.c auditd-reconfig.c auditd-sendmail.c auditd-dispatch.c auditd-listen.c +-auditd_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing +-auditd_LDFLAGS = -pie -Wl,-z,relro ++auditd_CFLAGS = -pthread -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing ++auditd_LDFLAGS = -pthread -pie -Wl,-z,relro + auditd_DEPENDENCIES = mt/libauditmt.a libev/libev.a + auditd_LDADD = @LIBWRAP_LIBS@ @libev_LIBS@ -Llibev -lev -lrt -lm $(gss_libs) + auditctl_SOURCES = auditctl.c auditctl-llist.c delete_all.c + auditctl_DEPENDENCIES = mt/libauditmt.a + aureport_SOURCES = aureport.c auditd-config.c ausearch-llist.c aureport-options.c ausearch-string.c ausearch-parse.c aureport-scan.c aureport-output.c ausearch-lookup.c ausearch-int.c ausearch-time.c ausearch-nvpair.c ausearch-avc.c ausearch-lol.c +--- audit-1.7.13.orig/src/Makefile.am ++++ audit-1.7.13/src/Makefile.am +@@ -31,10 +31,10 @@ + noinst_HEADERS = auditd-config.h auditd-event.h auditd-listen.h ausearch-llist.h ausearch-options.h auditctl-llist.h aureport-options.h ausearch-parse.h aureport-scan.h ausearch-lookup.h ausearch-int.h auditd-dispatch.h ausearch-string.h ausearch-nvpair.h ausearch-common.h ausearch-avc.h ausearch-time.h ausearch-lol.h + + auditd_SOURCES = auditd.c auditd-event.c auditd-config.c auditd-reconfig.c auditd-sendmail.c auditd-dispatch.c auditd-listen.c +-auditd_CFLAGS = -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing +-auditd_LDFLAGS = -pie -Wl,-z,relro ++auditd_CFLAGS = -pthread -fPIE -DPIE -g -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing ++auditd_LDFLAGS = -pthread -pie -Wl,-z,relro + auditd_DEPENDENCIES = mt/libauditmt.a libev/libev.a + auditd_LDADD = @LIBWRAP_LIBS@ @libev_LIBS@ -Llibev -lev -lrt -lm $(gss_libs) + + auditctl_SOURCES = auditctl.c auditctl-llist.c delete_all.c + auditctl_DEPENDENCIES = mt/libauditmt.a diff --git a/sys-process/audit/files/audit-1.7.18-missing_headers.patch b/sys-process/audit/files/audit-1.7.18-missing_headers.patch new file mode 100644 index 000000000000..120b173a0d71 --- /dev/null +++ b/sys-process/audit/files/audit-1.7.18-missing_headers.patch @@ -0,0 +1,13 @@ +Index: audit-1.7.13/lib/libaudit.c +=========================================== +--- audit-1.7.13.orig/lib/libaudit.c ++++ audit-1.7.13/lib/libaudit.c +@@ -36,6 +36,8 @@ + #include <sys/utsname.h> + #include <fcntl.h> /* O_NOFOLLOW needs gnu defined */ + #include <limits.h> /* for PATH_MAX */ ++#include <sys/stat.h> ++#include <sys/types.h> + + #include "libaudit.h" + #include "private.h" diff --git a/sys-process/audit/files/audit-2.0.5-python.patch b/sys-process/audit/files/audit-2.0.5-python.patch new file mode 100644 index 000000000000..29742ab5c5e4 --- /dev/null +++ b/sys-process/audit/files/audit-2.0.5-python.patch @@ -0,0 +1,22 @@ +--- bindings/python/Makefile.am ++++ bindings/python/Makefile.am +@@ -27,5 +27,6 @@ + + auparse_la_SOURCES = auparse_python.c + auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing +-auparse_la_LDFLAGS = -module -avoid-version ++auparse_la_CFLAGS = -shared ++auparse_la_LDFLAGS = -module -avoid-version -shared + auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la +--- swig/Makefile.am ++++ swig/Makefile.am +@@ -28,7 +28,8 @@ + pyexec_PYTHON = audit.py + pyexec_LTLIBRARIES = _audit.la + pyexec_SOLIBRARIES = _audit.so +-_audit_la_LDFLAGS = -module -avoid-version ++_audit_la_CFLAGS = -shared ++_audit_la_LDFLAGS = -module -avoid-version -shared + _audit_la_HEADERS: $(top_builddir)/config.h + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + nodist__audit_la_SOURCES = audit_wrap.c diff --git a/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch b/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch new file mode 100644 index 000000000000..3ec60fbc48ec --- /dev/null +++ b/sys-process/audit/files/audit-2.1.3-ia64-compile-fix.patch @@ -0,0 +1,212 @@ +diff -Nuar -X exclude audit-2.1.3.orig/configure.ac audit-2.1.3/configure.ac +--- audit-2.1.3.orig/configure.ac 2011-08-15 17:30:58.000000000 +0000 ++++ audit-2.1.3/configure.ac 2012-12-18 20:03:22.000000000 +0000 +@@ -79,6 +79,9 @@ + esac + fi + ++AC_CHECK_HEADER([asm/ptrace.h], [AC_DEFINE([HAVE_ASM_PTRACE_H],[],[Define to 1 if you have asm/ptrace.h])], []) ++AC_CHECK_HEADER([linux/ptrace.h], [AC_DEFINE([HAVE_LINUX_PTRACE_H],[],[Define to 1 if you have linux/ptrace.h])], []) ++ + #gssapi + AC_ARG_ENABLE(gssapi_krb5, + [AS_HELP_STRING([--enable-gssapi-krb5],[Enable GSSAPI Kerberos 5 support @<:@default=no@:>@])], +diff -Nuar -X exclude audit-2.1.3.orig/src/auditctl.c audit-2.1.3/src/auditctl.c +--- audit-2.1.3.orig/src/auditctl.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditctl.c 2012-12-18 20:21:21.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <stdlib.h> + #include <string.h> /* strdup needs xopen define */ +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-config.c audit-2.1.3/src/auditd-config.c +--- audit-2.1.3.orig/src/auditd-config.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd-config.c 2012-12-18 20:21:23.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <unistd.h> + #include <sys/stat.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-dispatch.c audit-2.1.3/src/auditd-dispatch.c +--- audit-2.1.3.orig/src/auditd-dispatch.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd-dispatch.c 2012-12-18 20:21:27.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <unistd.h> + #include <sys/uio.h> + #include <fcntl.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-event.c audit-2.1.3/src/auditd-event.c +--- audit-2.1.3.orig/src/auditd-event.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd-event.c 2012-12-18 20:21:29.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-listen.c audit-2.1.3/src/auditd-listen.c +--- audit-2.1.3.orig/src/auditd-listen.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd-listen.c 2012-12-18 20:21:31.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <unistd.h> + #include <sys/stat.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-reconfig.c audit-2.1.3/src/auditd-reconfig.c +--- audit-2.1.3.orig/src/auditd-reconfig.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd-reconfig.c 2012-12-18 20:21:33.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <pthread.h> + #include <signal.h> + #include <stdlib.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd-sendmail.c audit-2.1.3/src/auditd-sendmail.c +--- audit-2.1.3.orig/src/auditd-sendmail.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd-sendmail.c 2012-12-18 20:21:34.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <unistd.h> // for access() + #include <string.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/auditd.c audit-2.1.3/src/auditd.c +--- audit-2.1.3.orig/src/auditd.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/auditd.c 2012-12-18 20:21:38.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <sys/types.h> + #include <unistd.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/autrace.c audit-2.1.3/src/autrace.c +--- audit-2.1.3.orig/src/autrace.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/autrace.c 2012-12-18 20:21:43.000000000 +0000 +@@ -21,6 +21,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <string.h> + #include <sys/wait.h> +diff -Nuar -X exclude audit-2.1.3.orig/src/delete_all.c audit-2.1.3/src/delete_all.c +--- audit-2.1.3.orig/src/delete_all.c 2011-08-15 17:31:00.000000000 +0000 ++++ audit-2.1.3/src/delete_all.c 2012-12-18 20:21:48.000000000 +0000 +@@ -20,6 +20,7 @@ + * Steve Grubb <sgrubb@redhat.com> + */ + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <string.h> + #include <errno.h> +diff -Nuar -X exclude audit-2.1.3.orig/lib/fixup.h audit-2.1.3/lib/fixup.h +--- audit-2.1.3.orig/lib/fixup.h 1970-01-01 00:00:00.000000000 +0000 ++++ audit-2.1.3/lib/fixup.h 2012-12-18 20:21:02.000000000 +0000 +@@ -0,0 +1,17 @@ ++#ifndef _AUDIT_IA64_FIXUP_H_ ++#define _AUDIT_IA64_FIXUP_H_ ++ ++#ifdef __ia64__ /* what a pos */ ++# include <linux/types.h> ++# define _ASM_IA64_FPU_H ++#endif ++#include <signal.h> ++/* ++#ifdef HAVE_ASM_PTRACE_H ++# include <asm/ptrace.h> ++#endif ++#ifdef HAVE_LINUX_PTRACE_H ++# include <linux/ptrace.h> ++#endif ++*/ ++#endif +--- audit-2.1.3/src/ausearch.c 2012-12-22 03:09:54.000000000 +0000 ++++ audit-2.1.3/src/ausearch.c 2012-12-22 03:10:02.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <stdio_ext.h> + #include <string.h> +diff -Nuar audit-2.1.3.orig/audisp/audispd.c audit-2.1.3/audisp/audispd.c +--- audit-2.1.3.orig/audisp/audispd.c 2011-08-15 17:30:59.000000000 +0000 ++++ audit-2.1.3/audisp/audispd.c 2012-12-22 03:25:15.000000000 +0000 +@@ -21,6 +21,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <unistd.h> + #include <stdlib.h> +diff -Nuar audit-2.1.3.orig/audisp/plugins/prelude/audisp-prelude.c audit-2.1.3/audisp/plugins/prelude/audisp-prelude.c +--- audit-2.1.3.orig/audisp/plugins/prelude/audisp-prelude.c 2011-08-15 17:30:59.000000000 +0000 ++++ audit-2.1.3/audisp/plugins/prelude/audisp-prelude.c 2012-12-22 03:25:20.000000000 +0000 +@@ -21,6 +21,8 @@ + * + */ + ++#include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <stdlib.h> + #include <signal.h> +diff -Nuar audit-2.1.3.orig/audisp/plugins/remote/audisp-remote.c audit-2.1.3/audisp/plugins/remote/audisp-remote.c +--- audit-2.1.3.orig/audisp/plugins/remote/audisp-remote.c 2011-08-15 17:30:59.000000000 +0000 ++++ audit-2.1.3/audisp/plugins/remote/audisp-remote.c 2012-12-22 03:25:22.000000000 +0000 +@@ -22,6 +22,7 @@ + */ + + #include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <signal.h> + #include <syslog.h> +diff -Nuar audit-2.1.3.orig/contrib/plugin/audisp-example.c audit-2.1.3/contrib/plugin/audisp-example.c +--- audit-2.1.3.orig/contrib/plugin/audisp-example.c 2011-08-15 17:31:02.000000000 +0000 ++++ audit-2.1.3/contrib/plugin/audisp-example.c 2012-12-22 03:25:27.000000000 +0000 +@@ -37,6 +37,8 @@ + */ + + #define _GNU_SOURCE ++#include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <signal.h> + #include <string.h> +diff -Nuar audit-2.1.3.orig/contrib/skeleton.c audit-2.1.3/contrib/skeleton.c +--- audit-2.1.3.orig/contrib/skeleton.c 2011-08-15 17:31:02.000000000 +0000 ++++ audit-2.1.3/contrib/skeleton.c 2012-12-22 03:25:40.000000000 +0000 +@@ -7,6 +7,8 @@ + * gcc skeleton.c -o skeleton -laudit + */ + ++#include "config.h" ++#include "fixup.h" + #include <stdio.h> + #include <sys/types.h> + #include <sys/uio.h> diff --git a/sys-process/audit/files/audit-2.1.3-python.patch b/sys-process/audit/files/audit-2.1.3-python.patch new file mode 100644 index 000000000000..a9feec14e831 --- /dev/null +++ b/sys-process/audit/files/audit-2.1.3-python.patch @@ -0,0 +1,24 @@ +diff -Nuar --exclude '*.orig' audit-2.1.3.orig/bindings/python/Makefile.am audit-2.1.3/bindings/python/Makefile.am +--- audit-2.1.3.orig/bindings/python/Makefile.am 2011-08-15 17:31:01.000000000 +0000 ++++ audit-2.1.3/bindings/python/Makefile.am 2011-09-10 19:01:36.974983756 +0000 +@@ -27,5 +27,6 @@ + + auparse_la_SOURCES = auparse_python.c + auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I/usr/include/python$(PYTHON_VERSION) -fno-strict-aliasing +-auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++auparse_la_CFLAGS = -shared ++auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + auparse_la_LIBADD = ../../auparse/libauparse.la ../../lib/libaudit.la +diff -Nuar --exclude '*.orig' audit-2.1.3.orig/swig/Makefile.am audit-2.1.3/swig/Makefile.am +--- audit-2.1.3.orig/swig/Makefile.am 2011-08-15 17:31:03.000000000 +0000 ++++ audit-2.1.3/swig/Makefile.am 2011-09-10 19:02:14.095067690 +0000 +@@ -28,7 +28,8 @@ + pyexec_PYTHON = audit.py + pyexec_LTLIBRARIES = _audit.la + pyexec_SOLIBRARIES = _audit.so +-_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++_audit_la_CFLAGS = -shared ++_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + _audit_la_HEADERS: $(top_builddir)/config.h + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + nodist__audit_la_SOURCES = audit_wrap.c diff --git a/sys-process/audit/files/audit-2.4.1-python.patch b/sys-process/audit/files/audit-2.4.1-python.patch new file mode 100644 index 000000000000..6c27396ef323 --- /dev/null +++ b/sys-process/audit/files/audit-2.4.1-python.patch @@ -0,0 +1,22 @@ +--- audit-2.4.1/bindings/python/Makefile.am ++++ audit-2.4.1/bindings/python/Makefile.am +@@ -27,5 +27,6 @@ + + auparse_la_SOURCES = auparse_python.c + auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) -I@PYINCLUDEDIR@ -fno-strict-aliasing +-auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++auparse_la_CFLAGS = -shared ++auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la +--- audit-2.4.1/swig/Makefile.am ++++ audit-2.4.1/swig/Makefile.am +@@ -27,7 +27,8 @@ + pyexec_PYTHON = audit.py + pyexec_LTLIBRARIES = _audit.la + pyexec_SOLIBRARIES = _audit.so +-_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++_audit_la_CFLAGS = -shared ++_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + _audit_la_HEADERS: $(top_builddir)/config.h + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + nodist__audit_la_SOURCES = audit_wrap.c diff --git a/sys-process/audit/files/audit-2.4.3-python.patch b/sys-process/audit/files/audit-2.4.3-python.patch new file mode 100644 index 000000000000..7b9ea53e09d2 --- /dev/null +++ b/sys-process/audit/files/audit-2.4.3-python.patch @@ -0,0 +1,46 @@ +diff -ur audit-2.4.3.orig/bindings/python/python2/Makefile.am audit-2.4.3/bindings/python/python2/Makefile.am +--- audit-2.4.3.orig/bindings/python/python2/Makefile.am 2015-07-22 23:35:24.315424091 +0800 ++++ audit-2.4.3/bindings/python/python2/Makefile.am 2015-07-22 23:37:16.861510504 +0800 +@@ -29,5 +29,6 @@ + + auparse_la_SOURCES = $(top_srcdir)/bindings/python/auparse_python.c + auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) +-auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++auparse_la_CFLAGS = -shared ++auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la +diff -ur audit-2.4.3.orig/bindings/python/python3/Makefile.am audit-2.4.3/bindings/python/python3/Makefile.am +--- audit-2.4.3.orig/bindings/python/python3/Makefile.am 2015-07-22 23:35:24.315424091 +0800 ++++ audit-2.4.3/bindings/python/python3/Makefile.am 2015-07-22 23:37:30.395400641 +0800 +@@ -28,5 +28,6 @@ + + auparse_la_SOURCES = $(top_srcdir)/bindings/python/auparse_python.c + auparse_la_CPPFLAGS = -I$(top_srcdir)/auparse $(AM_CPPFLAGS) +-auparse_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++auparse_la_CFLAGS = -shared ++auparse_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + auparse_la_LIBADD = ${top_builddir}/auparse/libauparse.la ${top_builddir}/lib/libaudit.la +diff -ur audit-2.4.3.orig/bindings/swig/python/Makefile.am audit-2.4.3/bindings/swig/python/Makefile.am +--- audit-2.4.3.orig/bindings/swig/python/Makefile.am 2015-07-22 23:35:24.316424083 +0800 ++++ audit-2.4.3/bindings/swig/python/Makefile.am 2015-07-22 23:35:53.244189263 +0800 +@@ -28,7 +28,7 @@ + pyexec_LTLIBRARIES = _audit.la + pyexec_SOLIBRARIES = _audit.so + _audit_la_CFLAGS = -shared +-_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + _audit_la_HEADERS: $(top_builddir)/config.h + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + _audit_la_LIBADD = $(top_builddir)/lib/libaudit.la +diff -ur audit-2.4.3.orig/bindings/swig/python3/Makefile.am audit-2.4.3/bindings/swig/python3/Makefile.am +--- audit-2.4.3.orig/bindings/swig/python3/Makefile.am 2015-07-22 23:35:24.316424083 +0800 ++++ audit-2.4.3/bindings/swig/python3/Makefile.am 2015-07-22 23:36:27.833908482 +0800 +@@ -29,7 +29,7 @@ + py3exec_LTLIBRARIES = _audit.la + py3exec_SOLIBRARIES = _audit.so + _audit_la_CFLAGS = -shared +-_audit_la_LDFLAGS = -module -avoid-version -Wl,-z,relro ++_audit_la_LDFLAGS = -module -avoid-version -shared -Wl,-z,relro + _audit_la_HEADERS: $(top_builddir)/config.h + _audit_la_DEPENDENCIES =${top_srcdir}/lib/libaudit.h ${top_builddir}/lib/libaudit.la + _audit_la_LIBADD = ${top_builddir}/lib/libaudit.la diff --git a/sys-process/audit/files/audit.rules b/sys-process/audit/files/audit.rules new file mode 100644 index 000000000000..4463b1f30917 --- /dev/null +++ b/sys-process/audit/files/audit.rules @@ -0,0 +1,25 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +# +# This file contains the auditctl rules that are loaded +# whenever the audit daemon is started via the initscripts. +# The rules are simply the parameters that would be passed +# to auditctl. + +# First rule - delete all +# This is to clear out old rules, so we don't append to them. +-D + +# Feel free to add below this line. See auditctl man page + +# The following rule would cause all of the syscalls listed to be ignored in logging. +# -a entry,never -S read -S write -S open -S fstat -S fstat64 -S mmap -S brk -S munmap -S _llseek -S nanosleep -S fcntl64 -S close -S dup2 -S rt_sigaction -S stat64 -S stat + +# The following rule would cause the capture of all systems not caught above. +# -a entry,always -S all + +# Increase the buffers to survive stress events +-b 256 + +# vim:ft=conf: diff --git a/sys-process/audit/files/audit.rules-2.1.3 b/sys-process/audit/files/audit.rules-2.1.3 new file mode 100644 index 000000000000..a53a70360d71 --- /dev/null +++ b/sys-process/audit/files/audit.rules-2.1.3 @@ -0,0 +1,26 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +# +# This file contains the auditctl rules that are loaded +# whenever the audit daemon is started via the initscripts. +# The rules are simply the parameters that would be passed +# to auditctl. + +# First rule - delete all +# This is to clear out old rules, so we don't append to them. +-D + +# Feel free to add below this line. See auditctl man page + +# The following rule would cause all of the syscalls listed to be ignored in logging. +-a exit,never -F arch=b32 -S read -S write -S open -S fstat -S mmap -S brk -S munmap -S nanosleep -S fcntl -S close -S dup2 -S rt_sigaction -S stat +-a exit,never -F arch=b64 -S read -S write -S open -S fstat -S mmap -S brk -S munmap -S nanosleep -S fcntl -S close -S dup2 -S rt_sigaction -S stat + +# The following rule would cause the capture of all systems not caught above. +# -a exit,always -S all + +# Increase the buffers to survive stress events +-b 8192 + +# vim:ft=conf: diff --git a/sys-process/audit/files/audit.rules.stop.post b/sys-process/audit/files/audit.rules.stop.post new file mode 100644 index 000000000000..04d81dda96d1 --- /dev/null +++ b/sys-process/audit/files/audit.rules.stop.post @@ -0,0 +1,13 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +# +# This file contains the auditctl rules that are loaded immediately after the +# audit deamon is stopped via the initscripts. +# The rules are simply the parameters that would be passed +# to auditctl. + +# Not used for the default Gentoo configuration as of v1.2.3 +# Paranoid security types might wish to reconfigure kauditd here. + +# vim:ft=conf: diff --git a/sys-process/audit/files/audit.rules.stop.pre b/sys-process/audit/files/audit.rules.stop.pre new file mode 100644 index 000000000000..7fc0d84de9b5 --- /dev/null +++ b/sys-process/audit/files/audit.rules.stop.pre @@ -0,0 +1,16 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +# +# This file contains the auditctl rules that are loaded immediately before the +# audit deamon is stopped via the initscripts. +# The rules are simply the parameters that would be passed +# to auditctl. + +# auditd is stopping, don't capture events anymore +-D + +# Disable kernel generating audit events +-e 0 + +# vim:ft=conf: diff --git a/sys-process/audit/files/auditd-conf.d-1.2.3 b/sys-process/audit/files/auditd-conf.d-1.2.3 new file mode 100644 index 000000000000..a8250c5fd217 --- /dev/null +++ b/sys-process/audit/files/auditd-conf.d-1.2.3 @@ -0,0 +1,16 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Configuration options for auditd +# -f for foreground mode +# There are some other options as well, but you'll have to look in the source +# code to find them as they aren't ready for use yet. +EXTRAOPTIONS='' + +# Audit rules file to run after starting auditd +RULEFILE_STARTUP=/etc/audit/audit.rules + +# Audit rules file to run before and after stopping auditd +RULEFILE_STOP_PRE=/etc/audit/audit.rules.stop.pre +RULEFILE_STOP_POST=/etc/audit/audit.rules.stop.post diff --git a/sys-process/audit/files/auditd-conf.d-2.1.3 b/sys-process/audit/files/auditd-conf.d-2.1.3 new file mode 100644 index 000000000000..923e9378f49b --- /dev/null +++ b/sys-process/audit/files/auditd-conf.d-2.1.3 @@ -0,0 +1,23 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Configuration options for auditd +# -f for foreground mode +# There are some other options as well, but you'll have to look in the source +# code to find them as they aren't ready for use yet. +EXTRAOPTIONS='' + +# Audit rules file to run after starting auditd +RULEFILE_STARTUP=/etc/audit/audit.rules + +# Audit rules file to run before and after stopping auditd +RULEFILE_STOP_PRE=/etc/audit/audit.rules.stop.pre +RULEFILE_STOP_POST=/etc/audit/audit.rules.stop.post + +# If you want to enforce a certain locale for auditd, +# uncomment one of the next lines: +#AUDITD_LANG=none +AUDITD_LANG=C +#AUDITD_LANG=en_US +#AUDITD_LANG=en_US.UTF-8 diff --git a/sys-process/audit/files/auditd-init.d-1.7.17 b/sys-process/audit/files/auditd-init.d-1.7.17 new file mode 100644 index 000000000000..4d55ce99f5d2 --- /dev/null +++ b/sys-process/audit/files/auditd-init.d-1.7.17 @@ -0,0 +1,58 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +start_auditd() { + ebegin "Starting auditd" + start-stop-daemon \ + --start --quiet --pidfile /var/run/auditd.pid \ + --exec /sbin/auditd -- ${EXTRAOPTIONS} + local ret=$? + eend $ret + return $ret +} + +stop_auditd() { + ebegin "Stopping auditd" + start-stop-daemon \ + --stop --quiet --pidfile /var/run/auditd.pid + local ret=$? + eend $ret + return $ret +} + + +loadfile() { + local rules="$1" + if [ -n "${rules}" -a -f "${rules}" ]; then + einfo "Loading audit rules from ${rules}" + /sbin/auditctl -R "${rules}" 1>/dev/null + return $? + else + return 0 + fi +} + +start() { + start_auditd + local ret=$? + if [ $ret -eq 0 -a "${RC_CMD}" != "restart" ]; then + loadfile "${RULEFILE_STARTUP}" + fi + return $ret +} + +stop() { + [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_PRE}" + stop_auditd + local ret=$? + [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_POST}" + return $ret +} + +# This is a special case, we do not want to touch the rules at all +restart() { + stop_auditd + start_auditd +} diff --git a/sys-process/audit/files/auditd-init.d-2.1.3 b/sys-process/audit/files/auditd-init.d-2.1.3 new file mode 100644 index 000000000000..3b34fa8e0364 --- /dev/null +++ b/sys-process/audit/files/auditd-init.d-2.1.3 @@ -0,0 +1,97 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands='reload reload_auditd reload_rules' +description='Linux Auditing System' +description_reload='Reload daemon configuration and rules' +description_reload_rules='Reload daemon rules' +description_reload_auditd='Reload daemon configuration' + +name='auditd' +pidfile='/var/run/auditd.pid' +command='/sbin/auditd' + +start_auditd() { + # Env handling taken from the upstream init script + if [ -z "$AUDITD_LANG" -o "$AUDITD_LANG" = "none" -o "$AUDITD_LANG" = "NONE" ]; then + unset LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE + else + LANG="$AUDITD_LANG" + LC_TIME="$AUDITD_LANG" + LC_ALL="$AUDITD_LANG" + LC_MESSAGES="$AUDITD_LANG" + LC_NUMERIC="$AUDITD_LANG" + LC_MONETARY="$AUDITD_LANG" + LC_COLLATE="$AUDITD_LANG" + export LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE + fi + unset HOME MAIL USER USERNAME + + ebegin "Starting ${name}" + start-stop-daemon \ + --start --quiet --pidfile ${pidfile} \ + --exec ${command} -- ${EXTRAOPTIONS} + local ret=$? + eend $ret + return $ret +} + +stop_auditd() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + local ret=$? + eend $ret + return $ret +} + + +loadfile() { + local rules="$1" + if [ -n "${rules}" -a -f "${rules}" ]; then + einfo "Loading audit rules from ${rules}" + /sbin/auditctl -R "${rules}" 1>/dev/null + return $? + else + return 0 + fi +} + +start() { + start_auditd + local ret=$? + if [ $ret -eq 0 -a "${RC_CMD}" != "restart" ]; then + touch /var/lock/subsys/${name} + loadfile "${RULEFILE_STARTUP}" + fi + return $ret +} + +reload_rules() { + loadfile "${RULEFILE_STARTUP}" +} + +reload_auditd() { + [ -f ${pidfile} ] && kill -HUP `cat ${pidfile}` +} + +reload() { + reload_auditd + reload_rules +} + +stop() { + [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_PRE}" + stop_auditd + rm -f /var/lock/subsys/${name} + local ret=$? + [ "${RC_CMD}" != "restart" ] && loadfile "${RULEFILE_STOP_POST}" + return $ret +} + +# This is a special case, we do not want to touch the rules at all +restart() { + stop_auditd + start_auditd +} diff --git a/sys-process/audit/metadata.xml b/sys-process/audit/metadata.xml new file mode 100644 index 000000000000..4f84c8541bd7 --- /dev/null +++ b/sys-process/audit/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-process/bcron/Manifest b/sys-process/bcron/Manifest new file mode 100644 index 000000000000..76324e8565a6 --- /dev/null +++ b/sys-process/bcron/Manifest @@ -0,0 +1 @@ +DIST bcron-0.09.tar.gz 57584 RMD160 a7ae646635c2da2a71803020f890453fac62f6d5 SHA1 d2136f1de412b7d8be0adbef298411a1ee1908f0 SHA256 c547ff95ca2f0fb7d4bfd6c3f81cc9f099fe287b566c9511d9d9930380b004c8 diff --git a/sys-process/bcron/bcron-0.09-r2.ebuild b/sys-process/bcron/bcron-0.09-r2.ebuild new file mode 100644 index 000000000000..2b1675a600ea --- /dev/null +++ b/sys-process/bcron/bcron-0.09-r2.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit cron eutils toolchain-funcs multilib +DESCRIPTION="A new cron system designed with secure operations in mind by Bruce Guenter" + +HOMEPAGE="http://untroubled.org/bcron/" +SRC_URI="http://untroubled.org/bcron/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=dev-libs/bglibs-1.106" +RDEPEND=">=sys-process/cronbase-0.3.2 + virtual/mta + sys-apps/ucspi-unix + virtual/daemontools" + +CRON_SYSTEM_CRONTAB="yes" + +src_prepare() { + epatch "${FILESDIR}/bcron-0.09-fix-parallel-build.patch" + epatch "${FILESDIR}/bcron-0.09-fix-socket-permissions.patch" +} + +src_configure() { + echo "/usr/include/bglibs" > conf-bgincs + echo "/usr/$(get_libdir)/bglibs" > conf-bglibs + echo "${D}/usr/bin" > conf-bin + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld +} + +src_install() { + einstall || die + + #fix permissions of crontab + fperms o-rwx /usr/bin/bcrontab + fowners root:cron /usr/bin/bcrontab + + doman bcrontab.1 crontab.5 bcron-update.8 bcron-start.8 + doman bcron-spool.8 bcron-sched.8 bcron-exec.8 + + dodoc ANNOUNCEMENT NEWS README TODO + + keepdir /etc/cron.d + + keepdir /var/spool/cron/crontabs + keepdir /var/spool/cron/tmp + + for i in crontabs tmp; + do + fowners cron:cron /var/spool/cron/$i + fperms go-rwx /var/spool/cron/$i + done + + dodir /etc/bcron + + insinto /etc + doins "${FILESDIR}"/crontab + + insinto /var/lib/supervise/bcron + doins bcron-sched.run + + insinto /var/lib/supervise/bcron/log + doins bcron-sched-log.run + + insinto /var/lib/supervise/bcron-spool + doins bcron-spool.run + + insinto /var/lib/supervise/bcron-update + doins bcron-update.run +} + +pkg_config() { + cd "${ROOT}"var/lib/supervise/bcron + [ -e run ] && cp run bcron-sched.run.`date +%Y%m%d%H%M%S` + cp bcron-sched.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron/log + [ -e run ] && cp run bcron-sched-log.run.`date +%Y%m%d%H%M%S` + cp bcron-sched-log.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron-spool + [ -e run ] && cp run bcron-spool.run.`date +%Y%m%d%H%M%S` + cp bcron-spool.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron-update + [ -e run ] && cp run bcron-update.run.`date +%Y%m%d%H%M%S` + cp bcron-update.run run + chmod u+x run + + [ ! -e "${ROOT}"/var/spool/cron/trigger ] && mkfifo "${ROOT}"var/spool/cron/trigger + chown cron:cron /var/spool/cron/trigger + chmod go-rwx /var/spool/cron/trigger +} + +pkg_postinst() { + echo + elog "Run " + elog "emerge --config =${PF}" + elog "to create or update your run files (backups are created) in" + elog " /var/lib/supervise/bcron (bcron daemon) and" + elog " /var/lib/supervise/bcron-spool (crontab receiver) and" + elog " /var/lib/supervise/bcron-update (system crontab updater)" + + cron_pkg_postinst +} diff --git a/sys-process/bcron/bcron-0.09.ebuild b/sys-process/bcron/bcron-0.09.ebuild new file mode 100644 index 000000000000..380ad7b56950 --- /dev/null +++ b/sys-process/bcron/bcron-0.09.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +CRON_SYSTEM_CRONTAB="yes" + +inherit cron eutils toolchain-funcs +DESCRIPTION="A new cron system designed with secure operations in mind by Bruce Guenter" + +HOMEPAGE="http://untroubled.org/bcron/" +SRC_URI="http://untroubled.org/bcron/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND=">=dev-libs/bglibs-1.031" +RDEPEND=">=sys-process/cronbase-0.3.2 + virtual/mta + sys-apps/ucspi-unix + virtual/daemontools" + +src_compile() { + echo "/usr/include/bglibs" > conf-bgincs + echo "/usr/lib/bglibs" > conf-bglibs + echo "${D}/usr/bin" > conf-bin + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld + # bug #278459 + emake -j1 || die "make failed" +} + +src_install() { + einstall || die + + #fix permissions of crontab + fperms o-rwx /usr/bin/bcrontab + fowners root:cron /usr/bin/bcrontab + + doman bcrontab.1 crontab.5 bcron-update.8 bcron-start.8 + doman bcron-spool.8 bcron-sched.8 bcron-exec.8 + + dodoc ANNOUNCEMENT NEWS README TODO + + keepdir /etc/cron.d + + keepdir /var/spool/cron/crontabs + keepdir /var/spool/cron/tmp + + for i in crontabs tmp; + do + fowners cron:cron /var/spool/cron/$i + fperms go-rwx /var/spool/cron/$i + done + + dodir /etc/bcron + + insinto /etc + doins "${FILESDIR}"/crontab + + insinto /var/lib/supervise/bcron + doins bcron-sched.run + + insinto /var/lib/supervise/bcron/log + doins bcron-sched-log.run + + insinto /var/lib/supervise/bcron-spool + doins bcron-spool.run + + insinto /var/lib/supervise/bcron-update + doins bcron-update.run +} + +pkg_config() { + cd "${ROOT}"var/lib/supervise/bcron + [ -e run ] && cp run bcron-sched.run.`date +%Y%m%d%H%M%S` + cp bcron-sched.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron/log + [ -e run ] && cp run bcron-sched-log.run.`date +%Y%m%d%H%M%S` + cp bcron-sched-log.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron-spool + [ -e run ] && cp run bcron-spool.run.`date +%Y%m%d%H%M%S` + cp bcron-spool.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron-update + [ -e run ] && cp run bcron-update.run.`date +%Y%m%d%H%M%S` + cp bcron-update.run run + chmod u+x run + + [ ! -e "${ROOT}"/var/spool/cron/trigger ] && mkfifo "${ROOT}"var/spool/cron/trigger + chown cron:cron /var/spool/cron/trigger + chmod go-rwx /var/spool/cron/trigger +} + +pkg_postinst() { + echo + elog "Run " + elog "emerge --config =${PF}" + elog "to create or update your run files (backups are created) in" + elog " /var/lib/supervise/bcron (bcron daemon) and" + elog " /var/lib/supervise/bcron-spool (crontab receiver) and" + elog " /var/lib/supervise/bcron-update (system crontab updater)" + + cron_pkg_postinst +} diff --git a/sys-process/bcron/files/bcron-0.09-fix-parallel-build.patch b/sys-process/bcron/files/bcron-0.09-fix-parallel-build.patch new file mode 100644 index 000000000000..987b302abe4f --- /dev/null +++ b/sys-process/bcron/files/bcron-0.09-fix-parallel-build.patch @@ -0,0 +1,19 @@ +--- Makefile.orig 2010-01-14 15:39:07.000000000 +0100 ++++ Makefile 2010-01-14 15:39:40.000000000 +0100 +@@ -96,14 +96,14 @@ + ./load insthier -lbg-installer -lbg + mv insthier installer + +-instcheck: load insthier.o ++instcheck: load insthier.o installer instshow + ./load insthier -lbg-instcheck -lbg + mv insthier instcheck + + insthier.o: compile insthier.c conf_bin.c + ./compile insthier.c + +-instshow: load insthier.o ++instshow: load insthier.o installer + ./load insthier -lbg-instshow -lbg + mv insthier instshow + diff --git a/sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch b/sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch new file mode 100644 index 000000000000..a8b13038e608 --- /dev/null +++ b/sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch @@ -0,0 +1,10 @@ +--- a/bcron-spool.run 2005-06-09 04:14:42.000000000 +0400 ++++ b/bcron-spool/run 2010-07-12 01:29:24.000000000 +0400 +@@ -5,6 +5,6 @@ + envuidgid cron \ + sh -c ' + exec \ +-unixserver -U ${BCRON_SOCKET:-/var/run/bcron-spool} \ ++unixserver -U ${BCRON_SOCKET:-/var/run/bcron-spool} -r 16 -p 0660 \ + bcron-spool + ' diff --git a/sys-process/bcron/files/crontab b/sys-process/bcron/files/crontab new file mode 100644 index 000000000000..318d0e40879f --- /dev/null +++ b/sys-process/bcron/files/crontab @@ -0,0 +1,15 @@ +# for bcron +# $Id$ + +# Global variables +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly +59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly +9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily +19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly +29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly +*/10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons diff --git a/sys-process/bcron/metadata.xml b/sys-process/bcron/metadata.xml new file mode 100644 index 000000000000..2ba9b9520d07 --- /dev/null +++ b/sys-process/bcron/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cron</herd> + <longdescription> + This is bcron, a new cron system designed with secure operations in + mind. To do this, the system is divided into several seperate programs, + each responsible for a seperate task, with strictly controlled + communications between them. The user interface is a drop-in + replacement for similar systems (such as vixie-cron), but the internals + differ greatly. + </longdescription> +</pkgmetadata> diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest new file mode 100644 index 000000000000..d6611bb3118c --- /dev/null +++ b/sys-process/criu/Manifest @@ -0,0 +1,2 @@ +DIST criu-1.5.2.tar.bz2 457573 SHA256 e8226018ac6c4094d61a1c002543e2b2253b4041a8edb24d4c1eaa41ce5ab345 SHA512 c7916fde1f63cb66a89e71867c204a251dfa2b9de703ac467bc460c6f0d895947996fd466c17cb529d2502aba7b75b8b30162baf3944fefebb71625fb88e5458 WHIRLPOOL c951692e684bd1b032bde1b534a4f4bd4b769a1e73afc56c74711ac943da907f638489205e8be2c68bbc345c1da8b641a7175dccd34aad907ca3251c3f2156a0 +DIST criu-1.6.tar.bz2 484513 SHA256 35ba6f5df90bfb8a25ae5e53459272bb37b8a69790e084f86d7a9ffa0df35993 SHA512 0672c7342ffed7c23fdb747b7bd3b08f205a4bf3965577991d007f71e70be5243247e52ad823f0099713f7977f6f4be5403ea2073a840b5024b6a0f240f65bdc WHIRLPOOL da5a767b3f89efdd2cda21331cc60e60e0cdbab163a55ef1a3080d3601df924688d612c7e76000c3d383cdb22002b16c28ad2740b7bc6aba784021f31ebc54c4 diff --git a/sys-process/criu/criu-1.5.2.ebuild b/sys-process/criu/criu-1.5.2.ebuild new file mode 100644 index 000000000000..55dad0c137d5 --- /dev/null +++ b/sys-process/criu/criu-1.5.2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs linux-info flag-o-matic + +DESCRIPTION="utility to checkpoint/restore a process tree" +HOMEPAGE="http://criu.org/" +SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64" +IUSE="setproctitle" + +RDEPEND="dev-libs/protobuf-c + setproctitle? ( dev-libs/libbsd )" +DEPEND="${RDEPEND} + app-text/asciidoc + app-text/xmlto" + +CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER + ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG" + +RESTRICT="test" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.3.1-flags.patch + epatch "${FILESDIR}"/${PN}-1.3.1-makefile.patch + epatch "${FILESDIR}"/${PN}-1.5-automagic-libbsd.patch +} + +src_compile() { + unset ARCH + emake CC="$(tc-getCC)" LD="$(tc-getLD)" V=1 SETPROCTITLE=$(usex setproctitle) WERROR=0 all docs +} + +src_test() { + # root privileges are required to dump all necessary info + if [[ ${EUID} -eq 0 ]] ; then + emake -j1 CC="$(tc-getCC)" V=1 WERROR=0 test + fi +} + +src_install() { + emake SYSCONFDIR="${EPREFIX}"/etc PREFIX="${EPREFIX}"/usr DESTDIR="${D}" install + dodoc CREDITS README +} diff --git a/sys-process/criu/criu-1.6-r1.ebuild b/sys-process/criu/criu-1.6-r1.ebuild new file mode 100644 index 000000000000..3806853b814e --- /dev/null +++ b/sys-process/criu/criu-1.6-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils toolchain-funcs linux-info flag-o-matic + +DESCRIPTION="utility to checkpoint/restore a process tree" +HOMEPAGE="http://criu.org/" +SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64" +IUSE="setproctitle" + +RDEPEND="dev-libs/protobuf-c + setproctitle? ( dev-libs/libbsd )" +DEPEND="${RDEPEND} + app-text/asciidoc + app-text/xmlto" + +CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER + ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG" + +RESTRICT="test" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-1.3.1-flags.patch + epatch "${FILESDIR}"/${PN}-1.3.1-makefile.patch + epatch "${FILESDIR}"/${PN}-1.5-automagic-libbsd.patch +} + +criu_arch() { + # criu infers the arch from $(uname -m). We never want this to happen. + case ${ARCH} in + amd64) echo "x86_64";; + arm64) echo "aarch64";; + x86) echo "i386";; + *) echo "${ARCH}";; + esac +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + LD="$(tc-getLD)" \ + OBJCOPY="$(tc-getOBJCOPY)" \ + ARCH="$(criu_arch)" \ + V=1 WERROR=0 \ + SETPROCTITLE=$(usex setproctitle) \ + all docs +} + +src_test() { + # root privileges are required to dump all necessary info + if [[ ${EUID} -eq 0 ]] ; then + emake -j1 CC="$(tc-getCC)" ARCH="$(criu_arch)" V=1 WERROR=0 test + fi +} + +src_install() { + emake \ + ARCH="$(criu_arch)" \ + PREFIX="${EPREFIX}"/usr \ + LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \ + DESTDIR="${D}" \ + install + + dodoc CREDITS README.md +} diff --git a/sys-process/criu/files/criu-1.3.1-flags.patch b/sys-process/criu/files/criu-1.3.1-flags.patch new file mode 100644 index 000000000000..84f503770557 --- /dev/null +++ b/sys-process/criu/files/criu-1.3.1-flags.patch @@ -0,0 +1,55 @@ +--- criu-1.3.1/Makefile ++++ criu-1.3.1/Makefile +@@ -102,9 +102,6 @@ + + ifeq ($(DEBUG),1) + DEFINES += -DCR_DEBUG +- CFLAGS += -O0 -ggdb3 +-else +- CFLAGS += -O2 + endif + + ifeq ($(GMON),1) +--- criu-1.3.1/test/zdtm/lib/Makefile ++++ criu-1.3.1/test/zdtm/lib/Makefile +@@ -1,6 +1,6 @@ + include ../Makefile.inc + +-CFLAGS = -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 ++CFLAGS = -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 + CFLAGS += $(USERCFLAGS) + + LIBDIR = . +--- criu-1.3.1/test/zdtm/live/static/Makefile ++++ criu-1.3.1/test/zdtm/live/static/Makefile +@@ -3,7 +3,7 @@ + LIBDIR = ../../lib + LIB = $(LIBDIR)/libzdtmtst.a + override CPPFLAGS += -I$(LIBDIR) +-CFLAGS = -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 ++CFLAGS = -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 + CFLAGS += $(USERCFLAGS) + + TST_NOFILE = \ +--- criu-1.3.1/test/zdtm/live/streaming/Makefile ++++ criu-1.3.1/test/zdtm/live/streaming/Makefile +@@ -3,7 +3,7 @@ + LIBDIR = ../../lib + LIB = $(LIBDIR)/libzdtmtst.a + override CPPFLAGS += -I$(LIBDIR) +-CFLAGS = -g -O2 -Wall -Werror -fno-strict-aliasing ++CFLAGS = -Wall -fno-strict-aliasing + CFLAGS += $(USERCFLAGS) + + TST_NOFILE = \ +--- criu-1.3.1/test/zdtm/live/transition/Makefile ++++ criu-1.3.1/test/zdtm/live/transition/Makefile +@@ -3,7 +3,7 @@ + LIBDIR = ../../lib + LIB = $(LIBDIR)/libzdtmtst.a + override CPPFLAGS += -I$(LIBDIR) +-CFLAGS = -g -O2 -Wall -Werror ++CFLAGS = -Wall + CFLAGS += $(USERCFLAGS) + + TST_NOFILE = \ diff --git a/sys-process/criu/files/criu-1.3.1-makefile.patch b/sys-process/criu/files/criu-1.3.1-makefile.patch new file mode 100644 index 000000000000..50781c192aa8 --- /dev/null +++ b/sys-process/criu/files/criu-1.3.1-makefile.patch @@ -0,0 +1,20 @@ +--- criu-1.3.1/Makefile.inc ++++ criu-1.3.1/Makefile.inc +@@ -15,15 +15,9 @@ + SBINDIR := $(PREFIX)/sbin + MANDIR := $(PREFIX)/share/man + SYSTEMDUNITDIR := $(PREFIX)/lib/systemd/system/ +-LOGROTATEDIR := $(PREFIX)/etc/logrotate.d/ ++LOGROTATEDIR := $(SYSCONFDIR)/etc/logrotate.d/ + LIBDIR := $(PREFIX)/lib +-# For recent Debian/Ubuntu with multiarch support +-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \ +- -qDEB_HOST_MULTIARCH 2>/dev/null) +-ifneq "$(DEB_HOST_MULTIARCH)" "" +-LIBDIR := $(PREFIX)/lib/$(DEB_HOST_MULTIARCH) +-# For most other systems +-else ifeq "$(shell uname -m)" "x86_64" ++ifeq "$(shell uname -m)" "x86_64" + LIBDIR := $(PREFIX)/lib64 + endif + diff --git a/sys-process/criu/files/criu-1.5-automagic-libbsd.patch b/sys-process/criu/files/criu-1.5-automagic-libbsd.patch new file mode 100644 index 000000000000..8f5e4b4e02d0 --- /dev/null +++ b/sys-process/criu/files/criu-1.5-automagic-libbsd.patch @@ -0,0 +1,29 @@ +Control libbsd dependency via SETPROCTITLE definition. + +--- criu-1.5/Makefile.config ++++ criu-1.5/Makefile.config +@@ -3,10 +3,12 @@ + + CONFIG := include/config.h + ++ifeq ($(SETPROCTITLE),yes) + ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y) + LIBS += -lbsd + DEFINES += -DCONFIG_HAS_LIBBSD + endif ++endif + + $(CONFIG): scripts/utilities.mak scripts/feature-tests.mak include/config-base.h + $(E) " GEN " $@ +@@ -33,9 +35,11 @@ + ifeq ($(VDSO),y) + $(Q) @echo '#define CONFIG_VDSO' >> $@ + endif ++ifeq ($(SETPROCTITLE),yes) + ifeq ($(call try-cc,$(SETPROCTITLE_INIT_TEST),-lbsd),y) + $(Q) @echo '#define CONFIG_HAS_SETPROCTITLE_INIT' >> $@ + endif ++endif + $(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@ + + config: $(CONFIG) diff --git a/sys-process/criu/files/criu-1.5.1-arm64-ptrace.patch b/sys-process/criu/files/criu-1.5.1-arm64-ptrace.patch new file mode 100644 index 000000000000..497838132a24 --- /dev/null +++ b/sys-process/criu/files/criu-1.5.1-arm64-ptrace.patch @@ -0,0 +1,12 @@ +diff --git a/arch/aarch64/include/asm/types.h b/arch/aarch64/include/asm/types.h +index 8dd336e..6657279 100644 +--- a/arch/aarch64/include/asm/types.h ++++ b/arch/aarch64/include/asm/types.h +@@ -3,6 +3,7 @@ + + #include <stdbool.h> + #include <signal.h> ++#include <asm/ptrace.h> + #include "protobuf/core.pb-c.h" + + #include "asm-generic/page.h" diff --git a/sys-process/criu/metadata.xml b/sys-process/criu/metadata.xml new file mode 100644 index 000000000000..4ff189ce3f9a --- /dev/null +++ b/sys-process/criu/metadata.xml @@ -0,0 +1,12 @@ +<?xml version = '1.0' encoding = 'UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>virtualization</herd> + <maintainer> + <email>dlan@gentoo.org</email> + <name>Yixun Lan</name> + </maintainer> + <use> + <flag name='setproctitle'>Make process titles of service workers to be more verbose</flag> + </use> +</pkgmetadata> diff --git a/sys-process/cronbase/cronbase-0.3.3.ebuild b/sys-process/cronbase/cronbase-0.3.3.ebuild new file mode 100644 index 000000000000..b8cedbd679c3 --- /dev/null +++ b/sys-process/cronbase/cronbase-0.3.3.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit user + +DESCRIPTION="base for all cron ebuilds" +HOMEPAGE="http://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +pkg_setup() { + enewgroup cron 16 + enewuser cron 16 -1 /var/spool/cron cron +} + +src_install() { + newsbin "${FILESDIR}"/run-crons-${PV} run-crons || die + + diropts -m0750; keepdir /etc/cron.hourly + diropts -m0750; keepdir /etc/cron.daily + diropts -m0750; keepdir /etc/cron.weekly + diropts -m0750; keepdir /etc/cron.monthly + + diropts -m0750 -o root -g cron; keepdir /var/spool/cron + + diropts -m0750; keepdir /var/spool/cron/lastrun +} + +pkg_postinst() { + #Portage doesn't enforce proper permissions on already existing" + #directories (bug 141619). + echo + elog "Forcing proper permissions on" + elog "${ROOT}etc/cron.{hourly,daily,weekly,monthly}," + elog "${ROOT}var/spool/cron/ and ${ROOT}var/spool/cron/lastrun/" + echo + chmod 0750 "${ROOT}"etc/cron.{hourly,daily,weekly,monthly} \ + || die "chmod failed" + chmod 0750 "${ROOT}"var/spool/{cron,cron/lastrun} || die "chmod failed" + chown root:cron "${ROOT}var/spool/cron" || die "chown failed" +} diff --git a/sys-process/cronbase/cronbase-0.3.4.ebuild b/sys-process/cronbase/cronbase-0.3.4.ebuild new file mode 100644 index 000000000000..a05a141f612e --- /dev/null +++ b/sys-process/cronbase/cronbase-0.3.4.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit user + +DESCRIPTION="base for all cron ebuilds" +HOMEPAGE="http://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +S=${WORKDIR} + +pkg_setup() { + enewgroup cron 16 + enewuser cron 16 -1 /var/spool/cron cron +} + +src_install() { + newsbin "${FILESDIR}"/run-crons-${PV} run-crons + + diropts -m0750 + keepdir /etc/cron.{hourly,daily,weekly,monthly} + + keepdir /var/spool/cron/lastrun + diropts -m0750 -o root -g cron + keepdir /var/spool/cron +} diff --git a/sys-process/cronbase/cronbase-0.3.5-r1.ebuild b/sys-process/cronbase/cronbase-0.3.5-r1.ebuild new file mode 100644 index 000000000000..a05a141f612e --- /dev/null +++ b/sys-process/cronbase/cronbase-0.3.5-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit user + +DESCRIPTION="base for all cron ebuilds" +HOMEPAGE="http://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +S=${WORKDIR} + +pkg_setup() { + enewgroup cron 16 + enewuser cron 16 -1 /var/spool/cron cron +} + +src_install() { + newsbin "${FILESDIR}"/run-crons-${PV} run-crons + + diropts -m0750 + keepdir /etc/cron.{hourly,daily,weekly,monthly} + + keepdir /var/spool/cron/lastrun + diropts -m0750 -o root -g cron + keepdir /var/spool/cron +} diff --git a/sys-process/cronbase/cronbase-0.3.6.ebuild b/sys-process/cronbase/cronbase-0.3.6.ebuild new file mode 100644 index 000000000000..a05a141f612e --- /dev/null +++ b/sys-process/cronbase/cronbase-0.3.6.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit user + +DESCRIPTION="base for all cron ebuilds" +HOMEPAGE="http://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +S=${WORKDIR} + +pkg_setup() { + enewgroup cron 16 + enewuser cron 16 -1 /var/spool/cron cron +} + +src_install() { + newsbin "${FILESDIR}"/run-crons-${PV} run-crons + + diropts -m0750 + keepdir /etc/cron.{hourly,daily,weekly,monthly} + + keepdir /var/spool/cron/lastrun + diropts -m0750 -o root -g cron + keepdir /var/spool/cron +} diff --git a/sys-process/cronbase/cronbase-0.3.7.ebuild b/sys-process/cronbase/cronbase-0.3.7.ebuild new file mode 100644 index 000000000000..a05a141f612e --- /dev/null +++ b/sys-process/cronbase/cronbase-0.3.7.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit user + +DESCRIPTION="base for all cron ebuilds" +HOMEPAGE="http://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +S=${WORKDIR} + +pkg_setup() { + enewgroup cron 16 + enewuser cron 16 -1 /var/spool/cron cron +} + +src_install() { + newsbin "${FILESDIR}"/run-crons-${PV} run-crons + + diropts -m0750 + keepdir /etc/cron.{hourly,daily,weekly,monthly} + + keepdir /var/spool/cron/lastrun + diropts -m0750 -o root -g cron + keepdir /var/spool/cron +} diff --git a/sys-process/cronbase/files/run-crons-0.3.3 b/sys-process/cronbase/files/run-crons-0.3.3 new file mode 100755 index 000000000000..1fbc3eee1332 --- /dev/null +++ b/sys-process/cronbase/files/run-crons-0.3.3 @@ -0,0 +1,110 @@ +#!/bin/bash +# +# $Id$ +# +# 12 Oct 2008; Thilo Bangert <bangert@gentoo.org> run-crons: +# ignore emacs backup files (bug #237200) +# include logging patch (bug #140869) +# +# 08 Mar 2005; Aaron Walker <ka0ttic@gentoo.org> run-crons: +# Ignore the error messages from find caused by race conditions, since +# we could care less about the error as long as the file has been removed. +# See bug 8506. +# +# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: +# Make the locking actually work. The old code was racy. +# Thanks to Mathias Gumz in bug 45155 for some cleanups. +# +# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: +# fixed a race condition, where cron jobs and run-crons wanted to +# delete touch files +# +# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: +# moved lastrun directory to /var/spool/cron/lastrun +# +# Author: Achim Gottinger <achim@gentoo.org> +# +# Mostly copied from SuSE +# +# this script looks into /etc/cron.[hourly|daily|weekly|monthly] +# for scripts to be executed. The info about last run is stored in +# /var/spool/cron/lastrun + +LOCKDIR=/var/spool/cron/lastrun +LOCKFILE=${LOCKDIR}/lock + +mkdir -p ${LOCKDIR} + +# Make sure we're not running multiple instances at once. +# Try twice to lock, otherwise give up. +for ((i = 0; i < 2; i = i + 1)); do + ln -sn $$ ${LOCKFILE} 2>/dev/null && break + + # lock failed, check for a running process. + # handle both old- and new-style locking. + cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || + cronpid=$(cat ${LOCKFILE} 2>/dev/null) || + continue # lockfile disappeared? try again + + # better than kill -0 because we can verify that it's really + # another run-crons process + if [[ $(</proc/${cronpid}/cmdline) == $(</proc/$$/cmdline) ]] 2>/dev/null; then + # whoa, another process is really running + exit 0 + else + rm -f ${LOCKFILE} + fi +done + +# Check to make sure locking was successful +if [[ ! -L ${LOCKFILE} ]]; then + echo "Can't create or read existing ${LOCKFILE}, giving up" + exit 1 +fi + +# Set a trap to remove the lockfile when we're finished +trap "rm -f ${LOCKFILE}" 0 1 2 3 15 + + +for BASE in hourly daily weekly monthly ; do + CRONDIR=/etc/cron.${BASE} + + test -d $CRONDIR || continue + + if [ -e ${LOCKDIR}/cron.$BASE ] ; then + case $BASE in + hourly) + #>= 1 hour, 5 min -=> +65 min + TIME="-cmin +65" ;; + daily) + #>= 1 day, 5 min -=> +1445 min + TIME="-cmin +1445" ;; + weekly) + #>= 1 week, 5 min -=> +10085 min + TIME="-cmin +10085" ;; + monthly) + #>= 31 days, 5 min -=> +44645 min + TIME="-cmin +44645" ;; + esac + + find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true + fi + + # if there is no touch file, make one then run the scripts + if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then + touch ${LOCKDIR}/cron.$BASE + + set +e + GLOBIGNORE="*~" + for SCRIPT in $CRONDIR/* ; do + if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then + [ -x /usr/bin/logger ] && /usr/bin/logger -i -p cron.info -t run-crons "(`whoami`) CMD ($SCRIPT)" + $SCRIPT + fi + done + fi +done + +# Clean out bogus cron.$BASE files with future times +touch ${LOCKDIR} +find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; &>/dev/null || true diff --git a/sys-process/cronbase/files/run-crons-0.3.4 b/sys-process/cronbase/files/run-crons-0.3.4 new file mode 100755 index 000000000000..928b95d784b4 --- /dev/null +++ b/sys-process/cronbase/files/run-crons-0.3.4 @@ -0,0 +1,114 @@ +#!/bin/bash +# +# $Id$ +# +# 12 Oct 2008; Thilo Bangert <bangert@gentoo.org> run-crons: +# ignore emacs backup files (bug #237200) +# include logging patch (bug #140869) +# +# 08 Mar 2005; Aaron Walker <ka0ttic@gentoo.org> run-crons: +# Ignore the error messages from find caused by race conditions, since +# we could care less about the error as long as the file has been removed. +# See bug 8506. +# +# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: +# Make the locking actually work. The old code was racy. +# Thanks to Mathias Gumz in bug 45155 for some cleanups. +# +# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: +# fixed a race condition, where cron jobs and run-crons wanted to +# delete touch files +# +# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: +# moved lastrun directory to /var/spool/cron/lastrun +# +# Author: Achim Gottinger <achim@gentoo.org> +# +# Mostly copied from SuSE +# +# this script looks into /etc/cron.[hourly|daily|weekly|monthly] +# for scripts to be executed. The info about last run is stored in +# /var/spool/cron/lastrun + +LOCKDIR=/var/spool/cron/lastrun +LOCKFILE=${LOCKDIR}/lock + +mkdir -p ${LOCKDIR} + +# Make sure we're not running multiple instances at once. +# Try twice to lock, otherwise give up. +for ((i = 0; i < 2; i = i + 1)); do + ln -sn $$ ${LOCKFILE} 2>/dev/null && break + + # lock failed, check for a running process. + # handle both old- and new-style locking. + cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || + cronpid=$(cat ${LOCKFILE} 2>/dev/null) || + continue # lockfile disappeared? try again + + # better than kill -0 because we can verify that it's really + # another run-crons process + if [[ $(</proc/${cronpid}/cmdline) == $(</proc/$$/cmdline) ]] 2>/dev/null; then + # whoa, another process is really running + exit 0 + else + rm -f ${LOCKFILE} + fi +done + +# Check to make sure locking was successful +if [[ ! -L ${LOCKFILE} ]]; then + echo "Can't create or read existing ${LOCKFILE}, giving up" + exit 1 +fi + +# Set a trap to remove the lockfile when we're finished +trap "rm -f ${LOCKFILE}" 0 1 2 3 15 + + +for BASE in hourly daily weekly monthly ; do + CRONDIR=/etc/cron.${BASE} + + test -d $CRONDIR || continue + + if [ -e ${LOCKDIR}/cron.$BASE ] ; then + case $BASE in + hourly) + #>= 1 hour, 5 min -=> +65 min + TIME="-cmin +65" ;; + daily) + #>= 1 day, 5 min -=> +1445 min + TIME="-cmin +1445" ;; + weekly) + #>= 1 week, 5 min -=> +10085 min + TIME="-cmin +10085" ;; + monthly) + #>= 31 days, 5 min -=> +44645 min + TIME="-cmin +44645" ;; + esac + + find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true + fi + + # if there is no touch file, make one then run the scripts + if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then + touch ${LOCKDIR}/cron.$BASE + + set +e + for SCRIPT in $CRONDIR/* ; do + if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then + # Filter out files people do not expect to be executed. + case ${SCRIPT} in + .*|*~) continue ;; + esac + + [ -x /usr/bin/logger ] && /usr/bin/logger -i -p cron.info -t run-crons "(`whoami`) CMD ($SCRIPT)" + $SCRIPT + fi + done + fi +done + +# Clean out bogus cron.$BASE files with future times +touch ${LOCKDIR} +find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; &>/dev/null || true diff --git a/sys-process/cronbase/files/run-crons-0.3.5 b/sys-process/cronbase/files/run-crons-0.3.5 new file mode 100755 index 000000000000..305341ac31fa --- /dev/null +++ b/sys-process/cronbase/files/run-crons-0.3.5 @@ -0,0 +1,130 @@ +#!/bin/bash +# +# $Id$ +# +# 12 Oct 2008; Thilo Bangert <bangert@gentoo.org> run-crons: +# ignore emacs backup files (bug #237200) +# include logging patch (bug #140869) +# +# 08 Mar 2005; Aaron Walker <ka0ttic@gentoo.org> run-crons: +# Ignore the error messages from find caused by race conditions, since +# we could care less about the error as long as the file has been removed. +# See bug 8506. +# +# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: +# Make the locking actually work. The old code was racy. +# Thanks to Mathias Gumz in bug 45155 for some cleanups. +# +# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: +# fixed a race condition, where cron jobs and run-crons wanted to +# delete touch files +# +# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: +# moved lastrun directory to /var/spool/cron/lastrun +# +# Author: Achim Gottinger <achim@gentoo.org> +# +# Mostly copied from SuSE +# +# this script looks into /etc/cron.[hourly|daily|weekly|monthly] +# for scripts to be executed. The info about last run is stored in +# /var/spool/cron/lastrun + +LOCKDIR=/var/spool/cron/lastrun +LOCKFILE=${LOCKDIR}/lock + +# Usage: log <level> <args to logger> +# Log a message via syslog. +log() { + local level=$1 + shift + logger -i -p "cron.${level}" -t run-crons "$@" +} + +mkdir -p ${LOCKDIR} + +# Make sure we're not running multiple instances at once. +# Try twice to lock, otherwise give up. +for ((i = 0; i < 2; i = i + 1)); do + ln -sn $$ ${LOCKFILE} 2>/dev/null && break + + # lock failed, check for a running process. + # handle both old- and new-style locking. + cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || + cronpid=$(cat ${LOCKFILE} 2>/dev/null) || + continue # lockfile disappeared? try again + + # better than kill -0 because we can verify that it's really + # another run-crons process + if [[ $(</proc/${cronpid}/cmdline) == $(</proc/$$/cmdline) ]] 2>/dev/null; then + # whoa, another process is really running + exit 0 + else + rm -f ${LOCKFILE} + fi +done + +# Check to make sure locking was successful +if [[ ! -L ${LOCKFILE} ]]; then + echo "Can't create or read existing ${LOCKFILE}, giving up" + exit 1 +fi + +# Set a trap to remove the lockfile when we're finished +trap "rm -f ${LOCKFILE}" 0 1 2 3 15 + + +EXIT_STATUS=0 +for BASE in hourly daily weekly monthly ; do + CRONDIR=/etc/cron.${BASE} + + test -d $CRONDIR || continue + + if [ -e ${LOCKDIR}/cron.$BASE ] ; then + case $BASE in + hourly) + #>= 1 hour, 5 min -=> +65 min + TIME="-cmin +65" ;; + daily) + #>= 1 day, 5 min -=> +1445 min + TIME="-cmin +1445" ;; + weekly) + #>= 1 week, 5 min -=> +10085 min + TIME="-cmin +10085" ;; + monthly) + #>= 31 days, 5 min -=> +44645 min + TIME="-cmin +44645" ;; + esac + + find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; &>/dev/null || true + fi + + # if there is no touch file, make one then run the scripts + if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then + touch ${LOCKDIR}/cron.$BASE + + set +e + for SCRIPT in $CRONDIR/* ; do + if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then + # Filter out files people do not expect to be executed. + case ${SCRIPT} in + .*|*~) continue ;; + esac + + log info "($(whoami)) CMD (${SCRIPT})" + $SCRIPT + ret=$? + if [ ${ret} -ne 0 ] ; then + log err "CMD (${SCRIPT}) failed with exit status ${ret}" + EXIT_STATUS=1 + fi + fi + done + fi +done + +# Clean out bogus cron.$BASE files with future times +touch ${LOCKDIR} +find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; &>/dev/null || true + +exit ${EXIT_STATUS} diff --git a/sys-process/cronbase/files/run-crons-0.3.6 b/sys-process/cronbase/files/run-crons-0.3.6 new file mode 100755 index 000000000000..d5e609715d9b --- /dev/null +++ b/sys-process/cronbase/files/run-crons-0.3.6 @@ -0,0 +1,133 @@ +#!/bin/sh +# +# $Id$ +# +# 12 Oct 2008; Thilo Bangert <bangert@gentoo.org> run-crons: +# ignore emacs backup files (bug #237200) +# include logging patch (bug #140869) +# +# 08 Mar 2005; Aaron Walker <ka0ttic@gentoo.org> run-crons: +# Ignore the error messages from find caused by race conditions, since +# we could care less about the error as long as the file has been removed. +# See bug 8506. +# +# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: +# Make the locking actually work. The old code was racy. +# Thanks to Mathias Gumz in bug 45155 for some cleanups. +# +# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: +# fixed a race condition, where cron jobs and run-crons wanted to +# delete touch files +# +# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: +# moved lastrun directory to /var/spool/cron/lastrun +# +# Author: Achim Gottinger <achim@gentoo.org> +# +# Mostly copied from SuSE +# +# this script looks into /etc/cron.[hourly|daily|weekly|monthly] +# for scripts to be executed. The info about last run is stored in +# /var/spool/cron/lastrun + +LOCKDIR=/var/spool/cron/lastrun +LOCKFILE=${LOCKDIR}/lock + +# Usage: log <level> <args to logger> +# Log a message via syslog. +log() { + local level="$1" + shift + logger -i -p "cron.${level}" -t run-crons "$@" +} + +mkdir -p ${LOCKDIR} + +# Make sure we're not running multiple instances at once. +# Try twice to lock, otherwise give up. +i=0 +while [ $(( i += 1 )) -le 2 ] ; do + ln -sn $$ ${LOCKFILE} 2>/dev/null && break + + # lock failed, check for a running process. + # handle both old- and new-style locking. + cronpid=$(readlink ${LOCKFILE} 2>/dev/null) || + cronpid=$(cat ${LOCKFILE} 2>/dev/null) || + continue # lockfile disappeared? try again + + # better than kill -0 because we can verify that it's really + # another run-crons process + cmdline1=$(cat /proc/${cronpid}/cmdline 2>/dev/null) || : + cmdline2=$(cat /proc/$$/cmdline) + if [ "${cmdline1}" = "${cmdline2}" ] ; then + # whoa, another process is really running + exit 0 + else + rm -f ${LOCKFILE} + fi +done + +# Check to make sure locking was successful +if [ ! -L "${LOCKFILE}" ] ; then + echo "Can't create or read existing ${LOCKFILE}, giving up" + exit 1 +fi + +# Set a trap to remove the lockfile when we're finished +trap "rm -f ${LOCKFILE}" EXIT HUP INT QUIT TERM + + +EXIT_STATUS=0 +for BASE in hourly daily weekly monthly ; do + CRONDIR=/etc/cron.${BASE} + + test -d $CRONDIR || continue + + if [ -e ${LOCKDIR}/cron.$BASE ] ; then + case $BASE in + hourly) + #>= 1 hour, 5 min -=> +65 min + TIME="-cmin +65" ;; + daily) + #>= 1 day, 5 min -=> +1445 min + TIME="-cmin +1445" ;; + weekly) + #>= 1 week, 5 min -=> +10085 min + TIME="-cmin +10085" ;; + monthly) + #>= 31 days, 5 min -=> +44645 min + TIME="-cmin +44645" ;; + esac + + find ${LOCKDIR} -name cron.$BASE $TIME -exec rm {} \; 2>/dev/null || : + fi + + # if there is no touch file, make one then run the scripts + if [ ! -e ${LOCKDIR}/cron.$BASE ] ; then + touch ${LOCKDIR}/cron.$BASE + + set +e + for SCRIPT in $CRONDIR/* ; do + if [ -x "${SCRIPT}" ] && [ ! -d "${SCRIPT}" ] ; then + # Filter out files people do not expect to be executed. + case ${SCRIPT} in + .*|*~) continue ;; + esac + + log info "($(whoami)) CMD (${SCRIPT})" + $SCRIPT + ret=$? + if [ ${ret} -ne 0 ] ; then + log err "CMD (${SCRIPT}) failed with exit status ${ret}" + EXIT_STATUS=1 + fi + fi + done + fi +done + +# Clean out bogus cron.$BASE files with future times +touch ${LOCKDIR} +find ${LOCKDIR} -newer ${LOCKDIR} -exec /bin/rm -f {} \; 2>/dev/null || : + +exit ${EXIT_STATUS} diff --git a/sys-process/cronbase/files/run-crons-0.3.7 b/sys-process/cronbase/files/run-crons-0.3.7 new file mode 100755 index 000000000000..c966d64fbc56 --- /dev/null +++ b/sys-process/cronbase/files/run-crons-0.3.7 @@ -0,0 +1,195 @@ +#!/bin/sh +# +# $Id$ +# +# 12 Oct 2008; Thilo Bangert <bangert@gentoo.org> run-crons: +# ignore emacs backup files (bug #237200) +# include logging patch (bug #140869) +# +# 08 Mar 2005; Aaron Walker <ka0ttic@gentoo.org> run-crons: +# Ignore the error messages from find caused by race conditions, since +# we could care less about the error as long as the file has been removed. +# See bug 8506. +# +# 06 May 2004; Aron Griffis <agriffis@gentoo.org> run-crons: +# Make the locking actually work. The old code was racy. +# Thanks to Mathias Gumz in bug 45155 for some cleanups. +# +# 23 Jun 2002; Jon Nelson <jnelson@gentoo.org> run-crons: +# fixed a race condition, where cron jobs and run-crons wanted to +# delete touch files +# +# 20 Apr 2002; Thilo Bangert <bangert@gentoo.org> run-crons: +# moved lastrun directory to /var/spool/cron/lastrun +# +# Author: Achim Gottinger <achim@gentoo.org> +# +# Mostly copied from SuSE +# +# this script looks into /etc/cron.[hourly|daily|weekly|monthly] +# for scripts to be executed. The info about last run is stored in +# /var/spool/cron/lastrun + +LOCKDIR="/var/run/lock" +CRONSPOOLDIR="/var/spool/cron" +LASTRUNDIR="${CRONSPOOLDIR}/lastrun" +# This is the legacy lockfile that we need to clean up. +GLOBAL_LOCKFILE="${LASTRUNDIR}/lock" + +# Usage: log <level> <args to logger> +# Log a message via syslog. +log() { + local level="$1" + shift + logger -i -p "cron.${level}" -t run-crons "$@" +} + +# Usage: grab_lock <class> +# Grab the lock for <class> to make sure we are the only instance. +grab_lock() { + local i cronpid cmdline1 cmdline2 + local lockfile + + # Free whatever previous lock (if any) we held. + free_lock + + # For the legacy global lock, don't try to create a full path. + case $1 in + /*) lockfile=$1 ;; + *) lockfile="${LOCKDIR}/cron.$1" ;; + esac + + # Try twice to lock, otherwise give up. + i=0 + while [ $(( i += 1 )) -le 2 ] ; do + # Normally we should be able to grab the lock and get out of here fast. + if ln -sn $$ "${lockfile}" 2>/dev/null ; then + break + fi + + # Locking failed, so check for a running process. + # Handle both old- and new-style locking. + # Delete the cat logic when GLOBAL_LOCKFILE is purged. + # Note: Does not handle PID namespaces ... + if ! cronpid=$(readlink "${lockfile}" 2>/dev/null) ; then + if ! cronpid=$(cat "${lockfile}" 2>/dev/null) ; then + # The lockfile disappeared? Try the whole thing again ... + continue + fi + fi + + # This is better than kill -0 because we can verify that it's really + # another run-crons process. + cmdline1=$(cat "/proc/${cronpid}/cmdline" 2>/dev/null) || : + cmdline2=$(cat /proc/$$/cmdline) + if [ "${cmdline1}" = "${cmdline2}" ] ; then + # Whoa, another run-crons is really running. + return 1 + fi + + # The lockfile is pointing to a dead process so break it. + # TODO: This is still racy if we're running more than one run-crons. + rm -f "${lockfile}" + done + + # Check to make sure locking was successful. + if [ ! -L "${lockfile}" ] ; then + echo "Can't create or read existing ${lockfile}, giving up" + exit 1 + fi + + # Set the lock file for free_lock to clean up. + _LOCKFILE="${lockfile}" + + return 0 +} +# Prevent random env vars from messing with us. +_LOCKFILE= +# Set a trap to release the lockfile when we're finished. +trap 'free_lock' EXIT HUP INT QUIT TERM + +# Usage: free_lock +# Release the lock that we last grabbed. This does not nest! +free_lock() { + if [ -n "${_LOCKFILE}" ] ; then + rm -f "${_LOCKFILE}" + # Only break the lock once. + _LOCKFILE= + fi +} + + +EXIT_STATUS=0 + +# Grab the legacy global lock to smoothly handle upgrades. +# We should drop this after like Dec 2016. +if [ -L "${GLOBAL_LOCKFILE}" -o -f "${GLOBAL_LOCKFILE}" ] ; then + if ! grab_lock "${GLOBAL_LOCKFILE}" ; then + # An old process is still running -- abort. + exit 0 + fi + # Now release the lock since we no longer care about it. + free_lock +fi + +for BASE in hourly daily weekly monthly ; do + CRONDIR=/etc/cron.${BASE} + + test -d $CRONDIR || continue + + # Grab the lock for this specific dir. + if ! grab_lock "${BASE}" ; then + # Someone else is processing this dir, so skip it. + continue + fi + + # Blow away stale states for this particular dir. + lastrunfile="${LASTRUNDIR}/cron.${BASE}" + if [ -e "${lastrunfile}" ] ; then + case $BASE in + hourly) + #>= 1 hour, 5 min -=> +65 min + TIME="-cmin +65" ;; + daily) + #>= 1 day, 5 min -=> +1445 min + TIME="-cmin +1445" ;; + weekly) + #>= 1 week, 5 min -=> +10085 min + TIME="-cmin +10085" ;; + monthly) + #>= 31 days, 5 min -=> +44645 min + TIME="-cmin +44645" ;; + esac + + find "${LASTRUNDIR}/" -name cron.$BASE $TIME -exec rm {} \; 2>/dev/null || : + fi + + # if there is no state file, make one, then run the scripts. + if [ ! -e "${lastrunfile}" ] ; then + touch "${lastrunfile}" + + set +e + for SCRIPT in $CRONDIR/* ; do + if [ -x "${SCRIPT}" ] && [ ! -d "${SCRIPT}" ] ; then + # Filter out files people do not expect to be executed. + case ${SCRIPT} in + .*|*~) continue ;; + esac + + log info "($(whoami)) CMD (${SCRIPT})" + $SCRIPT + ret=$? + if [ ${ret} -ne 0 ] ; then + log err "CMD (${SCRIPT}) failed with exit status ${ret}" + EXIT_STATUS=1 + fi + fi + done + fi +done + +# Clean out bogus state files with future times. +touch "${LASTRUNDIR}" +find "${LASTRUNDIR}/" -newer "${LASTRUNDIR}" -exec /bin/rm -f {} \; 2>/dev/null || : + +exit ${EXIT_STATUS} diff --git a/sys-process/cronbase/metadata.xml b/sys-process/cronbase/metadata.xml new file mode 100644 index 000000000000..3f399e92bcff --- /dev/null +++ b/sys-process/cronbase/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cron</herd> +</pkgmetadata> diff --git a/sys-process/cronie/Manifest b/sys-process/cronie/Manifest new file mode 100644 index 000000000000..9fd0eca3e840 --- /dev/null +++ b/sys-process/cronie/Manifest @@ -0,0 +1,2 @@ +DIST cronie-1.4.12.tar.gz 234214 SHA256 0f5c9bf32f352599451c4ca0d6bc076d19e73ecfa5a90b34ecfe47c918c8bafd SHA512 ff17c9a1ba39957727db390d28d21248f05414f55119094d99a646695698e1b148b920f3fc91e9733b862bc8ce226824d290fff51abe17410a0e63ab3b424865 WHIRLPOOL 61a6a7c3a660bbbb38ff2b7b700fe6fa84b1144d20d658e26f4cde522f6fc3faa6141f4cb176f78cfb22cfb50e17f2a945aeb382761ba2aa1b25e6e16ad20082 +DIST cronie-1.5.0.tar.gz 242072 SHA256 9cf0e3f4f5042a9c09413d62c8e0c055e12401f70b112465f0f81f2c84ebfb3f SHA512 cad4d78cbb58ea32d1093890b316b6599d115b29f367eecc2e4a0a3560ab85ac85aa159886c883e46defb6212432d37f425396cfca686e4dd8526102ca4dd8fe WHIRLPOOL 69cb81b1d5673137132d921f8ed917e83965c5511004f58d386bb36e40787d30c640a3527d933346f3071b781c217b3001ee089045841ff054b965638e217744 diff --git a/sys-process/cronie/cronie-1.4.12.ebuild b/sys-process/cronie/cronie-1.4.12.ebuild new file mode 100644 index 000000000000..9149c0534ce3 --- /dev/null +++ b/sys-process/cronie/cronie-1.4.12.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cron eutils pam systemd user + +DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron" +SRC_URI="https://fedorahosted.org/releases/c/r/cronie/${P}.tar.gz" +HOMEPAGE="https://fedorahosted.org/cronie/wiki" + +LICENSE="ISC BSD BSD-2 GPL-2" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="anacron +inotify pam selinux" + +DEPEND="pam? ( virtual/pam ) + anacron? ( !sys-process/anacron )" +RDEPEND="${DEPEND}" + +#cronie supports /etc/crontab +CRON_SYSTEM_CRONTAB="yes" + +pkg_setup() { + enewgroup crontab +} + +src_configure() { + SPOOL_DIR="/var/spool/cron/crontabs" \ + ANACRON_SPOOL_DIR="/var/spool/anacron" \ + econf \ + $(use_with inotify) \ + $(use_with pam) \ + $(use_with selinux) \ + $(use_enable anacron) \ + --enable-syscrontab \ + --with-daemon_username=cron \ + --with-daemon_groupname=cron +} + +src_install() { + emake install DESTDIR="${D}" + + docrondir -m 1730 -o root -g crontab + fowners root:crontab /usr/bin/crontab + fperms 2751 /usr/bin/crontab + + insinto /etc/conf.d + newins "${S}"/crond.sysconfig ${PN} + + insinto /etc + newins "${FILESDIR}/${PN}-1.3-crontab" crontab + newins "${FILESDIR}/${PN}-1.2-cron.deny" cron.deny + + keepdir /etc/cron.d + newinitd "${FILESDIR}/${PN}-1.3-initd" ${PN} + newpamd "${FILESDIR}/${PN}-1.4.3-pamd" crond + + sed s:sysconfig/crond:conf.d/cronie: contrib/cronie.systemd \ + > "${T}"/cronie.service + systemd_dounit "${T}"/cronie.service + + if use anacron ; then + local anacrondir="/var/spool/anacron" + keepdir ${anacrondir} + fowners root:cron ${anacrondir} + fperms 0750 ${anacrondir} + + insinto /etc + + doins contrib/anacrontab + + insinto /etc/cron.hourly + doins contrib/0anacron + fperms 0750 /etc/cron.hourly/0anacron + fi + + dodoc AUTHORS README contrib/* +} + +pkg_postinst() { + cron_pkg_postinst +} diff --git a/sys-process/cronie/cronie-1.5.0-r1.ebuild b/sys-process/cronie/cronie-1.5.0-r1.ebuild new file mode 100644 index 000000000000..2bc6434d1e5d --- /dev/null +++ b/sys-process/cronie/cronie-1.5.0-r1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cron eutils pam systemd user + +DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron" +SRC_URI="https://fedorahosted.org/releases/c/r/cronie/${P}.tar.gz" +HOMEPAGE="https://fedorahosted.org/cronie/wiki" + +LICENSE="ISC BSD BSD-2 GPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="anacron +inotify pam selinux" + +DEPEND="pam? ( virtual/pam ) + anacron? ( !sys-process/anacron )" +RDEPEND="${DEPEND}" + +#cronie supports /etc/crontab +CRON_SYSTEM_CRONTAB="yes" + +pkg_setup() { + enewgroup crontab +} + +src_prepare() { + epatch "${FILESDIR}/cronie-systemd.patch" +} + +src_configure() { + SPOOL_DIR="/var/spool/cron/crontabs" \ + ANACRON_SPOOL_DIR="/var/spool/anacron" \ + econf \ + $(use_with inotify) \ + $(use_with pam) \ + $(use_with selinux) \ + $(use_enable anacron) \ + --enable-syscrontab \ + --with-daemon_username=cron \ + --with-daemon_groupname=cron +} + +src_install() { + emake install DESTDIR="${D}" + + docrondir -m 1730 -o root -g crontab + fowners root:crontab /usr/bin/crontab + fperms 2751 /usr/bin/crontab + + insinto /etc/conf.d + newins "${S}"/crond.sysconfig ${PN} + + insinto /etc + newins "${FILESDIR}/${PN}-1.3-crontab" crontab + newins "${FILESDIR}/${PN}-1.2-cron.deny" cron.deny + + keepdir /etc/cron.d + newinitd "${FILESDIR}/${PN}-1.3-initd" ${PN} + newpamd "${FILESDIR}/${PN}-1.4.3-pamd" crond + + systemd_newunit contrib/cronie.systemd cronie.service + + if use anacron ; then + local anacrondir="/var/spool/anacron" + keepdir ${anacrondir} + fowners root:cron ${anacrondir} + fperms 0750 ${anacrondir} + + insinto /etc + + doins contrib/anacrontab + + insinto /etc/cron.hourly + doins contrib/0anacron + fperms 0750 /etc/cron.hourly/0anacron + fi + + dodoc AUTHORS README NEWS contrib/* +} + +pkg_postinst() { + cron_pkg_postinst +} diff --git a/sys-process/cronie/cronie-1.5.0.ebuild b/sys-process/cronie/cronie-1.5.0.ebuild new file mode 100644 index 000000000000..f4af12a5b385 --- /dev/null +++ b/sys-process/cronie/cronie-1.5.0.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cron eutils pam systemd user + +DESCRIPTION="Cronie is a standard UNIX daemon cron based on the original vixie-cron" +SRC_URI="https://fedorahosted.org/releases/c/r/cronie/${P}.tar.gz" +HOMEPAGE="https://fedorahosted.org/cronie/wiki" + +LICENSE="ISC BSD BSD-2 GPL-2" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="anacron +inotify pam selinux" + +DEPEND="pam? ( virtual/pam ) + anacron? ( !sys-process/anacron )" +RDEPEND="${DEPEND}" + +#cronie supports /etc/crontab +CRON_SYSTEM_CRONTAB="yes" + +pkg_setup() { + enewgroup crontab +} + +src_prepare() { + epatch "${FILESDIR}/cronie-systemd.patch" +} + +src_configure() { + SPOOL_DIR="/var/spool/cron/crontabs" \ + ANACRON_SPOOL_DIR="/var/spool/anacron" \ + econf \ + $(use_with inotify) \ + $(use_with pam) \ + $(use_with selinux) \ + $(use_enable anacron) \ + --enable-syscrontab \ + --with-daemon_username=cron \ + --with-daemon_groupname=cron +} + +src_install() { + emake install DESTDIR="${D}" + + docrondir -m 1730 -o root -g crontab + fowners root:crontab /usr/bin/crontab + fperms 2751 /usr/bin/crontab + + insinto /etc/conf.d + newins "${S}"/crond.sysconfig ${PN} + + insinto /etc + newins "${FILESDIR}/${PN}-1.3-crontab" crontab + newins "${FILESDIR}/${PN}-1.2-cron.deny" cron.deny + + keepdir /etc/cron.d + newinitd "${FILESDIR}/${PN}-1.3-initd" ${PN} + newpamd "${FILESDIR}/${PN}-1.4.3-pamd" crond + + systemd_newunit contrib/cronie.systemd cronie.service + + if use anacron ; then + local anacrondir="/var/spool/anacron" + keepdir ${anacrondir} + fowners root:cron ${anacrondir} + fperms 0750 ${anacrondir} + + insinto /etc + + doins contrib/anacrontab + + insinto /etc/cron.hourly + doins contrib/0anacron + fperms 0750 /etc/cron.hourly/0anacron + fi + + dodoc AUTHORS README NEWS contrib/* +} + +pkg_postinst() { + cron_pkg_postinst +} diff --git a/sys-process/cronie/files/cronie-1.2-cron.deny b/sys-process/cronie/files/cronie-1.2-cron.deny new file mode 100644 index 000000000000..42cdd5f8c9a3 --- /dev/null +++ b/sys-process/cronie/files/cronie-1.2-cron.deny @@ -0,0 +1,5 @@ +# $Id$ +# If for any reason you have users in the 'cron' group who should not +# be allowed to run crontab, add them to this file (one username per +# line) + diff --git a/sys-process/cronie/files/cronie-1.3-crontab b/sys-process/cronie/files/cronie-1.3-crontab new file mode 100644 index 000000000000..c1364fac4d8e --- /dev/null +++ b/sys-process/cronie/files/cronie-1.3-crontab @@ -0,0 +1,16 @@ +# for cronie +# $Id$ + +# Global variables +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly +# if anacron is not present +59 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.hourly +9 3 * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.daily +19 4 * * 6 root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.weekly +29 5 1 * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f /var/spool/cron/lastrun/cron.monthly +*/10 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; } diff --git a/sys-process/cronie/files/cronie-1.3-initd b/sys-process/cronie/files/cronie-1.3-initd new file mode 100644 index 000000000000..2434d61e3e58 --- /dev/null +++ b/sys-process/cronie/files/cronie-1.3-initd @@ -0,0 +1,14 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +command="/usr/sbin/crond" +command_args="${CRONDARGS}" +pidfile="/var/run/crond.pid" + +depend() { + use clock logger + need localmount + provide cron +} diff --git a/sys-process/cronie/files/cronie-1.4.3-pamd b/sys-process/cronie/files/cronie-1.4.3-pamd new file mode 100644 index 000000000000..e82be8d87f7b --- /dev/null +++ b/sys-process/cronie/files/cronie-1.4.3-pamd @@ -0,0 +1,9 @@ +# +# The PAM configuration file for the cron daemon +# +# +auth include system-auth +account required pam_access.so +account include system-auth +session required pam_loginuid.so +session include system-auth diff --git a/sys-process/cronie/files/cronie-systemd.patch b/sys-process/cronie/files/cronie-systemd.patch new file mode 100644 index 000000000000..81c191737842 --- /dev/null +++ b/sys-process/cronie/files/cronie-systemd.patch @@ -0,0 +1,30 @@ +From 11d255eb05ae9814c16cd443a7710d99492e16c1 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert <floppym@gentoo.org> +Date: Mon, 13 Jul 2015 10:59:57 -0400 +Subject: [PATCH] Adjust systemd service unit for Gentoo + +--- + contrib/cronie.systemd | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/contrib/cronie.systemd b/contrib/cronie.systemd +index ad46899..7a6c1a9 100644 +--- a/contrib/cronie.systemd ++++ b/contrib/cronie.systemd +@@ -3,10 +3,11 @@ Description=Command Scheduler + After=auditd.service nss-user-lookup.target systemd-user-sessions.service time-sync.target ypbind.service + + [Service] +-EnvironmentFile=/etc/sysconfig/crond +-ExecStart=/usr/sbin/crond -n $CRONDARGS ++ExecStart=/usr/sbin/crond + ExecReload=/bin/kill -HUP $MAINPID + KillMode=process ++Type=forking ++PIDFile=/var/run/crond.pid + + [Install] + WantedBy=multi-user.target +-- +2.4.5 + diff --git a/sys-process/cronie/metadata.xml b/sys-process/cronie/metadata.xml new file mode 100644 index 000000000000..79ee2465bc19 --- /dev/null +++ b/sys-process/cronie/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cron</herd> +<maintainer> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> +</maintainer> + <longdescription lang="en"> + Cronie contains the standard UNIX daemon crond that runs specified programs at + scheduled times and related tools. It is based on the original cron and + has security and configuration enhancements like the ability to use pam and + SELinux. + And why cronie? See http://www.urbandictionary.com/define.php?term=cronie + </longdescription> + <use> + <flag name='anacron'>Install the periodic anacron command scheduler.</flag> + <flag name='inotify'>Enable inotify filesystem monitoring support.</flag> + </use> +</pkgmetadata> diff --git a/sys-process/cronutils/Manifest b/sys-process/cronutils/Manifest new file mode 100644 index 000000000000..793987022115 --- /dev/null +++ b/sys-process/cronutils/Manifest @@ -0,0 +1 @@ +DIST cronutils-1.5.tar.gz 8262 SHA256 3a358a73d945222a9d650190f5c038e771b2102cf5b7bda3863965eca873003c SHA512 24992f5f325b703e5c9b231744e320dacb442bb81725f49aefcf6376134e345254445cbf0f0a3c8353aa7ef77027b8f15709972b1332fe70e6e31e5aba5b688d WHIRLPOOL f277dc23738beab40d77adfc011533e80331eea22f86348d6a216cfebb52bd53662dc9389a65ec9f71f55bb2474f97dd030ffb8e5c8a14d6c8e1b075fb64f5aa diff --git a/sys-process/cronutils/cronutils-1.5.ebuild b/sys-process/cronutils/cronutils-1.5.ebuild new file mode 100644 index 000000000000..fd2375ef6127 --- /dev/null +++ b/sys-process/cronutils/cronutils-1.5.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit toolchain-funcs + +DESCRIPTION="Utilities to assist running batch processing jobs" +HOMEPAGE="http://code.google.com/p/cronutils/" +SRC_URI="http://cronutils.googlecode.com/files/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="-D_XOPEN_SOURCE=500 ${CFLAGS}" +} + +src_install() { + emake DESTDIR="${D}" prefix=/usr install +} diff --git a/sys-process/cronutils/metadata.xml b/sys-process/cronutils/metadata.xml new file mode 100644 index 000000000000..23f23b2beb69 --- /dev/null +++ b/sys-process/cronutils/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> + <longdescription lang="en"> + Utilities to assist running batch processing jobs. + + * runalarm: Limit the run time of a process. + * runlock: Prevent concurrent runs of a process. + * runstat: Export statistics about a process's execution. + </longdescription> + <upstream> + <remote-id type="google-code">cronutils</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/daemontools-encore/Manifest b/sys-process/daemontools-encore/Manifest new file mode 100644 index 000000000000..464c8a836d7e --- /dev/null +++ b/sys-process/daemontools-encore/Manifest @@ -0,0 +1 @@ +DIST daemontools-encore-1.10.tar.gz 87096 SHA256 9f48f3c6cdd3f2b0202532e87f9ff46ea86777ca31ebda3a96bed618104bbd31 SHA512 569030fb9941186f167644740d0424987105b7a818d5a3cdb4e90ced5530a16938b7205141ca2f198f83362269f9cc28eb5acafe9cd7f985c8e56d307f706767 WHIRLPOOL d4ad3bebb8467dbfb5b9d8a40020c50822ca14cfb9ebc1ff44b3563a93e3083061f7b16a137a6c7df6898df6349ee380b6453c299ee098286924ba92b6b279ac diff --git a/sys-process/daemontools-encore/daemontools-encore-1.10.ebuild b/sys-process/daemontools-encore/daemontools-encore-1.10.ebuild new file mode 100644 index 000000000000..caee2a530797 --- /dev/null +++ b/sys-process/daemontools-encore/daemontools-encore-1.10.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit flag-o-matic qmail + +DESCRIPTION="Collection of tools for managing UNIX services" +HOMEPAGE="http://untroubled.org/daemontools-encore/" +SRC_URI="http://untroubled.org/daemontools-encore/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="selinux static" + +DEPEND="" +RDEPEND="selinux? ( sec-policy/selinux-daemontools ) + !sys-process/daemontools + !app-doc/daemontools-man" + +src_compile() { + use static && append-ldflags -static + qmail_set_cc + emake +} + +src_install() { + keepdir /service + + echo ${D}/usr/bin >conf-bin + echo ${D}/usr/share/man >conf-man + dodir /usr/bin + dodir /usr/share/man + emake install + + dodoc ChangeLog CHANGES CHANGES.djb README TODO + + newinitd "${FILESDIR}"/svscan.init-2 svscan +} + +pkg_postinst() { + einfo + einfo "You can run daemontools using the svscan init.d script," + einfo "or you could run it through inittab." + einfo "To use inittab, emerge supervise-scripts and run:" + einfo "svscan-add-to-inittab" + einfo "Then you can hup init with the command telinit q" + einfo +} diff --git a/sys-process/daemontools-encore/files/svscan.init-2 b/sys-process/daemontools-encore/files/svscan.init-2 new file mode 100644 index 000000000000..6121f8ee56d1 --- /dev/null +++ b/sys-process/daemontools-encore/files/svscan.init-2 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +pidfile="/var/run/svscan.pid" +command="/usr/bin/svscan" +command_args="/service" +command_background="true" + +depend() { + use net + before ntpd ntp-client spamd apache apache2 +} + +stop() { + ebegin "Stopping service scan" + start-stop-daemon --stop --exec ${command} \ + --pidfile ${pidfile} + eend $? + + ebegin "Stopping service scan services" + svc -dx /service/* 2>/dev/null + eend $? + + ebegin "Stopping service scan logging" + svc -dx /service/*/log 2>/dev/null + eend $? +} diff --git a/sys-process/daemontools-encore/metadata.xml b/sys-process/daemontools-encore/metadata.xml new file mode 100644 index 000000000000..c9faa952c09f --- /dev/null +++ b/sys-process/daemontools-encore/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> +<longdescription lang="en"> +daemontools-encore is a collection of tools for managing UNIX services. +It is derived from the public-domain release of daemontools by +D. J. Bernstein. + +daemontools-encore adds numerous enhancements above what daemontools +could do while maintaining backwards compatibility with daemontools. +See the CHANGES file for more details on what features have been added. +</longdescription> +</pkgmetadata> diff --git a/sys-process/daemontools/Manifest b/sys-process/daemontools/Manifest new file mode 100644 index 000000000000..a6a335ba6519 --- /dev/null +++ b/sys-process/daemontools/Manifest @@ -0,0 +1,2 @@ +DIST daemontools-0.76-man-20020131.tar.gz 8005 RMD160 d82f0bad55f0751fdfadfa0f3bf2883740fa65d9 SHA1 28e167def0e457f2be10aa90504c402fa08723ab SHA256 1b4d77afe0878a0df587672531a3f7bbe0feb7ad0e9acf50395426e3c434600a +DIST daemontools-0.76.tar.gz 36975 RMD160 9819dae18b3f15a366e49fea81ecef76d5b4f53f SHA1 70a1be67e7dbe0192a887905846acc99ad5ce5b7 SHA256 a55535012b2be7a52dcd9eccabb9a198b13be50d0384143bd3b32b8710df4c1f diff --git a/sys-process/daemontools/daemontools-0.76-r7.ebuild b/sys-process/daemontools/daemontools-0.76-r7.ebuild new file mode 100644 index 000000000000..0f405e43e844 --- /dev/null +++ b/sys-process/daemontools/daemontools-0.76-r7.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils flag-o-matic qmail + +DESCRIPTION="Collection of tools for managing UNIX services" +HOMEPAGE="http://cr.yp.to/daemontools.html" +SRC_URI="http://cr.yp.to/daemontools/${P}.tar.gz + http://smarden.org/pape/djb/manpages/${P}-man-20020131.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="selinux static" + +DEPEND="" +RDEPEND="selinux? ( sec-policy/selinux-daemontools ) + !app-doc/daemontools-man" + +S="${WORKDIR}"/admin/${P}/src + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${PV}-errno.patch + epatch "${FILESDIR}"/${PV}-warnings.patch + ht_fix_file Makefile print-{cc,ld}.sh + + use static && append-ldflags -static + qmail_set_cc +} + +src_compile() { + touch home + emake || die +} + +src_install() { + keepdir /service + + dobin $(<../package/commands) || die + dodoc CHANGES ../package/README TODO + doman "${WORKDIR}"/${PN}-man/*.8 + + newinitd "${FILESDIR}"/svscan.init-0.76-r7 svscan +} + +pkg_postinst() { + einfo + einfo "You can run daemontools using the svscan init.d script," + einfo "or you could run it through inittab." + einfo "To use inittab, emerge supervise-scripts and run:" + einfo "svscan-add-to-inittab" + einfo "Then you can hup init with the command telinit q" + einfo +} diff --git a/sys-process/daemontools/files/0.76-errno.patch b/sys-process/daemontools/files/0.76-errno.patch new file mode 100644 index 000000000000..3af157c462c9 --- /dev/null +++ b/sys-process/daemontools/files/0.76-errno.patch @@ -0,0 +1,11 @@ +--- src/error.h 2001-07-12 11:49:49.000000000 -0500 ++++ src/error.h 2003-02-26 02:14:06.000000000 -0600 +@@ -3,7 +3,7 @@ + #ifndef ERROR_H + #define ERROR_H + +-extern int errno; ++#include <errno.h> + + extern int error_intr; + extern int error_nomem; diff --git a/sys-process/daemontools/files/0.76-warnings.patch b/sys-process/daemontools/files/0.76-warnings.patch new file mode 100644 index 000000000000..f558bb18b1bf --- /dev/null +++ b/sys-process/daemontools/files/0.76-warnings.patch @@ -0,0 +1,74 @@ +Fixup misc warnings + +Patch by RiverRat + +http://bugs.gentoo.org/124487 + +--- src/chkshsgr.c ++++ src/chkshsgr.c +@@ -1,10 +1,13 @@ + /* Public domain. */ + ++#include <sys/types.h> ++#include <stdlib.h> ++#include <grp.h> + #include <unistd.h> + + int main() + { +- short x[4]; ++ gid_t x[4]; + + x[0] = x[1] = 0; + if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1); +--- src/matchtest.c ++++ src/matchtest.c +@@ -1,3 +1,4 @@ ++#include <unistd.h> + #include "match.h" + #include "buffer.h" + #include "str.h" +--- src/multilog.c ++++ src/multilog.c +@@ -1,3 +1,4 @@ ++#include <stdio.h> + #include <unistd.h> + #include <sys/types.h> + #include <sys/stat.h> +--- src/prot.c ++++ src/prot.c +@@ -1,5 +1,8 @@ + /* Public domain. */ + ++#include <sys/types.h> ++#include <unistd.h> ++#include <grp.h> + #include "hasshsgr.h" + #include "prot.h" + +--- src/seek_set.c ++++ src/seek_set.c +@@ -1,6 +1,7 @@ + /* Public domain. */ + + #include <sys/types.h> ++#include <unistd.h> + #include "seek.h" + + #define SET 0 /* sigh */ +--- src/supervise.c ++++ src/supervise.c +@@ -1,3 +1,4 @@ ++#include <stdio.h> + #include <unistd.h> + #include <sys/types.h> + #include <sys/stat.h> +--- src/pathexec_run.c ++++ src/pathexec_run.c +@@ -1,5 +1,6 @@ + /* Public domain. */ + ++#include <unistd.h> + #include "error.h" + #include "stralloc.h" + #include "str.h" diff --git a/sys-process/daemontools/files/svscan.init b/sys-process/daemontools/files/svscan.init new file mode 100644 index 000000000000..18c642d5d731 --- /dev/null +++ b/sys-process/daemontools/files/svscan.init @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net + before ntpd ntp-client spamd apache apache2 +} + +start() { + ebegin "Starting service scan" + start-stop-daemon --start --exec /usr/bin/svscan \ + --background --make-pidfile \ + --pidfile /var/run/svscan.pid -- /service + eend $? +} + +stop() { + ebegin "Stopping service scan" + start-stop-daemon --stop --exec /usr/bin/svscan \ + --pidfile /var/run/svscan.pid + eend $? + + ebegin "Stopping service scan services" + svc -dx /service/* 2>/dev/null + eend $? + + ebegin "Stopping service scan logging" + svc -dx /service/*/log 2>/dev/null + eend $? +} diff --git a/sys-process/daemontools/files/svscan.init-0.76-r7 b/sys-process/daemontools/files/svscan.init-0.76-r7 new file mode 100644 index 000000000000..5b157b75eabf --- /dev/null +++ b/sys-process/daemontools/files/svscan.init-0.76-r7 @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net + before ntpd ntp-client spamd apache apache2 +} + +start() { + ebegin "Starting service scan" + setsid start-stop-daemon --start --exec /usr/bin/svscan \ + --background --make-pidfile \ + --pidfile /var/run/svscan.pid -- /service + eend $? +} + +stop() { + ebegin "Stopping service scan" + start-stop-daemon --stop --exec /usr/bin/svscan \ + --pidfile /var/run/svscan.pid + eend $? + + ebegin "Stopping service scan services" + svc -dx /service/* 2>/dev/null + eend $? + + ebegin "Stopping service scan logging" + svc -dx /service/*/log 2>/dev/null + eend $? +} diff --git a/sys-process/daemontools/metadata.xml b/sys-process/daemontools/metadata.xml new file mode 100644 index 000000000000..659da0ca93c2 --- /dev/null +++ b/sys-process/daemontools/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/dcron/Manifest b/sys-process/dcron/Manifest new file mode 100644 index 000000000000..a08a05fe8d07 --- /dev/null +++ b/sys-process/dcron/Manifest @@ -0,0 +1 @@ +DIST dcron-4.5.tar.gz 44978 SHA256 9e50edb6f5bd8153b16bad05087d985e5153ce45cc01ae77e7f842213fb4a824 SHA512 08521391d16ba5adf80278ec2a734319c26c48841fd94b119c0b27d744c2cfb3562b1a3630135a03d1c43b1668d49262713abb20ff5f7ecd397a2a19a2f6105a WHIRLPOOL 9513588005841e3ff37b0365c431a92d7cda9496600b15d33aeb36ae6f0ae6d7f7180621c6d0a6808140599b70d5022c9645a6ca77ac9ffa47e5d1a636a6f479 diff --git a/sys-process/dcron/dcron-4.5-r1.ebuild b/sys-process/dcron/dcron-4.5-r1.ebuild new file mode 100644 index 000000000000..ab94c00eb33b --- /dev/null +++ b/sys-process/dcron/dcron-4.5-r1.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit cron toolchain-funcs eutils systemd + +DESCRIPTION="A cute little cron from Matt Dillon" +HOMEPAGE="http://www.jimpryor.net/linux/dcron.html http://apollo.backplane.com/FreeSrc/" +SRC_URI="http://www.jimpryor.net/linux/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.5-pidfile.patch + epatch "${FILESDIR}"/${PN}-4.5-ldflags.patch + tc-export CC + cat <<-EOF > config + PREFIX = /usr + CRONTAB_GROUP = cron + EOF +} + +src_install() { + emake install DESTDIR="${D}" + dodoc CHANGELOG README "${FILESDIR}"/crontab + + docrondir + docron crond -m0700 -o root -g wheel + docrontab + + insinto /etc + doins "${FILESDIR}"/crontab + insinto /etc/cron.d + doins extra/prune-cronstamps + dodoc extra/run-cron extra/root.crontab + + newinitd "${FILESDIR}"/dcron.init-4.5 dcron + newconfd "${FILESDIR}"/dcron.confd-4.4 dcron + systemd_dounit "${FILESDIR}"/dcron.service + + insinto /etc/logrotate.d + newins extra/crond.logrotate dcron +} + +pkg_postinst() { + # upstream renamed their pid file + local src="${ROOT}/var/run/cron.pid" dst="${ROOT}/var/run/crond.pid" + if [ -e "${src}" -a ! -e "${dst}" ] ; then + cp "${src}" "${dst}" + fi +} diff --git a/sys-process/dcron/files/crontab b/sys-process/dcron/files/crontab new file mode 100644 index 000000000000..8c781871fbe7 --- /dev/null +++ b/sys-process/dcron/files/crontab @@ -0,0 +1,16 @@ +# for dcron +# $Id$ + +# dcron: +# This is NOT the system crontab! dcron does not support a system crontab. +# to get /etc/cron.{hourly|daily|weekly|montly} working with dcron run +# crontab /etc/crontab +# as root. +# NOTE: This will REPLACE root's current crontab!! + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly +59 * * * * rm -f /var/spool/cron/lastrun/cron.hourly +9 3 * * * rm -f /var/spool/cron/lastrun/cron.daily +19 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly +29 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly +*/10 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons diff --git a/sys-process/dcron/files/dcron b/sys-process/dcron/files/dcron new file mode 100755 index 000000000000..75922fb11079 --- /dev/null +++ b/sys-process/dcron/files/dcron @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use logger clock hostname + provide cron +} + +start() { + ebegin "Starting dcron" + start-stop-daemon --start --quiet --exec /usr/sbin/crond \ + -- >>/var/log/cron.log 2>&1 + /usr/bin/pgrep -x -u 0 -P 1 crond > /var/run/cron.pid + eend $? +} + +stop() { + ebegin "Stopping dcron" + start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid \ + --exec /usr/sbin/crond + eend $? +} diff --git a/sys-process/dcron/files/dcron-2.9-EDITOR.patch b/sys-process/dcron/files/dcron-2.9-EDITOR.patch new file mode 100644 index 000000000000..08c20bc0d13e --- /dev/null +++ b/sys-process/dcron/files/dcron-2.9-EDITOR.patch @@ -0,0 +1,20 @@ +fix 'crontab -e' to look at $EDITOR and not $VISUAL + +--- crontab.1 ++++ crontab.1 +@@ -27,5 +27,5 @@ + specify a different user and/or crontab directory. Generally the -e + option is used to edit your crontab. crontab will use /usr/bin/vi or +-the editor specified by your VISUAL environment variable to edit the ++the editor specified by your EDITOR environment variable to edit the + crontab. + .PP +--- crontab.c ++++ crontab.c +@@ -312,5 +312,5 @@ + if (ChangeUser(user, 1) < 0) + exit(0); +- if ((ptr = getenv("VISUAL")) == NULL || strlen(ptr) > 256) ++ if ((ptr = getenv("EDITOR")) == NULL || strlen(ptr) > 256) + ptr = PATH_VI; + diff --git a/sys-process/dcron/files/dcron-2.9-Makefile.patch b/sys-process/dcron/files/dcron-2.9-Makefile.patch new file mode 100644 index 000000000000..88b542042185 --- /dev/null +++ b/sys-process/dcron/files/dcron-2.9-Makefile.patch @@ -0,0 +1,27 @@ +--- Makefile ++++ Makefile +@@ -2,7 +2,8 @@ + # + + CC = gcc +-CFLAGS = -O2 -Wall -Wstrict-prototypes ++CFLAGS += -Wall -Wstrict-prototypes ++LDFLAGS += -Wl,-z,now + LIB = + SRCS = main.c subs.c database.c job.c + OBJS = main.o subs.o database.o job.o +@@ -14,12 +15,10 @@ + all: ${PROTOS} crond crontab + + crond: ${OBJS} +- ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} +- strip crond ++ ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS} + + crontab: ${D_OBJS} +- ${CC} ${CFLAGS} -o crontab ${D_OBJS} +- strip crontab ++ ${CC} ${CFLAGS} -o crontab ${D_OBJS} ${LDFLAGS} + + protos.h: ${SRCS} ${D_SRCS} + fgrep -h Prototype ${SRCS} ${D_SRCS} >protos.h diff --git a/sys-process/dcron/files/dcron-3.2-build.patch b/sys-process/dcron/files/dcron-3.2-build.patch new file mode 100644 index 000000000000..0dfdad202b0c --- /dev/null +++ b/sys-process/dcron/files/dcron-3.2-build.patch @@ -0,0 +1,16 @@ +fix parallel build + +http://bugs.gentoo.org/181043 + +--- dcron/Makefile ++++ dcron/Makefile +@@ -13,7 +13,8 @@ + PROTOS= protos.h + DISTTAR= /home/dillon/htdocs/FreeSrc/dcron32.tgz + +-all: ${PROTOS} crond crontab ++all: crond crontab ++${OBJS} ${D_OBJS}: ${PROTOS} + + crond: ${OBJS} + ${CC} ${CFLAGS} -o crond ${OBJS} ${LIB} ${LDFLAGS} diff --git a/sys-process/dcron/files/dcron-3.2-pidfile.patch b/sys-process/dcron/files/dcron-3.2-pidfile.patch new file mode 100644 index 000000000000..9ef687746909 --- /dev/null +++ b/sys-process/dcron/files/dcron-3.2-pidfile.patch @@ -0,0 +1,20 @@ +write out a pidfile + +--- dcron/main.c ++++ dcron/main.c +@@ -120,8 +120,14 @@ + perror("fork"); + exit(1); + } +- if (pid > 0) ++ if (pid > 0) { ++ FILE *fp; ++ if ((fp = fopen("/var/run/cron.pid", "w")) != NULL) { ++ fprintf(fp, "%d\n", pid); ++ fclose(fp); ++ } + exit(0); ++ } + } + + /* diff --git a/sys-process/dcron/files/dcron-4.4-ldflags.patch b/sys-process/dcron/files/dcron-4.4-ldflags.patch new file mode 100644 index 000000000000..4120d3090331 --- /dev/null +++ b/sys-process/dcron/files/dcron-4.4-ldflags.patch @@ -0,0 +1,30 @@ +From 9f4d538a4427240a807b82225080a3ff1fac9d16 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 26 Oct 2010 01:38:18 -0400 +Subject: [PATCH] respect LDFLAGS env var while building + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 3a89a3b..dc5b78f 100644 +--- a/Makefile ++++ b/Makefile +@@ -53,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS) + fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h + + crond: $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o crond ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond + + crontab: $(TABOBJS) +- $(CC) $(CFLAGS) $(TABOBJS) -o crontab ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab + + %.o: %.c defs.h $(PROTOS) + $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $< -o $@ +-- +1.7.3.1 + diff --git a/sys-process/dcron/files/dcron-4.4-pidfile.patch b/sys-process/dcron/files/dcron-4.4-pidfile.patch new file mode 100644 index 000000000000..a5994f09e934 --- /dev/null +++ b/sys-process/dcron/files/dcron-4.4-pidfile.patch @@ -0,0 +1,43 @@ +From 14b0f33ebf33d3d08427fd4d9fd4bda3cc107bd0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 26 Oct 2010 01:42:32 -0400 +Subject: [PATCH] crond: write a pid file + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 2 +- + main.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index dc5b78f..e278312 100644 +--- a/Makefile ++++ b/Makefile +@@ -38,7 +38,7 @@ DEFS = -DVERSION='"$(VERSION)"' \ + -DTIMESTAMP_FMT='"$(TIMESTAMP_FMT)"' + + # save variables needed for `make install` in config +-all: $(PROTOS) crond crontab ; ++all: crond crontab ; + rm -f config + echo "PREFIX = $(PREFIX)" >> config + echo "SBINDIR = $(SBINDIR)" >> config +diff --git a/main.c b/main.c +index e4a742e..6313213 100644 +--- a/main.c ++++ b/main.c +@@ -227,6 +227,11 @@ main(int ac, char **av) + exit(1); + } else if (pid > 0) { + /* parent */ ++ FILE *fp; ++ if ((fp = fopen("/var/run/cron.pid", "w")) != NULL) { ++ fprintf(fp, "%d\n", pid); ++ fclose(fp); ++ } + exit(0); + } + /* child continues */ +-- +1.7.3.1 + diff --git a/sys-process/dcron/files/dcron-4.4-prune.patch b/sys-process/dcron/files/dcron-4.4-prune.patch new file mode 100644 index 000000000000..3a8ff950e2cc --- /dev/null +++ b/sys-process/dcron/files/dcron-4.4-prune.patch @@ -0,0 +1,33 @@ +From 7d5633e67db8160b77df5e14bdcfb8cd579a9003 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 26 Oct 2010 02:11:12 -0400 +Subject: [PATCH] prune-cronstamps: reformat for cron.d usage + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + extra/prune-cronstamps | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + mode change 100755 => 100644 extra/prune-cronstamps + +diff --git a/extra/prune-cronstamps b/extra/prune-cronstamps +old mode 100755 +new mode 100644 +index c2973a5..9ce82a0 +--- a/extra/prune-cronstamps ++++ b/extra/prune-cronstamps +@@ -1,4 +1,4 @@ +-#!/bin/sh ++# /etc/cron.d/prune-cronstamps + + # Prunes any files in /var/spool/cron/cronstamps that haven't been used in ninety days. + # We check that both mtime and atime are greater than this: +@@ -10,5 +10,4 @@ + # and so its atime won't be updated. At least its mtime will be updated when + # it's modified. + +-find /var/spool/cron/cronstamps -mtime +90 -atime +90 -delete +- ++@weekly ID=prune-cronstamps find /var/spool/cron/cronstamps -mtime +90 -atime +90 -delete +-- +1.7.3.1 + diff --git a/sys-process/dcron/files/dcron-4.5-ldflags.patch b/sys-process/dcron/files/dcron-4.5-ldflags.patch new file mode 100644 index 000000000000..7fa2d8d9d015 --- /dev/null +++ b/sys-process/dcron/files/dcron-4.5-ldflags.patch @@ -0,0 +1,38 @@ +From 8a292168e584c50808b80df3577a7d89fa32db26 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 16 May 2011 16:24:20 -0400 +Subject: [PATCH] drop LDFLAGS set, and restore CFLAGS linking + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 5 ++--- + 1 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 1938e05..8309ad6 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,7 +32,6 @@ TABSRCS = crontab.c chuser.c + TABOBJS = crontab.o chuser.o + PROTOS = protos.h + LIBS = +-LDFLAGS = + DEFS = -DVERSION='"$(VERSION)"' \ + -DSCRONTABS='"$(SCRONTABS)"' -DCRONTABS='"$(CRONTABS)"' \ + -DCRONSTAMPS='"$(CRONSTAMPS)"' -DLOG_IDENT='"$(LOG_IDENT)"' \ +@@ -54,10 +53,10 @@ protos.h: $(SRCS) $(TABSRCS) + fgrep -h Prototype $(SRCS) $(TABSRCS) > protos.h + + crond: $(OBJS) +- $(CC) $(LDFLAGS) $^ $(LIBS) -o crond ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o crond + + crontab: $(TABOBJS) +- $(CC) $(LDFLAGS) $^ -o crontab ++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o crontab + + %.o: %.c defs.h $(PROTOS) + $(CC) $(CFLAGS) $(CPPFLAGS) -c $(DEFS) $< -o $@ +-- +1.7.5.rc3 + diff --git a/sys-process/dcron/files/dcron-4.5-pidfile.patch b/sys-process/dcron/files/dcron-4.5-pidfile.patch new file mode 100644 index 000000000000..6004c4c4b4d2 --- /dev/null +++ b/sys-process/dcron/files/dcron-4.5-pidfile.patch @@ -0,0 +1,43 @@ +From 14b0f33ebf33d3d08427fd4d9fd4bda3cc107bd0 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Tue, 26 Oct 2010 01:42:32 -0400 +Subject: [PATCH] crond: write a pid file + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 2 +- + main.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/Makefile b/Makefile +index dc5b78f..e278312 100644 +--- a/Makefile ++++ b/Makefile +@@ -38,7 +38,7 @@ DEFS = -DVERSION='"$(VERSION)"' \ + -DTIMESTAMP_FMT='"$(TIMESTAMP_FMT)"' + + # save variables needed for `make install` in config +-all: $(PROTOS) crond crontab ; ++all: crond crontab ; + rm -f config + echo "PREFIX = $(PREFIX)" >> config + echo "SBINDIR = $(SBINDIR)" >> config +diff --git a/main.c b/main.c +index e4a742e..6313213 100644 +--- a/main.c ++++ b/main.c +@@ -227,6 +227,11 @@ main(int ac, char **av) + exit(1); + } else if (pid > 0) { + /* parent */ ++ FILE *fp; ++ if ((fp = fopen("/var/run/crond.pid", "w")) != NULL) { ++ fprintf(fp, "%d\n", pid); ++ fclose(fp); ++ } + exit(0); + } + /* child continues */ +-- +1.7.3.1 + diff --git a/sys-process/dcron/files/dcron.confd b/sys-process/dcron/files/dcron.confd new file mode 100644 index 000000000000..48b41577679d --- /dev/null +++ b/sys-process/dcron/files/dcron.confd @@ -0,0 +1,8 @@ +# /etc/conf.d/dcron + +# Options to pass to dcron at startup +DCRON_OPTS="" + +# Logfile to send log output to +# Default is /var/log/cron.log, set to /dev/null to disable logging +DCRON_LOG="/var/log/cron.log" diff --git a/sys-process/dcron/files/dcron.confd-4.4 b/sys-process/dcron/files/dcron.confd-4.4 new file mode 100644 index 000000000000..61cdf12b43a7 --- /dev/null +++ b/sys-process/dcron/files/dcron.confd-4.4 @@ -0,0 +1,5 @@ +# /etc/conf.d/dcron + +# Options to pass to dcron at startup. +# Default logging is via syslog; use -L to send to file. +DCRON_OPTS="" diff --git a/sys-process/dcron/files/dcron.init b/sys-process/dcron/files/dcron.init new file mode 100755 index 000000000000..fbee9cf98fe6 --- /dev/null +++ b/sys-process/dcron/files/dcron.init @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use logger clock hostname + provide cron +} + +start() { + ebegin "Starting dcron" + /usr/sbin/crond ${DCRON_OPTS} >> ${DCRON_LOG:=/var/log/cron.log} 2>&1 + eend $? +} + +stop() { + ebegin "Stopping dcron" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/cron.pid --exec /usr/sbin/crond + local ret=$? + rm -f /var/run/cron.pid + eend ${ret} +} diff --git a/sys-process/dcron/files/dcron.init-4.4 b/sys-process/dcron/files/dcron.init-4.4 new file mode 100755 index 000000000000..6caed880dc3e --- /dev/null +++ b/sys-process/dcron/files/dcron.init-4.4 @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use logger clock hostname + provide cron +} + +start() { + ebegin "Starting ${SVCNAME}" + /usr/sbin/crond ${DCRON_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/cron.pid --exec /usr/sbin/crond + local ret=$? + rm -f /var/run/cron.pid + eend ${ret} +} diff --git a/sys-process/dcron/files/dcron.init-4.5 b/sys-process/dcron/files/dcron.init-4.5 new file mode 100755 index 000000000000..0224283523a8 --- /dev/null +++ b/sys-process/dcron/files/dcron.init-4.5 @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use logger clock hostname + provide cron +} + +start() { + ebegin "Starting ${SVCNAME}" + /usr/sbin/crond ${DCRON_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/crond.pid --exec /usr/sbin/crond + local ret=$? + rm -f /var/run/crond.pid + eend ${ret} +} diff --git a/sys-process/dcron/files/dcron.logrotate b/sys-process/dcron/files/dcron.logrotate new file mode 100644 index 000000000000..0577ad1186ae --- /dev/null +++ b/sys-process/dcron/files/dcron.logrotate @@ -0,0 +1,3 @@ +/var/log/cron.log { + copytruncate +} diff --git a/sys-process/dcron/files/dcron.service b/sys-process/dcron/files/dcron.service new file mode 100644 index 000000000000..0332390f2c81 --- /dev/null +++ b/sys-process/dcron/files/dcron.service @@ -0,0 +1,11 @@ +[Unit] +Description=Cron Daemon +After=syslog.target + +[Service] +ExecStart=/usr/sbin/crond -S -l info +Type=forking + +[Install] +WantedBy=multi-user.target + diff --git a/sys-process/dcron/metadata.xml b/sys-process/dcron/metadata.xml new file mode 100644 index 000000000000..541835b7739d --- /dev/null +++ b/sys-process/dcron/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cron</herd> +<maintainer> + <email>vapier@gentoo.org</email> +</maintainer> +</pkgmetadata> diff --git a/sys-process/fcron/Manifest b/sys-process/fcron/Manifest new file mode 100644 index 000000000000..ece19da98518 --- /dev/null +++ b/sys-process/fcron/Manifest @@ -0,0 +1,2 @@ +DIST fcron-3.1.1.src.tar.gz 597094 SHA256 449e21f09f80bd419d87165ba15dad94ad8ab215b7946fcf805b5340f019e952 SHA512 ce20f0aee72521f809af2be13ba797e0f6ac65f12f7797e67a4db56c3b111d24c499c135ec1c948d8385ded415da25a258daf90051a75f603f7322c23dbca945 WHIRLPOOL e3f4d056dd9926629c7ea36de2d5d768f510f256c6cdf0b051baaf5fda776d6295dd8a3213c32765d871cd6bdfc8bbb0bc7b5b0ab1da42c78441e19458594abe +DIST fcron-3.1.2.src.tar.gz 592409 SHA256 1c9299baab86e2b141031193c98ccd2e1b52d97a023b45a9e80266372ab11a5d SHA512 14aec35031449bb8abb81bee781215a09a6cd1d8e08a002ca391ea84c05b9c1cd07ef383e4fc3ee4ae928b60ad75f3f91114a41336110283a07fab64dc770503 WHIRLPOOL 0ec40e9921c187d87247a2bd5b0f807dda6a780e313608ba5c0933d1c470313b9db7f6d5b0ff15b7a853e966bb738c4bbac1c80a54541f402c2c51044f53cca9 diff --git a/sys-process/fcron/fcron-3.1.1.ebuild b/sys-process/fcron/fcron-3.1.1.ebuild new file mode 100644 index 000000000000..9b379174107c --- /dev/null +++ b/sys-process/fcron/fcron-3.1.1.ebuild @@ -0,0 +1,207 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WANT_AUTOMAKE=none + +inherit cron pam eutils flag-o-matic user autotools + +MY_P=${P/_/-} +DESCRIPTION="A command scheduler with extended capabilities over cron and anacron" +HOMEPAGE="http://fcron.free.fr/" +SRC_URI="http://fcron.free.fr/archives/${MY_P}.src.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 arm hppa ia64 ~mips ppc sparc x86 ~x86-fbsd" +IUSE="debug pam selinux linguas_fr +system-crontab readline" + +DEPEND="selinux? ( sys-libs/libselinux ) + pam? ( virtual/pam ) + readline? ( sys-libs/readline )" + +# see bug 282214 for the reason to depend on bash +RDEPEND="${DEPEND} + app-shells/bash + >=app-misc/editor-wrapper-3 + pam? ( >=sys-auth/pambase-20100310 )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup fcron + enewuser fcron -1 -1 -1 fcron + rootuser=$(egetent passwd 0 | cut -d ':' -f 1) + [[ ${rootuser} ]] || rootuser=root + rootgroup=$(egetent group 0 | cut -d ':' -f 1) + [[ ${rootgroup} ]] || rootgroup=root +} + +src_prepare() { + # respect LDFLAGS + sed -i "s:\(@LIBS@\):\$(LDFLAGS) \1:" Makefile.in || die "sed failed" + + sed -i -e 's:/etc/fcrontab:/etc/fcron/fcrontab:' script/check_system_crontabs.sh || die + + epatch "${FILESDIR}"/${P}-noreadline.patch + eautoconf +} + +src_configure() { + local myconf + + # Don't try to pass --with-debug as it'll play with cflags as + # well, and run foreground which is a _very_ nasty idea for + # Gentoo. + use debug && append-flags -DDEBUG + + # bindir is used just for calling fcronsighup + econf \ + --with-cflags="${CFLAGS}" \ + --bindir=/usr/libexec \ + $(use_with pam) \ + $(use_with selinux) \ + $(use_with readline) \ + --without-audit \ + --sysconfdir=/etc/fcron \ + --with-username=fcron \ + --with-groupname=fcron \ + --with-piddir=/var/run \ + --with-spooldir=/var/spool/fcron \ + --with-fifodir=/var/run \ + --with-fcrondyn=yes \ + --disable-checks \ + --with-editor=/usr/libexec/editor \ + --with-sendmail=/usr/sbin/sendmail \ + --with-shell=/bin/sh \ + --without-db2man --without-dsssl-dir \ + --with-rootname=${rootuser} \ + --with-rootgroup=${rootgroup} +} + +src_compile() { + default + + # bug #216460 + sed -i \ + -e 's:/usr/local/etc/fcron:/etc/fcron/fcron:g' \ + -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local/:/usr/:g' \ + doc/*/*/*.{txt,1,5,8,html} \ + || die "unable to fix documentation references" +} + +src_install() { + keepdir /var/spool/fcron + + exeinto /usr/libexec + doexe fcron fcronsighup + + dobin fcrondyn fcrontab + + insinto /etc/fcron + doins files/fcron.{allow,deny,conf} + + if use system-crontab; then + dosym fcrontab /usr/bin/crontab + + exeinto /usr/libexec + newexe script/check_system_crontabs.sh check_system_crontabs + + insinto /etc/fcron + newins "${FILESDIR}"/fcrontab.2 fcrontab + + fowners ${rootuser}:fcron /etc/fcron/fcrontab + fperms 0640 /etc/fcron/fcrontab + + insinto /etc + doins "${FILESDIR}"/crontab + fi + + fowners fcron:fcron \ + /var/spool/fcron \ + /usr/bin/fcron{dyn,tab} + + # fcronsighup needs to be suid root, because it sends a HUP to the + # running fcron daemon, but only has to be called by the fcron group + # anyway + fowners ${rootuser}:fcron \ + /usr/libexec/fcronsighup \ + /etc/fcron/fcron.{allow,deny,conf} \ + /etc/fcron + + fperms 6770 /var/spool/fcron + fperms 6775 /usr/bin/fcron{dyn,tab} + + fperms 4710 /usr/libexec/fcronsighup + + fperms 0750 /etc/fcron + fperms 0640 /etc/fcron/fcron.{allow,deny,conf} + + pamd_mimic system-services fcron auth account session + cat > "${T}"/fcrontab.pam <<- EOF + # Don't ask for the user's password; fcrontab will only allow to + # change user if running as root. + auth sufficient pam_permit.so + + # Still use the system-auth stack for account and session as the + # sysadmin might have set up stuff properly, and also avoids + # sidestepping limits (since fcrontab will run \$EDITOR). + account include system-auth + session include system-auth + EOF + newpamd "${T}"/fcrontab.pam fcrontab + + newinitd "${FILESDIR}"/fcron.init.3 fcron + + dodoc MANIFEST VERSION "${FILESDIR}"/crontab \ + doc/en/txt/{readme,thanks,faq,todo,relnotes,changes}.txt + newdoc files/fcron.conf fcron.conf.sample + dohtml doc/en/HTML/*.html + doman doc/en/man/*.{1,5,8} + + for lang in fr; do + use linguas_${lang} || continue + + doman -i18n=${lang} doc/${lang}/man/*.{1,5,8} || die + docinto html/${lang} + dohtml doc/${lang}/HTML/*.html || die + done +} + +pkg_postinst() { + elog "If it's the first time you install fcron make sure to execute" + elog " emerge --config ${CATEGORY}/${PN}" + elog "to configure the proper settings." + if ! use system-crontab; then + echo "" + ewarn "Remember that fcron will *not* use /etc/cron.d in this configuration" + echo "" + fi +} + +pkg_config() { + if [[ $(fcrontab -l -u systab 2>/dev/null) ]]; then + eerror "We're not going to make any change to your systab as long as" + eerror "it contains data; please clear it before proceeding." + return 1 + fi + + if use system-crontab; then + elog "This is going to set up fcron to execute check_system_crontabs." + elog "In this configuration, you're no longer free to edit the systab" + elog "at your leisure, at it'll be rewritten the moment the crontabs" + elog "are modified." + /usr/libexec/check_system_crontabs -v -i -f + else + elog "This is going to set up fcron to set up a default systab that" + elog "executes /etc/cron.{hourly,daily,weekly,monthly}." + fcrontab -u systab - <<- EOF + 0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly + 1 3 * * * rm -f /var/spool/cron/lastrun/cron.daily + 15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly + 30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly + EOF + fi +} diff --git a/sys-process/fcron/fcron-3.1.2-r2.ebuild b/sys-process/fcron/fcron-3.1.2-r2.ebuild new file mode 100644 index 000000000000..1bcdc1aaa3b3 --- /dev/null +++ b/sys-process/fcron/fcron-3.1.2-r2.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WANT_AUTOMAKE=none + +inherit cron pam eutils flag-o-matic user autotools systemd + +MY_P=${P/_/-} +DESCRIPTION="A command scheduler with extended capabilities over cron and anacron" +HOMEPAGE="http://fcron.free.fr/" +SRC_URI="http://fcron.free.fr/archives/${MY_P}.src.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="amd64 arm hppa ia64 ~mips ppc ~ppc64 sparc x86 ~x86-fbsd" +IUSE="debug pam selinux linguas_fr +mta +system-crontab readline" + +DEPEND="selinux? ( sys-libs/libselinux ) + mta? ( virtual/mta ) + pam? ( virtual/pam ) + readline? ( sys-libs/readline )" + +# see bug 282214 for the reason to depend on bash +RDEPEND="${DEPEND} + app-shells/bash + >=app-misc/editor-wrapper-3 + pam? ( >=sys-auth/pambase-20100310 )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup fcron + enewuser fcron -1 -1 -1 fcron + rootuser=$(egetent passwd 0 | cut -d ':' -f 1) + [[ ${rootuser} ]] || rootuser=root + rootgroup=$(egetent group 0 | cut -d ':' -f 1) + [[ ${rootgroup} ]] || rootgroup=root +} + +src_prepare() { + # respect LDFLAGS + sed -i "s:\(@LIBS@\):\$(LDFLAGS) \1:" Makefile.in || die "sed failed" + + sed -i -e 's:/etc/fcrontab:/etc/fcron/fcrontab:' script/check_system_crontabs.sh || die + + epatch "${FILESDIR}"/${PN}-3.1.1-noreadline.patch + eautoconf +} + +src_configure() { + local myconf + + # Don't try to pass --with-debug as it'll play with cflags as + # well, and run foreground which is a _very_ nasty idea for + # Gentoo. + use debug && append-flags -DDEBUG + + # bindir is used just for calling fcronsighup + econf \ + --with-cflags="${CFLAGS}" \ + --bindir=/usr/libexec \ + --sbindir=/usr/libexec \ + $(use_with pam) \ + $(use_with mta sendmail) \ + $(use_with selinux) \ + $(use_with readline) \ + --without-audit \ + --sysconfdir=/etc/fcron \ + --with-username=fcron \ + --with-groupname=fcron \ + --with-piddir=/var/run \ + --with-spooldir=/var/spool/fcron \ + --with-fifodir=/var/run \ + --with-fcrondyn=yes \ + --disable-checks \ + --with-editor=/usr/libexec/editor \ + --with-shell=/bin/sh \ + --without-db2man --without-dsssl-dir \ + --with-rootname=${rootuser} \ + --with-rootgroup=${rootgroup} \ + $(systemd_with_unitdir) +} + +src_compile() { + default + + # bug #216460 + sed -i \ + -e 's:/usr/local/etc/fcron:/etc/fcron/fcron:g' \ + -e 's:/usr/local/etc:/etc:g' \ + -e 's:/usr/local/:/usr/:g' \ + doc/*/*/*.{txt,1,5,8,html} \ + || die "unable to fix documentation references" +} + +src_install() { + keepdir /var/spool/fcron + + exeinto /usr/libexec + doexe fcron fcronsighup + + dobin fcrondyn fcrontab + + insinto /etc/fcron + doins files/fcron.{allow,deny,conf} + + if use system-crontab; then + dosym fcrontab /usr/bin/crontab + + exeinto /usr/libexec + newexe script/check_system_crontabs.sh check_system_crontabs + + insinto /etc/fcron + newins "${FILESDIR}"/fcrontab.2 fcrontab + + fowners ${rootuser}:fcron /etc/fcron/fcrontab + fperms 0640 /etc/fcron/fcrontab + + insinto /etc + doins "${FILESDIR}"/crontab + fi + + fowners fcron:fcron \ + /var/spool/fcron \ + /usr/bin/fcron{dyn,tab} + + # fcronsighup needs to be suid root, because it sends a HUP to the + # running fcron daemon, but only has to be called by the fcron group + # anyway + fowners ${rootuser}:fcron \ + /usr/libexec/fcronsighup \ + /etc/fcron/fcron.{allow,deny,conf} \ + /etc/fcron + + fperms 6770 /var/spool/fcron + fperms 6775 /usr/bin/fcron{dyn,tab} + + fperms 4710 /usr/libexec/fcronsighup + + fperms 0750 /etc/fcron + fperms 0640 /etc/fcron/fcron.{allow,deny,conf} + + pamd_mimic system-services fcron auth account session + cat > "${T}"/fcrontab.pam <<- EOF + # Don't ask for the user's password; fcrontab will only allow to + # change user if running as root. + auth sufficient pam_permit.so + + # Still use the system-auth stack for account and session as the + # sysadmin might have set up stuff properly, and also avoids + # sidestepping limits (since fcrontab will run \$EDITOR). + account include system-auth + session include system-auth + EOF + newpamd "${T}"/fcrontab.pam fcrontab + + newinitd "${FILESDIR}"/fcron.init.3 fcron + systemd_newunit "${S}/script/fcron.init.systemd" fcron.service + + dodoc MANIFEST VERSION "${FILESDIR}"/crontab \ + doc/en/txt/{readme,thanks,faq,todo,relnotes,changes}.txt + newdoc files/fcron.conf fcron.conf.sample + dohtml doc/en/HTML/*.html + doman doc/en/man/*.{1,5,8} + + for lang in fr; do + use linguas_${lang} || continue + + doman -i18n=${lang} doc/${lang}/man/*.{1,5,8} || die + docinto html/${lang} + dohtml doc/${lang}/HTML/*.html || die + done +} + +pkg_postinst() { + elog "If it's the first time you install fcron make sure to execute" + elog " emerge --config ${CATEGORY}/${PN}" + elog "to configure the proper settings." + if ! use system-crontab; then + echo "" + ewarn "Remember that fcron will *not* use /etc/cron.d in this configuration" + echo "" + fi +} + +pkg_config() { + if [[ $(fcrontab -l -u systab 2>/dev/null) ]]; then + eerror "We're not going to make any change to your systab as long as" + eerror "it contains data; please clear it before proceeding." + return 1 + fi + + if use system-crontab; then + elog "This is going to set up fcron to execute check_system_crontabs." + elog "In this configuration, you're no longer free to edit the systab" + elog "at your leisure, at it'll be rewritten the moment the crontabs" + elog "are modified." + /usr/libexec/check_system_crontabs -v -i -f + else + elog "This is going to set up fcron to set up a default systab that" + elog "executes /etc/cron.{hourly,daily,weekly,monthly}." + fcrontab -u systab - <<- EOF + 0 * * * * rm -f /var/spool/cron/lastrun/cron.hourly + 1 3 * * * rm -f /var/spool/cron/lastrun/cron.daily + 15 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly + 30 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly + EOF + fi +} diff --git a/sys-process/fcron/files/crontab b/sys-process/fcron/files/crontab new file mode 100644 index 000000000000..0ea9562d2962 --- /dev/null +++ b/sys-process/fcron/files/crontab @@ -0,0 +1,22 @@ +# for fcron +# $Id$ + +# fcron: +# This is NOT the system crontab! fcron does not support a system crontab. +# to get /etc/cron.{hourly|daily|weekly|montly} working with fcron run +# crontab /etc/crontab +# as root. +# NOTE: This will REPLACE root's current crontab!! + +# Global variables +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly +59 * * * * rm -f /var/spool/cron/lastrun/cron.hourly +9 3 * * * rm -f /var/spool/cron/lastrun/cron.daily +19 4 * * 6 rm -f /var/spool/cron/lastrun/cron.weekly +29 5 1 * * rm -f /var/spool/cron/lastrun/cron.monthly +*/10 * * * * test -x /usr/sbin/run-crons && /usr/sbin/run-crons diff --git a/sys-process/fcron/files/fcron-3.1.1-noreadline.patch b/sys-process/fcron/files/fcron-3.1.1-noreadline.patch new file mode 100644 index 000000000000..161e75b0998e --- /dev/null +++ b/sys-process/fcron/files/fcron-3.1.1-noreadline.patch @@ -0,0 +1,14 @@ +Index: fcron-3.1.1/configure.in +=================================================================== +--- fcron-3.1.1.orig/configure.in ++++ fcron-3.1.1/configure.in +@@ -86,7 +86,8 @@ AC_FUNC_WAIT3 + AC_CHECK_LIB(xnet, shutdown) + AC_CHECK_LIB(selinux, getcon, [selinuxavail=1], [selinuxavail=0]) + AC_CHECK_LIB(audit, audit_open, [auditavail=1], [auditavail=0]) +-AX_LIB_READLINE ++AC_ARG_WITH([readline], AS_HELP_STRING([--without-readline], [Build without readline @<:@default=yes@:>@])) ++AS_IF([test "x$with_readline" != "xno"], [AX_LIB_READLINE], [ax_cv_lib_readline=no]) + AC_CHECK_FUNC(getloadavg, [getloadavg=1], [getloadavg=0]) + AC_CHECK_LIB(kstat, kstat_open, [kstat=1], [kstat=0]) + if test $getloadavg -eq 1; then diff --git a/sys-process/fcron/files/fcron.init.3 b/sys-process/fcron/files/fcron.init.3 new file mode 100644 index 000000000000..209dd49d501b --- /dev/null +++ b/sys-process/fcron/files/fcron.init.3 @@ -0,0 +1,58 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +FCRON_INSTANCE=${SVCNAME##*.} + +configfile() { + if [ -n "${FCRON_INSTANCE}" -a "${SVCNAME}" != "fcron" ]; then + echo /etc/fcron/fcron.${FCRON_INSTANCE}.conf + else + echo /etc/fcron/fcron.conf + fi +} + +getconfig() { + # if there is no configuration file return the default value + if ! [ -f $(configfile) ]; then + echo $2 + return 0 + fi + + sed -n -e 's:^$1[ \t]*=[ \t]*::p' $(configfile) +} + +depend() { + config $(configfile) + + use logger + need clock hostname + # provide the cron service if we are the main instance + [ "${SVCNAME}" = "fcron" ] && provide cron +} + +command="/usr/libexec/fcron" +command_args="-c $(configfile)" +pidfile=$(getconfig pidfile /var/run/fcron.pid) +fcrontabs=$(getconfig fcrontabs /var/spool/fcron) + +extra_started_commands="reload" + +start_pre() { + if [ ! -e $(configfile) ]; then + eerror "You will need to create $(configfile) first" + eerror "There is a sample in /etc/fcron" + return 1 + fi + + if [ ! -d ${fcrontabs} ]; then + ebegin "Creating missing spooldir ${fcrontabs}" + ${command} --newspooldir ${fcrontabs} + eend $? + fi +} + +reload() { + kill -HUP `cat ${pidfile}` +} diff --git a/sys-process/fcron/files/fcrontab.2 b/sys-process/fcron/files/fcrontab.2 new file mode 100644 index 000000000000..e12c1178752b --- /dev/null +++ b/sys-process/fcron/files/fcrontab.2 @@ -0,0 +1,5 @@ +# $Id$ +# Script for checking system crontabs and creating the fcron systab. +# Runs every 10 minutes, does not mail output, doesn't log job runs +# except for errors. +@mail(false),nolog(true) 10 /usr/libexec/check_system_crontabs -s 0 diff --git a/sys-process/fcron/metadata.xml b/sys-process/fcron/metadata.xml new file mode 100644 index 000000000000..9c6deb27657e --- /dev/null +++ b/sys-process/fcron/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cron</herd> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <use> + <flag name="debug"> + Enable debug code and output. Since version 3.0.5 this will no + longer force foreground execution, and fcron will be able to run + as a service properly. + </flag> + <flag name="mta"> + Enable mta support for sending emails from fcron + </flag> + <flag name="pam"> + Enable PAM support for fcron. This means that fcron will pass + through the "fcron" stack before executing the jobs, and + fcrontab will use the "fcrontab" stack to authenticate the user + before editing its crontab file. + </flag> + <flag name="system-crontab"> + Set up fcron to respect /etc/crontab and /etc/cron.d. If this + flag is disabled, /etc/cron.d and /etc/crontab will be ignored, + but /etc/cron.{hourly,daily,weekly,monthly} will still be + respected. + </flag> + </use> +</pkgmetadata> diff --git a/sys-process/ftop/Manifest b/sys-process/ftop/Manifest new file mode 100644 index 000000000000..c17102e4d5fd --- /dev/null +++ b/sys-process/ftop/Manifest @@ -0,0 +1 @@ +DIST ftop-1.0.tar.bz2 143122 SHA256 3a705f4f291384344cd32c3dd5f5f6a7cd7cea7624c83cb7e923966dbcd47f82 SHA512 f572a52481db7d52a1e384500f5ec57eec36fefab95c7237197d69650e6522dd5ddd4c4425a08ffe853ba730519b90de522186aad5d8bd94cece6e66db5e634a WHIRLPOOL 091fd2e25770f77423fbd137d7a4f5b2989d9ac7478b360d7e7d1a22649dcd68b922882d30159e6e136309f92b156f07fb4c9ac886e7c569d17b3084938c89a7 diff --git a/sys-process/ftop/files/ftop-1.0-overflow.patch b/sys-process/ftop/files/ftop-1.0-overflow.patch new file mode 100644 index 000000000000..f6503fcdbc19 --- /dev/null +++ b/sys-process/ftop/files/ftop-1.0-overflow.patch @@ -0,0 +1,14 @@ +Set tmp_buf and rate_buf to something ridiculously high to fix a buffer +overflow when COLUMNS is large. - JeR + +--- a/src/ftop.c 2009-02-16 07:00:00.000000000 +0100 ++++ b/src/ftop.c 2013-09-06 14:42:41.788852952 +0200 +@@ -736,7 +736,7 @@ + { + size_t i, j, bytes, bar_total; + char more_procs_ch, more_files_ch, expanded_ch; +- char tmp_buf[80], rate_buf[80]; ++ char tmp_buf[2048], rate_buf[2048]; + char *tmp_str; + snapshot *s, *s_prev; + file_info *tmp_file; diff --git a/sys-process/ftop/files/ftop-1.0-tinfo.patch b/sys-process/ftop/files/ftop-1.0-tinfo.patch new file mode 100644 index 000000000000..cdbc30efa48e --- /dev/null +++ b/sys-process/ftop/files/ftop-1.0-tinfo.patch @@ -0,0 +1,10 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,7 @@ + + # Checks for libraries. + AC_CHECK_LIB([curses], [initscr]) ++AC_SEARCH_LIBS(stdscr,tinfo) + + # Checks for header files. + AC_HEADER_STDC diff --git a/sys-process/ftop/ftop-1.0.ebuild b/sys-process/ftop/ftop-1.0.ebuild new file mode 100644 index 000000000000..979f38c546e0 --- /dev/null +++ b/sys-process/ftop/ftop-1.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +AUTOTOOLS_AUTORECONF=frob +inherit autotools-utils + +DESCRIPTION="Monitor open files and filesystems" +HOMEPAGE="https://code.google.com/p/ftop/" +SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86" + +DEPEND="sys-libs/ncurses" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-overflow.patch + "${FILESDIR}"/${P}-tinfo.patch +) diff --git a/sys-process/ftop/metadata.xml b/sys-process/ftop/metadata.xml new file mode 100644 index 000000000000..4a00a64b40ae --- /dev/null +++ b/sys-process/ftop/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-process/fuser-bsd/Manifest b/sys-process/fuser-bsd/Manifest new file mode 100644 index 000000000000..82af52aba447 --- /dev/null +++ b/sys-process/fuser-bsd/Manifest @@ -0,0 +1,2 @@ +DIST fuser-1142334561.tar.bz2 11008 RMD160 55385162a218460993d44a6e5fa001f46d660b25 SHA1 d274a093fea5d3d6c85a3a77bd6eda13010baf1a SHA256 2edf0d189a77a55c84d58545de2cd446401ed42d2f06dd043db3c61f2087e5a2 +DIST fuser-bsd-patches-1.tar.bz2 1694 RMD160 280bdbb35eabe547e5bee4099a5db67fea165420 SHA1 4864a03a0ca264f4cf1df043497a2569cda3de2d SHA256 8386839d7af010eab8f550f1121dca256c46ecb57d931ca18072221f125e992e diff --git a/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild b/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild new file mode 100644 index 000000000000..736cf718bb0b --- /dev/null +++ b/sys-process/fuser-bsd/fuser-bsd-1142334561.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit base bsdmk eutils + +MY_P="${PN/-bsd/}-${PV}" + +PATCHLEVEL=1 +DESCRIPTION="fuser(1) utility for *BSD" +HOMEPAGE="http://mbsd.msk.ru/stas/fuser.html" +SRC_URI="http://mbsd.msk.ru/dist/${MY_P}.tar.bz2 + mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~sparc-fbsd ~x86-fbsd" +IUSE="" + +DEPEND="sys-freebsd/freebsd-mk-defs" +# virtual/libc needed here for has_version to work. +RDEPEND="virtual/libc + !sys-process/psmisc" + +S="${WORKDIR}/${PN/-bsd/}" + +src_prepare() { + if has_version '>=sys-freebsd/freebsd-lib-8' ; then # any better way to check it? + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" + fi +} + +src_install() { + into / + dosbin fuser + + doman fuser.1 +} diff --git a/sys-process/fuser-bsd/metadata.xml b/sys-process/fuser-bsd/metadata.xml new file mode 100644 index 000000000000..ecedda4aa2cc --- /dev/null +++ b/sys-process/fuser-bsd/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>bsd</herd> +</pkgmetadata> diff --git a/sys-process/glances/Manifest b/sys-process/glances/Manifest new file mode 100644 index 000000000000..c0cae6b038a0 --- /dev/null +++ b/sys-process/glances/Manifest @@ -0,0 +1,3 @@ +DIST Glances-2.2.1.tar.gz 3458958 SHA256 81d2a9b7132d70b4a156a61a724201bd70ab2edea01bf32e1b279fc4f765f7d5 SHA512 c7fa7431f0c503adae89702b52e51f7dc2f2beaa42d43a849896673d26e94a40a60f2511adb4404b31c8d91ef07244b8b0292924a5df8433afe1d2e2b656b383 WHIRLPOOL a32fd1a12eccb34d4616c23262535fd6a47fa334a5505ea601e560206f3ec5f32f4726ada28a736ed47b6ca81ec6cbada491e6d58a47385bc6b8433a4932aa8d +DIST Glances-2.3.tar.gz 3918915 SHA256 b56bb17505b72862358b2d31b6b9a7c0f9045105454d1de0ffed416ad2883612 SHA512 e331ea09200c87311c0dd7fb60efda6a0015ebd8773624ed5cb519bbfa37152fb9d2d0d3aa3e7bef3ce617c4ea5dbf05a019bf857126637364119a7f9d70ebfa WHIRLPOOL 99c8ff2e254abf65ed5c86604fc2baaf8ad973cf9c21b536069cf27802930cb6b7a7b4ccf5b454804d061c5203fda68b2ba712350af9ce132f185051e448c8b9 +DIST Glances-2.4.2.tar.gz 5497895 SHA256 31f1e4c2e129904a373f3b20d6800472375e415e01161168469ccebb320c9517 SHA512 ada7e2a9766dec54b26fa1fccac3b1abe6b9abcc16a96c6bb30d537370648732a99cff41c6c812908531a4995e118cb3d1127196184f40dee7a01a6a8a85d9b9 WHIRLPOOL 91cd5dfbe891c16bbbe5c6ae17500498c230d36a0795ba134a0384770cae04cbdf08b5236fd56157e438eaff17a7bd9cac3bc42bee7980239faf5c9fc18fc683 diff --git a/sys-process/glances/files/2.4.2-setup-data.patch b/sys-process/glances/files/2.4.2-setup-data.patch new file mode 100644 index 000000000000..b2d9d0b12319 --- /dev/null +++ b/sys-process/glances/files/2.4.2-setup-data.patch @@ -0,0 +1,15 @@ +diff -ur Glances-2.4.2.orig/setup.py Glances-2.4.2/setup.py +--- setup.py 2015-05-29 04:10:10.000000000 +0800 ++++ setup.py 2015-07-10 14:47:54.333415133 +0800 +@@ -13,9 +13,7 @@ + + def get_data_files(): + data_files = [ +- ('share/doc/glances', ['AUTHORS', 'COPYING', 'NEWS', 'README.rst', +- 'conf/glances.conf', 'docs/glances-doc.html']), +- ('share/doc/glances/images', glob.glob('docs/images/*.png')), +- ('share/man/man1', ['man/glances.1']) ++ ('share/man/man1', ['man/glances.1']), ++ ('etc/glances', ['conf/glances.conf']) + ] + diff --git a/sys-process/glances/glances-2.2.1.ebuild b/sys-process/glances/glances-2.2.1.ebuild new file mode 100644 index 000000000000..6b04afcb3a97 --- /dev/null +++ b/sys-process/glances/glances-2.2.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYTHON_REQ_USE="ncurses" + +inherit distutils-r1 linux-info + +MYPN=Glances +MYP=${MYPN}-${PV} + +DESCRIPTION="CLI curses based monitoring tool" +HOMEPAGE="https://github.com/nicolargo/glances" +SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" +IUSE="chart doc hddtemp snmp web" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +# There is another optional extra batinfo, absent from portage +RDEPEND="${DEPEND} + >=dev-python/psutil-2.0.0[${PYTHON_USEDEP}] + hddtemp? ( app-admin/hddtemp ) + snmp? ( dev-python/pysnmp[${PYTHON_USEDEP}] ) + web? ( dev-python/bottle[${PYTHON_USEDEP}] ) + chart? ( dev-python/matplotlib[${PYTHON_USEDEP}] )" + +CONFIG_CHECK="~TASK_IO_ACCOUNTING ~TASK_DELAY_ACCT ~TASKSTATS" + +S="${WORKDIR}/${MYP}" + +pkg_setup() { + linux-info_pkg_setup +} + +python_prepare_all() { + sed -e "s:share/doc/glances:share/doc/${PF}:g" \ + -e "s/'COPYING',//" \ + -e "s:/etc:${EPREFIX}/etc:" \ + -i setup.py || die + + distutils-r1_python_prepare_all +} + +python_install_all() { + # Abnormal setup for pre-built html docs in setup.py + use doc && local HTML_DOCS=( docs/_build/html/. ) + rm -rf "${D}"usr/share/doc/${PF}/{glances-doc.html,images/} || die + + distutils-r1_python_install_all +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "${PN} can gain additional functionality with following packages:" + elog " dev-python/jinja - export statistics to HTML" + elog " app-admin/hddtemp - monitor hard drive temperatures" + elog " dev-python/pysnmp - enable Python SNMP library support" + elog " dev-python/bottle - for Web server mode" + elog " dev-python/matplotlib - for graphical / chart support" + fi +} diff --git a/sys-process/glances/glances-2.3.ebuild b/sys-process/glances/glances-2.3.ebuild new file mode 100644 index 000000000000..84358877959f --- /dev/null +++ b/sys-process/glances/glances-2.3.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYTHON_REQ_USE="ncurses" + +inherit distutils-r1 linux-info + +MYPN=Glances +MYP=${MYPN}-${PV} + +DESCRIPTION="CLI curses based monitoring tool" +HOMEPAGE="https://github.com/nicolargo/glances" +SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" +IUSE="chart doc hddtemp snmp web" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +# There is another optional extra batinfo, absent from portage +RDEPEND="${DEPEND} + >=dev-python/psutil-2.0.0[${PYTHON_USEDEP}] + hddtemp? ( app-admin/hddtemp ) + snmp? ( dev-python/pysnmp[${PYTHON_USEDEP}] ) + web? ( dev-python/bottle[${PYTHON_USEDEP}] ) + chart? ( dev-python/matplotlib[${PYTHON_USEDEP}] )" + +CONFIG_CHECK="~TASK_IO_ACCOUNTING ~TASK_DELAY_ACCT ~TASKSTATS" + +S="${WORKDIR}/${MYP}" + +pkg_setup() { + linux-info_pkg_setup +} + +python_prepare_all() { + sed -e "s:share/doc/glances:share/doc/${PF}:g" \ + -e "s/'COPYING',//" \ + -e "s:/etc:${EPREFIX}/etc:" \ + -i setup.py || die + + distutils-r1_python_prepare_all +} + +python_install_all() { + # Abnormal setup for pre-built html docs in setup.py + use doc && local HTML_DOCS=( docs/_build/html/. ) + rm -rf "${D}"usr/share/doc/${PF}/{glances-doc.html,images/} || die + + distutils-r1_python_install_all +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "${PN} can gain additional functionality with following packages:" + elog " dev-python/jinja - export statistics to HTML" + elog " app-admin/hddtemp - monitor hard drive temperatures" + elog " dev-python/pysnmp - enable Python SNMP library support" + elog " dev-python/bottle - for Web server mode" + elog " dev-python/matplotlib - for graphical / chart support" + fi +} diff --git a/sys-process/glances/glances-2.4.2.ebuild b/sys-process/glances/glances-2.4.2.ebuild new file mode 100644 index 000000000000..a6d9b4d359c0 --- /dev/null +++ b/sys-process/glances/glances-2.4.2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYTHON_REQ_USE="ncurses" + +inherit distutils-r1 linux-info + +MYPN=Glances +MYP=${MYPN}-${PV} + +DESCRIPTION="CLI curses based monitoring tool" +HOMEPAGE="https://github.com/nicolargo/glances" +SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux" +IUSE="chart doc hddtemp snmp web" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +# There is another optional extra batinfo, absent from portage +RDEPEND="${DEPEND} + >=dev-python/psutil-2.0.0[${PYTHON_USEDEP}] + hddtemp? ( app-admin/hddtemp ) + snmp? ( dev-python/pysnmp[${PYTHON_USEDEP}] ) + web? ( dev-python/bottle[${PYTHON_USEDEP}] ) + chart? ( dev-python/matplotlib[${PYTHON_USEDEP}] )" + +CONFIG_CHECK="~TASK_IO_ACCOUNTING ~TASK_DELAY_ACCT ~TASKSTATS" + +S="${WORKDIR}/${MYP}" + +# Remove duplicate entries of a prebuilt doc build and +# ensure install of the file glances.conf in /etc/${PN} +PATCHES=( "${FILESDIR}"/2.4.2-setup-data.patch ) + +pkg_setup() { + linux-info_pkg_setup +} + +python_install_all() { + # add an intended file from original data set from setup.py to DOCS + local DOCS="README.rst conf/glances.conf" + # setup for pre-built html docs in setup.py + use doc && local HTML_DOCS=( docs/_build/html/. ) + + distutils-r1_python_install_all +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "${PN} can gain additional functionality with following packages:" + elog " dev-python/jinja - export statistics to HTML" + elog " app-admin/hddtemp - monitor hard drive temperatures" + elog " dev-python/pysnmp - enable Python SNMP library support" + elog " dev-python/bottle - for Web server mode" + elog " dev-python/matplotlib - for graphical / chart support" + fi + elog "A copy of glances.conf has been added to DOCS" +} diff --git a/sys-process/glances/metadata.xml b/sys-process/glances/metadata.xml new file mode 100644 index 000000000000..9e1478de80bb --- /dev/null +++ b/sys-process/glances/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <longdescription> + Glances is a cross-platform curses-based monitoring tool written in Python. +</longdescription> + <use> + <flag name="web">Enables the web server mode</flag> + <flag name="hddtemp">Enables hard drive temperature monitoring</flag> + <flag name="snmp">Enables SNMP support</flag> + <flag name="chart">Enables support of graph charts via matplotlib</flag> + </use> + <upstream> + <remote-id type="pypi">Glances</remote-id> + <remote-id type="github">nicolargo/glances</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest new file mode 100644 index 000000000000..ce3f8d98bd55 --- /dev/null +++ b/sys-process/htop/Manifest @@ -0,0 +1,2 @@ +DIST htop-1.0.2.tar.gz 388499 SHA256 ee60657b044ece0df096c053060df7abf3cce3a568ab34d260049e6a37ccd8a1 SHA512 50ae0e8ace862520c01a707b3cf9a19591dc1081f6fc38c7fdccc81e36dd94b3cbe9db00cbb90f782c22d9b73f22526e24d04fad8368c6f2a7de0c58f9d92191 WHIRLPOOL 2766cfe1ea9c98d23c375e5a1c293c6d573d33cf7132e9aaa6ad0335a5f62976a8b8a8da6ede2f03bbadb31ac62e9d7ba5b35138a262dda73eb033afdf27b570 +DIST htop-1.0.3.tar.gz 399306 SHA256 055c57927f75847fdc222b5258b079a9542811a9dcf5421c615c7e17f55d1829 SHA512 4c5c784b093bcad06eb2e8d8bb215e14f6e838a3d47d8da8402344c270c1724f85d0bcde2899571ba5d0e5a02274a0c3390a76fed61785b2604b51351f08f232 WHIRLPOOL 14b8879210025aff9a1e098314a1b35d2bb6fcfaab42b95670e3726c61d471b1618486e6fc3dbbc97043e85f9a22196d97e676f3b2dd98250326be8527bdebbe diff --git a/sys-process/htop/files/htop-1.0.2-out-of-src.patch b/sys-process/htop/files/htop-1.0.2-out-of-src.patch new file mode 100644 index 000000000000..d67abe7f4116 --- /dev/null +++ b/sys-process/htop/files/htop-1.0.2-out-of-src.patch @@ -0,0 +1,30 @@ + Makefile.am | 2 +- + scripts/MakeHeader.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 05a72e7..dd28a87 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -43,7 +43,7 @@ debug: + $(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG" + + .c.h: +- scripts/MakeHeader.py $< ++ $(top_srcdir)/scripts/MakeHeader.py $< + + cppcheck: + cppcheck -q -v . --enable=all -DHAVE_CGROUP -DHAVE_OPENVZ -DHAVE_TASKSTATS +diff --git a/scripts/MakeHeader.py b/scripts/MakeHeader.py +index 55eeed4..46af921 100755 +--- a/scripts/MakeHeader.py ++++ b/scripts/MakeHeader.py +@@ -11,7 +11,7 @@ state = ANY + static = 0 + + file = open(sys.argv[1]) +-name = sys.argv[1][:-2] ++name = os.path.basename(sys.argv[1][:-2]) + + out = open(name + ".h", "w") + class writer: diff --git a/sys-process/htop/files/htop-1.0.2-process.patch b/sys-process/htop/files/htop-1.0.2-process.patch new file mode 100644 index 000000000000..b949e262d35b --- /dev/null +++ b/sys-process/htop/files/htop-1.0.2-process.patch @@ -0,0 +1,13 @@ +Index: Process.c +=================================================================== +--- Process.c (revision 302) ++++ Process.c (working copy) +@@ -371,7 +371,7 @@ + } + + static void Process_writeField(Process* this, RichString* str, ProcessField field) { +- char buffer[128]; buffer[127] = '\0'; ++ char buffer[256]; buffer[255] = '\0'; + int attr = CRT_colors[DEFAULT_COLOR]; + int baseattr = CRT_colors[PROCESS_BASENAME]; + int n = sizeof(buffer) - 1; diff --git a/sys-process/htop/files/htop-1.0.2-tinfo.patch b/sys-process/htop/files/htop-1.0.2-tinfo.patch new file mode 100644 index 000000000000..4e13459f39c2 --- /dev/null +++ b/sys-process/htop/files/htop-1.0.2-tinfo.patch @@ -0,0 +1,58 @@ + Makefile.am | 2 ++ + configure.ac | 20 ++++++++++++-------- + 2 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 05a72e7..7908937 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -36,6 +36,8 @@ SUFFIXES = .h + BUILT_SOURCES = $(myhtopheaders) + htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h + ++htop_LDADD = $(NCURSES_LIBS) ++ + profile: + $(MAKE) all CFLAGS="" AM_CPPFLAGS="-pg -O2" + +diff --git a/configure.ac b/configure.ac +index ff6901b..6226d90 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,6 +20,7 @@ + AC_DISABLE_SHARED + AC_ENABLE_STATIC + AC_PROG_LIBTOOL ++PKG_PROG_PKG_CONFIG + + # Checks for libraries. + AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"]) +@@ -89,16 +89,20 @@ fi + + AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes") + if test "x$enable_unicode" = xyes; then +- AC_CHECK_LIB([ncursesw], [refresh], [], [ +- missing_libraries="$missing_libraries libncursesw" +- AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.]) ++ PKG_CHECK_MODULES([NCURSES], [ncursesw],[ ++ AC_CHECK_LIB([ncursesw], [refresh], [], [ ++ missing_libraries="$missing_libraries libncursesw" ++ AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.]) ++ ]) ++ AC_CHECK_HEADERS([ncursesw/curses.h],[:], ++ [AC_CHECK_HEADERS([ncurses/ncurses.h],[:], ++ [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])]) + ]) +- AC_CHECK_HEADERS([ncursesw/curses.h],[:], +- [AC_CHECK_HEADERS([ncurses/ncurses.h],[:], +- [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])]) + else +- AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) +- AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) ++ PKG_CHECK_MODULES([NCURSES], [ncurses],[ ++ AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) ++ AC_CHECK_HEADERS([curses.h],[:],[missing_headers="$missing_headers $ac_header"]) ++ ]) + fi + + if test ! -z "$missing_libraries"; then diff --git a/sys-process/htop/files/htop-1.0.3-tinfo.patch b/sys-process/htop/files/htop-1.0.3-tinfo.patch new file mode 100644 index 000000000000..62a887baf376 --- /dev/null +++ b/sys-process/htop/files/htop-1.0.3-tinfo.patch @@ -0,0 +1,62 @@ +diff --git a/Makefile.am b/Makefile.am +index 820e2e5..85f49e9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -36,6 +36,8 @@ SUFFIXES = .h + BUILT_SOURCES = $(myhtopheaders) + htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h + ++htop_LDADD = $(NCURSES_LIBS) ++ + profile: + $(MAKE) all CFLAGS="-pg" AM_CPPFLAGS="-pg -O2 -DNDEBUG" + +diff --git a/configure.ac b/configure.ac +index 2b934e8..3593885 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,6 +20,7 @@ AM_PROG_CC_C_O + AC_DISABLE_SHARED + AC_ENABLE_STATIC + AC_PROG_LIBTOOL ++PKG_PROG_PKG_CONFIG + + # Checks for libraries. + AC_CHECK_LIB([m], [ceil], [], [missing_libraries="$missing_libraries libm"]) +@@ -89,20 +90,24 @@ fi + + AC_ARG_ENABLE(unicode, [AC_HELP_STRING([--enable-unicode], [enable Unicode support])], ,enable_unicode="yes") + if test "x$enable_unicode" = xyes; then +- AC_CHECK_LIB([ncursesw], [refresh], [], [ +- missing_libraries="$missing_libraries libncursesw" +- AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.]) ++ PKG_CHECK_MODULES([NCURSES], [ncursesw],[ ++ AC_CHECK_LIB([ncursesw], [refresh], [], [ ++ missing_libraries="$missing_libraries libncursesw" ++ AC_MSG_ERROR([You may want to use --disable-unicode or install libncursesw.]) ++ ]) ++ AC_CHECK_HEADERS([ncursesw/curses.h],[:], ++ [AC_CHECK_HEADERS([ncurses/ncurses.h],[:], ++ [AC_CHECK_HEADERS([ncurses/curses.h],[:], ++ [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])]) + ]) +- AC_CHECK_HEADERS([ncursesw/curses.h],[:], +- [AC_CHECK_HEADERS([ncurses/ncurses.h],[:], +- [AC_CHECK_HEADERS([ncurses/curses.h],[:], +- [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])]) + else +- AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) +- AC_CHECK_HEADERS([curses.h],[:], +- [AC_CHECK_HEADERS([ncurses/curses.h],[:], +- [AC_CHECK_HEADERS([ncurses/ncurses.h],[:], +- [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])]) ++ PKG_CHECK_MODULES([NCURSES], [ncurses],[ ++ AC_CHECK_LIB([ncurses], [refresh], [], [missing_libraries="$missing_libraries libncurses"]) ++ AC_CHECK_HEADERS([curses.h],[:], ++ [AC_CHECK_HEADERS([ncurses/curses.h],[:], ++ [AC_CHECK_HEADERS([ncurses/ncurses.h],[:], ++ [AC_CHECK_HEADERS([ncurses.h],[:],[missing_headers="$missing_headers $ac_header"])])])]) ++ ]) + fi + + if test ! -z "$missing_libraries"; then diff --git a/sys-process/htop/htop-1.0.2-r2.ebuild b/sys-process/htop/htop-1.0.2-r2.ebuild new file mode 100644 index 000000000000..3ad83786ea32 --- /dev/null +++ b/sys-process/htop/htop-1.0.2-r2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +AUTOTOOLS_AUTORECONF=true + +inherit autotools-utils linux-info python-any-r1 + +DESCRIPTION="interactive process viewer" +HOMEPAGE="http://htop.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver" + +RDEPEND="sys-libs/ncurses[unicode?]" +DEPEND="${RDEPEND}" + +DOCS=( ChangeLog README ) + +CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS" + +# config.h problems +AUTOTOOLS_IN_SOURCE_BUILD=1 + +pkg_setup() { + if use kernel_FreeBSD && ! [[ -f ${ROOT}/compat/linux/proc/stat && -f ${ROOT}/compat/linux/proc/meminfo ]]; then + echo + eerror "htop requires linprocfs mounted at /compat/linux/proc to build and function." + eerror "To mount it, type:" + [ -d /compat/linux/proc ] || eerror "mkdir -p /compat/linux/proc" + eerror "mount -t linprocfs none /compat/linux/proc" + eerror "Alternatively, place this information into /etc/fstab" + echo + die "htop needs /compat/linux/proc mounted" + fi + + if ! has_version sys-process/lsof; then + ewarn "To use lsof features in htop(what processes are accessing" + ewarn "what files), you must have sys-process/lsof installed." + fi + python-any-r1_pkg_setup + linux-info_pkg_setup +} + +PATCHES=( + "${FILESDIR}"/${P}-tinfo.patch + "${FILESDIR}"/${P}-process.patch + "${FILESDIR}"/${P}-out-of-src.patch +) + +src_prepare() { + rm missing || die + sed \ + -e '1c\#!'"${EPREFIX}"'/usr/bin/python' \ + -i scripts/MakeHeader.py || die + autotools-utils_src_prepare +} + +src_configure() { + [[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971 + + local myeconfargs=() + + use kernel_FreeBSD && myeconfargs+=( --with-proc=/compat/linux/proc ) + + myeconfargs+=( + $(use_enable openvz) + $(use_enable kernel_linux cgroup) + $(use_enable vserver) + $(use_enable unicode) + --enable-taskstats + ) + autotools-utils_src_configure +} diff --git a/sys-process/htop/htop-1.0.2.ebuild b/sys-process/htop/htop-1.0.2.ebuild new file mode 100644 index 000000000000..28e1a571d4a8 --- /dev/null +++ b/sys-process/htop/htop-1.0.2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="interactive process viewer" +HOMEPAGE="http://htop.sourceforge.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-linux ~x86-linux" +IUSE="kernel_FreeBSD kernel_linux openvz unicode vserver" + +RDEPEND="sys-libs/ncurses[unicode?]" +DEPEND="${RDEPEND}" + +DOCS=( ChangeLog README ) + +pkg_setup() { + if use kernel_FreeBSD && ! [[ -f ${ROOT}/compat/linux/proc/stat && -f ${ROOT}/compat/linux/proc/meminfo ]]; then + echo + eerror "htop requires linprocfs mounted at /compat/linux/proc to build and function." + eerror "To mount it, type:" + [ -d /compat/linux/proc ] || eerror "mkdir -p /compat/linux/proc" + eerror "mount -t linprocfs none /compat/linux/proc" + eerror "Alternatively, place this information into /etc/fstab" + echo + die "htop needs /compat/linux/proc mounted" + fi + + if ! has_version sys-process/lsof; then + ewarn "To use lsof features in htop(what processes are accessing" + ewarn "what files), you must have sys-process/lsof installed." + fi +} + +src_prepare() { + sed -i -e '1c\#!'"${EPREFIX}"'/usr/bin/python' \ + scripts/MakeHeader.py || die +} + +src_configure() { + [[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971 + + local myconf='' + + use kernel_FreeBSD && myconf="${myconf} --with-proc=/compat/linux/proc" + + econf \ + $(use_enable openvz) \ + $(use_enable kernel_linux cgroup) \ + $(use_enable vserver) \ + $(use_enable unicode) \ + --enable-taskstats \ + ${myconf} +} diff --git a/sys-process/htop/htop-1.0.3.ebuild b/sys-process/htop/htop-1.0.3.ebuild new file mode 100644 index 000000000000..a0b4ab8a3891 --- /dev/null +++ b/sys-process/htop/htop-1.0.3.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +AUTOTOOLS_AUTORECONF=true + +inherit autotools-utils linux-info python-any-r1 + +DESCRIPTION="interactive process viewer" +HOMEPAGE="http://hisham.hm/htop/" +SRC_URI="http://hisham.hm/htop/releases/${PV}/${P}.tar.gz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux" +IUSE="kernel_FreeBSD kernel_linux oom openvz unicode vserver" + +RDEPEND="sys-libs/ncurses[unicode?]" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + virtual/pkgconfig" + +DOCS=( ChangeLog README ) + +CONFIG_CHECK="~TASKSTATS ~TASK_XACCT ~TASK_IO_ACCOUNTING ~CGROUPS" + +# config.h problems +AUTOTOOLS_IN_SOURCE_BUILD=1 + +PATCHES=("${FILESDIR}/${P}-tinfo.patch") + +pkg_setup() { + if use kernel_FreeBSD && ! [[ -f ${ROOT}/compat/linux/proc/stat && -f ${ROOT}/compat/linux/proc/meminfo ]]; then + echo + eerror "htop requires linprocfs mounted at /compat/linux/proc to build and function." + eerror "To mount it, type:" + [ -d /compat/linux/proc ] || eerror "mkdir -p /compat/linux/proc" + eerror "mount -t linprocfs none /compat/linux/proc" + eerror "Alternatively, place this information into /etc/fstab" + echo + die "htop needs /compat/linux/proc mounted" + fi + + if ! has_version sys-process/lsof; then + ewarn "To use lsof features in htop(what processes are accessing" + ewarn "what files), you must have sys-process/lsof installed." + fi + + python-any-r1_pkg_setup + linux-info_pkg_setup +} + +src_prepare() { + rm missing || die + + sed \ + -e '1c\#!'"${EPREFIX}"'/usr/bin/python' \ + -i scripts/MakeHeader.py || die + + autotools-utils_src_prepare +} + +src_configure() { + [[ $CBUILD != $CHOST ]] && export ac_cv_file__proc_{meminfo,stat}=yes #328971 + + local myeconfargs=() + + use kernel_FreeBSD && myeconfargs+=( --with-proc=/compat/linux/proc ) + + myeconfargs+=( + $(use_enable openvz) + $(use_enable kernel_linux cgroup) + $(use_enable vserver) + $(use_enable unicode) + $(use_enable oom) + --enable-taskstats + ) + autotools-utils_src_configure +} diff --git a/sys-process/htop/metadata.xml b/sys-process/htop/metadata.xml new file mode 100644 index 000000000000..1cc6802ab8d2 --- /dev/null +++ b/sys-process/htop/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <use> + <flag name="oom">Add column to track the OOM-killer score of processes</flag> + <flag name="openvz">Enable openvz support</flag> + <flag name="vserver">Enable vserver support</flag> + </use> + <longdescription> +htop is an interactive process viewer for Linux. It aims to be a 'better top': +you can scroll the process list vertically and horizontally, and select a +process to be killed with the arrow keys instead of by typing its process id. + </longdescription> +</pkgmetadata> diff --git a/sys-process/incron/Manifest b/sys-process/incron/Manifest new file mode 100644 index 000000000000..25e8efb368e1 --- /dev/null +++ b/sys-process/incron/Manifest @@ -0,0 +1 @@ +DIST incron-0.5.10.tar.gz 203158 SHA256 5d4abadb5f16c26e4f728a6433ad22f7655663b5812fbd4f94e852050f38e78a SHA512 653817c35059b5305e059137eac78f21a7d32ccc03fc92ba282eab66ba5f3d2c83a1a571ebdcead8df3ed500a7fd30cfa46375c635450b08d2bd8d00dfe86df3 WHIRLPOOL 563730d7d2ac9122d6650431c259b50f6e0fd5cbbaa2e64383c756722efd9bf6a8595cfee8bceff006afffff8ce49702b6d44de1c4156498fb559f4ef00e3458 diff --git a/sys-process/incron/files/incron-0.5.10+gcc-4.7.patch b/sys-process/incron/files/incron-0.5.10+gcc-4.7.patch new file mode 100644 index 000000000000..a1b690510f34 --- /dev/null +++ b/sys-process/incron/files/incron-0.5.10+gcc-4.7.patch @@ -0,0 +1,12 @@ +Index: incron-0.5.10/icd-main.cpp +=================================================================== +--- incron-0.5.10.orig/icd-main.cpp ++++ incron-0.5.10/icd-main.cpp +@@ -24,6 +24,7 @@ + #include <dirent.h> + #include <syslog.h> + #include <errno.h> ++#include <unistd.h> + #include <sys/poll.h> + #include <sys/stat.h> + #include <cstdio> diff --git a/sys-process/incron/files/incrond.init b/sys-process/incron/files/incrond.init new file mode 100644 index 000000000000..1137b81bd5a6 --- /dev/null +++ b/sys-process/incron/files/incrond.init @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use clock logger + need localmount +} + +start() { + ebegin "Starting incrond" + start-stop-daemon --start --pidfile /var/run/incrond.pid --exec /usr/sbin/incrond -- -f /etc/incron.conf + eend $? +} + +stop() { + ebegin "Stopping incrond" + start-stop-daemon --stop --pidfile /var/run/incrond.pid + eend $? +} diff --git a/sys-process/incron/files/incrond.service b/sys-process/incron/files/incrond.service new file mode 100644 index 000000000000..a3d2a9b0b3bb --- /dev/null +++ b/sys-process/incron/files/incrond.service @@ -0,0 +1,9 @@ +[Unit] +Description=Inotify System Scheduler + +[Service] +ExecStart=/usr/sbin/incrond --foreground -f /etc/incron.conf + +[Install] +WantedBy=multi-user.target + diff --git a/sys-process/incron/incron-0.5.10-r1.ebuild b/sys-process/incron/incron-0.5.10-r1.ebuild new file mode 100644 index 000000000000..50a052a28db5 --- /dev/null +++ b/sys-process/incron/incron-0.5.10-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils linux-info systemd toolchain-funcs + +DESCRIPTION="inotify based cron daemon" +HOMEPAGE="http://incron.aiken.cz/" +SRC_URI="http://inotify.aiken.cz/download/incron/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +# < 2.6.18 => INOTIFY, >= 2.6.18 => INOTIFY_USER +# It should be ok to expect at least 2.6.18 +CONFIG_CHECK="~INOTIFY_USER" + +src_prepare() { + epatch "${FILESDIR}"/${P}+gcc-4.7.patch +} + +src_compile() { + emake CXX=$(tc-getCXX) +} + +src_install() { + emake DESTDIR="${D}" PREFIX=/usr DOCDIR=/usr/share/doc/${PF} install + + newinitd "${FILESDIR}/incrond.init" incrond + systemd_dounit "${FILESDIR}/incrond.service" + + dodoc CHANGELOG README TODO +} diff --git a/sys-process/incron/incron-0.5.10.ebuild b/sys-process/incron/incron-0.5.10.ebuild new file mode 100644 index 000000000000..dc31eb2113d8 --- /dev/null +++ b/sys-process/incron/incron-0.5.10.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils linux-info toolchain-funcs + +DESCRIPTION="inotify based cron daemon" +HOMEPAGE="http://incron.aiken.cz/" +SRC_URI="http://inotify.aiken.cz/download/incron/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +# < 2.6.18 => INOTIFY, >= 2.6.18 => INOTIFY_USER +# It should be ok to expect at least 2.6.18 +CONFIG_CHECK="~INOTIFY_USER" + +src_prepare() { + epatch "${FILESDIR}"/${P}+gcc-4.7.patch +} + +src_compile() { + emake CXX=$(tc-getCXX) +} + +src_install() { + emake DESTDIR="${D}" PREFIX=/usr DOCDIR=/usr/share/doc/${PF} install + + newinitd "${FILESDIR}/incrond.init" incrond + + dodoc CHANGELOG README TODO +} diff --git a/sys-process/incron/metadata.xml b/sys-process/incron/metadata.xml new file mode 100644 index 000000000000..b71a8a2e034d --- /dev/null +++ b/sys-process/incron/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> +</pkgmetadata> diff --git a/sys-process/iotop/Manifest b/sys-process/iotop/Manifest new file mode 100644 index 000000000000..bf8726c67d9c --- /dev/null +++ b/sys-process/iotop/Manifest @@ -0,0 +1 @@ +DIST iotop-0.6.tar.bz2 29779 SHA256 3adea2a24eda49bbbaeb4e6ed2042355b441dbd7161e883067a02bfc8dcef75b SHA512 b1047da3bc46604447cc8ab22442a3a5381e1a79a6b176fe9ee8402ee5cebb959205407a6aeaffccccde9d2f67624ff8ee6717b051838f13ab88bf3a16db3ab9 WHIRLPOOL 662aece6230a0165739aac3130f69fc8f595fad045cf204e524fa1955692e81382a77fbb6938af3452608d64a7ca374ca49cc99db4c8cdb2bb04a1006676c82b diff --git a/sys-process/iotop/files/iotop-0.6-setup.py3.patch b/sys-process/iotop/files/iotop-0.6-setup.py3.patch new file mode 100644 index 000000000000..5844d86cb1ba --- /dev/null +++ b/sys-process/iotop/files/iotop-0.6-setup.py3.patch @@ -0,0 +1,31 @@ +From 98a5985e52e7041eb96c80dd95fd5c70634f5ee7 Mon Sep 17 00:00:00 2001 +Message-Id: <98a5985e52e7041eb96c80dd95fd5c70634f5ee7.1371536396.git.jlec@gentoo.org> +From: Justin Lecher <jlec@gentoo.org> +Date: Tue, 18 Jun 2013 08:19:28 +0200 +Subject: [PATCH] Make setp.py compatible with python3 + +Dictionaries in python 3 do not contain the itervalues() method anymore. +The values() method should be used and can also safely applied for +python 2. + +Signed-off-by: Justin Lecher <jlec@gentoo.org> +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 7150102..9de6068 100755 +--- a/setup.py ++++ b/setup.py +@@ -7,7 +7,7 @@ from iotop.version import VERSION + # Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/ + # while still honoring the choice of installing into local/ or not. + if hasattr(distutils_install, 'INSTALL_SCHEMES'): +- for d in distutils_install.INSTALL_SCHEMES.itervalues(): ++ for d in distutils_install.INSTALL_SCHEMES.values(): + if d.get('scripts', '').endswith('/bin'): + d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin' + +-- +1.8.2.1 + diff --git a/sys-process/iotop/iotop-0.6.ebuild b/sys-process/iotop/iotop-0.6.ebuild new file mode 100644 index 000000000000..e25695ca6990 --- /dev/null +++ b/sys-process/iotop/iotop-0.6.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +PYTHON_REQ_USE="ncurses(+)" + +inherit distutils-r1 linux-info + +DESCRIPTION="Top-like UI used to show which process is using the I/O" +HOMEPAGE="http://guichaz.free.fr/iotop/" +SRC_URI="http://guichaz.free.fr/iotop/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm hppa ~ia64 ~mips ppc sparc x86 ~amd64-linux ~x86-linux" +IUSE="" + +CONFIG_CHECK="~TASK_IO_ACCOUNTING ~TASK_DELAY_ACCT ~TASKSTATS ~VM_EVENT_COUNTERS" +DOCS=( NEWS README THANKS ChangeLog ) + +PATCHES=( "${FILESDIR}"/${P}-setup.py3.patch ) + +pkg_setup() { + linux-info_pkg_setup +} diff --git a/sys-process/iotop/metadata.xml b/sys-process/iotop/metadata.xml new file mode 100644 index 000000000000..4a00a64b40ae --- /dev/null +++ b/sys-process/iotop/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/sys-process/latencytop/Manifest b/sys-process/latencytop/Manifest new file mode 100644 index 000000000000..bc58ea9b3663 --- /dev/null +++ b/sys-process/latencytop/Manifest @@ -0,0 +1 @@ +DIST latencytop-0.5.tar.gz 25374 SHA256 9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef SHA512 81db52b29a5fd2a5e14863f1cbf948b15ea68ff41a826cdf323215c2c8b0334144aaccf00cb49a9f7c195efcb5ff49fbf2b687a8bd4b604d338af6628d319b2c WHIRLPOOL 4b189706105fafcaad8b0583516b1ffdb69d490f39e9ff272c2871aad4306a7e1d6dcd071bd020469679f4676035e736f7c8e41c808dceeaf260e3d0fa3bc088 diff --git a/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch b/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch new file mode 100644 index 000000000000..52d791e7a601 --- /dev/null +++ b/sys-process/latencytop/files/latencytop-0.5-01-mkdir-usr-sbin-as-well.patch @@ -0,0 +1,22 @@ +From d9685bb69c581489ef1c4278df8990fe02b0728d Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven <arjan@linux.intel.com> +Date: Tue, 28 Apr 2009 14:44:34 +0100 +Subject: [PATCH] mkdir /usr/sbin as well + +--- + +diff --git a/src/Makefile b/src/Makefile +index fdf1616..de24551 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -30,6 +30,7 @@ + + install: latencytop + mkdir -p $(DESTDIR)/usr/share/latencytop ++ mkdir -p $(DESTDIR)/$(SBINDIR) + install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans + install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/ + install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/ +-- +1.6.5.4 + diff --git a/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch b/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch new file mode 100644 index 000000000000..c33c127dab6b --- /dev/null +++ b/sys-process/latencytop/files/latencytop-0.5-03-clean-up-build-system.patch @@ -0,0 +1,75 @@ +From e024a79b7b16b09bfe88222ed7f43b969b3eb444 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Fri, 18 Dec 2009 10:49:19 -0500 +Subject: [PATCH] clean up build system + +Respect env build settings (compiler flags and tools) and install the man +page for people. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + src/Makefile | 32 ++++++++++++++++++-------------- + 1 files changed, 18 insertions(+), 14 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index de24551..9a3cc05 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -3,14 +3,22 @@ HAS_GTK_GUI = 1 + + DESTDIR = + SBINDIR = /usr/sbin +-XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare +-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw ++DATADIR = /usr/share/latencytop ++MANDIR = /usr/share/man ++MAN8DIR = $(MANDIR)/man8 ++PKG_CONFIG ?= pkg-config ++CFLAGS ?= -g -W ++CPPFLAGS ?= -D_FORTIFY_SOURCE=2 ++override CFLAGS += -Wno-sign-compare ++override CPPFLAGS += `$(PKG_CONFIG) --cflags glib-2.0` ++LDFLAGS ?= -Wl,--as-needed ++LDADD = `$(PKG_CONFIG) --libs glib-2.0` -lncursesw + + OBJS= latencytop.o text_display.o translate.o fsync.o + +-ifdef HAS_GTK_GUI +- XCFLAGS += `pkg-config --cflags gtk+-2.0` -DHAS_GTK_GUI +- LDF += `pkg-config --libs gtk+-2.0` ++ifeq ($(HAS_GTK_GUI),1) ++ override CPPFLAGS += `$(PKG_CONFIG) --cflags gtk+-2.0` -DHAS_GTK_GUI ++ LDADD += `$(PKG_CONFIG) --libs gtk+-2.0` + OBJS += gtk_display.o + endif + +@@ -24,19 +32,17 @@ endif + # libncursesw5-dev package. + # + +-# We write explicity this "implicit rule" +-%.o : %.c +- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ +- + latencytop: $(OBJS) latencytop.h Makefile +- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LDADD) + + clean: + rm -f *~ latencytop DEADJOE *.o + + install: latencytop +- mkdir -p $(DESTDIR)/usr/share/latencytop +- mkdir -p $(DESTDIR)/$(SBINDIR) +- install -m 0644 latencytop.trans $(DESTDIR)/usr/share/latencytop/latencytop.trans +- install -m 0644 *.png $(DESTDIR)/usr/share/latencytop/ ++ mkdir -p $(DESTDIR)$(DATADIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(MAN8DIR) ++ install -m 0644 latencytop.trans $(DESTDIR)$(DATADIR)/latencytop.trans ++ifeq ($(HAS_GTK_GUI),1) ++ install -m 0644 *.png $(DESTDIR)$(DATADIR)/ ++endif ++ install -m 0644 *.8 $(DESTDIR)$(MAN8DIR)/ + install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/ +-- +1.6.5.4 + diff --git a/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch b/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch new file mode 100644 index 000000000000..ef57e9e04c00 --- /dev/null +++ b/sys-process/latencytop/files/latencytop-0.5-fsync-fix-implicit-decl.patch @@ -0,0 +1,28 @@ +From 60427a259ba76b8238198e1f17a0c3b06491be3c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Fri, 18 Dec 2009 10:48:39 -0500 +Subject: [PATCH] fsync: fix implicit decl + +fsync.c: In function 'fsync_display': +fsync.c:330: warning: implicit declaration of function 'gettimeofday' + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + src/fsync.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/src/fsync.c b/src/fsync.c +index 1706571..3bec719 100644 +--- a/src/fsync.c ++++ b/src/fsync.c +@@ -30,6 +30,7 @@ + #include <string.h> + #include <ncurses.h> + #include <time.h> ++#include <sys/time.h> + #include <wchar.h> + #include <ctype.h> + +-- +1.6.5.4 + diff --git a/sys-process/latencytop/latencytop-0.5.ebuild b/sys-process/latencytop/latencytop-0.5.ebuild new file mode 100644 index 000000000000..c130c77b3555 --- /dev/null +++ b/sys-process/latencytop/latencytop-0.5.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +DESCRIPTION="tool for identifying where in the system latency is happening" +HOMEPAGE="http://www.latencytop.org/" +SRC_URI="http://www.latencytop.org/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="gtk unicode" + +RDEPEND="=dev-libs/glib-2* + gtk? ( =x11-libs/gtk+-2* ) + sys-libs/ncurses" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-*.patch + sed -i \ + -e "/^HAS_GTK_GUI/s:=.*:=$(use gtk && echo 1):" \ + Makefile || die +} + +src_compile() { + tc-export CC PKG_CONFIG + emake || die +} + +src_install() { + emake install DESTDIR="${D}" || die +} diff --git a/sys-process/latencytop/metadata.xml b/sys-process/latencytop/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-process/latencytop/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/lsof/Manifest b/sys-process/lsof/Manifest new file mode 100644 index 000000000000..aa57225e76a9 --- /dev/null +++ b/sys-process/lsof/Manifest @@ -0,0 +1,3 @@ +DIST lsof_4.87.tar.bz2 773664 SHA256 dfdd3709d82bc79ccdf3e404b84aafa9aede5948642a824ecaefd0aac589da2c SHA512 5e811225dd65366e3ef49628d567864fadda1dbda2d66a5e473123e73c468f5a3a577ae4e1b701a55ac49c2a759dab5c413663121c260a2804fca10ece902766 WHIRLPOOL 4ef01b855dbd8418e1533ebb293c3faacfa38c7a3cd30436d0a8174a974b7cd0eebfb79b23c4c3f13b66a65813a6fbdf5aa483d3f8d2689325fe7d0f48bfb5eb +DIST lsof_4.88.tar.bz2 778563 SHA256 fe6f9b0e26b779ccd0ea5a0b6327c2b5c38d207a6db16f61ac01bd6c44e5c99b SHA512 acf3901ac08bac5acaa123af835de03fcf86c1cb851a2cba5bb6d08c53dff62570e4129c18ffa241ae84a83d5e6fc5207fb12e43b5ff5a21a0c1967ca117848b WHIRLPOOL 74d85794e5f05920ac83b160b02e510442ebe3f390a8f30bbf514f31bb8ff74ad191f89bed5b3eee47033cc7d6fe01ba4d9d812050d7132e041899d96264076f +DIST lsof_4.89.tar.bz2 784560 SHA256 81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718 SHA512 cafb0209143c7863e5cebe7efc33a2520d36f9e26222350e4edfa18debbcfb5c81f42f71469e5913fb21f49a7562bbe761b72dfc8f297dadf75ac619cdcb318c WHIRLPOOL e269b5bff958461b0f522b9baa64efc64e04cb71a1fa3ca5b17564b9d180fa8984b74238d4769ff5e4d453bc76cb5d9c4652d080b7d26571326fab4b0bbaf4ac diff --git a/sys-process/lsof/files/lsof-4.85-arg.c.patch b/sys-process/lsof/files/lsof-4.85-arg.c.patch new file mode 100644 index 000000000000..98838cd772f3 --- /dev/null +++ b/sys-process/lsof/files/lsof-4.85-arg.c.patch @@ -0,0 +1,30 @@ +arg.c.patch Patches: lsof_4.85_src/arg.c + + Importance: major for all dialects supporting + the +|-e option (e.g., Linux) + + Function: this patch corrects a bug in the + accumulation of multiple +|-e + option values + +*** /tmp/T0iAaaeo Thu Oct 20 14:08:43 2011 +--- arg.c Thu Oct 20 14:03:49 2011 +*************** +*** 778,785 **** + ep->pathl = i; + ep->rdlnk = rdlnk; + ep->mp = (struct mounts *)NULL; +! if (!(ep->next = Efsysl)) +! Efsysl = ep; + return(0); + } + #endif /* defined(HASEOPT) */ +--- 778,785 ---- + ep->pathl = i; + ep->rdlnk = rdlnk; + ep->mp = (struct mounts *)NULL; +! ep->next = Efsysl; +! Efsysl = ep; + return(0); + } + #endif /* defined(HASEOPT) */ diff --git a/sys-process/lsof/files/lsof-4.85-cross.patch b/sys-process/lsof/files/lsof-4.85-cross.patch new file mode 100644 index 000000000000..c2c73ccb563f --- /dev/null +++ b/sys-process/lsof/files/lsof-4.85-cross.patch @@ -0,0 +1,37 @@ +let the preprocessor work its magic rather than executing the code + +https://bugs.gentoo.org/432120 + +make sure to use -P here + +https://bugs.gentoo.org/546636 + +--- a/Configure ++++ b/Configure +@@ -2730,20 +2730,17 @@ LOCKF_OWNER4 + rm -f ${LSOF_TMPC}.* + cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC1 + #include <features.h> +-main() { ++#undef XXX + #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) +-printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__); ++XXX: __GLIBC__ * 100 + __GLIBC_MINOR__ + #elif defined(__GLIBC__) +-printf("-DGLIBCV=%d00\n",__GLIBC__); +-#else +-printf("\n"); ++XXX: __GLIBC__ * 100 + #endif +-return(0); } + .LSOF_END_HERE_DOC1 +- $LINUX_CONF_CC ${LSOF_TMPC}.c -I$LSOF_INCLUDE -o ${LSOF_TMPC}.x > /dev/null 2>&1 ++ $LINUX_CONF_CC ${LSOF_TMPC}.c -E -P -I$LSOF_INCLUDE 2>/dev/null | sed -n '/^XXX:/s|.*:||p' > ${LSOF_TMPC}.x +- if test -x ${LSOF_TMPC}.x # { ++ if test -s ${LSOF_TMPC}.x # { + then +- LINUX_CLIB=`${LSOF_TMPC}.x` ++ LINUX_CLIB="-DGLIBCV=$(( `cat ${LSOF_TMPC}.x` ))" + LSOF_TMP=$? + else + LINUX_CLIB="" diff --git a/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch b/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch new file mode 100644 index 000000000000..28640a9e65ed --- /dev/null +++ b/sys-process/lsof/files/lsof-4.88-linux.dnode.c.patch @@ -0,0 +1,21 @@ +ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/patches/4.88/linux.dnode.c.patch + +*** dnode.c +--- lsof_4.88_src/dialects/linux/dnode.c +*************** +*** 580,586 **** + Lf->inp_ty = 1; + + #if defined(HASEPTOPTS) +! if (Lf->ntype == N_FIFO) { + (void) enter_pinfo(); + Lf->sf |= SELPINFO; + } +--- 580,586 ---- + Lf->inp_ty = 1; + + #if defined(HASEPTOPTS) +! if ((Lf->ntype == N_FIFO) && FpipeE) { + (void) enter_pinfo(); + Lf->sf |= SELPINFO; + } diff --git a/sys-process/lsof/lsof-4.87-r1.ebuild b/sys-process/lsof/lsof-4.87-r1.ebuild new file mode 100644 index 000000000000..ab64ac200074 --- /dev/null +++ b/sys-process/lsof/lsof-4.87-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils flag-o-matic toolchain-funcs + +MY_P=${P/-/_} +DESCRIPTION="Lists open files for running Unix processes" +HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" +SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2" + +LICENSE="lsof" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="examples ipv6 rpc selinux static" + +RDEPEND="rpc? ( net-libs/libtirpc ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + rpc? ( virtual/pkgconfig )" + +S=${WORKDIR}/${MY_P}/${MY_P}_src + +src_unpack() { + unpack ${A} + cd ${MY_P} + unpack ./${MY_P}_src.tar +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + # convert `test -r header.h` into a compile test + sed -i -r \ + -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ + -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ + Configure || die +} + +target() { + case ${CHOST} in + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-solaris*) echo solaris ;; + *-aix*) echo aixgcc ;; + *) echo linux ;; + esac +} + +src_configure() { + use static && append-ldflags -static + + append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") + append-cppflags $(usex ipv6 -{D,U}HASIPv6) + + export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ + $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" + + # Set LSOF_INCLUDE to a dummy location so the script doesn't poke + # around in it and mix /usr/include paths with cross-compile/etc. + touch .neverInv + LINUX_HASSELINUX=$(usex selinux y n) \ + LSOF_INCLUDE=${T} \ + LSOF_CC=$(tc-getCC) \ + LSOF_AR="$(tc-getAR) rc" \ + LSOF_RANLIB=$(tc-getRANLIB) \ + LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ + ./Configure -n $(target) || die +} + +src_compile() { + emake DEBUG="" all +} + +src_install() { + dobin lsof + + if use examples ; then + insinto /usr/share/lsof/scripts + doins scripts/* + fi + + doman lsof.8 + dodoc 00* +} + +pkg_postinst() { + if [[ ${CHOST} == *-solaris* ]] ; then + einfo "Note: to use lsof on Solaris you need read permissions on" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" + elif [[ ${CHOST} == *-aix* ]] ; then + einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" + fi +} diff --git a/sys-process/lsof/lsof-4.88-r1.ebuild b/sys-process/lsof/lsof-4.88-r1.ebuild new file mode 100644 index 000000000000..f9b4997db8b3 --- /dev/null +++ b/sys-process/lsof/lsof-4.88-r1.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils flag-o-matic toolchain-funcs + +MY_P=${P/-/_} +DESCRIPTION="Lists open files for running Unix processes" +HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" +SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2" + +LICENSE="lsof" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="examples ipv6 rpc selinux static" + +RDEPEND="rpc? ( net-libs/libtirpc ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + rpc? ( virtual/pkgconfig )" + +S=${WORKDIR}/${MY_P}/${MY_P}_src + +src_unpack() { + unpack ${A} + cd ${MY_P} + unpack ./${MY_P}_src.tar +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + epatch "${FILESDIR}"/${P}-linux.dnode.c.patch + # fix POSIX compliance with `echo` + sed -i \ + -e 's:echo -n:printf:' \ + AFSConfig Configure Customize Inventory tests/CkTestDB || die + # convert `test -r header.h` into a compile test + sed -i -r \ + -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ + -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ + Configure || die +} + +target() { + case ${CHOST} in + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-solaris*) echo solaris ;; + *-aix*) echo aixgcc ;; + *) echo linux ;; + esac +} + +src_configure() { + use static && append-ldflags -static + + append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") + append-cppflags $(usex ipv6 -{D,U}HASIPv6) + + export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ + $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" + + # Set LSOF_INCLUDE to a dummy location so the script doesn't poke + # around in it and mix /usr/include paths with cross-compile/etc. + touch .neverInv + LINUX_HASSELINUX=$(usex selinux y n) \ + LSOF_INCLUDE=${T} \ + LSOF_CC=$(tc-getCC) \ + LSOF_AR="$(tc-getAR) rc" \ + LSOF_RANLIB=$(tc-getRANLIB) \ + LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ + ./Configure -n $(target) || die +} + +src_compile() { + emake DEBUG="" all +} + +src_install() { + dobin lsof + + if use examples ; then + insinto /usr/share/lsof/scripts + doins scripts/* + fi + + doman lsof.8 + dodoc 00* +} + +pkg_postinst() { + if [[ ${CHOST} == *-solaris* ]] ; then + einfo "Note: to use lsof on Solaris you need read permissions on" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" + elif [[ ${CHOST} == *-aix* ]] ; then + einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" + fi +} diff --git a/sys-process/lsof/lsof-4.89.ebuild b/sys-process/lsof/lsof-4.89.ebuild new file mode 100644 index 000000000000..9fb54aefadd8 --- /dev/null +++ b/sys-process/lsof/lsof-4.89.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils flag-o-matic toolchain-funcs + +MY_P=${P/-/_} +DESCRIPTION="Lists open files for running Unix processes" +HOMEPAGE="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/" +SRC_URI="ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2 + ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/OLD/${MY_P}.tar.bz2 + http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof/${MY_P}.tar.bz2" + +LICENSE="lsof" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="examples ipv6 rpc selinux static" + +RDEPEND="rpc? ( net-libs/libtirpc ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + rpc? ( virtual/pkgconfig )" + +S=${WORKDIR}/${MY_P}/${MY_P}_src + +src_unpack() { + unpack ${A} + cd ${MY_P} + unpack ./${MY_P}_src.tar +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.85-cross.patch #432120 + # fix POSIX compliance with `echo` + sed -i \ + -e 's:echo -n:printf:' \ + AFSConfig Configure Customize Inventory tests/CkTestDB || die + # convert `test -r header.h` into a compile test + sed -i -r \ + -e 's:test -r \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\1>" | ${LSOF_CC} ${LSOF_CFGF} -E - >/dev/null 2>\&1:' \ + -e 's:grep (.*) \$\{LSOF_INCLUDE\}/([[:alnum:]/._]*):echo "#include <\2>" | ${LSOF_CC} ${LSOF_CFGF} -E -P -dD - 2>/dev/null | grep \1:' \ + Configure || die +} + +target() { + case ${CHOST} in + *-darwin*) echo darwin ;; + *-freebsd*) echo freebsd ;; + *-solaris*) echo solaris ;; + *-aix*) echo aixgcc ;; + *) echo linux ;; + esac +} + +src_configure() { + use static && append-ldflags -static + + append-cppflags $(use rpc && $(tc-getPKG_CONFIG) libtirpc --cflags || echo "-DHASNOTRPC -DHASNORPC_H") + append-cppflags $(usex ipv6 -{D,U}HASIPv6) + + export LSOF_CFGL="${CFLAGS} ${LDFLAGS} \ + $(use rpc && $(tc-getPKG_CONFIG) libtirpc --libs)" + + # Set LSOF_INCLUDE to a dummy location so the script doesn't poke + # around in it and mix /usr/include paths with cross-compile/etc. + touch .neverInv + LINUX_HASSELINUX=$(usex selinux y n) \ + LSOF_INCLUDE=${T} \ + LSOF_CC=$(tc-getCC) \ + LSOF_AR="$(tc-getAR) rc" \ + LSOF_RANLIB=$(tc-getRANLIB) \ + LSOF_CFGF="${CFLAGS} ${CPPFLAGS}" \ + ./Configure -n $(target) || die +} + +src_compile() { + emake DEBUG="" all +} + +src_install() { + dobin lsof + + if use examples ; then + insinto /usr/share/lsof/scripts + doins scripts/* + fi + + doman lsof.8 + dodoc 00* +} + +pkg_postinst() { + if [[ ${CHOST} == *-solaris* ]] ; then + einfo "Note: to use lsof on Solaris you need read permissions on" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group sys" + elif [[ ${CHOST} == *-aix* ]] ; then + einfo "Note: to use lsof on AIX you need read permissions on /dev/mem and" + einfo "/dev/kmem, i.e. you need to be root, or to be in the group system" + fi +} diff --git a/sys-process/lsof/metadata.xml b/sys-process/lsof/metadata.xml new file mode 100644 index 000000000000..49fb858fab9c --- /dev/null +++ b/sys-process/lsof/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +<use> + <flag name='rpc'>support looking up RPC service info</flag> +</use> +</pkgmetadata> diff --git a/sys-process/memwatch/Manifest b/sys-process/memwatch/Manifest new file mode 100644 index 000000000000..c2d27b8f527e --- /dev/null +++ b/sys-process/memwatch/Manifest @@ -0,0 +1 @@ +DIST memwatch-0.0.2.tar.gz 3342 SHA256 7eab256e6e2ebd1e302b5f40567b849b8e0f33e08179c9e35d4cfa55b194cf59 SHA512 79af7056023128a1a27150ba02d29fdd51dbfe79ae44acf36a149dded6940ba209967ef1729e77063e93cf4d85861d993eb44f38cdb5b42254ed4d8bc77e5235 WHIRLPOOL 8005051534441497a4494b12ee85a87c88c39396a47fe8794be24bbbb1758f0a3963bd8623e4c083c8e3c8be6c966a05687741595a8ed23d698d273081aedbb9 diff --git a/sys-process/memwatch/memwatch-0.0.2.ebuild b/sys-process/memwatch/memwatch-0.0.2.ebuild new file mode 100644 index 000000000000..c9fb4682ff39 --- /dev/null +++ b/sys-process/memwatch/memwatch-0.0.2.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="Interactive memory viewer" +HOMEPAGE="https://bitbucket.org/PascalRD/memwatch/" +SRC_URI="http://unixdev.ru/src/${P}.tar.gz" + +LICENSE="WTFPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="sys-libs/ncurses" +RDEPEND="${DEPEND}" + +src_prepare() { + einfo "Regenerating autotools files..." + ./autogen.sh || die "autogen failed" +} + +src_configure() { + econf +} + +src_compile() { + emake +} + +src_install() { + emake DESTDIR="${D}" install +} diff --git a/sys-process/memwatch/metadata.xml b/sys-process/memwatch/metadata.xml new file mode 100644 index 000000000000..ba1f5062af1a --- /dev/null +++ b/sys-process/memwatch/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>monsieurp@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="bitbucket">PascalRD/memwatch</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/metadata.xml b/sys-process/metadata.xml new file mode 100644 index 000000000000..18512914adfd --- /dev/null +++ b/sys-process/metadata.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The sys-process category contains packages which query or manipulate + processes. The 'cron' daemons are included in this. + </longdescription> + <longdescription lang="es"> + La categoría sys-proccess contiene paquetes que manipulan y obtienen + información de los procesos. Los paquetes de 'cron' también están + incluidos en esta categoría. + </longdescription> + <longdescription lang="ja"> + sys-processカテゴリにはプロセスを照会と操作パッケージが含まれます。 + cronデーモンはここに含まれます。 + </longdescription> + <longdescription lang="de"> + Die Kategorie sys-process enthält Pakete für das Arbeiten mit Prozessen. + Auch die Cron-Daemons sind in dieser Kategorie enthalten. + </longdescription> + <longdescription lang="nl"> + De sys-process categorie bevat pakketten voor de omgang met processen. Ook + de verschillende cron-daemons behoren tot deze categorie. + </longdescription> + <longdescription lang="vi"> + Nhóm sys-process chứa các phần mềm truy vấn và xử lý tiến trình. + Các 'cron' daemon cũng nằm trong đây. + </longdescription> + <longdescription lang="it"> + La categoria sys-process contiene pacchetti per la manipolazione e l'analisi dei processi. + I demoni 'cron' appartengono a questa categoria. + </longdescription> + <longdescription lang="pt"> + A categoria sys-process contém pacotes que manipulam e captam + informações dos processos. Os daemons de 'cron' estão incluídos + aqui. + </longdescription> + <longdescription lang="pl"> + Kategoria sys-process zawiera programy do przeszukiwania listy procesów + oraz do manipulowania nimi. Znajdują się tu również demony cron. + </longdescription> + <longdescription lang="ru"> + Категория sys-process содержит пакеты, которые работают с процессами в системе. + Демоны 'cron' также относятся к данной категории. + </longdescription> +</catmetadata> + diff --git a/sys-process/minit/Manifest b/sys-process/minit/Manifest new file mode 100644 index 000000000000..04f03ab46d4a --- /dev/null +++ b/sys-process/minit/Manifest @@ -0,0 +1,2 @@ +DIST minit-0.10.tar.bz2 26119 SHA256 e976926342da1828d7e6b10fe489366e7690acdd0c81c0fdfa04c57182ddfacd +DIST minit-0.9.1.tar.bz2 21894 SHA256 8128b6b96dbe31072005acb63005d77f052a98393c455a725c2ac5054d561d22 diff --git a/sys-process/minit/files/0.9.1-destdir.patch b/sys-process/minit/files/0.9.1-destdir.patch new file mode 100644 index 000000000000..7a36d3cdfde7 --- /dev/null +++ b/sys-process/minit/files/0.9.1-destdir.patch @@ -0,0 +1,16 @@ +--- Makefile.orig 2004-03-04 03:08:18.967017104 -0500 ++++ Makefile 2004-03-04 03:10:11.445917712 -0500 +@@ -36,10 +36,12 @@ + $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^ + + install-files: ++ test -d $(DESTDIR)/sbin || mkdir -p $(DESTDIR)/sbin + install minit pidfilehack $(DESTDIR)/sbin + install write_proc hard-reboot $(DESTDIR)/sbin ++ test -d $(DESTDIR)/bin || mkdir -p $(DESTDIR)/bin + install msvc $(DESTDIR)/bin +- test -d $(DESTDIR)/etc/minit || mkdir $(DESTDIR)/etc/minit ++ test -d $(DESTDIR)/etc/minit || mkdir -p $(DESTDIR)/etc/minit + + install-fifos: + -mkfifo -m 600 $(DESTDIR)/etc/minit/in $(DESTDIR)/etc/minit/out diff --git a/sys-process/minit/files/minit-0.10-fixes.diff b/sys-process/minit/files/minit-0.10-fixes.diff new file mode 100644 index 000000000000..5c80091f84f3 --- /dev/null +++ b/sys-process/minit/files/minit-0.10-fixes.diff @@ -0,0 +1,62 @@ +diff -ru minit-0.10.orig/Makefile minit-0.10/Makefile +--- minit-0.10.orig/Makefile 2005-04-08 19:24:04.000000000 +0200 ++++ minit-0.10/Makefile 2008-11-27 23:05:57.000000000 +0100 +@@ -7,7 +7,7 @@ + CROSS= + #CROSS=arm-linux- + LDFLAGS=-s +-MANDIR=/usr/man ++MANDIR=/usr/share/man + + path = $(subst :, ,$(PATH)) + diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet)) +@@ -44,9 +44,11 @@ + msvc: msvc.o + minit-update: minit-update.o split.o openreadclose.o + serdo: serdo.o +- + shutdown: shutdown.o split.o openreadclose.o opendevconsole.o +- $(DIET) $(CROSS)$(CC) $(LDFLAGS) -o shutdown $^ ++pidfilehack: pidfilehack.o ++hard-reboot: hard-reboot.o ++write_proc: write_proc.o ++killall5: killall5.o + + %.o: %.c + $(DIET) $(CROSS)$(CC) $(CFLAGS) -c $< +@@ -61,22 +63,11 @@ + test: test.c + gcc -nostdlib -o $@ $^ -I../dietlibc/include ../dietlibc/start.o ../dietlibc/dietlibc.a + +-pidfilehack: pidfilehack.c +- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^ +- +-hard-reboot: hard-reboot.c +- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^ +- +-write_proc: write_proc.c +- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^ +- +-killall5: killall5.c +- $(DIET) $(CROSS)$(CC) $(CFLAGS) -o $@ $^ +- + install-files: + install -d $(DESTDIR)/etc/minit $(DESTDIR)/sbin $(DESTDIR)/bin $(DESTDIR)$(MANDIR)/man8 +- install minit pidfilehack $(DESTDIR)/sbin ++ install minit killall5 pidfilehack $(DESTDIR)/sbin + install write_proc hard-reboot minit-update $(DESTDIR)/sbin ++ install listpids $(DESTDIR)/sbin/minit-list + install msvc serdo $(DESTDIR)/bin + install -m 4750 shutdown $(DESTDIR)/sbin + test -f $(DESTDIR)/sbin/init || ln $(DESTDIR)/sbin/minit $(DESTDIR)/sbin/init +diff -ru minit-0.10.orig/serdo.c minit-0.10/serdo.c +--- minit-0.10.orig/serdo.c 2005-02-26 18:00:22.000000000 +0100 ++++ minit-0.10/serdo.c 2008-11-27 23:02:57.000000000 +0100 +@@ -10,6 +10,7 @@ + #define MAXENV 256 + char* envp[MAXENV+2]; + int envc; ++extern char **environ; + + int continueonerror; + diff --git a/sys-process/minit/metadata.xml b/sys-process/minit/metadata.xml new file mode 100644 index 000000000000..e6921be3b87b --- /dev/null +++ b/sys-process/minit/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>vostorga@gentoo.org</email> + <name>Víctor Ostorga</name> + </maintainer> + <maintainer> + <email>aw-gentoo@instandbesetzt.net</email> + <name>Andreas Wiese</name> + </maintainer> +<longdescription> +minit - a small yet feature-complete init + +What works so far + * It can start services and take dependencies into account. + * It can restart services + * It can start services in sync mode (i.e. wait until they +terminate, to get around race conditions for static initializations) + * There is a companion utility "msvc" that can be used much in the +same way as the svc from daemontools. Communication works over two +fifos, /etc/minit/in and /etc/minit/out. Those have to exist before +minit is started and they should be owned by root and have mode 600. + * There is a companion utility "pidfilehack" that can be used to do +stuff like run ssh, wait a while, read the PID off /var/run/sshd.pid and +tell minit this PID so it will know when sshd exits and can restart it. + * It can pipe stdout to a dedicated log process. +</longdescription> +</pkgmetadata> diff --git a/sys-process/minit/minit-0.10.ebuild b/sys-process/minit/minit-0.10.ebuild new file mode 100644 index 000000000000..7deb89d95aaf --- /dev/null +++ b/sys-process/minit/minit-0.10.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils + +DESCRIPTION="a small yet feature-complete init" +HOMEPAGE="http://www.fefe.de/minit/" +SRC_URI="http://dl.fefe.de/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND=">=dev-libs/libowfat-0.28-r1 + dev-libs/dietlibc" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} + + epatch "${FILESDIR}"/minit-0.10-fixes.diff +} + +src_compile() { + emake CFLAGS="${CFLAGS} -I/usr/include/libowfat" \ + LDFLAGS="${LDFLAGS}" DIET="diet" CC="$(tc-getCC)" || die +} + +src_install() { + emake install-files DESTDIR="${D}" || die + mv "${D}"/sbin/shutdown "${D}"/sbin/minit-shutdown || die + mv "${D}"/sbin/killall5 "${D}"/sbin/minit-killall5 || die + rm "${D}"/sbin/init || die + dodoc CHANGES README TODO +} + +pkg_postinst() { + [ -e /etc/minit/in ] || mkfifo "${ROOT}"/etc/minit/in + [ -e /etc/minit/out ] || mkfifo "${ROOT}"/etc/minit/out +} diff --git a/sys-process/minit/minit-0.9.1.ebuild b/sys-process/minit/minit-0.9.1.ebuild new file mode 100644 index 000000000000..b895ccee65f3 --- /dev/null +++ b/sys-process/minit/minit-0.9.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils + +DESCRIPTION="a small yet feature-complete init" +HOMEPAGE="http://www.fefe.de/minit/" +SRC_URI="http://www.fefe.de/minit/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86" +IUSE="" + +DEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-destdir.patch +} + +src_compile() { + emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" DIET="" || die +} + +src_install() { + make install DESTDIR="${D}" || die + dodoc CHANGES README TODO +} diff --git a/sys-process/nmon/Manifest b/sys-process/nmon/Manifest new file mode 100644 index 000000000000..d5c67b70dd5e --- /dev/null +++ b/sys-process/nmon/Manifest @@ -0,0 +1 @@ +DIST lmon14i.c 201877 SHA256 d401cb5048e3e8e8f1ad63e68a0499c73ec64d5d2b7c41a1aeb2b596374eaa86 SHA512 fe739044516f1e11a30a83ea49a4db6dc65175fcbb5c6e305320e2763a6936bfa565910984008279b1f3595473166b8e3371472f76bd2472928892ab97c0fbfa WHIRLPOOL e924e79171037239f701f889cffd80f36d435a9d0b36febc573e9fb168dc0d1a9fadca2a8b7d67fb58fc4a859b01bd82b85c0a8a3649ca4fdd46a976cbf1f72e diff --git a/sys-process/nmon/metadata.xml b/sys-process/nmon/metadata.xml new file mode 100644 index 000000000000..143ec9f94899 --- /dev/null +++ b/sys-process/nmon/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">nmon</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/nmon/nmon-14i.ebuild b/sys-process/nmon/nmon-14i.ebuild new file mode 100644 index 000000000000..e52eaf07fcd3 --- /dev/null +++ b/sys-process/nmon/nmon-14i.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Nigel's performance MONitor for CPU, memory, network, disks, etc..." +HOMEPAGE="http://nmon.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/lmon${PV}.c" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND="sys-libs/ncurses" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig +" + +S=${WORKDIR} + +src_unpack() { + cp "${DISTDIR}"/lmon${PV}.c "${S}"/nmon.c || die +} + +src_compile() { + append-cppflags -DJFS -DGETUSER -DLARGEMEM -DPOWER + emake CC="$(tc-getCC)" LDLIBS="$( $(tc-getPKG_CONFIG) --libs ncurses)" ${PN} +} + +src_install() { + dobin nmon +} diff --git a/sys-process/numactl/Manifest b/sys-process/numactl/Manifest new file mode 100644 index 000000000000..31ce1c7719c2 --- /dev/null +++ b/sys-process/numactl/Manifest @@ -0,0 +1,2 @@ +DIST numactl-2.0.10.tar.gz 98999 SHA256 9d197fefac81c73dc2b2e554f1758b2ec56d4e9b2f04a7f45dff5d6cb14fb9ce SHA512 3a82b28bbc724a2340950ac33396055da852ee06e5b1d3414cd83dd6f9e26fbb648faae35ce4009c76d6a180f3067a8f3fb18e3ffaa6b6db68adfc0877e94975 WHIRLPOOL 59a172c14d96b01b1e13d2913f6f820d4f9bacb2f80e2920d4350273ff01ab57d56ab4a163fde2df3898c4b7cf204bd4a333c99f9feb9d5bcd89fea799a3d2db +DIST numactl-2.0.9.tar.gz 341455 SHA256 9ca033e6c14c0f26c20379b0cf9299429fd5a354a79c3c7880fd41ef69f7751c SHA512 483cbb1607da0f3bf0923202ea565100ea430b19502bdbd322f043f75dc945cc0f47878c0ed28badab23561c37da0b04aa12d07656bb4666c4f8d02a0d256407 WHIRLPOOL 5aba5b4a6ab0a4f06a2266054fdc7be8ca81696cf417e4fa4d10667ab95195edc5e002551a3bda4ea1eb25caf01d171ed18a16e4c29960902546aa78d7b93d73 diff --git a/sys-process/numactl/files/numactl-2.0.10-numademo-cflags.patch b/sys-process/numactl/files/numactl-2.0.10-numademo-cflags.patch new file mode 100644 index 000000000000..9b318df5a5ca --- /dev/null +++ b/sys-process/numactl/files/numactl-2.0.10-numademo-cflags.patch @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/540856 + +respect user CFLAGS + +--- a/Makefile.am ++++ b/Makefile.am +@@ -23,7 +23,7 @@ numastat_CFLAGS = $(AM_CFLAGS) -std=gnu99 + + numademo_SOURCES = numademo.c stream_lib.c stream_lib.h mt.c mt.h clearcache.c clearcache.h + numademo_CPPFLAGS = $(AM_CPPFLAGS) -DHAVE_STREAM_LIB -DHAVE_MT -DHAVE_CLEAR_CACHE +-numademo_CFLAGS = -O3 -ffast-math -funroll-loops ++numademo_CFLAGS = $(AM_CFLAGS) -ffast-math -funroll-loops + if HAVE_TREE_VECTORIZE + numademo_CFLAGS += -ftree-vectorize + endif diff --git a/sys-process/numactl/files/numactl-2.0.8-cpuid-pic.patch b/sys-process/numactl/files/numactl-2.0.8-cpuid-pic.patch new file mode 100644 index 000000000000..02e84b725772 --- /dev/null +++ b/sys-process/numactl/files/numactl-2.0.8-cpuid-pic.patch @@ -0,0 +1,17 @@ +make the code work on x86/PIC. this code is only used in the demo, +and the overhead of always running this is system noise, so don't +bother bracketing with __i386__/__PIC__ defines. + +http://bugs.gentoo.org/456238 + +--- a/clearcache.c ++++ b/clearcache.c +@@ -57,7 +57,7 @@ void clearcache(unsigned char *mem, unsigned size) + #if defined(__i386__) || defined(__x86_64__) + unsigned i, cl, eax, feat; + /* get clflush unit and feature */ +- asm("cpuid" : "=a" (eax), "=b" (cl), "=d" (feat) : "0" (1) : "cx"); ++ asm("xchg %%ebx, %%esi; cpuid; xchg %%esi, %%ebx;" : "=a" (eax), "=S" (cl), "=d" (feat) : "0" (1) : "cx"); + if (!(feat & (1 << 19))) + fallback_clearcache(); + cl = ((cl >> 8) & 0xff) * 8; diff --git a/sys-process/numactl/files/numactl-2.0.8-static_libs.patch b/sys-process/numactl/files/numactl-2.0.8-static_libs.patch new file mode 100644 index 000000000000..efb84ff6240a --- /dev/null +++ b/sys-process/numactl/files/numactl-2.0.8-static_libs.patch @@ -0,0 +1,86 @@ +Build static libs without -fPIC and only if BUILD_STATIC=yes + +https://bugs.gentoo.org/379849 + +Patch written by Kacper Kowalik <xarthisius@gentoo.org> +--- a/Makefile ++++ b/Makefile +@@ -7,6 +7,8 @@ + # for compatibility with old releases + CFLAGS += ${OPT_CFLAGS} + override CFLAGS += -I. ++# build static libraries by default ++BUILD_STATIC ?= yes + + # find out if compiler supports __thread + THREAD_SUPPORT := $(shell if $(CC) $(CFLAGS) threadtest.c -o threadtest \ +@@ -24,6 +26,7 @@ + + CLEANFILES := numactl.o libnuma.o numactl numademo numademo.o distance.o \ + memhog libnuma.so libnuma.so.1 numamon numamon.o syscall.o bitops.o \ ++ distance.pic.o libnuma.pic.o syscall.pic.o \ + memhog.o util.o stream_main.o stream_lib.o shm.o stream clearcache.o \ + test/pagesize test/tshared test/mynode.o test/tshared.o mt.o empty.o empty.c \ + test/mynode test/ftok test/prefered test/randmap \ +@@ -40,11 +43,16 @@ + libdir := ${prefix}/$(shell ./getlibdir) + docdir := ${prefix}/share/doc + ++NUMA_LIBS = libnuma.so ++ifeq ($(BUILD_STATIC),yes) ++NUMA_LIBS+= libnuma.a ++endif ++ + all: numactl migratepages migspeed libnuma.so numademo numamon memhog \ + test/tshared stream test/mynode test/pagesize test/ftok test/prefered \ + test/randmap test/nodemap test/distance test/tbitmap test/move_pages \ + test/mbind_mig_pages test/migrate_pages test/realloc_test libnuma.a \ +- test/node-parse numastat ++ test/node-parse numastat ${NUMA_LIBS} + + numactl: numactl.o util.o shm.o bitops.o libnuma.so + +@@ -81,13 +89,14 @@ + + libnuma.so.1: versions.ldscript + +-libnuma.so.1: libnuma.o syscall.o distance.o affinity.o sysfs.o rtnetlink.o ++libnuma.so.1: libnuma.pic.o syscall.pic.o distance.pic.o affinity.pic.o sysfs.pic.o rtnetlink.pic.o + ${CC} ${LDFLAGS} -shared -Wl,-soname=libnuma.so.1 -Wl,--version-script,versions.ldscript -Wl,-init,numa_init -Wl,-fini,numa_fini -o libnuma.so.1 $(filter-out versions.ldscript,$^) + + libnuma.so: libnuma.so.1 + ln -sf libnuma.so.1 libnuma.so + +-libnuma.o : CFLAGS += -fPIC ++%.pic.o: %.c ++ ${CC} -fPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@ + + AR ?= ar + RANLIB ?= ranlib +@@ -95,16 +104,6 @@ + $(AR) rc $@ $^ + $(RANLIB) $@ + +-distance.o : CFLAGS += -fPIC +- +-syscall.o : CFLAGS += -fPIC +- +-affinity.o : CFLAGS += -fPIC +- +-sysfs.o : CFLAGS += -fPIC +- +-rtnetlink.o : CFLAGS += -fPIC +- + test/tshared: test/tshared.o libnuma.so + + test/mynode: test/mynode.o libnuma.so +@@ -143,7 +148,9 @@ + mkdir -p ${libdir} + install -m 0755 libnuma.so.1 ${libdir} + cd ${libdir} ; ln -sf libnuma.so.1 libnuma.so ++ifeq ($(BUILD_STATIC),yes) + install -m 0644 libnuma.a ${libdir} ++endif + mkdir -p ${prefix}/include + install -m 0644 numa.h numaif.h numacompat1.h ${prefix}/include + install -m 0755 numastat ${prefix}/bin diff --git a/sys-process/numactl/files/numactl-2.0.9-testsuite_fix.patch b/sys-process/numactl/files/numactl-2.0.9-testsuite_fix.patch new file mode 100644 index 000000000000..27a97fdf2509 --- /dev/null +++ b/sys-process/numactl/files/numactl-2.0.9-testsuite_fix.patch @@ -0,0 +1,12 @@ +Tests fail with /bin/dash + +Singned-off-by: Lars Wendler <polynomial-c@gentoo.org> + +--- numactl-2.0.9/test/printcpu ++++ numactl-2.0.9/test/printcpu +@@ -1,4 +1,4 @@ +-#!/bin/sh ++#!/bin/bash + #print cpu it is running on + declare -a arr + arr=( $(< /proc/self/stat) ) diff --git a/sys-process/numactl/files/numactl-2.0.9-testsuite_path.patch b/sys-process/numactl/files/numactl-2.0.9-testsuite_path.patch new file mode 100644 index 000000000000..018fc6dbcd18 --- /dev/null +++ b/sys-process/numactl/files/numactl-2.0.9-testsuite_path.patch @@ -0,0 +1,14 @@ +diff -Naur numactl-2.0.10-orig/test/bind_range numactl-2.0.10/test/bind_range +--- numactl-2.0.10-orig/test/bind_range 2015-05-03 22:23:31.095600314 -0400 ++++ numactl-2.0.10/test/bind_range 2015-05-03 22:25:29.107592557 -0400 +@@ -93,8 +93,8 @@ + + HIGHESTCPU=$(grep 'processor' /proc/cpuinfo | tail -n1 | cut -f2 -d':') + HIGHESTCPU=$(echo $HIGHESTCPU | cut -f2 -d' ') +-HIGHESTNODE=$(numactl -H | grep -e 'node [0-9]* cpus' | tail -n1 | cut -f2 -d' ') +-LOWESTNODE=$(numactl -H | grep -e 'node [0-9]* cpus' | head -n1 | cut -f2 -d' ') ++HIGHESTNODE=$(../numactl -H | grep -e 'node [0-9]* cpus' | tail -n1 | cut -f2 -d' ') ++LOWESTNODE=$(../numactl -H | grep -e 'node [0-9]* cpus' | head -n1 | cut -f2 -d' ') + + get_mask + diff --git a/sys-process/numactl/metadata.xml b/sys-process/numactl/metadata.xml new file mode 100644 index 000000000000..bee9f9ae6f02 --- /dev/null +++ b/sys-process/numactl/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/numactl/numactl-2.0.10-r1.ebuild b/sys-process/numactl/numactl-2.0.10-r1.ebuild new file mode 100644 index 000000000000..d01149ba0b0c --- /dev/null +++ b/sys-process/numactl/numactl-2.0.10-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils toolchain-funcs multilib-minimal + +DESCRIPTION="Utilities and libraries for NUMA systems" +HOMEPAGE="http://oss.sgi.com/projects/libnuma/" +SRC_URI="ftp://oss.sgi.com/www/projects/libnuma/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# ARM lacks the __NR_migrate_pages syscall. +KEYWORDS="~amd64 -arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux" +IUSE="" + +ECONF_SOURCE=${S} + +src_prepare() { + eautoreconf + epatch "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238 +} + +src_test() { + if [ -d /sys/devices/system/node ]; then + einfo "The only generically safe test is regress2." + einfo "The other test cases require 2 NUMA nodes." + emake regress2 + else + ewarn "You do not have baseline NUMA support in your kernel, skipping tests." + fi +} + +multilib_src_compile() { + multilib_is_native_abi && default || emake libnuma.la +} + +multilib_src_install() { + emake DESTDIR="${D}" install$(multilib_is_native_abi || echo "-libLTLIBRARIES install-includeHEADERS") +} + +multilib_src_install_all() { + DOCS=( README TODO CHANGES DESIGN ) + einstalldocs + # delete man pages provided by the man-pages package #238805 + rm -r "${ED}"/usr/share/man/man[25] || die +} diff --git a/sys-process/numactl/numactl-2.0.10-r2.ebuild b/sys-process/numactl/numactl-2.0.10-r2.ebuild new file mode 100644 index 000000000000..18da72af2930 --- /dev/null +++ b/sys-process/numactl/numactl-2.0.10-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils toolchain-funcs multilib-minimal + +DESCRIPTION="Utilities and libraries for NUMA systems" +HOMEPAGE="http://oss.sgi.com/projects/libnuma/" +SRC_URI="ftp://oss.sgi.com/www/projects/libnuma/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# ARM lacks the __NR_migrate_pages syscall. +KEYWORDS="~amd64 -arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux" +IUSE="" + +ECONF_SOURCE=${S} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238 + epatch "${FILESDIR}"/${PN}-2.0.10-numademo-cflags.patch #540856 + eautoreconf +} + +src_test() { + if [ -d /sys/devices/system/node ]; then + einfo "The only generically safe test is regress2." + einfo "The other test cases require 2 NUMA nodes." + emake regress2 + else + ewarn "You do not have baseline NUMA support in your kernel, skipping tests." + fi +} + +multilib_src_compile() { + multilib_is_native_abi && default || emake libnuma.la +} + +multilib_src_install() { + emake DESTDIR="${D}" install$(multilib_is_native_abi || echo "-libLTLIBRARIES install-includeHEADERS") +} + +multilib_src_install_all() { + DOCS=( README TODO CHANGES DESIGN ) + einstalldocs + # delete man pages provided by the man-pages package #238805 + rm -r "${ED}"/usr/share/man/man[25] || die +} diff --git a/sys-process/numactl/numactl-2.0.10.ebuild b/sys-process/numactl/numactl-2.0.10.ebuild new file mode 100644 index 000000000000..395a4533a203 --- /dev/null +++ b/sys-process/numactl/numactl-2.0.10.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils toolchain-funcs multilib + +DESCRIPTION="Utilities and libraries for NUMA systems" +HOMEPAGE="http://oss.sgi.com/projects/libnuma/" +SRC_URI="ftp://oss.sgi.com/www/projects/libnuma/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# ARM lacks the __NR_migrate_pages syscall. +KEYWORDS="~amd64 -arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux" +IUSE="" + +src_prepare() { + eautoreconf + epatch "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238 +} + +src_test() { + if [ -d /sys/devices/system/node ]; then + einfo "The only generically safe test is regress2." + einfo "The other test cases require 2 NUMA nodes." + emake regress2 + else + ewarn "You do not have baseline NUMA support in your kernel, skipping tests." + fi +} + +src_install() { + DOCS=( README TODO CHANGES DESIGN ) + default + # delete man pages provided by the man-pages package #238805 + rm -r "${ED}"/usr/share/man/man[25] || die +} diff --git a/sys-process/numactl/numactl-2.0.9.ebuild b/sys-process/numactl/numactl-2.0.9.ebuild new file mode 100644 index 000000000000..e40bead10316 --- /dev/null +++ b/sys-process/numactl/numactl-2.0.9.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs multilib + +DESCRIPTION="Utilities and libraries for NUMA systems" +HOMEPAGE="http://oss.sgi.com/projects/libnuma/" +SRC_URI="ftp://oss.sgi.com/www/projects/libnuma/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +# ARM lacks the __NR_migrate_pages syscall. +KEYWORDS="-arm amd64 ~ia64 ppc ppc64 x86 ~amd64-linux" +IUSE="static-libs" + +src_prepare() { + echo "printf $(get_libdir)" > getlibdir + epatch "${FILESDIR}"/${PN}-2.0.8-static_libs.patch + epatch "${FILESDIR}"/${PN}-2.0.8-cpuid-pic.patch #456238 + epatch "${FILESDIR}"/${PN}-2.0.9-testsuite_fix.patch + epatch "${FILESDIR}"/${P}-testsuite_path.patch + rm numastat || die #466108 +} + +src_compile() { + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" \ + CFLAGS="${CFLAGS}" \ + BENCH_CFLAGS="" \ + THREAD_SUPPORT=$(tc-has-tls && echo yes || echo no) \ + BUILD_STATIC=$(usex static-libs) +} + +src_test() { + if [ -d /sys/devices/system/node ]; then + einfo "The only generically safe test is regress2." + einfo "The other test cases require 2 NUMA nodes." + cd test + ./regress2 || die + else + ewarn "You do not have baseline NUMA support in your kernel, skipping tests." + fi +} + +src_install() { + emake install prefix="${ED}/usr" BUILD_STATIC=$(usex static-libs) + # delete man pages provided by the man-pages package #238805 + rm -rf "${ED}"/usr/share/man/man[25] + doman *.8 # makefile doesnt get them all + dodoc README TODO CHANGES DESIGN +} diff --git a/sys-process/numad/Manifest b/sys-process/numad/Manifest new file mode 100644 index 000000000000..2883ddcadd10 --- /dev/null +++ b/sys-process/numad/Manifest @@ -0,0 +1 @@ +DIST numad-0.5-334278f.tar.bz2 21007 SHA256 5a288f3597d616211f7ce7cc9e7e9e65c72f2360754ac02f9e0e17f86118ea9b SHA512 1b4a577f0713bae1386f2064fcb2dcbfb9453e23e7617f40cfff4e56d02a8c26a48c8d03f1ac7aa36e4ba168824572377f84bc669d1dabdc1820c2cdc4c57911 WHIRLPOOL e4ca9eeaccab3544d39e0a7ef812f1d2eca4269f5ee8466ee043dbdabc9e987b9393b4f3f3d5f6e1d898256179515ca52985e2e38c4afa27b84c4514e2e9259d diff --git a/sys-process/numad/files/0001-Fix-man-page-directory-creation.patch b/sys-process/numad/files/0001-Fix-man-page-directory-creation.patch new file mode 100644 index 000000000000..0b8a1d7c27ff --- /dev/null +++ b/sys-process/numad/files/0001-Fix-man-page-directory-creation.patch @@ -0,0 +1,26 @@ +From 276611ad637334a6e3ea464540b204318f832ba8 Mon Sep 17 00:00:00 2001 +From: Doug Goldstein <cardoe@cardoe.com> +Date: Wed, 13 Jun 2012 17:49:52 -0500 +Subject: [PATCH] Fix man page directory creation + +When building inside of a buildroot, the path for the man page might not +exist so create it before we attempt to install a file into it. +--- + Makefile | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/Makefile b/Makefile +index d9adca9..32ad480 100755 +--- a/Makefile ++++ b/Makefile +@@ -42,6 +42,7 @@ RANLIB ?= ranlib + + install: numad + mkdir -p ${prefix}/bin ++ mkdir -p ${prefix}/share/man/man8 + install -m 0755 numad ${prefix}/bin + install -m 0644 numad.8 ${prefix}/share/man/man8 + +-- +1.7.3.4 + diff --git a/sys-process/numad/files/numad-0.5-ldlibs.patch b/sys-process/numad/files/numad-0.5-ldlibs.patch new file mode 100644 index 000000000000..d124e32e9ee4 --- /dev/null +++ b/sys-process/numad/files/numad-0.5-ldlibs.patch @@ -0,0 +1,34 @@ +From 9eb3cc5c51d846c8c8b750a4eb55545d7b5fea6c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Wed, 23 Apr 2014 15:41:26 -0400 +Subject: [PATCH] use LDLIBS for linker flags + +When you put -lfoo into the dependency line of make, it forces it to +search /lib and /usr/lib for files to link against. This can cause +problems when trying to cross-compile or build for different ABIs. +Use the standard LDLIBS variable instead. + +URL: https://bugs.gentoo.org/505760 +Reported-by: Georgi Georgiev <chutzimir@gmail.com> +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index f3838b4..f2e9a6e 100644 +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,8 @@ docdir := ${prefix}/share/doc + + all: numad + +-numad: numad.o -lpthread ++LDLIBS := -lpthread ++numad: numad.o + + AR ?= ar + RANLIB ?= ranlib +-- +1.9.2 + diff --git a/sys-process/numad/metadata.xml b/sys-process/numad/metadata.xml new file mode 100644 index 000000000000..6565d583883d --- /dev/null +++ b/sys-process/numad/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> + <maintainer> + <email>cardoe@gentoo.org</email> + <name>Doug Goldstein</name> + </maintainer> +</pkgmetadata> diff --git a/sys-process/numad/numad-0.5-r1.ebuild b/sys-process/numad/numad-0.5-r1.ebuild new file mode 100644 index 000000000000..f8d4bf97e402 --- /dev/null +++ b/sys-process/numad/numad-0.5-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit linux-info toolchain-funcs + +if [[ ${PV} = *9999* ]]; then + inherit git-2 + EGIT_REPO_URI="git://git.fedorahosted.org/numad.git" + KEYWORDS="~amd64 -arm -s390 x86" +else + SRC_URI="http://git.fedorahosted.org/git/?p=numad.git;a=snapshot;h=334278ff3d774d105939743436d7378a189e8693;sf=tbz2 -> numad-0.5-334278f.tar.bz2" + KEYWORDS="amd64 -arm -s390 x86" + S="${WORKDIR}/${PN}-334278f" +fi + +DESCRIPTION="The NUMA daemon that manages application locality" +HOMEPAGE="http://fedoraproject.org/wiki/Features/numad" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="" + +CONFIG_CHECK="~NUMA ~CPUSETS" + +src_prepare() { + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${FILESDIR}" \ + epatch + + tc-export CC +} + +src_configure() { + : +} + +src_compile() { + emake CFLAGS="${CFLAGS} -std=gnu99" +} + +src_install() { + emake prefix="${ED}/usr" install +} diff --git a/sys-process/numad/numad-0.5-r2.ebuild b/sys-process/numad/numad-0.5-r2.ebuild new file mode 100644 index 000000000000..4aba3a848455 --- /dev/null +++ b/sys-process/numad/numad-0.5-r2.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit linux-info toolchain-funcs eutils + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="git://git.fedorahosted.org/numad.git" + inherit git-2 +else + HASH="334278ff3d774d105939743436d7378a189e8693" + SRC_URI="http://git.fedorahosted.org/git/?p=numad.git;a=snapshot;h=${HASH};sf=tbz2 -> numad-0.5-${HASH:0:7}.tar.bz2" + KEYWORDS="~amd64 -arm -s390 ~x86" + S="${WORKDIR}/${PN}-${HASH:0:7}" +fi + +DESCRIPTION="The NUMA daemon that manages application locality" +HOMEPAGE="http://fedoraproject.org/wiki/Features/numad" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="" + +CONFIG_CHECK="~NUMA ~CPUSETS" + +src_prepare() { + epatch "${FILESDIR}"/0001-Fix-man-page-directory-creation.patch + epatch "${FILESDIR}"/${PN}-0.5-ldlibs.patch #505760 + tc-export CC +} + +src_configure() { + : +} + +src_compile() { + emake CFLAGS="${CFLAGS} -std=gnu99" +} + +src_install() { + emake prefix="${ED}/usr" install +} diff --git a/sys-process/numad/numad-0.5.ebuild b/sys-process/numad/numad-0.5.ebuild new file mode 100644 index 000000000000..4b3b2e78f406 --- /dev/null +++ b/sys-process/numad/numad-0.5.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit linux-info + +if [[ ${PV} = *9999* ]]; then + inherit git-2 + EGIT_REPO_URI="git://git.fedorahosted.org/numad.git" + KEYWORDS="-arm -s390" +else + SRC_URI="http://git.fedorahosted.org/git/?p=numad.git;a=snapshot;h=334278ff3d774d105939743436d7378a189e8693;sf=tbz2 -> numad-0.5-334278f.tar.bz2" + KEYWORDS="amd64 -arm -s390 x86" + S="${WORKDIR}/${PN}-334278f" +fi + +DESCRIPTION="The NUMA daemon that manages application locality" +HOMEPAGE="http://fedoraproject.org/wiki/Features/numad" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +CONFIG_CHECK="~NUMA ~CPUSETS" + +src_prepare() { + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${FILESDIR}" \ + epatch +} + +src_configure() { + : +} + +src_install() { + emake prefix="${ED}/usr" install +} diff --git a/sys-process/numad/numad-9999.ebuild b/sys-process/numad/numad-9999.ebuild new file mode 100644 index 000000000000..1dd514c4a980 --- /dev/null +++ b/sys-process/numad/numad-9999.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit linux-info toolchain-funcs eutils + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="git://git.fedorahosted.org/numad.git" + inherit git-2 +else + SRC_URI="" + KEYWORDS="~amd64 ~x86 -arm -s390" +fi + +DESCRIPTION="The NUMA daemon that manages application locality" +HOMEPAGE="http://fedoraproject.org/wiki/Features/numad" + +LICENSE="LGPL-2.1" +SLOT="0" +IUSE="" + +CONFIG_CHECK="~NUMA ~CPUSETS" + +src_prepare() { + epatch "${FILESDIR}"/0001-Fix-man-page-directory-creation.patch + tc-export CC +} + +src_configure() { + : +} + +src_compile() { + emake CFLAGS="${CFLAGS} -std=gnu99" +} + +src_install() { + emake prefix="${ED}/usr" install +} diff --git a/sys-process/parallel/Manifest b/sys-process/parallel/Manifest new file mode 100644 index 000000000000..f3fd694884a4 --- /dev/null +++ b/sys-process/parallel/Manifest @@ -0,0 +1,2 @@ +DIST parallel-20150522.tar.bz2 1129286 SHA256 4c4a199740189a4a220a10da29fdb33a0b71abef1f253eeb89a28da6f264f306 SHA512 c55f89be6f5ed23295de062392d798a10ecf5dfa89b8b819af50cb1174c33cff9f9633d911c07ffd6126262a8d011c96397aee9be8551948f7247fa4f0f12fd1 WHIRLPOOL 90ce60b9c35db7010553bc040793c5d959cfa57456bf4f0c5b187a7eb88df8b5a8c2dedd47f5973109a54184d81cfc0c406aae48a7dd8d73969b24671401a72c +DIST parallel-20150622.tar.bz2 1174020 SHA256 963a9c962ac8f4a53535f779ab7a46336dc6e12234d75dc796248bf9117aef48 SHA512 8bafc5f756f015fc5de880c0483d1d863f80a18193bb8660b43a9ee20a47cc4f22f10596a184e45f4d96b1a5d2308060fa01a69fcd747272f5cd207f82b600ec WHIRLPOOL b867730e14068a5af2734bfd6cb68be2d8cb46eb80bbd7170f77bd0e19d53094a1efda8a5805b59319ff93ed38315e233e563601bf6716489f408eb231a0dd5e diff --git a/sys-process/parallel/metadata.xml b/sys-process/parallel/metadata.xml new file mode 100644 index 000000000000..7bed4228d018 --- /dev/null +++ b/sys-process/parallel/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>proxy-maintainers</herd> +<maintainer> + <email>ryoichiro.suzuki@gmail.com</email> + <name>Ryoichiro Suzuki</name> +</maintainer> +<maintainer> + <email>fauli@gentoo.org</email> + <name>Christian Faulhammer (proxy)</name> +</maintainer> +<longdescription lang="en"> +GNU parallel is a shell tool for executing jobs in parallel locally or +using remote machines. A job is typically a single command or a small +script that has to be run for each of the lines in the input. The +typical input is a list of files, a list of hosts, a list of users, a +list of URLs, or a list of tables. + +If you use xargs today you will find GNU parallel very easy to use as +GNU parallel is written to have the same options as xargs. If you +write loops in shell, you will find GNU parallel may be able to +replace most of the loops and make them run faster by running several +jobs in parallel. If you use ppss or pexec you will find GNU parallel +will often make the command easier to read. +</longdescription> +</pkgmetadata> diff --git a/sys-process/parallel/parallel-20150522.ebuild b/sys-process/parallel/parallel-20150522.ebuild new file mode 100644 index 000000000000..ce1f22576b77 --- /dev/null +++ b/sys-process/parallel/parallel-20150522.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A shell tool for executing jobs in parallel locally or on remote machines" +HOMEPAGE="http://www.gnu.org/software/parallel/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND="dev-lang/perl + dev-perl/Devel-Size + virtual/perl-Data-Dumper + virtual/perl-File-Temp + virtual/perl-IO" +# moreutils for `parallel` and grass for 'sql.1' manpage +DEPEND="${RDEPEND} + !<sys-apps/moreutils-0.45-r1 + !<sci-geosciences/grass-6.4.1-r1" + +DOCS="NEWS README" + +src_configure() { + econf --docdir="${EPREFIX}"/usr/share/doc/${PF}/html +} + +src_install() { + default + + # See src/Makefile.am for this one: + rm -f "${ED}"usr/bin/sem + dosym ${PN} /usr/bin/sem +} + +pkg_postinst() { + elog "To distribute jobs to remote machines you'll need these dependencies" + elog " net-misc/openssh" + elog " net-misc/rsync" +} diff --git a/sys-process/parallel/parallel-20150622.ebuild b/sys-process/parallel/parallel-20150622.ebuild new file mode 100644 index 000000000000..c147d204c042 --- /dev/null +++ b/sys-process/parallel/parallel-20150622.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A shell tool for executing jobs in parallel locally or on remote machines" +HOMEPAGE="http://www.gnu.org/software/parallel/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND="dev-lang/perl + dev-perl/Devel-Size + virtual/perl-Data-Dumper + virtual/perl-File-Temp + virtual/perl-IO" +# moreutils for `parallel` and grass for 'sql.1' manpage +DEPEND="${RDEPEND} + !<sys-apps/moreutils-0.45-r1 + !<sci-geosciences/grass-6.4.1-r1" + +DOCS="NEWS README" + +src_configure() { + econf --docdir="${EPREFIX}"/usr/share/doc/${PF}/html +} + +src_install() { + default + + # See src/Makefile.am for this one: + rm -f "${ED}"usr/bin/sem + dosym ${PN} /usr/bin/sem +} + +pkg_postinst() { + elog "To distribute jobs to remote machines you'll need these dependencies" + elog " net-misc/openssh" + elog " net-misc/rsync" +} diff --git a/sys-process/pidof-bsd/Manifest b/sys-process/pidof-bsd/Manifest new file mode 100644 index 000000000000..472bce62f713 --- /dev/null +++ b/sys-process/pidof-bsd/Manifest @@ -0,0 +1 @@ +DIST pidof-bsd-20050501.tar.gz 1769 SHA256 c3ed8826178debe872f7717b8810d477d4611ab19af73bed97c5af1c552d20e6 diff --git a/sys-process/pidof-bsd/files/pidof-bsd-20050501-fbsd10.patch b/sys-process/pidof-bsd/files/pidof-bsd-20050501-fbsd10.patch new file mode 100644 index 000000000000..5c7382e1344f --- /dev/null +++ b/sys-process/pidof-bsd/files/pidof-bsd-20050501-fbsd10.patch @@ -0,0 +1,18 @@ +share/mk/bsd.compat.mk has been removed from FreeBSD 10.0. +An old style NOMAN is not supported anymore. + +https://bugs.gentoo.org/show_bug.cgi?id=483044 + +diff --git a/Makefile b/Makefile +index d2d760b..446bd6f 100644 +--- a/Makefile ++++ b/Makefile +@@ -2,7 +2,7 @@ + + PROG= pidof + SRCS= pidof.c +-NOMAN= yes ++NO_MAN= yes + LDADD= -lkvm + LINKS= ${BINDIR}/pidof + diff --git a/sys-process/pidof-bsd/files/pidof-bsd-20050501-firstarg.patch b/sys-process/pidof-bsd/files/pidof-bsd-20050501-firstarg.patch new file mode 100644 index 000000000000..dfb15ae7b94b --- /dev/null +++ b/sys-process/pidof-bsd/files/pidof-bsd-20050501-firstarg.patch @@ -0,0 +1,13 @@ +Index: pidof/pidof.c +=================================================================== +--- pidof.orig/pidof.c ++++ pidof/pidof.c +@@ -67,7 +67,7 @@ get_pid_of_process(const char *process_n + char **p_argv = NULL; + + if ((p_argv = kvm_getargv(kd, p+i, 0)) != NULL) +- for (; *p_argv != NULL; p_argv++) ++ if ( *p_argv != NULL ) + if (strcmp(process_name, basename(*p_argv)) == 0) { + (void)printf("%d ", (int)p[i].ki_pid); + processes_found++; diff --git a/sys-process/pidof-bsd/files/pidof-bsd-20050501-gfbsd.patch b/sys-process/pidof-bsd/files/pidof-bsd-20050501-gfbsd.patch new file mode 100644 index 000000000000..bb7a776b630d --- /dev/null +++ b/sys-process/pidof-bsd/files/pidof-bsd-20050501-gfbsd.patch @@ -0,0 +1,128 @@ +? .pidof.c.swp +? pidof +? pidof.core +Index: pidof.c +=================================================================== +RCS file: /cvsroot/bmp-plugins/pidof/pidof.c,v +retrieving revision 1.4 +diff -u -r1.4 pidof.c +--- pidof.c 1 May 2005 16:26:19 -0000 1.4 ++++ pidof.c 13 Sep 2005 16:11:08 -0000 +@@ -26,6 +26,7 @@ + * $Id$ + */ + ++#include <unistd.h> + #include <stdio.h> + #include <string.h> + #include <err.h> +@@ -37,56 +38,91 @@ + #include <fcntl.h> + #include <stdlib.h> + #include <sysexits.h> ++#include <libgen.h> + +-static int get_pid_of_process(char *process_name); ++static int get_pid_of_process(const char *process_name); + static void usage(void); + ++static int match_argv; ++static pid_t own_pid; ++ + static int +-get_pid_of_process(char *process_name) ++get_pid_of_process(const char *process_name) + { + static kvm_t *kd = NULL; + struct kinfo_proc *p; +- int i, n_processes, processes_found; +- +- processes_found = 0; ++ int i, n_processes, ++ processes_found = 0; + + if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open")) == NULL) + (void)errx(1, "%s", kvm_geterr(kd)); + else { + p = kvm_getprocs(kd, KERN_PROC_PROC, 0, &n_processes); +- for (i = 0; i<n_processes; i++) +- if (strncmp(process_name, p[i].ki_comm, COMMLEN+1) == 0) { +- (void)printf("%d ", (int)p[i].ki_pid); +- processes_found++; +- } ++ for (i = 0; i<n_processes; i++) { ++ if (p[i].ki_pid != own_pid) ++ if (strncmp(process_name, p[i].ki_comm, COMMLEN+1) == 0) { ++ (void)printf("%d ", (int)p[i].ki_pid); ++ processes_found++; ++ } else if (match_argv == 1) { ++ char **p_argv = NULL; ++ ++ if ((p_argv = kvm_getargv(kd, p+i, 0)) != NULL) ++ for (; *p_argv != NULL; p_argv++) ++ if (strcmp(process_name, basename(*p_argv)) == 0) { ++ (void)printf("%d ", (int)p[i].ki_pid); ++ processes_found++; ++ break; ++ } ++ } ++ } + + kvm_close(kd); + } +- +- return processes_found; ++ ++ return (processes_found); + } + + static void + usage() + { + +- (void)fprintf(stderr, "usage: pidof name1 name2 ...\n"); ++ (void)fprintf(stderr, "usage: pidof [-x] name1 name2 ...\n"); + exit(EX_USAGE); + } + + int + main(int argc, char **argv) + { +- int i, procs_found; ++ int i, procs_found, ++ ch; + + procs_found = 0; ++ match_argv = 0; + +- if (argc <= 1) +- usage(); ++ own_pid = getpid(); ++ ++ while ((ch = getopt(argc, argv, "x")) != -1) { ++ switch (ch) { ++ case 'x': ++ match_argv = 1; ++ break; ++ case '?': ++ default: ++ usage(); ++ break; ++ } ++ } ++ argc -= optind; ++ argv += optind; + +- for (i = 1; i<argc; procs_found += get_pid_of_process(argv[i++])); ++ if (argc < 1) ++ usage(); ++ ++ for (i = 0; i<argc; i++) { ++ procs_found += get_pid_of_process(argv[i]); ++ } + + (void)printf("\n"); + +- return (procs_found > 0) ? 0 : 1; ++ return ((procs_found > 0) ? 0 : 1); + } diff --git a/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch b/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch new file mode 100644 index 000000000000..13e890c6a37c --- /dev/null +++ b/sys-process/pidof-bsd/files/pidof-bsd-20050501-pname.patch @@ -0,0 +1,46 @@ +--- a/pidof.c 2006-09-21 15:14:03 +0100 ++++ b/pidof.c 2006-09-21 15:13:47 +0100 +@@ -53,14 +53,22 @@ + struct kinfo_proc *p; + int i, n_processes, + processes_found = 0; ++ char *pname = NULL; ++ ++ if (process_name == NULL) ++ return 0; ++ ++ if ((pname = strdup(basename(process_name))) == NULL) ++ return 0; + +- if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, "kvm_open")) == NULL) +- (void)errx(1, "%s", kvm_geterr(kd)); +- else { ++ if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null", O_RDONLY, NULL)) == NULL) { ++ free(pname); ++ (void)errx(1, "%s", kvm_geterr(kd)); ++ } else { + p = kvm_getprocs(kd, KERN_PROC_PROC, 0, &n_processes); + for (i = 0; i<n_processes; i++) { + if (p[i].ki_pid != own_pid) +- if (strncmp(process_name, p[i].ki_comm, COMMLEN+1) == 0) { ++ if (strncmp(pname, p[i].ki_comm, COMMLEN+1) == 0) { + (void)printf("%d ", (int)p[i].ki_pid); + processes_found++; + } else if (match_argv == 1) { +@@ -68,7 +76,7 @@ + + if ((p_argv = kvm_getargv(kd, p+i, 0)) != NULL) + if ( *p_argv != NULL ) +- if (strcmp(process_name, basename(*p_argv)) == 0) { ++ if (strcmp(pname, basename(*p_argv)) == 0) { + (void)printf("%d ", (int)p[i].ki_pid); + processes_found++; + break; +@@ -77,6 +85,7 @@ + } + + kvm_close(kd); ++ free(pname); + } + + return (processes_found); diff --git a/sys-process/pidof-bsd/metadata.xml b/sys-process/pidof-bsd/metadata.xml new file mode 100644 index 000000000000..ecedda4aa2cc --- /dev/null +++ b/sys-process/pidof-bsd/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>bsd</herd> +</pkgmetadata> diff --git a/sys-process/pidof-bsd/pidof-bsd-20050501-r4.ebuild b/sys-process/pidof-bsd/pidof-bsd-20050501-r4.ebuild new file mode 100644 index 000000000000..65fd527c014e --- /dev/null +++ b/sys-process/pidof-bsd/pidof-bsd-20050501-r4.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit base bsdmk + +DESCRIPTION="pidof(1) utility for *BSD" +HOMEPAGE="http://people.freebsd.org/~novel/pidof.html" +SRC_URI="mirror://gentoo/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="" + +DEPEND="sys-freebsd/freebsd-mk-defs" +RDEPEND="!sys-process/psmisc" + +S="${WORKDIR}/pidof" + +PATCHES=( "${FILESDIR}/${P}-gfbsd.patch" + "${FILESDIR}/${P}-firstarg.patch" + "${FILESDIR}/${P}-pname.patch" + "${FILESDIR}/${P}-fbsd10.patch" ) + +src_install() { + into / + dobin pidof +} diff --git a/sys-process/pkill-darwin/Manifest b/sys-process/pkill-darwin/Manifest new file mode 100644 index 000000000000..09a21212b57a --- /dev/null +++ b/sys-process/pkill-darwin/Manifest @@ -0,0 +1 @@ +DIST pkill-darwin-1.0.tar.xz 8232 RMD160 58ba7aee0730da2c3af521471f6d6ff103f464a6 SHA1 ba7a407f4315d556d767ed8329cc0de2252e9742 SHA256 a1adc263e6685d210397b8fc186b6856730b8a075aef987cee593e8cf7241e4f diff --git a/sys-process/pkill-darwin/metadata.xml b/sys-process/pkill-darwin/metadata.xml new file mode 100644 index 000000000000..f737f232e3bf --- /dev/null +++ b/sys-process/pkill-darwin/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>prefix</herd> +</pkgmetadata> diff --git a/sys-process/pkill-darwin/pkill-darwin-1.0.ebuild b/sys-process/pkill-darwin/pkill-darwin-1.0.ebuild new file mode 100644 index 000000000000..bc0f538d18f0 --- /dev/null +++ b/sys-process/pkill-darwin/pkill-darwin-1.0.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit toolchain-funcs + +DESCRIPTION="pgrep(1) and pkill(1) for Darwin" +HOMEPAGE="http://prefix.gentooexperimental.org:8000/pkill-darwin/" +SRC_URI="http://www.gentoo.org/~grobian/distfiles/${P}.tar.xz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~ppc-macos ~x86-macos ~x64-macos" +IUSE="" + +src_compile() { + echo $(tc-getCC) ${CFLAGS} -o pkill ${LDFLAGS} pkill.c + $(tc-getCC) ${CFLAGS} -o pkill ${LDFLAGS} pkill.c || die + # don't link, such that the suid trick described below won't make people + # suid their pkill too + cp pkill pgrep || die + ln -s pkill.1 pgrep.1 || die +} + +src_install() { + into /usr + dobin pkill pgrep + doman pkill.1 pgrep.1 +} + +pkg_postinst() { + einfo "If you you want pgrep to be able to show and match on the arguments" + einfo "of all processes, you will have to make pgrep suid root. To do so" + einfo "you have to perform the following steps:" + einfo " % sudo chown root ${EPREFIX}/usr/bin/pgrep" + einfo " % sudo chmod u+s ${EPREFIX}/usr/bin/prgep" +} diff --git a/sys-process/prll/Manifest b/sys-process/prll/Manifest new file mode 100644 index 000000000000..70b7a60a925b --- /dev/null +++ b/sys-process/prll/Manifest @@ -0,0 +1 @@ +DIST prll-0.6.2.tar.bz2 37870 SHA256 49fbbcd8b8ae72afb8c1c7343f84852d2f397061ce29ec95dd462940ed355d0b diff --git a/sys-process/prll/files/0.5-prefix.patch b/sys-process/prll/files/0.5-prefix.patch new file mode 100644 index 000000000000..dcf2314fb5d0 --- /dev/null +++ b/sys-process/prll/files/0.5-prefix.patch @@ -0,0 +1,30 @@ +diff --git a/prll.sh b/prll.sh +index 45a4fa4..f3ec39f 100644 +--- a/prll.sh ++++ b/prll.sh +@@ -41,7 +41,7 @@ function prll() { + EOF + [[ -z "$1" ]] && return 1 || return 0 + fi +- /usr/bin/which prll_qer > /dev/null ++ @GENTOO_PORTAGE_EPREFIX@/usr/bin/which prll_qer > /dev/null + if [[ $? -ne 0 ]] ; then + echo "PRLL: Missing prll_qer." 1>&2 + return 1 +@@ -51,14 +51,14 @@ function prll() { + local prll_unbuffer=yes + shift + else +- /usr/bin/which prll_bfr > /dev/null ++ @GENTOO_PORTAGE_EPREFIX@/usr/bin/which prll_bfr > /dev/null + if [[ $? -ne 0 ]] ; then + echo "PRLL: Missing prll_bfr." 1>&2 + return 1 + fi + fi + if [[ -z $PRLL_NR_CPUS ]] ; then +- /usr/bin/which grep > /dev/null ++ @GENTOO_PORTAGE_EPREFIX@/usr/bin/which grep > /dev/null + if [[ $? -ne 0 || ! -a /proc/cpuinfo ]] ; then + echo "PRLL: Environment variable PRLL_NR_CPUS is not set" 1>&2 + echo "PRLL: and either the grep utility is missing or" 1>&2 diff --git a/sys-process/prll/metadata.xml b/sys-process/prll/metadata.xml new file mode 100644 index 000000000000..c383eefa7061 --- /dev/null +++ b/sys-process/prll/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>shell-tools</herd> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">prll</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/prll/prll-0.6.2.ebuild b/sys-process/prll/prll-0.6.2.ebuild new file mode 100644 index 000000000000..02b60b3ab832 --- /dev/null +++ b/sys-process/prll/prll-0.6.2.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils prefix toolchain-funcs + +DESCRIPTION="A utility for parallelizing execution of shell functions" +HOMEPAGE="http://prll.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" +IUSE="" + +src_prepare() { + sed \ + -e '/then sh/d' \ + -e '/then zsh/d' \ + -e '/then dash/d' \ + -i tests/Makefile || die + tc-export CC +} + +src_install() { + dobin ${PN}_{qer,bfr} + insinto /etc/profile.d/ + doins ${PN}.sh + dodoc AUTHORS README NEWS + doman ${PN}.1 +} diff --git a/sys-process/procenv/Manifest b/sys-process/procenv/Manifest new file mode 100644 index 000000000000..c2f1e7233fcc --- /dev/null +++ b/sys-process/procenv/Manifest @@ -0,0 +1,2 @@ +DIST procenv-0.35.tar.gz 251995 SHA256 4b5e9bdf0e7ee7ff63548f380258407bfee64618734db31f33adc332ce02be26 SHA512 c9dab048adba7c3cb659b91aaea5c090d2919a0f38ac53920c433e5888e29d7b0072ca5ba76c4c71cc5d45402dff47dbaee663ff3a3c045e4127032c7467fa49 WHIRLPOOL c186319546607c3fb22bcf97f6ee41099016c777c615a94165624c5934c303f1d2492aa6a54cd15e5e0323abc1c683fd0b16b2ab0825315d4e28abf8f2048b97 +DIST procenv-0.36.tar.gz 264248 SHA256 70550499d0602ffbb4bbbe91c1a6d468d44589ab29b74b5ccc42b9558f970fb4 SHA512 0a054541a2ec08aa147f2f6b222bc7c17ce9e5f7f96fae512bfd569572277566e3b3a55ab876668b2678d54b16272427ececfdba5fde2144f18ae992f892d9e9 WHIRLPOOL 100b20b0b9b17fdb5de0e8defe7bd987743bd8c6594a6ac55ef1a73cf10eed90e29bcb30227fe678a16e3fef11e6fac9d1d5a644ee56e9de11d263c9882c087f diff --git a/sys-process/procenv/metadata.xml b/sys-process/procenv/metadata.xml new file mode 100644 index 000000000000..c213cba2254f --- /dev/null +++ b/sys-process/procenv/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> + <upstream> + <remote-id type="launchpad">procenv</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/procenv/procenv-0.35.ebuild b/sys-process/procenv/procenv-0.35.ebuild new file mode 100644 index 000000000000..13c342a05c91 --- /dev/null +++ b/sys-process/procenv/procenv-0.35.ebuild @@ -0,0 +1,13 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A command-line utility that simply dumps all attributes of its environment" +HOMEPAGE="https://launchpad.net/procenv/" +SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" diff --git a/sys-process/procenv/procenv-0.36.ebuild b/sys-process/procenv/procenv-0.36.ebuild new file mode 100644 index 000000000000..13c342a05c91 --- /dev/null +++ b/sys-process/procenv/procenv-0.36.ebuild @@ -0,0 +1,13 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A command-line utility that simply dumps all attributes of its environment" +HOMEPAGE="https://launchpad.net/procenv/" +SRC_URI="https://launchpad.net/${PN}/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" diff --git a/sys-process/procexp/Manifest b/sys-process/procexp/Manifest new file mode 100644 index 000000000000..3d8bec371e1f --- /dev/null +++ b/sys-process/procexp/Manifest @@ -0,0 +1 @@ +DIST process_explorer-1.5-277.noarch.rpm 146630 SHA256 b58dd139c16295d1d89937ddd684b7298f9d5b175b6dc5ce580ec073f7cf3792 SHA512 bdf03a0cbce621791ed272d61ee230a672caa8cd2d16e52b4fc256fe7955dc93636108dffdae30375e0b497d9378a8c3fdf6fc8bbd66cf04254596507d17dbef WHIRLPOOL f7098d8744666a49abb148e683b18c990385f8dba6f9aeb94832fb3531227d635b5f8f85316237a12ddc0e2182550993275d6c882a5e70d19119c63f6b83ed42 diff --git a/sys-process/procexp/metadata.xml b/sys-process/procexp/metadata.xml new file mode 100644 index 000000000000..c900ff1e9017 --- /dev/null +++ b/sys-process/procexp/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <maintainer> + <email>pinkbyte@gentoo.org</email> + <name>Sergey Popov</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">procexp</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/procexp/procexp-1.5.277.ebuild b/sys-process/procexp/procexp-1.5.277.ebuild new file mode 100644 index 000000000000..c32615bf2b23 --- /dev/null +++ b/sys-process/procexp/procexp-1.5.277.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python2_7 ) +inherit eutils gnome2-utils multilib python-single-r1 rpm versionator + +MY_P="process_explorer-$(replace_version_separator 2 '-')" + +DESCRIPTION="Graphical process explorer" +HOMEPAGE="http://sourceforge.net/apps/mediawiki/procexp/index.php?title=Main_Page" +SRC_URI="mirror://sourceforge/project/procexp/${MY_P}.noarch.rpm" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="${PYTHON_DEPS}" +RDEPEND="${DEPEND} + dev-python/PyQt4[X,${PYTHON_USEDEP}] + dev-python/configobj[${PYTHON_USEDEP}] + dev-python/pyqwt[${PYTHON_USEDEP}] + sys-auth/polkit" + +S="${WORKDIR}/opt/${MY_P}/${PN}" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# No build system provided by upstream +# https://sourceforge.net/tracker/?func=detail&aid=3573774&group_id=309156&atid=1301952 + +src_prepare() { + # Removing unnecessary svn cruft + esvn_clean + + rm make_rpm.py process_explorer.spec ${PN}.desktop ${PN}.sh || die 'remove unneeded files failed' + + epatch_user + + python_fix_shebang . +} + +src_install() { + newicon -s 48 icon.png ${PN}.png + rm icon.png || die + + insinto "/usr/share/polkit-1/actions" + doins com.procexp.pkexec.policy + rm com.procexp.pkexec.policy || die + + insinto "/usr/$(get_libdir)/${PN}" + doins -r * + fperms +x "/usr/$(get_libdir)/${PN}/procexp.py" + fperms +x "/usr/$(get_libdir)/${PN}/rootproxy/procroot.py" + + dosym "/usr/$(get_libdir)/${PN}/procexp.py" /usr/bin/procexp + make_desktop_entry ${PN} "Linux Process Explorer" ${PN} "System;Utility;" +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} diff --git a/sys-process/procps/Manifest b/sys-process/procps/Manifest new file mode 100644 index 000000000000..47f32570b1f4 --- /dev/null +++ b/sys-process/procps/Manifest @@ -0,0 +1,5 @@ +DIST procps-3.3.8-respect_epipe_in_fileutils.patch 1412 SHA256 4a56c88697fa6099a62a4169838c9c04df2c2c2bbc08e9ad9953e5b00df16d68 SHA512 317fc8e7c3fbd280182f55b399a30b2cfbc72268590825ea323537361cd761776afe1486509cb04ae937287ccf11578def5aac2eaa0fe660d04f0357282d9c14 WHIRLPOOL f8fdac8a172037edf51e1e777374293848afaa2180adc35adce5bf8ebefceb37df30082b27f6d6f1f5a571ba0f84bdfff9fc6c2343f120ce5c80b2f52e1804ac +DIST procps-3.3.8-top_user_filter.patch 2355 SHA256 089d7d0a0a497d88d34f3d05da245198b97353d11768453f5c57b7a346d72d0d SHA512 dc9af2ef6a9f1e5b8434069226c4739cdb914f4b84c366596e8a4fb853e4d61715814a0888938cd4c96f2f5bd9adaa573e4fb37be659424e615298e65980bca2 WHIRLPOOL 7e7a52917567013f425dc631dbdcafd3c4978893caf9c3e0e2979c7825332d1296e8026c43c1ac4915787226b53949d6264860b549cd0ac79bb0e8c63f264231 +DIST procps-ng-3.3.10.tar.xz 657232 SHA256 1759229cd0d97da3d200d5599c4ea82726d61fae9c4b7d3edd52c544962791b7 SHA512 cbfa49e79a88a8e7066a9c316ef089f15fa825c5bfbc22ab8a83f53c6f367a7c586cef9c403e360d373d824c471533a15ddb11cd30c561650e6879fe687e7e4f WHIRLPOOL 723dd1c00578a7fa7e3ff47bed60283c30850cc8ae8069c704ba648792809a67c5944dbfd9b7b0159e0be83215b61e6b71b2d76e65b3619aed54223900ffed9b +DIST procps-ng-3.3.8.tar.xz 553056 SHA256 a4109cfb6fe3bcfb5a0efb37efe04d0c8ce858bff3820d48cc258bad41bed46b SHA512 63ba13f9ef0f4558748c6b2d1b0719a1173bd87e38279e3b052a10e207e1b808626d031f16dd65b05c55708366df7350cb0a64da8dc20e7f9f1fdc1cd2417c71 WHIRLPOOL 671860af1f028c9c8c7bb0c035db86e3e13d9d754801e7a3f19105710bb9720bbfa627e4e748b823192286319fe4e7e736c1af5a3fb34116cbe93386b0d2bed6 +DIST procps-ng-3.3.9.tar.xz 560812 SHA256 00f0cb0fadf968ddf605b0ef119846af07386629244d4f3da711a2cecf4e8663 SHA512 62c7270aa48b4346a3198f306d1cb8474f64650bfb67e8cc6c4d41923e50c31c95b3a0367a464823fb50a6137ec0c6352006292ac85b50caf730ec8ec35eb553 WHIRLPOOL dac97433a87badd40b46e3155bf0e30652ed2961a41bc8fca074357431301d250632215512ad752634c9c4f3273a1c75caba1ecf4f5a3c510bee155660dde166 diff --git a/sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch b/sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch new file mode 100644 index 000000000000..697674861bff --- /dev/null +++ b/sys-process/procps/files/procps-3.3.10-pmap-unreadable.patch @@ -0,0 +1,60 @@ +https://bugs.gentoo.org/404389 + +From 92071e963e6ff50f0e221dde286f3229267b2ff9 Mon Sep 17 00:00:00 2001 +From: Craig Small <csmall@enc.com.au> +Date: Sat, 24 Jan 2015 18:53:29 +1100 +Subject: [PATCH] pmap: print process even if smaps unreadable + +pmap would previously print the process name if +/proc/PID/smaps could be opened, even if subsequent +reads failed. This actually occurs with other users +PIDs. + +Kernel 3.18rc1 introduced a change where the file could +not been opened, meaning pmap -X 1 previously showed +the process name and nothing else but NOW shows nothing +make check failed because of this. + +This change prints the process name even before trying to open +the file, returning it to previous behaviour. +Thanks to Vincent Bernat for some analysis. + +References: + https://bugs.debian.org/775624 + https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=29a40ace841cba9b661711f042d1821cdc4ad47c + +Signed-off-by: Craig Small <csmall@enc.com.au> +--- + NEWS | 1 + + pmap.c | 8 ++++---- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/pmap.c b/pmap.c +index c83617c..17e0e30 100644 +--- a/pmap.c ++++ b/pmap.c +@@ -533,6 +533,10 @@ static int one_proc(proc_t * p) + */ + int maxcmd = 0xfffff; + ++ escape_command(cmdbuf, p, sizeof cmdbuf, &maxcmd, ++ ESC_ARGS | ESC_BRACKETS); ++ printf("%u: %s\n", p->tgid, cmdbuf); ++ + if (x_option || X_option || c_option) { + sprintf(buf, "/proc/%u/smaps", p->tgid); + if ((fp = fopen(buf, "r")) == NULL) +@@ -543,10 +547,6 @@ static int one_proc(proc_t * p) + return 1; + } + +- escape_command(cmdbuf, p, sizeof cmdbuf, &maxcmd, +- ESC_ARGS | ESC_BRACKETS); +- printf("%u: %s\n", p->tgid, cmdbuf); +- + if (X_option || c_option) { + print_extended_maps(fp); + return 0; +-- +2.4.0 + diff --git a/sys-process/procps/files/procps-3.3.10-tests-no-tty.patch b/sys-process/procps/files/procps-3.3.10-tests-no-tty.patch new file mode 100644 index 000000000000..7a774e5f2ef1 --- /dev/null +++ b/sys-process/procps/files/procps-3.3.10-tests-no-tty.patch @@ -0,0 +1,122 @@ +https://bugs.gentoo.org/461302 + +From 4050148a4533e8a79cef0d7dcd0c058d78c48a31 Mon Sep 17 00:00:00 2001 +From: Craig Small <csmall@enc.com.au> +Date: Sat, 9 May 2015 17:48:12 +1000 +Subject: [PATCH] Fix some sched and tty tests + +The ps sched test has been disabled. There are too many +odd build farms this fails in strange ways. + +Other odd build farms have no tty and so some tests check +for no tty and skip if not found. +--- + testsuite/config/unix.exp | 9 +++++++++ + testsuite/pgrep.test/pgrep.exp | 11 +++++++---- + testsuite/pkill.test/pkill.exp | 3 +-- + testsuite/ps.test/ps_output.exp | 2 -- + testsuite/ps.test/ps_sched_batch.exp | 16 +++++++++------- + 5 files changed, 26 insertions(+), 15 deletions(-) + +diff --git a/testsuite/config/unix.exp b/testsuite/config/unix.exp +index 522efb1..1318e9a 100644 +--- a/testsuite/config/unix.exp ++++ b/testsuite/config/unix.exp +@@ -146,3 +146,12 @@ proc kill_testproc { } { + kill_process $testproc2_pid + file delete $testproc_path + } ++ ++proc get_tty {} { ++ if { [catch { set raw_tty [ exec tty ] } msg]} { ++ warning "No TTY found" ++ return "" ++ } ++ regexp "/dev/(.+)" $raw_tty > tty ++ return $tty ++} +diff --git a/testsuite/pgrep.test/pgrep.exp b/testsuite/pgrep.test/pgrep.exp +index 152b6ec..1c6cec6 100644 +--- a/testsuite/pgrep.test/pgrep.exp ++++ b/testsuite/pgrep.test/pgrep.exp +@@ -9,8 +9,7 @@ set not_uid [ expr { $uid + 1 } ] + set gid [ exec id -g ] + set not_gid [ expr { $gid + 1 } ] + set ps "${topdir}ps/pscommand" +-set raw_tty [ exec tty ] +-regexp "/dev/(.+)" $raw_tty > tty ++set tty [ get_tty ] + + set test "pgprep with no arguments" + spawn $pgrep +@@ -80,8 +79,12 @@ spawn $pgrep -s 1 $testproc_comm + expect_blank "$test" + + set test "pgrep matches on tty" +-spawn $pgrep -t $tty $testproc_comm +-expect_pass "$test" "^$testproc1_pid\\s+$testproc2_pid\\s*$" ++if { $tty == "" } { ++ untested "$test" ++} else { ++ spawn $pgrep -t $tty $testproc_comm ++ expect_pass "$test" "^$testproc1_pid\\s+$testproc2_pid\\s*$" ++} + + set test "pgrep doesn't match with bogus tty" + spawn $pgrep -t glass $testproc_comm +diff --git a/testsuite/pkill.test/pkill.exp b/testsuite/pkill.test/pkill.exp +index 5eece7d..c583cbe 100644 +--- a/testsuite/pkill.test/pkill.exp ++++ b/testsuite/pkill.test/pkill.exp +@@ -9,8 +9,7 @@ set not_uid [ expr { $uid + 1 } ] + set gid [ exec id -g ] + set not_gid [ expr { $gid + 1 } ] + set ps "${topdir}ps/pscommand" +-set raw_tty [ exec tty ] +-regexp "/dev/(.+)" $raw_tty > tty ++set tty [ get_tty ] + + set test "pkill with no arguments" + spawn $pkill +diff --git a/testsuite/ps.test/ps_output.exp b/testsuite/ps.test/ps_output.exp +index 3a6f3d8..1b2c097 100644 +--- a/testsuite/ps.test/ps_output.exp ++++ b/testsuite/ps.test/ps_output.exp +@@ -9,8 +9,6 @@ set uid [ exec id -u ] + set not_uid [ expr { $uid + 1 } ] + set gid [ exec id -g ] + set not_gid [ expr { $gid + 1 } ] +-set raw_tty [ exec tty ] +-regexp "/dev/(.+)" $raw_tty > tty + + # All the fields + # Cannot do args,cmd,comm +diff --git a/testsuite/ps.test/ps_sched_batch.exp b/testsuite/ps.test/ps_sched_batch.exp +index e0c31ff..c58b9a2 100644 +--- a/testsuite/ps.test/ps_sched_batch.exp ++++ b/testsuite/ps.test/ps_sched_batch.exp +@@ -1,12 +1,14 @@ + # + # check the ps SCHED_BATCH scheduler policy output + # +-set ps "${topdir}ps/pscommand" +-set schedbatch "${topdir}testsuite/test-schedbatch" +- +-spawn $schedbatch 18 +- ++# This is too flaky on certain build systems to be ++# reliable - CS ++#set ps "${topdir}ps/pscommand" ++#set schedbatch "${topdir}testsuite/test-schedbatch" ++# ++#spawn $schedbatch 18 ++# + set test "ps SCHED_BATCH scheduler" +-spawn $ps --no-header -o comm,cls,nice -a +-expect_pass "$test" "\\s+test-schedbatch\\s+B\\s+18" ++#spawn $ps --no-header -o comm,cls,nice -a ++#expect_pass "$test" "\\s+test-schedbatch\\s+B\\s+18" + untested "$test" +-- +2.4.0 + diff --git a/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch new file mode 100644 index 000000000000..00397480ca3b --- /dev/null +++ b/sys-process/procps/files/procps-3.3.8-kill-neg-pid.patch @@ -0,0 +1,46 @@ +From 396cbc4cf36166217d877e2ff7e0a290758b0bc2 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Thu, 27 Jun 2013 18:37:17 -0400 +Subject: [PATCH] kill: fix -PID handling + +Commit 19b6f48990b02aeca211b480625b95b2033c1017 tried to fix -PID +handling, but the new logic ends up skipping over the arg. This is +because getopt increments optind after it processed the -PID (even +though it was an unknown option). We need to decrement it by one +so the loop at the end of the code will process it for us. + +I also fixed some whitespace errors in that same commit. + +URL: http://code.google.com/p/chromium/issues/detail?id=255209 +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + skill.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/skill.c b/skill.c +index fb57305..074c5d7 100644 +--- a/skill.c ++++ b/skill.c +@@ -390,7 +390,7 @@ static void __attribute__ ((__noreturn__)) + else + sigopt++; + +- opterr=0; /* suppress errors on -123 */ ++ opterr = 0; /* suppress errors on -123 */ + while (loop == 1 && (i = getopt_long(argc, argv, "l::Ls:hV", longopts, NULL)) != -1) + switch (i) { + case 'l': +@@ -423,7 +423,9 @@ static void __attribute__ ((__noreturn__)) + xwarnx(_("invalid argument %c"), optopt); + kill_usage(stderr); + } +- loop=0; ++ /* We need to back off by one since getopt() ate the -PID */ ++ --optind; ++ loop = 0; + break; + default: + kill_usage(stderr); +-- +1.8.2.1 + diff --git a/sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch b/sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch new file mode 100644 index 000000000000..c6b0a4a36251 --- /dev/null +++ b/sys-process/procps/files/procps-3.3.9-sysctl-load-config-files.patch @@ -0,0 +1,14 @@ +http://bugs.gentoo.org/520314 +http://gitorious.org/procps/procps/commit/7f6efed9bb85d1e212e06985ea3e06720f6ca949 + +--- sysctl.c ++++ sysctl.c +@@ -640,7 +640,7 @@ + } + + +- if (stat(DEFAULT_PRELOAD, &ts) < 0 && S_ISREG(ts.st_mode)) { ++ if (stat(DEFAULT_PRELOAD, &ts) == 0 && S_ISREG(ts.st_mode)) { + if (!Quiet) + printf(_("* Applying %s ...\n"), DEFAULT_PRELOAD); + rc |= Preload(DEFAULT_PRELOAD); diff --git a/sys-process/procps/metadata.xml b/sys-process/procps/metadata.xml new file mode 100644 index 000000000000..f805f9b9f30a --- /dev/null +++ b/sys-process/procps/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> + <use> + <flag name='modern-top'>Enables new startup defaults of top. Keeps old + defaults if disabled</flag> + <flag name='ncurses'>Build programs that use ncurses: top, slabtop, + watch</flag> + </use> +</pkgmetadata> diff --git a/sys-process/procps/procps-3.3.10-r1.ebuild b/sys-process/procps/procps-3.3.10-r1.ebuild new file mode 100644 index 000000000000..88c02c26ab96 --- /dev/null +++ b/sys-process/procps/procps-3.3.10-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="standard informational utilities and process-handling tools" +# http://packages.debian.org/sid/procps +HOMEPAGE="http://procps.sourceforge.net/ https://gitlab.com/procps-ng/procps" +# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz" +#FEDORA_HASH="0980646fa25e0be58f7afb6b98f79d74" +#SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz" +SRC_URI="http://dev.gentoo.org/~polynomial-c/${PN}-ng-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="+ncurses modern-top nls selinux static-libs systemd test unicode" + +RDEPEND="!<sys-apps/sysvinit-2.88-r6 + ncurses? ( >=sys-libs/ncurses-5.7-r7[unicode?] ) + selinux? ( sys-libs/libselinux ) + systemd? ( >=sys-apps/systemd-209 )" +DEPEND="${RDEPEND} + ncurses? ( virtual/pkgconfig ) + systemd? ( virtual/pkgconfig ) + test? ( dev-util/dejagnu )" + +S=${WORKDIR}/${PN}-ng-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch # http://crbug.com/255209 + epatch "${FILESDIR}"/${P}-pmap-unreadable.patch #404389 + epatch "${FILESDIR}"/${P}-tests-no-tty.patch #461302 + sed -i -e 's:systemd-login:systemd:' configure || die #501306 +} + +src_configure() { + econf \ + --exec-prefix="${EPREFIX}" \ + --docdir='$(datarootdir)'/doc/${PF} \ + $(use_enable modern-top) \ + $(use_with ncurses) \ + $(use_enable nls) \ + $(use_enable selinux libselinux) \ + $(use_enable static-libs static) \ + $(use_with systemd) \ + $(use_enable unicode watch8bit) +} + +src_test() { + emake check </dev/null #461302 +} + +src_install() { + default + #dodoc sysctl.conf + + mv "${ED}"/usr/bin/pidof "${ED}"/bin/ || die + + # The configure script is completely whacked in the head + mv "${ED}"/lib* "${ED}"/usr/ || die + gen_usr_ldscript -a procps + prune_libtool_files +} diff --git a/sys-process/procps/procps-3.3.8-r2.ebuild b/sys-process/procps/procps-3.3.8-r2.ebuild new file mode 100644 index 000000000000..81f27df40987 --- /dev/null +++ b/sys-process/procps/procps-3.3.8-r2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="standard informational utilities and process-handling tools" +# http://packages.debian.org/sid/procps +HOMEPAGE="http://procps.sourceforge.net/ https://gitlab.com/procps-ng/procps" +# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz" +FEDORA_HASH="aecbeeda2ab308f8d09dddcb4cb9a572" +SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz + https://gitorious.org/procps/procps/commit/ce5e995921e770bfcda25e42fe090aeccdbf1291.patch -> ${PN}-3.3.8-respect_epipe_in_fileutils.patch + https://gitorious.org/procps/procps/commit/e6a78f2745ca6c7ceed4406d3ce5397e77518b11.patch -> ${PN}-3.3.8-top_user_filter.patch" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="+ncurses nls static-libs test unicode" + +RDEPEND="ncurses? ( >=sys-libs/ncurses-5.7-r7[unicode?] )" +DEPEND="${RDEPEND} + ncurses? ( virtual/pkgconfig ) + test? ( dev-util/dejagnu )" + +S=${WORKDIR}/${PN}-ng-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${P}-kill-neg-pid.patch \ + "${DISTDIR}"/${P}-respect_epipe_in_fileutils.patch \ + "${DISTDIR}"/${P}-top_user_filter.patch +} + +src_configure() { + econf \ + --exec-prefix="${EPREFIX}" \ + --docdir='$(datarootdir)'/doc/${PF} \ + $(use_with ncurses) \ + $(use_enable nls) \ + $(use_enable static-libs static) \ + $(use_enable unicode watch8bit) +} + +src_install() { + default +# dodoc sysctl.conf + + # The configure script is completely whacked in the head + mv "${ED}"/lib* "${ED}"/usr/ || die + gen_usr_ldscript -a procps + prune_libtool_files +} diff --git a/sys-process/procps/procps-3.3.9-r2.ebuild b/sys-process/procps/procps-3.3.9-r2.ebuild new file mode 100644 index 000000000000..4e8e0e6d4222 --- /dev/null +++ b/sys-process/procps/procps-3.3.9-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="standard informational utilities and process-handling tools" +# http://packages.debian.org/sid/procps +HOMEPAGE="http://procps.sourceforge.net/ https://gitlab.com/procps-ng/procps" +# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz" +FEDORA_HASH="0980646fa25e0be58f7afb6b98f79d74" +SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="+ncurses nls selinux static-libs systemd test unicode" + +RDEPEND="!<sys-apps/sysvinit-2.88-r6 + ncurses? ( >=sys-libs/ncurses-5.7-r7[unicode?] ) + selinux? ( sys-libs/libselinux ) + systemd? ( >=sys-apps/systemd-209 )" +DEPEND="${RDEPEND} + ncurses? ( virtual/pkgconfig ) + systemd? ( virtual/pkgconfig ) + test? ( dev-util/dejagnu )" + +S=${WORKDIR}/${PN}-ng-${PV} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch \ + "${FILESDIR}"/${P}-sysctl-load-config-files.patch + sed -i -e 's:systemd-login:systemd:' configure || die #501306 +} + +src_configure() { + econf \ + --exec-prefix="${EPREFIX}" \ + --docdir='$(datarootdir)'/doc/${PF} \ + $(use_with ncurses) \ + $(use_enable nls) \ + $(use_enable selinux libselinux) \ + $(use_enable static-libs static) \ + $(use_with systemd) \ + $(use_enable unicode watch8bit) +} + +src_install() { + default +# dodoc sysctl.conf + + mv "${ED}"/usr/bin/pidof "${ED}"/bin/ || die + + # The configure script is completely whacked in the head + mv "${ED}"/lib* "${ED}"/usr/ || die + gen_usr_ldscript -a procps + prune_libtool_files +} diff --git a/sys-process/procps/procps-3.3.9.ebuild b/sys-process/procps/procps-3.3.9.ebuild new file mode 100644 index 000000000000..aeecf82ae205 --- /dev/null +++ b/sys-process/procps/procps-3.3.9.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="standard informational utilities and process-handling tools" +# http://packages.debian.org/sid/procps +HOMEPAGE="http://procps.sourceforge.net/ https://gitlab.com/procps-ng/procps" +# SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV}.orig.tar.xz" +FEDORA_HASH="0980646fa25e0be58f7afb6b98f79d74" +SRC_URI="http://pkgs.fedoraproject.org/repo/pkgs/${PN}-ng/${PN}-ng-${PV}.tar.xz/${FEDORA_HASH}/${PN}-ng-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ~ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="+ncurses nls static-libs test unicode" + +RDEPEND="ncurses? ( >=sys-libs/ncurses-5.7-r7[unicode?] ) + !<sys-apps/sysvinit-2.88-r6" +DEPEND="${RDEPEND} + ncurses? ( virtual/pkgconfig ) + test? ( dev-util/dejagnu )" + +S=${WORKDIR}/${PN}-ng-${PV} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.3.8-kill-neg-pid.patch +} + +src_configure() { + econf \ + --exec-prefix="${EPREFIX}" \ + --docdir='$(datarootdir)'/doc/${PF} \ + $(use_with ncurses) \ + $(use_enable nls) \ + $(use_enable static-libs static) \ + $(use_enable unicode watch8bit) +} + +src_install() { + default +# dodoc sysctl.conf + + mv "${ED}"/usr/bin/pidof "${ED}"/bin/ || die + + # The configure script is completely whacked in the head + mv "${ED}"/lib* "${ED}"/usr/ || die + gen_usr_ldscript -a procps + prune_libtool_files +} diff --git a/sys-process/psinfo/Manifest b/sys-process/psinfo/Manifest new file mode 100644 index 000000000000..95a3a96126ce --- /dev/null +++ b/sys-process/psinfo/Manifest @@ -0,0 +1 @@ +DIST psinfo-0.12.tar.gz 9107 RMD160 24185c1dd77bc8ea81345182895718bc7852fc1d SHA1 991dabc002420bede6c0866109221ee6892ac2ec SHA256 2c1ad9a76eb91c92f79c859b9058f673fabc6cfc2b0a752db392fc5afd8a3aa1 diff --git a/sys-process/psinfo/files/psinfo-0.12-asneeded.patch b/sys-process/psinfo/files/psinfo-0.12-asneeded.patch new file mode 100644 index 000000000000..97cfd7f817fb --- /dev/null +++ b/sys-process/psinfo/files/psinfo-0.12-asneeded.patch @@ -0,0 +1,36 @@ + Makefile | 17 ++++++++++------- + 1 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/Makefile b/Makefile +index 2964607..fb4ece8 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,10 @@ +-CC=gcc +-CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wswitch -Wshadow -Wcast-align -Wno-unused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls ++CC ?=gcc ++CFLAGS ?=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wswitch -Wshadow -Wcast-align -Wno-unused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls + INSTALL=install +-LDFLAGS= ++LDFLAGS ?= + SOURCES=psinfo.c + EXECUTABLE=psinfo +-TARGETDIR=/usr/local/bin ++TARGETDIR=/usr/bin + + all: $(EXECUTABLE) + +@@ -12,7 +12,10 @@ clean: + rm -f $(EXECUTABLE) + + install: $(EXECUTABLE) +- $(INSTALL) -m 755 psinfo $(TARGETDIR) ++ $(INSTALL) -D -m 755 psinfo $(DESTDIR)/$(TARGETDIR)/$(EXECUTABLE) + +-$(EXECUTABLE): $(SOURCES) +- $(CC) $(CFLAGS) -o $@ $(SOURCES) $(LDFLAGS) ++$(EXECUTABLE): psinfo.o ++ $(CC) $(LDFLAGS) -o $@ psinfo.o ++ ++psinfo.o: psinfo.c ++ $(CC) $(CFLAGS) -c psinfo.c diff --git a/sys-process/psinfo/metadata.xml b/sys-process/psinfo/metadata.xml new file mode 100644 index 000000000000..dc06c49f3397 --- /dev/null +++ b/sys-process/psinfo/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>jlec@gentoo.org</email> +</maintainer> +</pkgmetadata> diff --git a/sys-process/psinfo/psinfo-0.12.ebuild b/sys-process/psinfo/psinfo-0.12.ebuild new file mode 100644 index 000000000000..7bccc722826b --- /dev/null +++ b/sys-process/psinfo/psinfo-0.12.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="Process information and statistics using the kernel /proc interface" +HOMEPAGE="http://www.ward.nu/computer/psinfo/" +SRC_URI="http://www.ward.nu/computer/${PN}/${P}.tar.gz" + +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +LICENSE="GPL-2" +IUSE="" + +src_prepare () { + epatch "${FILESDIR}"/${P}-asneeded.patch + tc-export CC +} + +#src_compile() { +# emake \ +# CFLAGS="${CFLAGS}" \ +# CC=$(tc-getCC) +#} + +#src_install() { +# dobin ${PN} +# dodoc README +#} diff --git a/sys-process/psmisc/Manifest b/sys-process/psmisc/Manifest new file mode 100644 index 000000000000..e2c163e4cc35 --- /dev/null +++ b/sys-process/psmisc/Manifest @@ -0,0 +1,3 @@ +DIST psmisc-22.16-r1.tar.gz 468223 SHA256 38ba34e9ddbfa755f9b7c54a4e1733e12d65121891dacda941f21d856ab41da8 SHA512 f6805f2fdd07f06a1f2ad70be065636a842dd73f4ec176b8173d7486d737561330a52392cf8712aa509fa303a174775a41a0fd73e89dad3a2958fa1d7e5b97f9 WHIRLPOOL 056dff216ac303e18af7fa1ed0a4fc97d91b701a7e69cce599079a13a478206107521d7fc2693eaca97c7c65c9417475c8c499b59a74f9d275a47afdd6a04254 +DIST psmisc-22.20.tar.gz 432501 SHA256 b17224e2385f6a799ffebba27eb7870771d42555e86814ef56b6d7e955765514 SHA512 5565163651c90afeb146c3305fddefc544bcd4cd5e98917fd57a9920e76c22e4bc0a197618539475a1410cfec9dd168b69983b2210a3ad9fc54368e9220503a6 WHIRLPOOL 97826e7d6d5def8a631a0726c3c1c8f67ab4f5f5b39e67d4a915f2741d8914b6c83d69293daacf25e92cef37990e1463ef7dc0843b47d5b0bfb1e3745fde669d +DIST psmisc-22.21.tar.gz 457702 SHA256 97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a SHA512 766aeb45687090b88b17176c5117a603e83fe92a13c013aea72c8ee80048adf02e18c7daa52ddfb8b2135f7c9a1bcae38896cdfb8d0158728d85a446c5e0d5ae WHIRLPOOL cbd4af3e54ce01f43558184b57a24e44dfb6e05d8438bd11e2308ee62535bb93dc417b08e66603966cc5912d7fa88c29df1529995a42e2a8b7c3da663b01681f diff --git a/sys-process/psmisc/files/psmisc-22.16-fuser-pic.patch b/sys-process/psmisc/files/psmisc-22.16-fuser-pic.patch new file mode 100644 index 000000000000..40a3c0c0d35f --- /dev/null +++ b/sys-process/psmisc/files/psmisc-22.16-fuser-pic.patch @@ -0,0 +1,17 @@ +http://bugs.gentoo.org/401851 +http://sourceforge.net/tracker/?func=detail&aid=3504801&group_id=15273&atid=115273 + +the x86 asm code is not PIC friendly, so disable it and fall back to the +gcc builtin for doing prefetching + +--- src/lists.h ++++ src/lists.h +@@ -68,7 +68,7 @@ + asm volatile ("lfetch [%0]" :: "r" (x)) + #elif defined(__powerpc64__) + asm volatile ("dcbt 0,%0" :: "r" (x)) +-#elif !defined(__CYGWIN__) && defined(__i386__) ++#elif !defined(__CYGWIN__) && !defined(__PIC__) && defined(__i386__) + asm volatile ("661:\n\t" + ".byte 0x8d,0x74,0x26,0x00\n" + "\n662:\n" diff --git a/sys-process/psmisc/files/psmisc-22.20-selinux.patch b/sys-process/psmisc/files/psmisc-22.20-selinux.patch new file mode 100644 index 000000000000..b4ac010ac8dc --- /dev/null +++ b/sys-process/psmisc/files/psmisc-22.20-selinux.patch @@ -0,0 +1,263 @@ +From 89fa40f0a55096a62809e852244d7db3f445b0cd Mon Sep 17 00:00:00 2001 +From: Craig Small <csmall@enc.com.au> +Date: Sun, 7 Oct 2012 10:52:46 +1100 +Subject: [PATCH] pstree compiles with SE Linux + +pstree failed to compile with SE Linux enabled because one of the +scontext was missed and without it enabled the bug doesn't appear. + +pstree is now re-worked so scontext is defined as a dummy meaning +most of the code except the reall SE Linux specific stuff is compilied +meaning this sort of thing shouldn't happen too much again. + +Bug-Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=437332 +Bug-Sourceforge: https://sourceforge.net/p/psmisc/bugs/54/ +--- + src/pstree.c | 69 ++++++------------------------------------------------------ + 1 file changed, 6 insertions(+), 63 deletions(-) + +diff --git a/src/pstree.c b/src/pstree.c +index db57244..b9a01cf 100644 +--- a/src/pstree.c ++++ b/src/pstree.c +@@ -47,6 +47,8 @@ + + #ifdef WITH_SELINUX + #include <selinux/selinux.h> ++#else ++typedef void* security_context_t; /* DUMMY to remove most ifdefs */ + #endif /*WITH_SELINUX */ + + extern const char *__progname; +@@ -81,9 +83,7 @@ typedef struct _proc { + pid_t pid; + pid_t pgid; + uid_t uid; +-#ifdef WITH_SELINUX + security_context_t scontext; +-#endif /*WITH_SELINUX */ + char flags; + struct _child *children; + struct _proc *parent; +@@ -131,16 +131,14 @@ static int *more = NULL; + + static int print_args = 0, compact = 1, user_change = 0, pids = 0, pgids = 0, + show_parents = 0, by_pid = 0, trunc = 1, wait_end = 0; +-#ifdef WITH_SELINUX + static int show_scontext = 0; +-#endif /*WITH_SELINUX */ + static int output_width = 132; + static int cur_x = 1; + static char last_char = 0; + static int dumped = 0; /* used by dump_by_user */ + static int charlen = 0; /* length of character */ + +-static void fix_orphans(void); ++static void fix_orphans(security_context_t scontext); + /* + * Allocates additional buffer space for width and more as needed. + * The first call will allocate the first buffer. +@@ -229,15 +227,12 @@ static int out_int(int x) + return digits; + } + +-#ifdef WITH_SELINUX + static void out_scontext(security_context_t scontext) + { + out_string("`"); + out_string(scontext); + out_string("'"); + } +-#endif /*WITH_SELINUX */ +- + + static void out_newline(void) + { +@@ -259,12 +254,8 @@ static PROC *find_proc(pid_t pid) + return NULL; + } + +-#ifdef WITH_SELINUX + static PROC *new_proc(const char *comm, pid_t pid, uid_t uid, + security_context_t scontext) +-#else /*WITH_SELINUX */ +-static PROC *new_proc(const char *comm, pid_t pid, uid_t uid) +-#endif /*WITH_SELINUX */ + { + PROC *new; + +@@ -279,9 +270,7 @@ static PROC *new_proc(const char *comm, pid_t pid, uid_t uid) + new->flags = 0; + new->argc = 0; + new->argv = NULL; +-#ifdef WITH_SELINUX + new->scontext = scontext; +-#endif /*WITH_SELINUX */ + new->children = NULL; + new->parent = NULL; + new->next = list; +@@ -364,24 +353,14 @@ rename_proc(PROC *this, const char *comm, uid_t uid) + } + } + } +-#ifdef WITH_SELINUX + static void + add_proc(const char *comm, pid_t pid, pid_t ppid, pid_t pgid, uid_t uid, + const char *args, int size, char isthread, security_context_t scontext) +-#else /*WITH_SELINUX */ +-static void +-add_proc(const char *comm, pid_t pid, pid_t ppid, pid_t pgid, uid_t uid, +- const char *args, int size, char isthread) +-#endif /*WITH_SELINUX */ + { + PROC *this, *parent; + + if (!(this = find_proc(pid))) +-#ifdef WITH_SELINUX + this = new_proc(comm, pid, uid, scontext); +-#else /*WITH_SELINUX */ +- this = new_proc(comm, pid, uid); +-#endif /*WITH_SELINUX */ + else { + rename_proc(this, comm, uid); + } +@@ -393,11 +372,7 @@ add_proc(const char *comm, pid_t pid, pid_t ppid, pid_t pgid, uid_t uid, + if (isthread) + this->flags |= PFLAG_THREAD; + if (!(parent = find_proc(ppid))) { +-#ifdef WITH_SELINUX + parent = new_proc("?", ppid, 0, scontext); +-#else /*WITH_SELINUX */ +- parent = new_proc("?", ppid, 0); +-#endif + } + if (pid != 0) { + add_child(parent, this); +@@ -494,12 +469,10 @@ dump_tree(PROC * current, int level, int rep, int leaf, int last, + else + (void) out_int(current->uid); + } +-#ifdef WITH_SELINUX + if (show_scontext) { + out_char(info++ ? ',' : '('); + out_scontext(current->scontext); + } +-#endif /*WITH_SELINUX */ + if ((swapped && print_args && current->argc < 0) || (!swapped && info)) + out_char(')'); + if ((current->flags & PFLAG_HILIGHT) && (tmp = tgetstr("me", NULL))) +@@ -520,11 +493,7 @@ dump_tree(PROC * current, int level, int rep, int leaf, int last, + } + } + } +-#ifdef WITH_SELINUX + if (show_scontext || print_args || !current->children) +-#else /*WITH_SELINUX */ +- if (print_args || !current->children) +-#endif /*WITH_SELINUX */ + { + while (closing--) + out_char(']'); +@@ -533,11 +502,7 @@ dump_tree(PROC * current, int level, int rep, int leaf, int last, + ensure_buffer_capacity(level); + more[level] = !last; + +-#ifdef WITH_SELINUX + if (show_scontext || print_args) +-#else /*WITH_SELINUX */ +- if (print_args) +-#endif /*WITH_SELINUX */ + { + width[level] = swapped + (comm_len > 1 ? 0 : -1); + count=0; +@@ -653,8 +618,8 @@ static void read_proc(void) + pid_t pid, ppid, pgid; + int fd, size; + int empty; +-#ifdef WITH_SELINUX + security_context_t scontext = NULL; ++#ifdef WITH_SELINUX + int selinux_enabled = is_selinux_enabled() > 0; + #endif /*WITH_SELINUX */ + +@@ -726,21 +691,12 @@ static void read_proc(void) + while ((dt = readdir(taskdir)) != NULL) { + if ((thread = atoi(dt->d_name)) != 0) { + if (thread != pid) { +-#ifdef WITH_SELINUX + if (print_args) + add_proc(threadname, thread, pid, pgid, st.st_uid, + threadname, strlen (threadname) + 1, 1,scontext); + else + add_proc(threadname, thread, pid, pgid, st.st_uid, + NULL, 0, 1, scontext); +-#else /*WITH_SELINUX */ +- if (print_args) +- add_proc(threadname, thread, pid, pgid, st.st_uid, +- threadname, strlen (threadname) + 1, 1); +- else +- add_proc(threadname, thread, pid, pgid, st.st_uid, +- NULL, 0, 1); +-#endif /*WITH_SELINUX */ + } + } + } +@@ -749,11 +705,7 @@ static void read_proc(void) + } + free(taskpath); + if (!print_args) +-#ifdef WITH_SELINUX + add_proc(comm, pid, ppid, pgid, st.st_uid, NULL, 0, 0, scontext); +-#else /*WITH_SELINUX */ +- add_proc(comm, pid, ppid, pgid, st.st_uid, NULL, 0, 0); +-#endif /*WITH_SELINUX */ + else { + sprintf(path, "%s/%d/cmdline", PROC_BASE, pid); + if ((fd = open(path, O_RDONLY)) < 0) { +@@ -770,13 +722,8 @@ static void read_proc(void) + size--; + if (size) + buffer[size++] = 0; +-#ifdef WITH_SELINUX + add_proc(comm, pid, ppid, pgid, st.st_uid, + buffer, size, 0, scontext); +-#else /*WITH_SELINUX */ +- add_proc(comm, pid, ppid, pgid, st.st_uid, +- buffer, size, 0); +-#endif /*WITH_SELINUX */ + } + } + } +@@ -787,7 +734,7 @@ static void read_proc(void) + } + } + (void) closedir(dir); +- fix_orphans(); ++ fix_orphans(scontext); + if (print_args) + free(buffer); + if (empty) { +@@ -796,7 +743,7 @@ static void read_proc(void) + } + } + +-static void fix_orphans(void) ++static void fix_orphans(security_context_t scontext) + { + /* When using kernel 3.3 with hidepid feature enabled on /proc + * then we need fake root pid and gather all the orphan processes +@@ -807,11 +754,7 @@ static void fix_orphans(void) + PROC *root, *walk; + + if (!(root = find_proc(ROOT_PID))) { +-#ifdef WITH_SELINUX + root = new_proc("?", ROOT_PID, 0, scontext); +-#else /*WITH_SELINUX */ +- root = new_proc("?", ROOT_PID, 0); +-#endif + } + for (walk = list; walk; walk = walk->next) { + if (walk->pid == 1 || walk->pid == 0) +-- +1.7.12 + diff --git a/sys-process/psmisc/files/psmisc-22.21-fuser_typo_fix.patch b/sys-process/psmisc/files/psmisc-22.21-fuser_typo_fix.patch new file mode 100644 index 000000000000..5c5fd990f9ca --- /dev/null +++ b/sys-process/psmisc/files/psmisc-22.21-fuser_typo_fix.patch @@ -0,0 +1,44 @@ +From 3638cc55b4d08851faba46635d737b24d016665b Mon Sep 17 00:00:00 2001 +From: Brad Jorsch <anomie@users.sourceforge.net> +Date: Fri, 28 Feb 2014 21:55:02 +1100 +Subject: [PATCH] Typo in fuser makes -M on all the time + +Brad found that fuser had the -M option on all the time. +A simple but significant typo caused this, thanks the the patch. + +Bug-Debian: http://bugs.debian.org/740275 + +Signed-off-by: Craig Small <csmall@enc.com.au> +--- + ChangeLog | 4 ++++ + src/fuser.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index fd1cccf..e5f784c 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++Changes in 22.22 ++================ ++ * Fixed typo in fuser which has -M on Debian #740275 ++ + Changes in 22.21 + ================ + * Missing comma in fuser(1) added Debian #702391 +diff --git a/src/fuser.c b/src/fuser.c +index b485f65..389b302 100644 +--- a/src/fuser.c ++++ b/src/fuser.c +@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[]) + usage(_("No process specification given")); + + /* Check if -M flag was used and if so check mounts */ +- if (opts * OPT_ISMOUNTPOINT) { ++ if (opts & OPT_ISMOUNTPOINT) { + check_mountpoints(&mounts, &names_head, &names_tail); + } + +-- +2.2.2 + diff --git a/sys-process/psmisc/metadata.xml b/sys-process/psmisc/metadata.xml new file mode 100644 index 000000000000..8be3e0d684ec --- /dev/null +++ b/sys-process/psmisc/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>base-system</herd> + <upstream> + <remote-id type="sourceforge">psmisc</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/psmisc/psmisc-22.16.ebuild b/sys-process/psmisc/psmisc-22.16.ebuild new file mode 100644 index 000000000000..162bdec84980 --- /dev/null +++ b/sys-process/psmisc/psmisc-22.16.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils + +DESCRIPTION="A set of tools that use the proc filesystem" +HOMEPAGE="http://psmisc.sourceforge.net/" +SRC_URI="mirror://sourceforge/psmisc/${P}.tar.gz -> ${P}-r1.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="ipv6 nls selinux X" + +RDEPEND=">=sys-libs/ncurses-5.7-r7 + nls? ( virtual/libintl ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2.2.6b + nls? ( sys-devel/gettext )" + +DOCS="AUTHORS ChangeLog NEWS README" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-22.16-fuser-pic.patch #394443 +} + +src_configure() { + econf \ + $(use_enable selinux) \ + --disable-harden-flags \ + $(use_enable ipv6) \ + $(use_enable nls) +} + +src_compile() { + # peekfd is a fragile crap hack #330631 + nonfatal emake -C src peekfd || touch src/peekfd{.o,} + emake +} + +src_install() { + default + + use X || rm -f "${ED}"/usr/bin/pstree.x11 + + [[ -s ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/bin/peekfd + [[ -e ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/share/man/man1/peekfd.1 + + # fuser is needed by init.d scripts + dodir /bin + mv "${ED}"/usr/bin/fuser "${ED}"/bin || die +} diff --git a/sys-process/psmisc/psmisc-22.20.ebuild b/sys-process/psmisc/psmisc-22.20.ebuild new file mode 100644 index 000000000000..21d2d44ee9df --- /dev/null +++ b/sys-process/psmisc/psmisc-22.20.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils + +DESCRIPTION="A set of tools that use the proc filesystem" +HOMEPAGE="http://psmisc.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux" +IUSE="ipv6 nls selinux X" + +RDEPEND=">=sys-libs/ncurses-5.7-r7 + nls? ( virtual/libintl ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2.2.6b + nls? ( sys-devel/gettext )" + +DOCS="AUTHORS ChangeLog NEWS README" + +src_prepare() { + epatch "${FILESDIR}"/${P}-selinux.patch #437332 +} + +src_configure() { + econf \ + $(use_enable selinux) \ + --disable-harden-flags \ + $(use_enable ipv6) \ + $(use_enable nls) +} + +src_compile() { + # peekfd is a fragile crap hack #330631 + nonfatal emake -C src peekfd || touch src/peekfd{.o,} + emake +} + +src_install() { + default + + use X || rm -f "${ED}"/usr/bin/pstree.x11 + + [[ -s ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/bin/peekfd + [[ -e ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/share/man/man1/peekfd.1 + + # fuser is needed by init.d scripts; use * wildcard for #458250 + dodir /bin + mv "${ED}"/usr/bin/*fuser "${ED}"/bin || die +} diff --git a/sys-process/psmisc/psmisc-22.21-r2.ebuild b/sys-process/psmisc/psmisc-22.21-r2.ebuild new file mode 100644 index 000000000000..febfaa74edee --- /dev/null +++ b/sys-process/psmisc/psmisc-22.21-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils + +DESCRIPTION="A set of tools that use the proc filesystem" +HOMEPAGE="http://psmisc.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux" +IUSE="ipv6 nls selinux X" + +RDEPEND=">=sys-libs/ncurses-5.7-r7 + nls? ( virtual/libintl ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + >=sys-devel/libtool-2.2.6b + nls? ( sys-devel/gettext )" + +DOCS="AUTHORS ChangeLog NEWS README" + +src_prepare() { + epatch "${FILESDIR}/${P}-fuser_typo_fix.patch" +} + +src_configure() { + econf \ + $(use_enable selinux) \ + --disable-harden-flags \ + $(use_enable ipv6) \ + $(use_enable nls) +} + +src_compile() { + # peekfd is a fragile crap hack #330631 + nonfatal emake -C src peekfd || touch src/peekfd{.o,} + emake +} + +src_install() { + default + + use X || rm -f "${ED}"/usr/bin/pstree.x11 + + [[ -s ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/bin/peekfd + [[ -e ${ED}/usr/bin/peekfd ]] || rm -f "${ED}"/usr/share/man/man1/peekfd.1 + + # fuser is needed by init.d scripts; use * wildcard for #458250 + dodir /bin + mv "${ED}"/usr/bin/*fuser "${ED}"/bin || die +} diff --git a/sys-process/runit/Manifest b/sys-process/runit/Manifest new file mode 100644 index 000000000000..832e9b72b0b5 --- /dev/null +++ b/sys-process/runit/Manifest @@ -0,0 +1,2 @@ +DIST runit-2.1.1.tar.gz 109661 SHA256 ffcf2d27b32f59ac14f2d4b0772a3eb80d9342685a2042b7fbbc472c07cf2a2c SHA512 a927a757386653fdc40437884e3dc2d1dda6aaf5f1919f301fcf604e559836bd44e5fcb296d69e7f4260fd881475124c44996530de4948d35d8a102b206ca470 WHIRLPOOL ff378ace3c4e0829a435eec8a9e40da7df6e0e0b00ad8c821a169d2e88a38aee4608147316eec1cfc2e676780fefb4bab81e56e3fe7be80bbb6bd08656373208 +DIST runit-2.1.2.tar.gz 110916 SHA256 6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18 SHA512 a18773ebf1aa22305dd89ed67363165b9fcf86c192b2be4e268d08005dd82d51265160c637abe072f2f2e378c4b315a75bd3d3e602c3e75bdd451a3b0190f8cf WHIRLPOOL c70ecafcdd874b08e6bd47a904903eae03884b71eca30306c6eb512fc72ee8c93a5b0badc4a954e248421157e07bf0620789a810901365c2eeac38107cd62747 diff --git a/sys-process/runit/files/1 b/sys-process/runit/files/1 new file mode 100755 index 000000000000..d6a5b4f64eeb --- /dev/null +++ b/sys-process/runit/files/1 @@ -0,0 +1,10 @@ +#!/bin/sh +# system one time tasks + +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +RUNLEVEL=S /sbin/rc sysinit +RUNLEVEL=S /sbin/rc boot + +touch /etc/runit/stopit +chmod 0 /etc/runit/stopit diff --git a/sys-process/runit/files/2 b/sys-process/runit/files/2 new file mode 100755 index 000000000000..233ad006aac3 --- /dev/null +++ b/sys-process/runit/files/2 @@ -0,0 +1,6 @@ +#!/bin/sh + +PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin + +exec env - PATH=$PATH \ +runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/sys-process/runit/files/2-2.1.2 b/sys-process/runit/files/2-2.1.2 new file mode 100644 index 000000000000..5d503709e220 --- /dev/null +++ b/sys-process/runit/files/2-2.1.2 @@ -0,0 +1,6 @@ +#!/bin/sh + +PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin + +exec env - PATH=$PATH \ +runsvdir /etc/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/sys-process/runit/files/3 b/sys-process/runit/files/3 new file mode 100755 index 000000000000..f143f5f46011 --- /dev/null +++ b/sys-process/runit/files/3 @@ -0,0 +1,14 @@ +#!/bin/sh +exec >/dev/console 2>&1 +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +echo 'Waiting for getties to stop...' +sv shutdown -w 10 /var/service/getty-* + +echo 'Waiting for services to stop...' +sv shutdown -w 300 /var/service/* + +echo 'Shutdown...' +test -x /etc/runit/reboot && LAST=6 || LAST=0 +test -x /etc/runit/reboot && RC=reboot || RC=shutdown +RUNLEVEL=$LAST /sbin/rc $RC diff --git a/sys-process/runit/files/3-2.1.2 b/sys-process/runit/files/3-2.1.2 new file mode 100644 index 000000000000..3dd5a486c19d --- /dev/null +++ b/sys-process/runit/files/3-2.1.2 @@ -0,0 +1,14 @@ +#!/bin/sh +exec >/dev/console 2>&1 +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +echo 'Waiting for getties to stop...' +sv -w 10 force-shutdown /etc/service/getty-* + +echo 'Waiting for services to stop...' +sv -w 300 force-shutdown /etc/service/* + +echo 'Shutdown...' +test -x /etc/runit/reboot && LAST=6 || LAST=0 +test -x /etc/runit/reboot && RC=reboot || RC=shutdown +RUNLEVEL=$LAST /sbin/rc $RC diff --git a/sys-process/runit/files/ctrlaltdel b/sys-process/runit/files/ctrlaltdel new file mode 100755 index 000000000000..668445738dfc --- /dev/null +++ b/sys-process/runit/files/ctrlaltdel @@ -0,0 +1,9 @@ +#!/bin/sh + +PATH=/bin:/usr/bin +MSG="System is going down in 14 seconds..." + +# echo 'disabled.' ; exit +touch /etc/runit/stopit +chmod 100 /etc/runit/stopit && echo "$MSG" | wall +/bin/sleep 14 diff --git a/sys-process/runit/files/finish.getty b/sys-process/runit/files/finish.getty new file mode 100755 index 000000000000..c3d440a85e38 --- /dev/null +++ b/sys-process/runit/files/finish.getty @@ -0,0 +1,2 @@ +#!/bin/sh +exec utmpset -w TTY diff --git a/sys-process/runit/files/run.getty b/sys-process/runit/files/run.getty new file mode 100755 index 000000000000..ab6f9543fe97 --- /dev/null +++ b/sys-process/runit/files/run.getty @@ -0,0 +1,2 @@ +#!/bin/sh +exec /sbin/agetty 38400 TTY linux diff --git a/sys-process/runit/files/run.getty-2.1.2 b/sys-process/runit/files/run.getty-2.1.2 new file mode 100644 index 000000000000..33b2e7853275 --- /dev/null +++ b/sys-process/runit/files/run.getty-2.1.2 @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/chpst -P /sbin/agetty 38400 TTY linux diff --git a/sys-process/runit/metadata.xml b/sys-process/runit/metadata.xml new file mode 100644 index 000000000000..9f0135754bf7 --- /dev/null +++ b/sys-process/runit/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> +<email> +williamh@gentoo.org +</email> +</maintainer> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/runit/runit-2.1.1-r1.ebuild b/sys-process/runit/runit-2.1.1-r1.ebuild new file mode 100644 index 000000000000..6e556c4703e0 --- /dev/null +++ b/sys-process/runit/runit-2.1.1-r1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="3" + +inherit toolchain-funcs flag-o-matic + +DESCRIPTION="A UNIX init scheme with service supervision" +HOMEPAGE="http://smarden.org/runit/" +SRC_URI="http://smarden.org/runit/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" +IUSE="static" + +S=${WORKDIR}/admin/${P}/src + +src_prepare() { + # we either build everything or nothing static + sed -i -e 's:-static: :' Makefile +} + +src_configure() { + use static && append-ldflags -static + + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld +} + +src_install() { + dodir /var + keepdir /etc/runit{,/runsvdir{,/default,/all}} + dosym default /etc/runit/runsvdir/current + dosym ../etc/runit/runsvdir/current /var/service + dosym ../etc/runit/2 /sbin/runsvdir-start + + dobin $(<../package/commands) || die "dobin" + dodir /sbin + mv "${ED}"/usr/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin" + + cd "${S}"/.. + dodoc package/{CHANGES,README,THANKS,TODO} + dohtml doc/*.html + doman man/*.[18] + + exeinto /etc/runit + doexe "${FILESDIR}"/{1,2,3,ctrlaltdel} || die + for tty in tty1 tty2 tty3 tty4 tty5 tty6; do + exeinto /etc/runit/runsvdir/all/getty-$tty/ + for script in run finish; do + newexe "${FILESDIR}"/$script.getty $script + dosed "s:TTY:${tty}:g" /etc/runit/runsvdir/all/getty-$tty/$script + done + dosym ../all/getty-$tty /etc/runit/runsvdir/default/getty-$tty + done + + # make sv command work + cd "${S}" + insinto /etc/env.d + cat <<-EOF > env.d + #/etc/env.d/20runit + SVDIR="/var/service/" + EOF + newins env.d 20runit +} + +pkg_postinst() { + ewarn "/etc/profile was updated. Please run:" + ewarn "source /etc/profile" + ewarn "to make 'sv' work correctly on your currently open shells" +} diff --git a/sys-process/runit/runit-2.1.2.ebuild b/sys-process/runit/runit-2.1.2.ebuild new file mode 100644 index 000000000000..6e28dc4ae098 --- /dev/null +++ b/sys-process/runit/runit-2.1.2.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit toolchain-funcs flag-o-matic versionator + +DESCRIPTION="A UNIX init scheme with service supervision" +HOMEPAGE="http://smarden.org/runit/" +SRC_URI="http://smarden.org/runit/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="static" + +S=${WORKDIR}/admin/${P}/src + +src_prepare() { + # we either build everything or nothing static + sed -i -e 's:-static: :' Makefile + + # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726008 + [[ ${COMPILER} == "diet" ]] && + use ppc && + filter-flags "-mpowerpc-gpopt" +} + +src_configure() { + use static && append-ldflags -static + + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld +} + +src_install() { + into / + dobin $(<../package/commands) + dodir /sbin + mv "${ED}"/bin/{runit-init,runit,utmpset} "${ED}"/sbin/ || die "dosbin" + dosym ../etc/runit/2 /sbin/runsvdir-start + into /usr + + cd .. + dodoc package/{CHANGES,README,THANKS,TODO} + dohtml doc/*.html + doman man/*.[18] + +dodir /etc/runit + exeinto /etc/runit + doexe "${FILESDIR}"/{1,ctrlaltdel} + newexe "${FILESDIR}"/2-${PV} 2 + newexe "${FILESDIR}"/3-${PV} 3 + + dodir /etc/sv + for tty in tty1 tty2 tty3 tty4 tty5 tty6; do + exeinto /etc/sv/getty-$tty/ + newexe "${FILESDIR}"/finish.getty finish + newexe "${FILESDIR}"/run.getty-${PV} run + for script in finish run; do + sed -i -e "s:TTY:${tty}:g" "${ED}"/etc/sv/getty-$tty/$script + done + done + + # make sv command work + cat <<-EOF > "${T}"/env.d + #/etc/env.d/20runit + SVDIR="/etc/service/" + EOF + insinto /etc/env.d + newins "${T}"/env.d 20runit +} + +pkg_preinst() { + if has_version 'sys-process/runit' && + has_version '<sys-process/runit-2.1.2' && + [ -d "${EROOT}"etc/runit/runsvdir/all ]; then + if [ -e "${EROOT}"etc/sv ]; then + mv -f "${EROOT}"etc/sv "${EROOT}"etc/sv.bak || die + ewarn "${EROOT}etc/sv was moved to ${EROOT}etc/sv.bak" + fi + mv "${EROOT}"etc/runit/runsvdir/all "${EROOT}"etc/sv|| die + ln -sf "${EROOT}"etc/sv "${EROOT}"etc/runit/runsvdir/all || die + cp -a "${EROOT}"etc/runit/runsvdir "${T}" || die + touch "${T}"/make_var_service || die + fi +} + +default_config() { + local sv="${EROOT}"etc/sv + local service="${EROOT}"etc/service + mkdir -p "${service}" || die + for x in tty1 tty2 tty3 tty4 tty5 tty6; do + ln -sf "${sv}"/getty-$x "${service}"/getty-$x || die + done + einfo "The links to services runit will supervise are installed" + einfo "in $service." + einfo "If you need multiple runlevels, please see the documentation" + einfo "for how to set them up." + einfo +} + +migrate_from_211() { + # Create /etc/service and /var/service if requested + if [ -e "${T}"/make_var_service ]; then + ln -sf "${EROOT}"etc/runit/runsvdir/current "${EROOT}"etc/service || die + ln -sf "${EROOT}"etc/runit/runsvdir/current "${EROOT}"var/service || die + fi + if [ -d "${T}"/runsvdir ]; then + cp -a "${T}"/runsvdir "${EROOT}"etc/runit || die + fi + return 0 +} + +pkg_postinst() { + if [ -z "$REPLACING_VERSIONS" ]; then + default_config + elif [ ! version_is_at_least 2.1.2 $REPLACING_VERSIONS ]; then + migrate_from_211 + fi + + ewarn "To make sure sv works correctly in your currently open" + ewarn "shells, please run the following command:" + ewarn + ewarn "source /etc/profile" + ewarn + + if [ -L "${EROOT}"var/service ]; then + ewarn "Once this version of runit is active, please remove the" + ewarn "compatibility symbolic link at ${EROOT}var/service" + ewarn "The correct path now is ${EROOT}etc/service" + ewarn + fi + + if [ -L "${EROOT}"etc/runit/runsvdir/all ]; then + ewarn "${EROOT}etc/runit/runsvdir/all has moved to" + iewarn "${EROOT}etc/sv." + ewarn "Any symbolic links under ${EROOT}etc/runit/runsvdir" + ewarn "which point to services through ../all should be updated to" + ewarn "point to them through ${EROOT}etc/sv." + ewarn "Once that is done, ${EROOT}etc/runit/runsvdir/all should be" + ewarn "removed." + ewarn + fi +} diff --git a/sys-process/schedtool/Manifest b/sys-process/schedtool/Manifest new file mode 100644 index 000000000000..3eb58253c1a8 --- /dev/null +++ b/sys-process/schedtool/Manifest @@ -0,0 +1 @@ +DIST schedtool-1.3.0.tar.bz2 26531 SHA256 4e002a2a619d592f7c9b9d284381ffc004d8a71c38945aa95d5d53f2e4c0c8cf SHA512 1ae39a7b9481cf4062740343cd31289117610041546a7969fde7ae3bed3c1a06cd258dffaeafc4326c9115e37878b943d5abec222e25e45e2a5f76c65adf3b6a WHIRLPOOL 112683b5d2e46b36a058097c53902083594d61d0de26a527cdaff0e2040dfcf06418ba575ba37378c5ef8593750f702b8511c296e67e011e97ff4555f1c717b2 diff --git a/sys-process/schedtool/metadata.xml b/sys-process/schedtool/metadata.xml new file mode 100644 index 000000000000..c50bcbc70dc8 --- /dev/null +++ b/sys-process/schedtool/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>kernel-misc</herd> + <longdescription> + schedtool can be used to query or alter a process' scheduling policy under linux + </longdescription> +</pkgmetadata> diff --git a/sys-process/schedtool/schedtool-1.3.0-r1.ebuild b/sys-process/schedtool/schedtool-1.3.0-r1.ebuild new file mode 100644 index 000000000000..2d5866c9d105 --- /dev/null +++ b/sys-process/schedtool/schedtool-1.3.0-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit toolchain-funcs + +DESCRIPTION="A tool to query or alter a process' scheduling policy" +HOMEPAGE="http://freequaos.host.sk/schedtool" +SRC_URI="http://freequaos.host.sk/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT=0 +KEYWORDS="amd64 ~mips ppc x86 ~amd64-linux ~x86-linux" +IUSE="" + +src_prepare() { + sed -i '/^CFLAGS=/d;/^install:/s/install-doc//' Makefile || die +} + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + emake DESTPREFIX="${ED}"/usr install + dodoc CHANGES INSTALL PACKAGERS README SCHED_DESIGN TODO TUNING +} diff --git a/sys-process/supervise-scripts/Manifest b/sys-process/supervise-scripts/Manifest new file mode 100644 index 000000000000..25627a6d2e6c --- /dev/null +++ b/sys-process/supervise-scripts/Manifest @@ -0,0 +1 @@ +DIST supervise-scripts-4.0.tar.gz 23504 SHA256 5c8e9732f6dc36afd2d4e8030acbbbf3aaf2b009cb33cb14558687ce6bd2bc87 diff --git a/sys-process/supervise-scripts/metadata.xml b/sys-process/supervise-scripts/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-process/supervise-scripts/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/supervise-scripts/supervise-scripts-4.0.ebuild b/sys-process/supervise-scripts/supervise-scripts-4.0.ebuild new file mode 100644 index 000000000000..bceaeb6214d3 --- /dev/null +++ b/sys-process/supervise-scripts/supervise-scripts-4.0.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +DESCRIPTION="Starting and stopping daemontools managed services" +HOMEPAGE="http://untroubled.org/supervise-scripts/" +SRC_URI="http://untroubled.org/supervise-scripts/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 ppc sparc x86" +IUSE="doc" + +RDEPEND="virtual/daemontools" +DEPEND="${RDEPEND}" + +src_prepare() { + echo "/usr/bin" > conf-bin + echo "/usr/share/man" > conf-man +} + +src_install() { + emake PREFIX="${D}" install || die "Install failed" + use doc && dohtml *.html +} diff --git a/sys-process/systemd-cron/Manifest b/sys-process/systemd-cron/Manifest new file mode 100644 index 000000000000..d1b8b4e3c4e1 --- /dev/null +++ b/sys-process/systemd-cron/Manifest @@ -0,0 +1 @@ +DIST systemd-cron-1.5.3.tar.gz 29105 SHA256 3623b625938e1dc45ea3b7abf6eab35180c73eddf7865f4297cc5f38c8e09aca SHA512 ea0241f93b8d92497fa020d84630ee153dc299d9b16b17567784a4dcb5ddf0a4589e7e033428562a862218ef79b192245178df2d7dcc69f779ef9156921674c7 WHIRLPOOL 51a148f780397b79d5988fb729061318c38afd2c096bf2eb4d62e340db2753f9268be11ca54974a7480d83b424cf9638961c713d843ef2ffaea1b1fe234ba539 diff --git a/sys-process/systemd-cron/metadata.xml b/sys-process/systemd-cron/metadata.xml new file mode 100644 index 000000000000..fe7ff0a5f0e1 --- /dev/null +++ b/sys-process/systemd-cron/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>rich0@gentoo.org</email> + </maintainer> + <use> + <flag name="cron-boot">Include support for the boot timer.</flag> + <flag name="etc-crontab-systemd">Use dedicated /etc/crontab-systemd instead of parsing /etc/crontab</flag> + <flag name="minutely">Support /etc/cron.minutely</flag> + <flag name="yearly">Support /etc/cron.yearly</flag> + <flag name="setgid">Compile setgid C helper for crontab. Needs GCC or Clang.</flag> + </use> + <upstream> + <remote-id type="github">systemd-cron/systemd-cron</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/systemd-cron/systemd-cron-1.5.3.ebuild b/sys-process/systemd-cron/systemd-cron-1.5.3.ebuild new file mode 100644 index 000000000000..ee6d11a02652 --- /dev/null +++ b/sys-process/systemd-cron/systemd-cron-1.5.3.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( pypy3 python{3_3,3_4} ) +inherit eutils python-single-r1 systemd + +DESCRIPTION="systemd units to provide minimal cron daemon functionality by running scripts in cron directories" +HOMEPAGE="https://github.com/systemd-cron/systemd-cron/" +SRC_URI="https://github.com/systemd-cron/${PN}/archive/v${PV}.tar.gz -> systemd-cron-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cron-boot etc-crontab-systemd minutely setgid yearly" + +RDEPEND=">=sys-apps/systemd-217 + sys-apps/debianutils + !etc-crontab-systemd? ( !sys-process/dcron ) + ${PYTHON_DEPS} + sys-process/cronbase" + +DEPEND="sys-process/cronbase" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +src_prepare() { + python_fix_shebang --force "${S}/src/bin" + + sed -i \ + -e 's/^crontab/crontab-systemd/' \ + -e 's/^CRONTAB/CRONTAB-SYSTEMD/' \ + -- "${S}/src/man/crontab."{1,5}".in" || die + + sed -i \ + -e 's!/crontab$!/crontab-systemd!' \ + -e 's!/crontab\(\.[15]\)$!/crontab-systemd\1!' \ + -- "${S}/Makefile.in" || die + + if use etc-crontab-systemd + then sed -i \ + -e "s!/etc/crontab!/etc/crontab-systemd!" \ + -- "${S}/src/man/crontab."{1,5}".in" \ + "${S}/src/bin/systemd-crontab-generator.py" || die + fi + + epatch_user +} + +my_use_enable() { + if use ${1}; then + echo --enable-${2:-${1}}=yes + else + echo --enable-${2:-${1}}=no + fi +} + +src_configure() { + ./configure \ + --prefix="${EPREFIX}/usr" \ + --confdir="${EPREFIX}/etc" \ + --runparts="${EPREFIX}/bin/run-parts" \ + --mandir="${EPREFIX}/usr/share/man" \ + --unitdir="$(systemd_get_unitdir)" \ + $(my_use_enable cron-boot boot) \ + $(my_use_enable minutely) \ + $(my_use_enable yearly) \ + $(my_use_enable yearly quarterly) \ + $(my_use_enable yearly semi_annually) \ + $(my_use_enable setgid) \ + --enable-persistent=yes +} diff --git a/sys-process/time/Manifest b/sys-process/time/Manifest new file mode 100644 index 000000000000..aa5e05278e9f --- /dev/null +++ b/sys-process/time/Manifest @@ -0,0 +1 @@ +DIST time-1.7.tar.gz 103066 SHA256 e37ea79a253bf85a85ada2f7c632c14e481a5fd262a362f6f4fd58e68601496d SHA512 d759b651e343beddc0b3bd06af85881486b72319c979a2e7f752d5a34edd8b7c1c19391c5c7a2e8f6685746cc7a046bf2c8e082b31458a1dd043ed90a4cebcd1 WHIRLPOOL 8102c994a6b5faa60ee51e7343383f307c0d31cbd26177f86fc96b41014e1065b536202a371556af336394ac0bf473db2571a15bc7644247a9a3d8235269880f diff --git a/sys-process/time/files/1.7-info-dir-entry.patch b/sys-process/time/files/1.7-info-dir-entry.patch new file mode 100644 index 000000000000..1cc057b04ea1 --- /dev/null +++ b/sys-process/time/files/1.7-info-dir-entry.patch @@ -0,0 +1,12 @@ +--- time.info.old 2004-09-11 03:00:39.076871344 -0400 ++++ time.info 2004-09-11 03:00:40.394671008 -0400 +@@ -19,6 +19,9 @@ + manual into another language, under the above conditions for modified + versions, except that this permission notice may be stated in a + translation approved by the Foundation. ++START-INFO-DIR-ENTRY ++* time: (time). summarize system resources used ++END-INFO-DIR-ENTRY + + + File: time.info, Node: Top, Prev: (dir), Up: (dir) diff --git a/sys-process/time/files/time-1.7-build.patch b/sys-process/time/files/time-1.7-build.patch new file mode 100644 index 000000000000..82d6ae1c7584 --- /dev/null +++ b/sys-process/time/files/time-1.7-build.patch @@ -0,0 +1,16 @@ +--- configure.in ++++ configure.in +@@ -1,11 +1,6 @@ + dnl Process this file with autoconf to produce a configure script. +-AC_INIT(time.c) +-VERSION=1.7 +-AC_SUBST(VERSION) +-PACKAGE=time +-AC_SUBST(PACKAGE) +- +-AC_ARG_PROGRAM ++AC_INIT(time, 1.7) ++AM_INIT_AUTOMAKE + + dnl Checks for programs. + AC_PROG_CC diff --git a/sys-process/time/files/time-1.7-incorrect_memory_usage.patch b/sys-process/time/files/time-1.7-incorrect_memory_usage.patch new file mode 100644 index 000000000000..55807100c3a9 --- /dev/null +++ b/sys-process/time/files/time-1.7-incorrect_memory_usage.patch @@ -0,0 +1,28 @@ +https://bugs.launchpad.net/ubuntu/+source/time/+bug/742248 +https://bugs.gentoo.org/332253 + +diff -rupN time-1.7-original/ChangeLog time-1.7/ChangeLog +--- time-1.7-original/ChangeLog 2011-11-11 09:17:47.507026731 +0100 ++++ time-1.7/ChangeLog 2011-11-11 09:27:46.751002205 +0100 +@@ -1,3 +1,9 @@ ++Fri Oct 1 00:00:00 2010 Bob Proulx <bob@proulx.com> ++ The struct rusage reports ru_maxrss in kbytes not pages and ++ should not be converted through pages-to-kbytes again. ++ Reported by Sven Hartrumpf. ++ * time.c (summarize): Do not call ptok on ru_maxrss. ++ + Thu Jul 11 12:37:17 1996 David J MacKenzie <djm@catapult.va.pubnix.com> + + * Version 1.7. +diff -rupN time-1.7-original/time.c time-1.7/time.c +--- time-1.7-original/time.c 2011-11-11 09:17:47.507026731 +0100 ++++ time-1.7/time.c 2011-11-11 09:27:58.167001738 +0100 +@@ -398,7 +398,7 @@ summarize (fp, fmt, command, resp) + ptok ((UL) resp->ru.ru_ixrss) / MSEC_TO_TICKS (v)); + break; + case 'M': /* Maximum resident set size. */ +- fprintf (fp, "%lu", ptok ((UL) resp->ru.ru_maxrss)); ++ fprintf (fp, "%lu", (UL) resp->ru.ru_maxrss); + break; + case 'O': /* Outputs. */ + fprintf (fp, "%ld", resp->ru.ru_oublock); diff --git a/sys-process/time/metadata.xml b/sys-process/time/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-process/time/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/time/time-1.7-r1.ebuild b/sys-process/time/time-1.7-r1.ebuild new file mode 100644 index 000000000000..c04633522c20 --- /dev/null +++ b/sys-process/time/time-1.7-r1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils autotools + +DESCRIPTION="displays info about resources used by a program" +HOMEPAGE="http://www.gnu.org/directory/time.html" +SRC_URI="mirror://gnu/time/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-build.patch + epatch "${FILESDIR}"/${PV}-info-dir-entry.patch + eautoreconf +} diff --git a/sys-process/time/time-1.7-r2.ebuild b/sys-process/time/time-1.7-r2.ebuild new file mode 100644 index 000000000000..9c1c4b7e3405 --- /dev/null +++ b/sys-process/time/time-1.7-r2.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils autotools + +DESCRIPTION="displays info about resources used by a program" +HOMEPAGE="http://www.gnu.org/directory/time.html" +SRC_URI="mirror://gnu/time/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux" +IUSE="" + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-build.patch \ + "${FILESDIR}"/${PV}-info-dir-entry.patch \ + "${FILESDIR}"/${P}-incorrect_memory_usage.patch + eautoreconf +} diff --git a/sys-process/tiptop/Manifest b/sys-process/tiptop/Manifest new file mode 100644 index 000000000000..b01391d6ff81 --- /dev/null +++ b/sys-process/tiptop/Manifest @@ -0,0 +1,2 @@ +DIST tiptop-2.2.tar.gz 99602 SHA256 965cb99b16cb59df78363d83b62877ce8501b0aac1116a86bed8a16aa96b171d SHA512 533624a134fcab5e30126412b32bd6a484851ba192ef452877a2199ee3c083fe0222af28c556a8f0769457b5ee7229769b163b8d07e13d03f9f14e192a541d34 WHIRLPOOL 8eb390197404c94070b67384345100e515e3d91677133adec1539736e1a28f55430e5db0c6a99b2c2cd6663d4fb4129a02487a6b6f5ae25f74736c9e1ce29ee5 +DIST tiptop-2.3.tar.gz 101006 SHA256 3f07e958b40acaeab98e9eb1326c9f91b0be0a782c1cc2bd7a9e18d31fab18ca SHA512 e09ad1fd7063c9b8b7351b5c114cfa1f8e1737b1cfb73c4c869612c3887b060a838c33bdee330349225b48cd73d295fef24cd36c6eb36b566d20adff2dae53d5 WHIRLPOOL 11be7aa8cbd35186d402fb2453fc0969763058d6b6aaef43028bb74af5deacf5ede40b837c2e5277cdf905717862bf62ec1b23342ea7d874eda021bece520c43 diff --git a/sys-process/tiptop/metadata.xml b/sys-process/tiptop/metadata.xml new file mode 100644 index 000000000000..6719fcd2bb35 --- /dev/null +++ b/sys-process/tiptop/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +</pkgmetadata> diff --git a/sys-process/tiptop/tiptop-2.2.ebuild b/sys-process/tiptop/tiptop-2.2.ebuild new file mode 100644 index 000000000000..f62abfe0c116 --- /dev/null +++ b/sys-process/tiptop/tiptop-2.2.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="top for performance counters" +HOMEPAGE="http://tiptop.gforge.inria.fr/" +SRC_URI="http://${PN}.gforge.inria.fr/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="sys-libs/ncurses + dev-libs/libxml2" +DEPEND="${RDEPEND}" diff --git a/sys-process/tiptop/tiptop-2.3.ebuild b/sys-process/tiptop/tiptop-2.3.ebuild new file mode 100644 index 000000000000..d88b301a42b1 --- /dev/null +++ b/sys-process/tiptop/tiptop-2.3.ebuild @@ -0,0 +1,18 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="top for performance counters" +HOMEPAGE="http://tiptop.gforge.inria.fr/" +SRC_URI="http://${PN}.gforge.inria.fr/releases/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="sys-libs/ncurses + dev-libs/libxml2" +DEPEND="${RDEPEND}" diff --git a/sys-process/top-apple/Manifest b/sys-process/top-apple/Manifest new file mode 100644 index 000000000000..dcac48f47e47 --- /dev/null +++ b/sys-process/top-apple/Manifest @@ -0,0 +1,2 @@ +DIST libutil-11-top-73.h 5641 SHA256 b7f92a89bb8907a00709cd564d673806f46af4875c3016e6e27191ca5f73adc6 +DIST top-73.tar.gz 69253 SHA256 69668602b008a04b808e37cfbbca4335e60a1c69cac0f51891a573687d0d7227 diff --git a/sys-process/top-apple/files/top-apple-73-darwin9.patch b/sys-process/top-apple/files/top-apple-73-darwin9.patch new file mode 100644 index 000000000000..63d37c58f30b --- /dev/null +++ b/sys-process/top-apple/files/top-apple-73-darwin9.patch @@ -0,0 +1,40 @@ +--- libtop.c.orig 2012-05-03 14:35:48.000000000 +0200 ++++ libtop.c 2012-05-03 14:41:36.000000000 +0200 +@@ -23,6 +23,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <limits.h> ++#include <inttypes.h> + #include <sys/types.h> + #include <mach/bootstrap.h> + #include <mach/host_priv.h> +@@ -1458,6 +1459,7 @@ + libtop_pinfo_update_kernmem_info(task_t task, libtop_pinfo_t* pinfo) { + kern_return_t kr; + ++#ifdef TASK_KERNELMEMORY_INFO_COUNT + mach_msg_type_number_t count = TASK_KERNELMEMORY_INFO_COUNT; + + pinfo->psamp.p_palloc = pinfo->psamp.palloc; +@@ -1466,6 +1468,9 @@ + pinfo->psamp.p_sfree = pinfo->psamp.sfree; + + kr = task_info(task, TASK_KERNELMEMORY_INFO, (task_info_t)&pinfo->psamp.palloc, &count); ++#else ++ memset(&pinfo->psamp.palloc, 0, sizeof(pinfo->psamp.palloc)); ++#endif + return kr; + } + +@@ -1630,9 +1635,11 @@ + } + + switch (info.share_mode) { ++#ifdef SM_LARGE_PAGE + case SM_LARGE_PAGE: + // Treat SM_LARGE_PAGE the same as SM_PRIVATE + // since they are not shareable and are wired. ++#endif + case SM_PRIVATE: + rprvt += info.private_pages_resident * pagesize; + rprvt += info.shared_pages_resident * pagesize; diff --git a/sys-process/top-apple/metadata.xml b/sys-process/top-apple/metadata.xml new file mode 100644 index 000000000000..f737f232e3bf --- /dev/null +++ b/sys-process/top-apple/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>prefix</herd> +</pkgmetadata> diff --git a/sys-process/top-apple/top-apple-73.ebuild b/sys-process/top-apple/top-apple-73.ebuild new file mode 100644 index 000000000000..4cdbfd54da7b --- /dev/null +++ b/sys-process/top-apple/top-apple-73.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit toolchain-funcs eutils + +DESCRIPTION="Apple's top from Mac OS X Lion 10.7" +HOMEPAGE="http://www.opensource.apple.com/" +SRC_URI=" + http://www.opensource.apple.com/tarballs/top/top-${PV}.tar.gz + http://www.opensource.apple.com/source/libutil/libutil-11/libutil.h?txt -> libutil-11-top-${PV}.h" + +LICENSE="APSL-2 BSD" +SLOT="0" +KEYWORDS="~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +S=${WORKDIR}/top-${PV} + +src_prepare() { + # libutil.h header is missing at least on Leopard (10.5), the dylib just + # exists + [[ ! -e ${ROOT}/usr/include/libutil.h ]] && \ + cp "${DISTDIR}"/libutil-11-top-${PV}.h "${S}"/libutil.h || die + epatch "${FILESDIR}"/${P}-darwin9.patch +} + +src_compile() { + local libs="-lutil -lpanel -lncurses -framework CoreFoundation -framework IOKit" + echo "$(tc-getCC) ${CFLAGS} ${LDFLAGS} -o top -I." *.c ${libs} + $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o top -I. *.c ${libs} || die +} + +src_install() { + dobin top +} + +pkg_postinst() { + ewarn "To use top, you need to perform the following commands:" + ewarn " % sudo chown root ${EPREFIX}/usr/bin/top" + ewarn " % sudo chmod u+s ${EPREFIX}/usr/bin/top" +} diff --git a/sys-process/unixtop/Manifest b/sys-process/unixtop/Manifest new file mode 100644 index 000000000000..8d0a2ea74f4b --- /dev/null +++ b/sys-process/unixtop/Manifest @@ -0,0 +1 @@ +DIST top-3.8beta1.tar.bz2 233880 SHA256 1b5281071a4fcc132205e643fb2fe196cf839555874aaee507a7d07aa0076cda SHA512 c66d786e34070afd00dc2225ce4cddcf0fdaee0e2a6c6e2dfadadcd97bbe84c6668041ff5b075137630b99240c711fbfda8b85fb09c6a39e3067798cbe612671 WHIRLPOOL 1a51c53494d8128fd6ff8bcbfea54efbacf0d7af3e78a492ca29d5bf276ca639d403273f03e49536e7168122bc6002cd1fb1c0c84cd322d691b41032ed766842 diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch new file mode 100644 index 000000000000..a5a3bc58546d --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch @@ -0,0 +1,75 @@ +http://sourceforge.net/tracker/index.php?func=detail&aid=2815842&group_id=72892&atid=536042 + +*** hash.c-old Thu Jul 2 15:30:55 2009 +--- hash.c Thu Jul 2 15:48:39 2009 +*************** +*** 1354,1360 **** + hi->value = value; + + /* hash to the bucket */ +! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]); + + /* walk the list to make sure we do not have a duplicate */ + ll = &(bucket->list); +--- 1354,1360 ---- + hi->value = value; + + /* hash to the bucket */ +! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]); + + /* walk the list to make sure we do not have a duplicate */ + ll = &(bucket->list); +*************** +*** 1408,1414 **** + pidthr_t k1; + + /* find the bucket */ +! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]); + + /* walk the list until we find the existing item */ + ll = &(bucket->list); +--- 1408,1414 ---- + pidthr_t k1; + + /* find the bucket */ +! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]); + + /* walk the list until we find the existing item */ + ll = &(bucket->list); +*************** +*** 1460,1466 **** + pidthr_t k1; + + result = NULL; +! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL) + { + ll = &(bucket->list); + li = LL_FIRST(ll); +--- 1460,1466 ---- + pidthr_t k1; + + result = NULL; +! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL) + { + ll = &(bucket->list); + li = LL_FIRST(ll); +*************** +*** 1499,1505 **** + pidthr_t k1; + + result = NULL; +! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL) + { + ll = &(bucket->list); + li = LL_FIRST(ll); +--- 1499,1505 ---- + pidthr_t k1; + + result = NULL; +! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL) + { + ll = &(bucket->list); + li = LL_FIRST(ll); + + + diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch new file mode 100644 index 000000000000..76042bb4c1a6 --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch @@ -0,0 +1,44 @@ +https://hg.openindiana.org/upstream/oracle/userland-gate/raw-file/23c55a2f8a8e/components/top/patches/03.sunos5.patch + +*** top-3.8beta1/machine/m_sunos5.c.orig Wed Aug 31 05:23:52 2011 +--- top-3.8beta1/machine/m_sunos5.c Wed Aug 31 05:25:25 2011 +*************** +*** 2064,2070 **** + + /* read the whole file */ + p = malloc(st.st_size); +! (void)pread(fd, p, st.st_size, 0); + + /* cache the file descriptor if we can */ + if (fd < maxfiles) +--- 2064,2076 ---- + + /* read the whole file */ + p = malloc(st.st_size); +! if (pread(fd, p, st.st_size, 0) != st.st_size) +! { +! (void) close(fd); +! op->fd_lpsinfo = -1; +! free(p); +! continue; +! } + + /* cache the file descriptor if we can */ + if (fd < maxfiles) +*************** +*** 2148,2154 **** + op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time); + op->seen = 1; + } +! free(p); + } + #endif + +--- 2154,2160 ---- + op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time); + op->seen = 1; + } +! free(prp); + } + #endif + diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix.patch new file mode 100644 index 000000000000..d8c6e556e197 --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix.patch @@ -0,0 +1,28 @@ +http://defect.opensolaris.org/bz/show_bug.cgi?id=5482 +http://sourceforge.net/tracker/?func=detail&aid=2593511&group_id=72892&atid=536042 + +--- top-3.8beta1/machine/m_sunos5.c ++++ top-3.8beta1/machine/m_sunos5.c +@@ -2059,11 +2059,11 @@ + /* make sure we have a valid descriptor and the file's current size */ + if (fd >= 0 && fstat(fd, &st) != -1) + { +- char *p; ++ char *p, *p0; + int i; + + /* read the whole file */ +- p = malloc(st.st_size); ++ p = p0 = malloc(st.st_size); + (void)pread(fd, p, st.st_size, 0); + + /* cache the file descriptor if we can */ +@@ -2148,7 +2148,7 @@ + op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time); + op->seen = 1; + } +- free(p); ++ free(p0); + } + #endif + diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch new file mode 100644 index 000000000000..73cd88b72826 --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch @@ -0,0 +1,14 @@ +* check ncurses first, such that we only link agains (system) termcap if + necessary (never the case in prefix) -- grobian@gentoo.org + +--- configure.ac ++++ configure.ac +@@ -174,7 +174,7 @@ + AC_CHECK_LIB(kvm, kvm_open) + # -lmld -lmach + AC_CHECK_LIB(mach, vm_statistics) +-AC_SEARCH_LIBS(tgetent, termcap curses ncurses) ++AC_SEARCH_LIBS(tgetent, ncurses curses termcap) + AC_CHECK_LIB(m, exp) + + # check for libraries required by extension diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch new file mode 100644 index 000000000000..f5d34a4a9ae9 --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch @@ -0,0 +1,22 @@ +* no idea where these macros are, but we can surely do without this, for + now -- grobian@gentoo.org + +--- configure.ac ++++ configure.ac +@@ -504,16 +504,6 @@ + + AC_MSG_RESULT($result) + +-# add extra cflags if the compiler accepts them +-AX_CFLAGS_WARN_ALL +-MODULE_CFLAGS="" +-if test "$ax_cv_c_compiler_vendor" = "gnu"; then +- AX_CFLAGS_GCC_OPTION([-fno-strict-aliasing], [MODULE_CFLAGS]) +- if test "$target_cpu" = "alpha"; then +- AX_CFLAGS_GCC_OPTION([-mfp-trap-mode=sui -mtrap-precision=i]) +- fi +-fi +- + # Define man page supplement + MAN_SUPPLEMENT=machine/m_$MODULE.man + AC_SUBST_FILE(MAN_SUPPLEMENT) diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch new file mode 100644 index 000000000000..503ed3576a70 --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch @@ -0,0 +1,23 @@ +https://hg.openindiana.org/upstream/oracle/userland-gate/file/23c55a2f8a8e/components/top/patches/04.percent_cpu.patch + +--- top-3.8beta1/machine/m_sunos5.c.orig Tue Nov 8 11:23:08 2011 ++++ top-3.8beta1/machine/m_sunos5.c Tue Nov 8 11:23:11 2011 +@@ -152,8 +152,17 @@ + * one of the spare slots in the prinfo structure. + */ + +-#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_filler[0])) ++#if OSREV > 59 ++/* ++ * on Solaris 10, psinfo.pr_filler is 4 bytes and not double-aligned, so we must * move our scratch space to the larger pr.lwp_pr_filler which is 20 bytes ++ * XXX this is a time bomb and will likely break in future Solaris releases. ++ */ ++#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_lwp.pr_filler[0])) ++#else ++#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_filler[0])) ++#endif + ++ + /* definitions for indices in the nlist array */ + #define X_V 0 + #define X_MPID 1 diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch new file mode 100644 index 000000000000..afea694b59ad --- /dev/null +++ b/sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch @@ -0,0 +1,21 @@ +http://defect.opensolaris.org/bz/show_bug.cgi?id=6580 + +--- top-3.8beta1/commands.c ++++ top-3.8beta1/commands.c +@@ -501,13 +501,15 @@ + if (procnum == -1 || prio < PRIO_MIN || prio > PRIO_MAX) + { + message_error(" renice: bad priority value"); ++ return; + } + #endif + + /* move to the first process number */ + if ((str = next_field(str)) == NULL) + { +- message_error(" remice: no processes specified"); ++ message_error(" renice: no processes specified"); ++ return; + } + + #ifdef HAVE_SETPRIORITY diff --git a/sys-process/unixtop/metadata.xml b/sys-process/unixtop/metadata.xml new file mode 100644 index 000000000000..f5e4e79522ea --- /dev/null +++ b/sys-process/unixtop/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>prefix</herd> + <upstream> + <remote-id type="sourceforge">unixtop</remote-id> + </upstream> +</pkgmetadata> diff --git a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild new file mode 100644 index 000000000000..062e6f5abdf8 --- /dev/null +++ b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils autotools + +DESCRIPTION="top for UNIX systems" +HOMEPAGE="http://unixtop.sourceforge.net/" +SRC_URI="mirror://sourceforge/unixtop/top-${PV/_/}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="sys-libs/ncurses" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/top-${PV/_/} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-ncurses.patch + epatch "${FILESDIR}"/${P}-no-AX-macros.patch + epatch "${FILESDIR}"/${P}-renice-segfault.patch + epatch "${FILESDIR}"/${P}-memleak-fix-v2.patch + epatch "${FILESDIR}"/${P}-high-threadid-crash.patch + epatch "${FILESDIR}"/${P}-percent-cpu.patch + eautoreconf +} + +src_compile() { + local myconf= + + # don't do bi-arch cruft on hosts that support that, such as Solaris + export enable_dualarch=no + + # configure demands an override because on OSX this is "experimental" + [[ ${CHOST} == *-darwin* ]] && myconf="${myconf} --with-module=macosx" + + econf ${myconf} || die + emake || die +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README FAQ Y2K +} diff --git a/sys-process/vixie-cron/Manifest b/sys-process/vixie-cron/Manifest new file mode 100644 index 000000000000..102b8d49a05d --- /dev/null +++ b/sys-process/vixie-cron/Manifest @@ -0,0 +1,2 @@ +DIST vixie-cron-4.1-gentoo-r4.patch.bz2 4204 SHA256 8de14b11da567f7859df3dcf71802f32ac1b3650ae07c6cb6dbc259e1f6da7fc SHA512 eec8f89a97927a3557bd1350ed7e9baa0ec133e2c49f8f0fbf51adf62c377451dc48867ca6affcc7576833a5b6b749613c9b99641b1b658853f91d8071c3411b WHIRLPOOL 9951885d10f0f49cb0b66b1b592a870f24c04647688422c7fb396e266af0aeed7ae357bb571f13ee30aeec747ecfe78abb0335f80ea5bfd0084aee4321a581d4 +DIST vixie-cron-4.1.tar.bz2 54246 SHA256 fd25119b301e0e8306ec27ee912298740c5c8ae879bac02381429cf355d1122d SHA512 1db9a246243dbd4934438ce70bf022215ccffed4b899a77b076d5a7679a7b98a23ef67344e329fc7a836df90685581e10b1c95709db40601c33d2052ce561e04 WHIRLPOOL e137a0e056103efc1bf0aa022bf0f9e2ca3ab8bb3ff97645de27c2e381a4aa5303d477cd1bc6220177aa503c2bce5bbe2331d311dfac4f5ab43cf6928dbe1ea7 diff --git a/sys-process/vixie-cron/files/cron.pam.d b/sys-process/vixie-cron/files/cron.pam.d new file mode 100644 index 000000000000..e09d6f8d8325 --- /dev/null +++ b/sys-process/vixie-cron/files/cron.pam.d @@ -0,0 +1,7 @@ +#%PAM-1.0 + +account required pam_unix.so + +auth required pam_unix.so + +session required pam_limits.so diff --git a/sys-process/vixie-cron/files/crontab b/sys-process/vixie-cron/files/crontab new file mode 100644 index 000000000000..7a923117deb1 --- /dev/null +++ b/sys-process/vixie-cron/files/crontab @@ -0,0 +1,17 @@ +# for vixie cron +# +# $Id$ +# + +# Global variables +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly +*/15 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons +0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly +0 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily +15 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly +30 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly diff --git a/sys-process/vixie-cron/files/crontab-3.0.1-r4 b/sys-process/vixie-cron/files/crontab-3.0.1-r4 new file mode 100644 index 000000000000..f7939c25b1db --- /dev/null +++ b/sys-process/vixie-cron/files/crontab-3.0.1-r4 @@ -0,0 +1,15 @@ +# for vixie cron +# $Id$ + +# Global variables +SHELL=/bin/bash +PATH=/sbin:/bin:/usr/sbin:/usr/bin +MAILTO=root +HOME=/ + +# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly +59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly +9 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily +19 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly +29 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly +*/10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons diff --git a/sys-process/vixie-cron/files/crontab.5.diff b/sys-process/vixie-cron/files/crontab.5.diff new file mode 100644 index 000000000000..f50db3dc7902 --- /dev/null +++ b/sys-process/vixie-cron/files/crontab.5.diff @@ -0,0 +1,35 @@ +--- crontab.5.orig 2004-02-19 20:40:04.954132624 +0000 ++++ crontab.5 2004-02-19 20:45:27.033169168 +0000 +@@ -153,6 +153,32 @@ + ``30 4 1,15 * 5'' + would cause a command to be run at 4:30 am on the 1st and 15th of each + month, plus every Friday. ++.PP ++Instead of the first five fields, one of eight special strings may ++appear: ++.IP ++.ta 1.5i ++string meaning ++.br ++------ ------- ++.br ++@reboot Run once, at startup. ++.br ++@yearly Run once a year, "0 0 1 1 *". ++.br ++@annually (same as @yearly) ++.br ++@monthly Run once a month, "0 0 1 * *". ++.br ++@weekly Run once a week, "0 0 * * 0". ++.br ++@daily Run once a day, "0 0 * * *". ++.br ++@midnight (same as @daily) ++.br ++@hourly Run once an hour, "0 * * * *". ++.br ++.fi + .SH EXAMPLE CRON FILE + .nf + diff --git a/sys-process/vixie-cron/files/pamd.compatible b/sys-process/vixie-cron/files/pamd.compatible new file mode 100644 index 000000000000..62eb029eac54 --- /dev/null +++ b/sys-process/vixie-cron/files/pamd.compatible @@ -0,0 +1,7 @@ +#%PAM-1.0 + +account required pam_unix.so + +auth required pam_unix.so + +session optional pam_limits.so diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff b/sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff new file mode 100644 index 000000000000..c7930ddc4e97 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-basename.diff @@ -0,0 +1,20 @@ +diff --exclude='*~' -urN vixie-cron-4.1.orig/cron.c vixie-cron-4.1/cron.c +--- vixie-cron-4.1.orig/cron.c 2005-02-23 02:05:30.730975808 -0500 ++++ vixie-cron-4.1/cron.c 2005-02-23 02:07:13.233393072 -0500 +@@ -25,6 +25,7 @@ + + #define MAIN_PROGRAM + ++#include <libgen.h> + #include "cron.h" + + enum timejump { negative, small, medium, large }; +@@ -61,7 +62,7 @@ + cron_db database; + int fd; + +- ProgramName = argv[0]; ++ ProgramName = basename(argv[0]); + + setlocale(LC_ALL, ""); + diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch new file mode 100644 index 000000000000..d204ad882aa2 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-commandline.patch @@ -0,0 +1,13 @@ +--- entry.c.orig 2004-08-27 20:09:34.000000000 +0200 ++++ entry.c 2004-12-01 22:16:10.992268200 +0100 +@@ -336,7 +336,9 @@ + + /* If the first character of the command is '-' it is a cron option. + */ +- while ((ch = get_char(file)) == '-') { ++ ch = get_char(file); ++ Skip_Blanks(ch, file) ++ while (ch == '-') { + switch (ch = get_char(file)) { + case 'q': + e->flags |= DONT_LOG; diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny b/sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny new file mode 100644 index 000000000000..42cdd5f8c9a3 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-cron.deny @@ -0,0 +1,5 @@ +# $Id$ +# If for any reason you have users in the 'cron' group who should not +# be allowed to run crontab, add them to this file (one username per +# line) + diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch new file mode 100644 index 000000000000..5109554e1dd1 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-crontabrace.patch @@ -0,0 +1,29 @@ +--- vixie-cron-4.1/crontab.c ++++ vixie-cron-4.1/crontab.c +@@ -314,8 +314,6 @@ + perror("fstat"); + goto fatal; + } +- utimebuf.actime = statbuf.st_atime; +- utimebuf.modtime = statbuf.st_mtime; + + /* Turn off signals. */ + (void)signal(SIGHUP, SIG_IGN); +@@ -374,6 +372,17 @@ + perror(Filename); + exit(ERROR_EXIT); + } ++ if (swap_uids() < OK) { ++ perror("swapping uids"); ++ exit(ERROR_EXIT); ++ } ++ utimebuf.actime = statbuf.st_atime; ++ utimebuf.modtime = statbuf.st_mtime; ++ utime(Filename, &utimebuf); ++ if (swap_uids_back() < OK) { ++ perror("swapping uids back"); ++ exit(ERROR_EXIT); ++ } + utime(Filename, &utimebuf); + again: + rewind(NewCrontab); diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch new file mode 100644 index 000000000000..cabdef02e67b --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-hardlink.patch @@ -0,0 +1,11 @@ +--- database.c.orig 2007-04-08 21:06:16.913019387 +0200 ++++ database.c 2007-04-08 21:06:29.489736093 +0200 +@@ -251,7 +251,7 @@ + log_it(fname, getpid(), "WRONG FILE OWNER", tabname); + goto next_crontab; + } +- if (statbuf->st_nlink != 1) { ++ if (statbuf->st_nlink != 1 && pw != NULL) { + log_it(fname, getpid(), "BAD LINK COUNT", tabname); + goto next_crontab; + } diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch new file mode 100644 index 000000000000..64bf67138e70 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-pam.patch @@ -0,0 +1,67 @@ +--- vixie-cron-3.0.1.orig/Makefile Thu May 30 19:47:00 2002 ++++ vixie-cron-3.0.1/Makefile Thu May 30 20:54:46 2002 +@@ -55,7 +55,7 @@ + INCLUDE = -I. + #INCLUDE = + #<<need getopt()>> +-LIBS = ++LIBS = -lpam + #<<optimize or debug?>> + OPTIM = $(RPM_OPT_FLAGS) + #OPTIM = -g +--- vixie-cron-3.0.1.orig/do_command.c Thu May 30 19:47:00 2002 ++++ vixie-cron-3.0.1/do_command.c Thu May 30 20:55:50 2002 +@@ -25,6 +25,18 @@ + + #include "cron.h" + ++#include <security/pam_appl.h> ++static pam_handle_t *pamh = NULL; ++static const struct pam_conv conv = { ++ NULL ++}; ++#define PAM_FAIL_CHECK if (retcode != PAM_SUCCESS) { \ ++ fprintf(stderr,"\n%s\n",pam_strerror(pamh, retcode)); \ ++ syslog(LOG_ERR,"%s",pam_strerror(pamh, retcode)); \ ++ pam_end(pamh, retcode); exit(1); \ ++ } ++ ++ + static void child_process(entry *, user *); + static int safe_p(const char *, const char *); + +@@ -65,6 +77,7 @@ + int stdin_pipe[2], stdout_pipe[2]; + char *input_data, *usernm, *mailto; + int children = 0; ++ int retcode = 0; + + Debug(DPROC, ("[%ld] child_process('%s')\n", (long)getpid(), e->cmd)) + +@@ -134,6 +147,16 @@ + *p = '\0'; + } + ++ ++ retcode = pam_start("cron", usernm, &conv, &pamh); ++ PAM_FAIL_CHECK; ++ retcode = pam_acct_mgmt(pamh, PAM_SILENT); ++ PAM_FAIL_CHECK; ++ retcode = pam_open_session(pamh, PAM_SILENT); ++ PAM_FAIL_CHECK; ++ retcode = pam_setcred(pamh, PAM_ESTABLISH_CRED | PAM_SILENT); ++ PAM_FAIL_CHECK; ++ + /* fork again, this time so we can exec the user's command. + */ + switch (vfork()) { +@@ -507,6 +530,9 @@ + Debug(DPROC, (", dumped core")) + Debug(DPROC, ("\n")) + } ++ pam_setcred(pamh, PAM_DELETE_CRED | PAM_SILENT); ++ retcode = pam_close_session(pamh, PAM_SILENT); ++ pam_end(pamh, retcode); + } + + static int diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff new file mode 100644 index 000000000000..ec2493e8c3ca --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux-1.diff @@ -0,0 +1,144 @@ +diff -purN vixie-cron-4.1.orig/Makefile vixie-cron-4.1/Makefile +--- vixie-cron-4.1.orig/Makefile 2004-08-27 14:09:33.000000000 -0400 ++++ vixie-cron-4.1/Makefile 2008-08-25 15:17:20.062720415 -0400 +@@ -68,7 +68,8 @@ LINTFLAGS = -hbxa $(INCLUDE) $(DEBUGGING + #<<want to use a nonstandard CC?>> + CC = gcc -Wall -Wno-unused -Wno-comment + #<<manifest defines>> +-DEFS = ++DEFS = -s -DWITH_SELINUX ++LIBS += -lselinux + #(SGI IRIX systems need this) + #DEFS = -D_BSD_SIGNALS -Dconst= + #<<the name of the BSD-like install program>> +diff -purN vixie-cron-4.1.orig/database.c vixie-cron-4.1/database.c +--- vixie-cron-4.1.orig/database.c 2004-08-27 14:09:34.000000000 -0400 ++++ vixie-cron-4.1/database.c 2008-08-27 08:19:37.948930858 -0400 +@@ -28,6 +28,16 @@ static char rcsid[] = "# $Id$ + + #include "cron.h" + ++#ifdef WITH_SELINUX ++#include <selinux/selinux.h> ++#include <selinux/flask.h> ++#include <selinux/av_permissions.h> ++#include <selinux/get_context_list.h> ++#define SYSUSERNAME "system_u" ++#else ++#define SYSUSERNAME "*system*" ++#endif ++ + #define TMAX(a,b) ((a)>(b)?(a):(b)) + + static void process_crontab(const char *, const char *, +@@ -183,7 +193,7 @@ process_crontab(const char *uname, const + if (fname == NULL) { + /* must be set to something for logging purposes. + */ +- fname = "*system*"; ++ fname = SYSUSERNAME; + } else if ((pw = getpwnam(uname)) == NULL) { + /* file doesn't have a user in passwd file. + */ +@@ -245,6 +255,56 @@ process_crontab(const char *uname, const + free_user(u); + log_it(fname, getpid(), "RELOAD", tabname); + } ++#ifdef WITH_SELINUX ++ if (is_selinux_enabled()) { ++ security_context_t file_context=NULL; ++ security_context_t user_context=NULL; ++ struct av_decision avd; ++ int retval=0; ++ char *seuser=NULL; ++ char *level=NULL; ++ ++ if (fgetfilecon(crontab_fd, &file_context) < OK) { ++ log_it(fname, getpid(), "getfilecon FAILED", tabname); ++ goto next_crontab; ++ } ++ ++ /* ++ * Since crontab files are not directly executed, ++ * crond must ensure that the crontab file has ++ * a context that is appropriate for the context of ++ * the user cron job. It performs an entrypoint ++ * permission check for this purpose. ++ */ ++ if (getseuserbyname(fname, &seuser, &level) < 0) { ++ log_it(fname, getpid(), "NO SEUSER", tabname); ++ goto next_crontab; ++ } ++ ++ if (get_default_context_with_level(seuser, level, NULL, &user_context) < 0) { ++ log_it(fname, getpid(), "NO CONTEXT", tabname); ++ freecon(file_context); ++ free(seuser); ++ free(level); ++ goto next_crontab; ++ } ++ ++ retval = security_compute_av(user_context, ++ file_context, ++ SECCLASS_FILE, ++ FILE__ENTRYPOINT, ++ &avd); ++ freecon(user_context); ++ freecon(file_context); ++ free(seuser); ++ free(level); ++ ++ if (retval || ((FILE__ENTRYPOINT & avd.allowed) != FILE__ENTRYPOINT)) { ++ log_it(fname, getpid(), "ENTRYPOINT FAILED", tabname); ++ goto next_crontab; ++ } ++ } ++#endif + u = load_user(crontab_fd, pw, fname); + if (u != NULL) { + u->mtime = statbuf->st_mtime; +diff -purN vixie-cron-4.1.orig/do_command.c vixie-cron-4.1/do_command.c +--- vixie-cron-4.1.orig/do_command.c 2004-08-27 14:09:34.000000000 -0400 ++++ vixie-cron-4.1/do_command.c 2008-08-25 15:43:43.289174371 -0400 +@@ -25,6 +25,11 @@ static char rcsid[] = "# $Id$ + + #include "cron.h" + ++#ifdef WITH_SELINUX ++#include <selinux/selinux.h> ++#include <selinux/get_context_list.h> ++#endif ++ + static void child_process(entry *, user *); + static int safe_p(const char *, const char *); + +@@ -265,6 +270,29 @@ child_process(entry *e, user *u) { + _exit(OK_EXIT); + } + # endif /*DEBUGGING*/ ++#ifdef WITH_SELINUX ++ if (is_selinux_enabled()) { ++ char *seuser=NULL; ++ char *level=NULL; ++ security_context_t scontext; ++ ++ if (getseuserbyname(u->name, &seuser, &level) < 0) { ++ fprintf(stderr, "getseuserbyname: Could not determine seuser for user %s\n", u->name); ++ _exit(ERROR_EXIT); ++ } ++ if (get_default_context_with_level(seuser, level, NULL, &scontext) < 0) { ++ fprintf(stderr, "get_default_context_with_level: could not get security context for user %s, seuser %s\n", u->name, seuser); ++ _exit(ERROR_EXIT); ++ } ++ if (setexeccon(scontext) < 0) { ++ fprintf(stderr, "setexeccon: Could not set exec context to %s for user %s\n", scontext, u->name); ++ _exit(ERROR_EXIT); ++ } ++ free(seuser); ++ free(level); ++ freecon(scontext); ++ } ++#endif + execle(shell, shell, "-c", e->cmd, (char *)0, e->envp); + fprintf(stderr, "execl: couldn't exec `%s'\n", shell); + perror("execl"); diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-selinux.diff b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux.diff new file mode 100644 index 000000000000..a4621e2530da --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-selinux.diff @@ -0,0 +1,117 @@ +--- vixie-cron-3.0.1/Makefile.selinux 2003-05-20 14:52:06.000000000 -0400 ++++ vixie-cron-3.0.1/Makefile 2003-05-20 14:52:21.000000000 -0400 +@@ -71,7 +71,8 @@ LINTFLAGS = -hbxa $(INCLUDE) $(COMPAT) $ + #<<want to use a nonstandard CC?>> + #CC = vcc + #<<manifest defines>> +-DEFS = ++DEFS = -s -DWITH_SELINUX ++LIBS += -lselinux + #(SGI IRIX systems need this) + #DEFS = -D_BSD_SIGNALS -Dconst= + #<<the name of the BSD-like install program>> +--- vixie-cron-3.0.1/database.c.selinux 2003-05-20 14:52:56.000000000 -0400 ++++ vixie-cron-3.0.1/database.c 2003-05-23 13:27:24.898020960 -0400 +@@ -28,6 +28,15 @@ + + #include "cron.h" + ++#ifdef WITH_SELINUX ++#include <selinux/selinux.h> ++#include <selinux/flask.h> ++#include <selinux/av_permissions.h> ++#define SYSUSERNAME "system_u" ++#else ++#define SYSUSERNAME "*system*" ++#endif ++ + #define TMAX(a,b) ((a)>(b)?(a):(b)) + + static void process_crontab(const char *, const char *, +@@ -217,7 +226,7 @@ + if (fname == NULL) { + /* must be set to something for logging purposes. + */ +- fname = "*system*"; ++ fname = SYSUSERNAME; + } else if ((pw = getpwnam(uname)) == NULL) { + /* file doesn't have a user in passwd file. + */ +@@ -279,6 +288,43 @@ + free_user(u); + log_it(fname, getpid(), "RELOAD", tabname); + } ++#ifdef WITH_SELINUX ++ if (is_selinux_enabled()) { ++ security_context_t file_context=NULL; ++ security_context_t user_context=NULL; ++ struct av_decision avd; ++ int retval=0; ++ ++ if (fgetfilecon(crontab_fd, &file_context) < OK) { ++ log_it(fname, getpid(), "getfilecon FAILED", tabname); ++ goto next_crontab; ++ } ++ ++ /* ++ * Since crontab files are not directly executed, ++ * crond must ensure that the crontab file has ++ * a context that is appropriate for the context of ++ * the user cron job. It performs an entrypoint ++ * permission check for this purpose. ++ */ ++ if (get_default_context(fname, NULL, &user_context)) { ++ log_it(fname, getpid(), "NO CONTEXT", tabname); ++ freecon(file_context); ++ goto next_crontab; ++ } ++ retval = security_compute_av(user_context, ++ file_context, ++ SECCLASS_FILE, ++ FILE__ENTRYPOINT, ++ &avd); ++ freecon(user_context); ++ freecon(file_context); ++ if (retval || ((FILE__ENTRYPOINT & avd.allowed) != FILE__ENTRYPOINT)) { ++ log_it(fname, getpid(), "ENTRYPOINT FAILED", tabname); ++ goto next_crontab; ++ } ++ } ++#endif + u = load_user(crontab_fd, pw, fname); + if (u != NULL) { + u->mtime = statbuf->st_mtime; +--- vixie-cron-3.0.1/do_command.c.selinux 2003-05-20 14:53:12.000000000 -0400 ++++ vixie-cron-3.0.1/do_command.c 2003-05-20 14:58:06.000000000 -0400 +@@ -25,6 +25,10 @@ + + #include "cron.h" + ++#ifdef WITH_SELINUX ++#include <selinux/selinux.h> ++#endif ++ + static void child_process(entry *, user *); + static int safe_p(const char *, const char *); + +@@ -265,6 +269,20 @@ + _exit(OK_EXIT); + } + # endif /*DEBUGGING*/ ++#ifdef WITH_SELINUX ++ if (is_selinux_enabled()) { ++ security_context_t scontext; ++ if (get_default_context(u->name, NULL, &scontext)) { ++ fprintf(stderr, "execle_secure: couldn't get security context for user %s\n", u->name); ++ _exit(ERROR_EXIT); ++ } ++ if (setexeccon(scontext) < 0) { ++ fprintf(stderr, "Could not set exec context to %s for user %s\n", scontext,u->name); ++ _exit(ERROR_EXIT); ++ } ++ freecon(scontext); ++ } ++#endif + execle(shell, shell, "-c", e->cmd, (char *)0, e->envp); + fprintf(stderr, "execl: couldn't exec `%s'\n", shell); + perror("execl"); diff --git a/sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch b/sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch new file mode 100644 index 000000000000..42fd8e13edd9 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron-4.1-setuid_check.patch @@ -0,0 +1,29 @@ +--- vixie-cron-4.1/do_command.c 2006-05-25 16:44:26.000000000 +0400 ++++ vixie-cron-4.1.lk/do_command.c 2006-05-25 16:42:25.000000000 +0400 +@@ -240,12 +240,23 @@ + } + } + #else +- setgid(e->pwd->pw_gid); ++ + initgroups(usernm, e->pwd->pw_gid); + #if (defined(BSD)) && (BSD >= 199103) + setlogin(usernm); + #endif /* BSD */ +- setuid(e->pwd->pw_uid); /* we aren't root after this... */ ++ // setuid(e->pwd->pw_uid); /* we aren't root after this... */ ++ ++ if ( setgid(e->pwd->pw_gid) == -1 ) { ++ fprintf(stderr,"can't set gid for %s\n", e->pwd->pw_name); ++ _exit(1); ++ } ++ ++ if ( setuid(e->pwd->pw_uid) == -1 ) { ++ fprintf(stderr,"can't set uid for %s\n", e->pwd->pw_name); ++ _exit(1); ++ } ++ + + #endif /* LOGIN_CAP */ + chdir(env_get("HOME", e->envp)); + diff --git a/sys-process/vixie-cron/files/vixie-cron.rc6 b/sys-process/vixie-cron/files/vixie-cron.rc6 new file mode 100755 index 000000000000..ea72ceddde80 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron.rc6 @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use clock logger + need localmount + provide cron +} + +start() { + ebegin "Starting vixie-cron" + start-stop-daemon --start --quiet --exec /usr/sbin/cron + eend $? +} + +stop() { + ebegin "Stopping vixie-cron" + start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid + eend $? +} diff --git a/sys-process/vixie-cron/files/vixie-cron.rc7 b/sys-process/vixie-cron/files/vixie-cron.rc7 new file mode 100644 index 000000000000..25d6bd116f71 --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron.rc7 @@ -0,0 +1,13 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +command=/usr/sbin/cron +pidfile=/var/run/cron.pid + +depend() { + use clock logger + need localmount + provide cron +} diff --git a/sys-process/vixie-cron/files/vixie-cron.service b/sys-process/vixie-cron/files/vixie-cron.service new file mode 100644 index 000000000000..66c3862e47ed --- /dev/null +++ b/sys-process/vixie-cron/files/vixie-cron.service @@ -0,0 +1,11 @@ +[Unit] +Description=Vixie Cron Daemon + +[Service] +Type=forking +ExecStart=/usr/sbin/cron +ExecStop=/bin/kill -TERM $MAINPID +IgnoreSIGPIPE=false + +[Install] +WantedBy=multi-user.target diff --git a/sys-process/vixie-cron/metadata.xml b/sys-process/vixie-cron/metadata.xml new file mode 100644 index 000000000000..3f399e92bcff --- /dev/null +++ b/sys-process/vixie-cron/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cron</herd> +</pkgmetadata> diff --git a/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild b/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild new file mode 100644 index 000000000000..e551741be553 --- /dev/null +++ b/sys-process/vixie-cron/vixie-cron-4.1-r14.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit cron toolchain-funcs pam eutils flag-o-matic user systemd + +# no useful homepage, bug #65898 +HOMEPAGE="ftp://ftp.isc.org/isc/cron/" +DESCRIPTION="Paul Vixie's cron daemon, a fully featured crond implementation" + +SELINUX_PATCH="${P}-selinux-1.diff" +GENTOO_PATCH_REV="r4" + +SRC_URI="mirror://gentoo/${P}.tar.bz2 + mirror://gentoo/${P}-gentoo-${GENTOO_PATCH_REV}.patch.bz2" + +LICENSE="ISC BSD-2 BSD" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="selinux pam debug" + +DEPEND="selinux? ( sys-libs/libselinux ) + pam? ( virtual/pam )" + +RDEPEND="selinux? ( sys-libs/libselinux ) + pam? ( virtual/pam )" + +#vixie-cron supports /etc/crontab +CRON_SYSTEM_CRONTAB="yes" + +pkg_setup() { + enewgroup crontab +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${WORKDIR}"/${P}-gentoo-${GENTOO_PATCH_REV}.patch + epatch "${FILESDIR}"/crontab.5.diff + epatch "${FILESDIR}"/${P}-commandline.patch + epatch "${FILESDIR}"/${P}-basename.diff + epatch "${FILESDIR}"/${P}-setuid_check.patch + epatch "${FILESDIR}"/${P}-hardlink.patch + epatch "${FILESDIR}"/${P}-crontabrace.patch + use pam && epatch "${FILESDIR}"/${P}-pam.patch + use selinux && epatch "${FILESDIR}"/${SELINUX_PATCH} +} + +src_compile() { + use debug && append-flags -DDEBUGGING + + sed -i -e "s:gcc \(-Wall.*\):$(tc-getCC) \1 ${CFLAGS}:" \ + -e "s:^\(LDFLAGS[ \t]\+=\).*:\1 ${LDFLAGS}:" Makefile \ + || die "sed Makefile failed" + + emake || die "emake failed" +} + +src_install() { + docrondir -m 1730 -o root -g crontab + docron + docrontab -m 2755 -o root -g crontab + + # /etc stuff + insinto /etc + newins "${FILESDIR}"/crontab-3.0.1-r4 crontab + newins "${FILESDIR}"/${P}-cron.deny cron.deny + + keepdir /etc/cron.d + newpamd "${FILESDIR}"/pamd.compatible cron + newinitd "${FILESDIR}"/vixie-cron.rc7 vixie-cron + + # doc stuff + doman crontab.1 crontab.5 cron.8 + dodoc "${FILESDIR}"/crontab + dodoc CHANGES CONVERSION FEATURES MAIL README THANKS + + systemd_dounit "${FILESDIR}/${PN}.service" +} + +pkg_preinst() { + has_version "<${CATEGORY}/${PN}-4.1-r10" + fix_spool_dir_perms=$? +} + +pkg_postinst() { + if [[ -f ${ROOT}/etc/init.d/vcron ]] + then + ewarn "Please run:" + ewarn "rc-update del vcron" + ewarn "rc-update add vixie-cron default" + fi + + # bug 71326 + if [[ -u ${ROOT}/etc/pam.d/cron ]] ; then + echo + ewarn "Warning: previous ebuilds didn't reset permissions prior" + ewarn "to installing crontab, resulting in /etc/pam.d/cron being" + ewarn "installed with the SUID and executable bits set." + ewarn + ewarn "Run the following as root to set the proper permissions:" + ewarn " chmod 0644 /etc/pam.d/cron" + echo + fi + + # bug 164466 + if [[ $fix_spool_dir_perms = 0 ]] ; then + echo + ewarn "Previous ebuilds didn't correctly set permissions on" + ewarn "the crontabs spool directory. Proper permissions are" + ewarn "now being set on ${ROOT}var/spool/cron/crontabs/" + ewarn "Look at this directory if you have a specific configuration" + ewarn "that needs special ownerships or permissions." + echo + chmod 1730 "${ROOT}/var/spool/cron/crontabs" || die "chmod failed" + chgrp -R crontab "${ROOT}/var/spool/cron/crontabs" || die "chgrp failed" + cd "${ROOT}/var/spool/cron/crontabs/" + for cronfile in * ; do + [[ ! -f $cronfile ]] || chown "$cronfile:crontab" "$cronfile" \ + || ewarn "chown failed on $cronfile, you probably have an orphan file." + done + fi + + cron_pkg_postinst +} diff --git a/sys-process/wait_on_pid/Manifest b/sys-process/wait_on_pid/Manifest new file mode 100644 index 000000000000..762fc32bea1f --- /dev/null +++ b/sys-process/wait_on_pid/Manifest @@ -0,0 +1 @@ +DIST wait_on_pid-0.0.2.tar.bz2 7139 SHA256 5bb33865c294378f3217facc183c0284dd6bd81e475fff715f03eeb5d47e40f8 SHA512 22e3481736b90b1b3152dc5c07e766892d42de199669909752fcbcfcd94ec9c3a143d1474c9533cf3494931e19e4ab63f7f4dcef7fffe7e2ac3d803c22852e72 WHIRLPOOL 240d263148009e447a522bf4bf53b2dd5e62e14f5a2827091627b4435cdec56c2720032bb0b0f8e2f2031366921d37989149ba77ccfbb052c364ce69ac73e7e6 diff --git a/sys-process/wait_on_pid/metadata.xml b/sys-process/wait_on_pid/metadata.xml new file mode 100644 index 000000000000..1e2132b024e6 --- /dev/null +++ b/sys-process/wait_on_pid/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>zzam@gentoo.org</email> + <name>Matthias Schwarzott</name> +</maintainer> +</pkgmetadata> diff --git a/sys-process/wait_on_pid/wait_on_pid-0.0.2.ebuild b/sys-process/wait_on_pid/wait_on_pid-0.0.2.ebuild new file mode 100644 index 000000000000..315268fc9904 --- /dev/null +++ b/sys-process/wait_on_pid/wait_on_pid-0.0.2.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils toolchain-funcs + +DESCRIPTION="small utility to wait for an arbitrary process to exit" +HOMEPAGE="http://dev.gentoo.org/~zzam/wait_on_pid/" +SRC_URI="mirror://gentoo/$P.tar.bz2 http://dev.gentoo.org/~zzam/wait_on_pid/$P.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc x86 ~amd64-linux ~x86-linux" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_prepare() { + tc-export CC +} + +src_install() { + dobin wait_on_pid || die + dodoc README +} diff --git a/sys-process/watchpid/Manifest b/sys-process/watchpid/Manifest new file mode 100644 index 000000000000..125f848083f2 --- /dev/null +++ b/sys-process/watchpid/Manifest @@ -0,0 +1 @@ +DIST watchpid_0.1.tar.gz 36432 RMD160 fc2b6153083b62247187013f37335f3190afa00a SHA1 9b57f4756f9afd0c39b467547762cc41686c1924 SHA256 f5a41188e74282bd2a37a023e0d7aeee2c347d43ee895fa020864da950e17f6c diff --git a/sys-process/watchpid/metadata.xml b/sys-process/watchpid/metadata.xml new file mode 100644 index 000000000000..96a2d586367d --- /dev/null +++ b/sys-process/watchpid/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata> diff --git a/sys-process/watchpid/watchpid-0.1-r1.ebuild b/sys-process/watchpid/watchpid-0.1-r1.ebuild new file mode 100644 index 000000000000..d8db315a7ebd --- /dev/null +++ b/sys-process/watchpid/watchpid-0.1-r1.ebuild @@ -0,0 +1,22 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Watches a process for termination" +SRC_URI="mirror://gentoo/${PN}_${PV}.tar.gz" +HOMEPAGE="http://www.codepark.org/" +KEYWORDS="x86 amd64 -ppc" +IUSE="" +SLOT="0" +LICENSE="GPL-2" +DEPEND="" + +src_compile() { + econf || die "econf failed" + emake CFLAGS="${CFLAGS}" || die "emake failed" +} + +src_install() { + make DESTDIR=${D} install || die "make install failed" + dodoc README AUTHORS +} diff --git a/sys-process/xjobs/Manifest b/sys-process/xjobs/Manifest new file mode 100644 index 000000000000..af0c065333f6 --- /dev/null +++ b/sys-process/xjobs/Manifest @@ -0,0 +1 @@ +DIST xjobs-20140125.tgz 95439 SHA256 cbe582b1109c380bd80a02eb21b721dcfc5ef701446bfc9606b99246a84e737a SHA512 f95f42824a133881aa86ba07095bd4bef87bf628cae1fe73f2ce6e00bc7e327382e28d808cd13db1a781cb1d357167896cbda663382b16bb87861a2587478644 WHIRLPOOL 1b56d7a02e6cb738a47b3676943aef421a1db6502c249a07dd80268c3cb1c11bbcb5e8dfb2aabb9bb2ba3ef742c1b0584ee9526147fd35a1156b4f9ff2c04f80 diff --git a/sys-process/xjobs/metadata.xml b/sys-process/xjobs/metadata.xml new file mode 100644 index 000000000000..df7fdbeaf2b3 --- /dev/null +++ b/sys-process/xjobs/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>mjo@gentoo.org</email> + <name>Michael Orlitzky</name> + </maintainer> +</pkgmetadata> diff --git a/sys-process/xjobs/xjobs-20140125.ebuild b/sys-process/xjobs/xjobs-20140125.ebuild new file mode 100644 index 000000000000..d1bd03a06173 --- /dev/null +++ b/sys-process/xjobs/xjobs-20140125.ebuild @@ -0,0 +1,17 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="Reads commands line by line and executes them in parallel" +HOMEPAGE="http://www.maier-komor.de/${PN}.html" +SRC_URI="http://www.maier-komor.de/${PN}/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="sys-devel/flex" +RDEPEND="" |