diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/cronolog |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/cronolog')
14 files changed, 751 insertions, 0 deletions
diff --git a/app-admin/cronolog/Manifest b/app-admin/cronolog/Manifest new file mode 100644 index 000000000000..bd1871a3375e --- /dev/null +++ b/app-admin/cronolog/Manifest @@ -0,0 +1,16 @@ +AUX 1.6.2-patches/cronolog-define-strptime.patch 302 SHA256 06f933bef29bf3194c7506d9abb476b5a2996ec8100c9a7a05164ce59c86c573 SHA512 f2bd5b109ef4c3656f31f516364defaad899a16f279d867a1548e7c797b30691daef49b7bee49e6ce15be3903aea09c3b5cf04cf077797d066ada9ac68e6335a WHIRLPOOL d8ad5817fd340cb534dea62622443cc2157a74195467436b01c03608c0e7934d680976f9b08399d202b86876a0a0330cf9589ed6dbbcf0ea1b638442804331f5 +AUX 1.6.2-patches/cronolog-doc.patch 406 SHA256 fc4098f09e6aa7a252239bc5ab1da45d1ce5d3c61ecb7e44deb6ee337fb75ca2 SHA512 a33eda2c8d9cb1c4f72ec6fa80de9748789cb1e754f6448f53c12df601d78f5284c66d1ed476cd11435fb83a4d834cdaea85f0a4d1421fb1796197a871860cfa WHIRLPOOL ab3b8c352a7b61534f37df8e2e3e522705ce2960f7cf0e28ebf51a919b9a38180aa0afa04f99186777591852041a41cfe89564e83f56f9bf8ccab287c7e21043 +AUX 1.6.2-patches/cronolog-getopt-long.patch 1080 SHA256 60dc7a318f7caf53834d92323bf9f65c43fce1d145002c8e7106aeb1da0671f7 SHA512 84f784dff035200a15ade43e5379bbaadf8ac24216c2dd157d2f3f2e30575d0bda8357b0d2661f1d13ba1b446e88b4bbe2805b46fd8af80c5f6af4a47bc03f4e WHIRLPOOL cc105dc2981b525eeae0c36e99e2d511a3e3816f19c53af3f87c7222c9c19192135fa8757dcaa48f06c782756cf0a8e4ee77eeefdafc73bfd2a20c60c2874983 +AUX 1.6.2-patches/cronolog-large-file.patch 823 SHA256 9bd28c00b30ef37c7fed8d362552edc86d5feb4551228facf78308d39eeb5716 SHA512 23d2579941d57bab47e73c3f258e54074b87bd5306877d8139b3a777de97be8d24c994142d6a38163048d02aa550096264e076fd47b3e5b4d5599d16f48edd3e WHIRLPOOL 5de6125851583665e67f215e29ed4fc94bcb934c9bfefa021d8a7283e61ad29d44f9f1122e34e82319e9e855c45b0524b6a15e316f55e4a733a2d8a5f05ba72e +AUX 1.6.2-patches/cronolog-missing-symlink.patch 326 SHA256 130793717436653c389280f372d5dce9b3e069f2b8c5fbf49a8a1fda6d443af1 SHA512 6617e7ccde6fd97e68147157b1c1341e5d4d0ad2ffe69225d543990ef5dba3bfea2f79c3a351d696470a70e0da57595d3eea194cc53aea81d3926b0f3b2eabad WHIRLPOOL 76c620918624f09265fbd4186f44018067ccbb491a7294ca76365b839ded6ac078b906505f3bb34ced8f0fc21f26e056c02197d7758e1af92c9beee64d92ab81 +AUX 1.6.2-patches/cronolog-setugid.patch 12345 SHA256 cd4a84f205b90575524ff282b19f997e0d6f487a24ad47a927bd29625cdd5151 SHA512 ed9048ceb5e9dcb86c34f34e0f2619ec85a1789883939ca99875ec61b3df711e6793204363445c8df3a13298aaa079fadde76f0a9e87b62b8bc44f103143a9e0 WHIRLPOOL 42801ed9c84470346bf9a7ef7bc7e81da17163a7032b28b336a5e59eb0502b6612759563394d2c83d23e88862086be46f3c6edc3447096aee9b3754ed1177f39 +AUX 1.6.2-patches/cronolog-sigusr1.patch 1154 SHA256 146822d36cac823e6e1c40838b7b1c94809202dfa495e527065b111aa1050ff7 SHA512 8d31f0032581b3295b168b5af4755f0ac5793869d7472a42c66ebe2b0ac7ecf03b88aa6459341bcbc5f6dfa3265f205844fe1a1b4e1256f957f12b5577ef2ed6 WHIRLPOOL fed9b050eca48b43d3054ea5dc44c8ed4dc6f409078f9869dc45580014bb40d063f2be70050d7fbd0fdcb99c9cc2ce13b81c81c70c11c0ac33352f4cdc65dadb +AUX 1.6.2-patches/cronolog-strftime.patch 435 SHA256 bb5fe1e93e79e4704bc0be045f4b15a810a76c068e1fc14e15c63039bb8f7ff6 SHA512 8c226b70c7b026ce5e7400798d0e2016ed984df04bd66b6a2358ce445323be930b5f7951b879545c8f075761cc2b5062f9ccc4b759f2e586a4c8943efa4ee914 WHIRLPOOL 70ba3a12f518727933a3c493f9a6ccce6e949e0091d8c6b2e8a6126c63a6981782a494ea1250dcd4892621cd23944fdcb33566c1fea246db07b8525487b652eb +AUX cronolog-1.6.2-umask.patch 2366 SHA256 8cf46a4acf301a1a5a12a993d653969874d8aba31884462313cd92a6a19976ae SHA512 da3f7d84ce365edce396bc43ec9b469973301c6a28f3eb56b7f019dcb65fb7ceec981f92c1382542d01e4b6e49e32ff4fe283aed9dbc7bb30c6780775acf39b3 WHIRLPOOL 740496a38f513494a4a3678c7bd9d1559924a667c85699d43622686e5e894fd7a8aa54f8e70210a98b624d3ef453158c2413b06afbdcac1eb0d8966643193a47 +DIST cronolog-1.6.2.tar.gz 133591 SHA256 65e91607643e5aa5b336f17636fa474eb6669acc89288e72feb2f54a27edb88e SHA512 786135aaa1359605840effb9a755c500970098ca32c1c4976c62f9d7481d24cecefe223ce8dcc34a139427259a6f3ba1c435c700a72ee07ed68ffc7f2d36e4ea WHIRLPOOL 2da26cdbbf3de135c1eaaaa4e932ed297f13ae05420f03a6b8f950c87c1d4ac067048058203dc9825e3a977aef7b44b24dbaf37b81c96c53e632e78121651506 +EBUILD cronolog-1.6.2-r3.ebuild 551 SHA256 5e55b8f58f880630e3a9f1fcad34d30578b65ef3e0026682f9fd5c01db620b64 SHA512 7d59570fa6a7346bc97acd36f9f30d4433929541bae8afe97ef7c2db2fa04bd2c11d63c750a41793edcbdf6d59456db890c48d07151d897cc5d160f7d5fa11d0 WHIRLPOOL b1489d147bf78bed691136a164ab70f656be473dc27a3fb2298eba67718b9a435e34beee3ea528862fab3b3a5eec6dcffbf8c626b00ffbc4046fe3edfa644fdd +EBUILD cronolog-1.6.2-r4.ebuild 636 SHA256 e86b2920ea88b30550c3e16300011a253e669d01f32f3bac4e34f8a815dc5339 SHA512 0b15fad256c0b3c2687aac00da048f3fb03ad35ecb307afa53c4f4d455f9c3930fc29a07f016151ea5296b6a1e0b74fb9e48de72d2f94f87e2a13d5e9cabb119 WHIRLPOOL 82360a970a77497d75b05f279e111acf58a310496c3058597c0f085716ed050f82f982ebddb43272b53afd36985bd7f302b13454edefe1dca582b79a8c766873 +EBUILD cronolog-1.6.2-r5.ebuild 610 SHA256 0020b4cf82c7db6621ab624fbde3c5020dbe7cfebc06bfe569bc1983bfd9c432 SHA512 c24343e2e09355cfe3b335583d13504a679a9f9cc2ffde0bb1fb2e30b86061b5d976bb5a275a48be2988f5b7a5667471f86a43a95bc457a1c86dadb716cdbd03 WHIRLPOOL f9d45a03b1a3c2e30cd839b21b765df6e286be2bc4b3df9d4e8d24e7ae1fbcafa698d93d12dd4dbc013b6bbc3662179042fbf676d1d643ab4625df93af061928 +MISC ChangeLog 3450 SHA256 4fccb655314cdc275d162d7c1befde1a5c67cb4a8adafc9dd9f15dc9e4ab4250 SHA512 ccb5c46299c97c421f8d9aa6a4363b79aae99ff8bc64f542f1a49e61db64824d95d6812d22c34f66633cf30d2daa261f604036550e7c5ad8426bfa89a9e5837d WHIRLPOOL 2277f8492dc698a8f197e9b636528eb4b0924aaa6f8710364eb890041428a24172803e61f7f90ec05942598bd1905066cd9e8146b6ce09b63f77a9716a50f8e8 +MISC ChangeLog-2015 4731 SHA256 d1b5eae7c8c9ae1d8d387be31a6e92f36b589151c26abf963db0e94768ea202e SHA512 1f1eea1f9a8e7b184e3997ad1bb58b84d24d663845cf7e859acfb35d5912062d8c824971a30292f0dfd578de31aede6d8bf3cd9c7845ba8de55b9be97dbf3515 WHIRLPOOL 539c6e34b51b242ecb73ad33a13c9d6b9791391691d8ca612ef6211df15e057f82b1845fdc6d41b19e7f4b53efdff1c5a7eb6df1e3bf190f54b852766dbb66bd +MISC metadata.xml 719 SHA256 1510b0c232eea361df3ec9399dea339e6e38b9b4f9d1485721653ae807260e57 SHA512 d5b5452b8105d8273328ee8ab1c95674686a00862a578f8171c4799791ceb131ac0204693a3d65ce6136d9cbea114f7f899a85669bde9b76b8c8e800a4c4c75f WHIRLPOOL 02cf394ec469d849f9dbabd14997ef14457e7f3e7a82f3ead00c353f66b748344dafab77883082158f33f629356d6a6595922cb5f68369b83d035ab5c8dddb69 diff --git a/app-admin/cronolog/cronolog-1.6.2-r3.ebuild b/app-admin/cronolog/cronolog-1.6.2-r3.ebuild new file mode 100644 index 000000000000..d3dd66369235 --- /dev/null +++ b/app-admin/cronolog/cronolog-1.6.2-r3.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils autotools + +DESCRIPTION="Cronolog apache logfile rotator" +HOMEPAGE="http://cronolog.org/" +SRC_URI="http://cronolog.org/download/${P}.tar.gz" + +LICENSE="GPL-2+ Apache-1.0" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-patches/*.patch + + eautoreconf +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog INSTALL NEWS README TODO +} diff --git a/app-admin/cronolog/cronolog-1.6.2-r4.ebuild b/app-admin/cronolog/cronolog-1.6.2-r4.ebuild new file mode 100644 index 000000000000..3c603c959591 --- /dev/null +++ b/app-admin/cronolog/cronolog-1.6.2-r4.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils autotools + +DESCRIPTION="Cronolog apache logfile rotator" +HOMEPAGE="http://cronolog.org/" +SRC_URI="http://cronolog.org/download/${P}.tar.gz" + +LICENSE="GPL-2+ Apache-1.0" +SLOT="0" +KEYWORDS="amd64 ~arm ~ppc x86" +IUSE="" + +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}-patches/*.patch + # patch written for infra usage + epatch "${FILESDIR}"/${PN}-1.6.2-umask.patch + + eautoreconf +} + +src_install() { + make DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog INSTALL NEWS README TODO +} diff --git a/app-admin/cronolog/cronolog-1.6.2-r5.ebuild b/app-admin/cronolog/cronolog-1.6.2-r5.ebuild new file mode 100644 index 000000000000..ca4ce0c7003d --- /dev/null +++ b/app-admin/cronolog/cronolog-1.6.2-r5.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils autotools + +DESCRIPTION="Log rotation software" +HOMEPAGE="https://github.com/fordmason/cronolog" +SRC_URI="http://cronolog.org/download/${P}.tar.gz" + +LICENSE="GPL-2+ Apache-1.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" + +PATCHES=( + "${FILESDIR}"/${PV}-patches + # rename and move into ${PV}-patches after -r3 removal + "${FILESDIR}"/${P}-umask.patch +) + +DOCS=( AUTHORS ChangeLog INSTALL NEWS README TODO ) + +src_prepare() { + default + mv configure.in configure.ac || die + eautoreconf +} diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-define-strptime.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-define-strptime.patch new file mode 100644 index 000000000000..26ac2a40319c --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-define-strptime.patch @@ -0,0 +1,11 @@ +diff -urb cronolog-1.6.2/src/cronoutils.c cronolog-1.6.2-patched/src/cronoutils.c +--- a/src/cronoutils.c 2001-05-03 09:43:21.000000000 -0700 ++++ b/src/cronoutils.c 2008-01-05 22:08:42.000000000 -0800 +@@ -69,6 +69,8 @@ + * + */ + ++#define _GNU_SOURCE ++ + #include "cronoutils.h" + extern char *tzname[2]; diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-doc.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-doc.patch new file mode 100644 index 000000000000..b4b68d5690a9 --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-doc.patch @@ -0,0 +1,12 @@ +diff -ur cronolog-1.6.2/doc/cronolog.1m cronolog-1.6.2/doc/cronolog.1m +--- a/doc/cronolog.1m 2001-05-04 01:44:55.000000000 -0700 ++++ b/doc/cronolog.1m 2008-01-06 00:43:33.000000000 -0800 +@@ -77,7 +77,7 @@ + to the current log file. + .\" + .IP "-P \fINAME\fP" +-.IP "--prevlink=\fINAME\fP" ++.IP "--prev-symlink=\fINAME\fP" + maintain a symbolic link from + .I NAME + to the previous log file. Requires that the diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-getopt-long.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-getopt-long.patch new file mode 100644 index 000000000000..b7eb5c1760c4 --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-getopt-long.patch @@ -0,0 +1,24 @@ +diff -urp cronolog-1.6.2/src/cronolog.c cronolog-1.6.2/src/cronolog.c +--- a/src/cronolog.c 2001-05-03 09:42:48.000000000 -0700 ++++ b/src/cronolog.c 2008-01-05 23:54:53.000000000 -0800 +@@ -139,7 +139,8 @@ struct option long_options[] = + { "delay", required_argument, NULL, 'd' }, + { "once-only", no_argument, NULL, 'o' }, + { "help", no_argument, NULL, 'h' }, +- { "version", no_argument, NULL, 'V' } ++ { "version", no_argument, NULL, 'V' }, ++ { NULL, 0, NULL, 0 } + }; + #endif + +diff -urp cronolog-1.6.2/src/cronotest.c cronolog-1.6.2/src/cronotest.c +--- cronolog-1.6.2/src/cronotest.c 2001-05-03 09:26:44.000000000 -0700 ++++ cronolog-1.6.2/src/cronotest.c 2008-01-06 00:02:24.000000000 -0800 +@@ -112,7 +112,8 @@ struct option long_options[] = + { "test-subdirs", required_argument, NULL, 'D' }, + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' }, +- { "verbose", no_argument, NULL, 'v' } ++ { "verbose", no_argument, NULL, 'v' }, ++ { NULL, 0, NULL, 0 } + }; diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-large-file.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-large-file.patch new file mode 100644 index 000000000000..25e488f061c0 --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-large-file.patch @@ -0,0 +1,27 @@ +--- a/src/cronolog.c 2003-10-13 12:35:17.000000000 +0000 ++++ b/src/cronolog.c 2003-10-13 12:36:36.000000000 +0000 +@@ -82,6 +82,8 @@ + * written to "file" (e.g. /dev/console) or to stderr if "file" is "-". + */ + ++#define _GNU_SOURCE 1 ++ + #include "cronoutils.h" + #include "getopt.h" + +@@ -394,13 +396,13 @@ + timestamp(*pnext_period), *pnext_period, + *pnext_period - time_now)); + +- log_fd = open(pfilename, O_WRONLY|O_CREAT|O_APPEND, FILE_MODE); ++ log_fd = open(pfilename, O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, FILE_MODE); + + #ifndef DONT_CREATE_SUBDIRS + if ((log_fd < 0) && (errno == ENOENT)) + { + create_subdirs(pfilename); +- log_fd = open(pfilename, O_WRONLY|O_CREAT|O_APPEND, FILE_MODE); ++ log_fd = open(pfilename, O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, FILE_MODE); + } + #endif + diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-missing-symlink.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-missing-symlink.patch new file mode 100644 index 000000000000..974c69faa74a --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-missing-symlink.patch @@ -0,0 +1,11 @@ +--- a/src/cronoutils.c 2003-10-13 12:44:59.000000000 +0000 ++++ b/src/cronoutils.c 2003-10-13 12:45:08.000000000 +0000 +@@ -199,7 +199,7 @@ + { + unlink(prevlinkname); + } +- if (stat(linkname, &stat_buf) == 0) ++ if (lstat(linkname, &stat_buf) == 0) + { + if (prevlinkname) { + rename(linkname, prevlinkname); diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-setugid.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-setugid.patch new file mode 100644 index 000000000000..8fe4c0f12396 --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-setugid.patch @@ -0,0 +1,390 @@ +diff -Naur cronolog-1.6.2/configure cronolog-1.6.2-new/configure +--- a/configure Thu May 3 17:44:22 2001 ++++ b/configure Mon Jun 3 00:38:32 2002 +@@ -1757,15 +1757,49 @@ + + fi + ++echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 ++echo "configure:1762: checking for uid_t in sys/types.h" >&5 ++if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then ++ echo $ac_n "(cached) $ac_c" 1>&6 ++else ++ cat > conftest.$ac_ext <<EOF ++#line 1767 "configure" ++#include "confdefs.h" ++#include <sys/types.h> ++EOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ egrep "uid_t" >/dev/null 2>&1; then ++ rm -rf conftest* ++ ac_cv_type_uid_t=yes ++else ++ rm -rf conftest* ++ ac_cv_type_uid_t=no ++fi ++rm -f conftest* ++ ++fi ++ ++echo "$ac_t""$ac_cv_type_uid_t" 1>&6 ++if test $ac_cv_type_uid_t = no; then ++ cat >> confdefs.h <<\EOF ++#define uid_t int ++EOF ++ ++ cat >> confdefs.h <<\EOF ++#define gid_t int ++EOF ++ ++fi ++ + + + echo $ac_n "checking for strftime""... $ac_c" 1>&6 +-echo "configure:1764: checking for strftime" >&5 ++echo "configure:1798: checking for strftime" >&5 + if eval "test \"`echo '$''{'ac_cv_func_strftime'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1769 "configure" ++#line 1803 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strftime(); below. */ +@@ -1788,7 +1822,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_strftime=yes" + else +@@ -1810,7 +1844,7 @@ + echo "$ac_t""no" 1>&6 + # strftime is in -lintl on SCO UNIX. + echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 +-echo "configure:1814: checking for strftime in -lintl" >&5 ++echo "configure:1848: checking for strftime in -lintl" >&5 + ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +@@ -1818,7 +1852,7 @@ + ac_save_LIBS="$LIBS" + LIBS="-lintl $LIBS" + cat > conftest.$ac_ext <<EOF +-#line 1822 "configure" ++#line 1856 "configure" + #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + /* We use char because int might match the return type of a gcc2 +@@ -1829,7 +1863,7 @@ + strftime() + ; return 0; } + EOF +-if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" + else +@@ -1856,12 +1890,12 @@ + fi + + echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +-echo "configure:1860: checking for vprintf" >&5 ++echo "configure:1894: checking for vprintf" >&5 + if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1865 "configure" ++#line 1899 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char vprintf(); below. */ +@@ -1884,7 +1918,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vprintf=yes" + else +@@ -1908,12 +1942,12 @@ + + if test "$ac_cv_func_vprintf" != yes; then + echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +-echo "configure:1912: checking for _doprnt" >&5 ++echo "configure:1946: checking for _doprnt" >&5 + if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1917 "configure" ++#line 1951 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt(); below. */ +@@ -1936,7 +1970,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func__doprnt=yes" + else +@@ -1963,12 +1997,12 @@ + for ac_func in mkdir mktime putenv + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:1967: checking for $ac_func" >&5 ++echo "configure:2001: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 1972 "configure" ++#line 2006 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +@@ -1991,7 +2025,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +@@ -2018,12 +2052,12 @@ + for ac_func in strptime localtime_r + do + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +-echo "configure:2022: checking for $ac_func" >&5 ++echo "configure:2056: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftest.$ac_ext <<EOF +-#line 2027 "configure" ++#line 2061 "configure" + #include "confdefs.h" + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +@@ -2046,7 +2080,7 @@ + + ; return 0; } + EOF +-if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:2084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +diff -Naur cronolog-1.6.2/configure.in cronolog-1.6.2-new/configure.in +--- cronolog-1.6.2/configure.in Thu May 3 17:30:50 2001 ++++ cronolog-1.6.2-new/configure.in Mon Jun 3 00:38:32 2002 +@@ -56,6 +56,7 @@ + AC_C_CONST + AC_TYPE_SIZE_T + AC_STRUCT_TM ++AC_TYPE_UID_T + + dnl Checks for library functions. + +diff -Naur cronolog-1.6.2/doc/cronolog.1m cronolog-1.6.2-new/doc/cronolog.1m +--- cronolog-1.6.2/doc/cronolog.1m Fri May 4 09:44:55 2001 ++++ cronolog-1.6.2-new/doc/cronolog.1m Mon Jun 3 00:39:10 2002 +@@ -89,6 +89,20 @@ + .IP --help + print a help message and then exit. + .\" ++.IP "-u \fIUSER\fP" ++.IP "--set-uid=\fIUSER\fP" ++sets the user ID of the cronolog process before any logs are opened. ++\fIUSER\fP can be a username or a numeric user ID. If \fIUSER\fP ++contains solely digits, it will be assumed to be a numeric user ID; ++otherwise, it will be assumed to be a username. ++.\" ++.IP "-g \fIGROUP\fP" ++.IP "--set-gid=\fIGROUP\fP" ++sets the group ID of the cronolog process before any logs are opened. ++\fIGROUP\fP can be a group name or a numeric group ID. If \fIGROUP\fP ++contains solely digits, it will be assumed to be a numeric group ID; ++otherwise, it will be assumed to be a group name. ++.\" + .IP "-p \fIPERIOD\fP" + .IP "--period=\fIPERIOD\fP" + specifies the period explicitly as an optional digit string followed +diff -Naur cronolog-1.6.2/src/cronolog.c cronolog-1.6.2-new/src/cronolog.c +--- cronolog-1.6.2/src/cronolog.c Thu May 3 17:42:48 2001 ++++ cronolog-1.6.2-new/src/cronolog.c Mon Jun 3 00:38:32 2002 +@@ -100,6 +100,12 @@ + #define VERSION_MSG "cronolog version 0.1\n" + #endif + ++#ifndef _WIN32 ++#define SETUGID_USAGE " -u USER, --set-uid=USER change to USER before doing anything (name or UID)\n" \ ++ " -g GROUP, --set-gid=GROUP change to GROUP before doing anything (name or GID)\n" ++#else ++#define SETUGID_USAGE "" ++#endif + + #define USAGE_MSG "usage: %s [OPTIONS] logfile-spec\n" \ + "\n" \ +@@ -117,12 +123,17 @@ + " -e, --european European date formats (default)\n" \ + " -s, --start-time=TIME starting time\n" \ + " -z TZ, --time-zone=TZ use TZ for timezone\n" \ ++ SETUGID_USAGE \ + " -V, --version print version number, then exit\n" + + + /* Definition of the short and long program options */ + ++#ifndef _WIN32 ++char *short_options = "ad:eop:s:z:H:P:S:l:hVx:u:g:"; ++#else + char *short_options = "ad:eop:s:z:H:P:S:l:hVx:"; ++#endif + + #ifndef _WIN32 + struct option long_options[] = +@@ -137,6 +148,8 @@ + { "link", required_argument, NULL, 'l' }, + { "period", required_argument, NULL, 'p' }, + { "delay", required_argument, NULL, 'd' }, ++ { "set-uid", required_argument, NULL, 'u' }, ++ { "set-gid", required_argument, NULL, 'g' }, + { "once-only", no_argument, NULL, 'o' }, + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' } +@@ -160,6 +173,12 @@ + char *template; + char *linkname = NULL; + char *prevlinkname = NULL; ++#ifndef _WIN32 ++ uid_t new_uid = 0; ++ gid_t new_gid = 0; ++ int change_uid = 0; ++ int change_gid = 0; ++#endif + mode_t linktype = 0; + int n_bytes_read; + int ch; +@@ -234,6 +253,16 @@ + } + break; + ++#ifndef _WIN32 ++ case 'u': ++ new_uid = parse_uid(optarg, argv[0]); ++ change_uid = 1; ++ break; ++ case 'g': ++ new_gid = parse_gid(optarg, argv[0]); ++ change_gid = 1; ++ break; ++#endif + case 'o': + periodicity = ONCE_ONLY; + break; +@@ -265,6 +294,17 @@ + fprintf(stderr, USAGE_MSG, argv[0]); + exit(1); + } ++ ++#ifndef _WIN32 ++ if (change_gid && setgid(new_gid) == -1) { ++ fprintf(stderr, "setgid: unable to change to gid: %d\n", new_gid); ++ exit(1); ++ } ++ if (change_uid && setuid(new_uid) == -1) { ++ fprintf(stderr, "setuid: unable to change to uid: %d\n", new_uid); ++ exit(1); ++ } ++#endif + + DEBUG((VERSION_MSG "\n")); + +diff -Naur cronolog-1.6.2/src/cronoutils.c cronolog-1.6.2-new/src/cronoutils.c +--- cronolog-1.6.2/src/cronoutils.c Thu May 3 17:43:21 2001 ++++ cronolog-1.6.2-new/src/cronoutils.c Mon Jun 3 00:38:32 2002 +@@ -710,4 +710,50 @@ + return retval; + } + +- ++ ++#ifndef _WIN32 ++/* Turn a string specifying either a username or UID into an actual ++ * uid_t for use in setuid(). A string is assumed to be a UID if ++ * it contains only decimal digits. */ ++uid_t ++parse_uid(char *user, char *argv0) ++{ ++ char *probe = user; ++ struct passwd *ent; ++ ++ while (*probe && isdigit(*probe)) { ++ probe++; ++ } ++ if (!(*probe)) { ++ return atoi(user); ++ } ++ if (!(ent = getpwnam(user))) { ++ fprintf(stderr, "%s: Bad username %s\n", argv0, user); ++ exit(1); ++ } ++ return (ent->pw_uid); ++} ++ ++ ++/* Turn a string specifying either a group name or GID into an actual ++ * gid_t for use in setgid(). A string is assumed to be a GID if ++ * it contains only decimal digits. */ ++gid_t ++parse_gid(char *group, char *argv0) ++{ ++ char *probe = group; ++ struct group *ent; ++ ++ while (*probe && isdigit(*probe)) { ++ probe++; ++ } ++ if (!(*probe)) { ++ return atoi(group); ++ } ++ if (!(ent = getgrnam(group))) { ++ fprintf(stderr, "%s: Bad group name %s\n", argv0, group); ++ exit(1); ++ } ++ return (ent->gr_gid); ++} ++#endif /* _WIN32 */ +diff -Naur cronolog-1.6.2/src/cronoutils.h cronolog-1.6.2-new/src/cronoutils.h +--- cronolog-1.6.2/src/cronoutils.h Thu May 3 17:40:12 2001 ++++ cronolog-1.6.2-new/src/cronoutils.h Mon Jun 3 00:38:32 2002 +@@ -84,6 +84,8 @@ + #include <limits.h> + #ifndef _WIN32 + #include <unistd.h> ++#include <pwd.h> ++#include <grp.h> + #else + #include <io.h> + #include <direct.h> +@@ -172,7 +174,8 @@ + void print_debug_msg(char *msg, ...); + time_t parse_time(char *time_str, int); + char *timestamp(time_t thetime); +- ++uid_t parse_uid(char *user, char *argv0); ++gid_t parse_gid(char *group, char *argv0); + + /* Global variables */ + diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch new file mode 100644 index 000000000000..e7cc8be2c425 --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch @@ -0,0 +1,46 @@ +*** a/src/cronolog.c.orig 2001-05-03 17:42:48.000000000 +0100 +--- b/src/cronolog.c 2003-08-15 14:03:17.000000000 +0100 +*************** +*** 84,95 **** +--- 84,97 ---- + + #include "cronoutils.h" + #include "getopt.h" ++ #include <signal.h> + + + /* Forward function declaration */ + + int new_log_file(const char *, const char *, mode_t, const char *, + PERIODICITY, int, int, char *, size_t, time_t, time_t *); ++ void terminate_self(int); + + + /* Definition of version and usage messages */ +*************** +*** 306,311 **** +--- 308,317 ---- + DEBUG(("Rotation period is per %d %s\n", period_multiple, periods[periodicity])); + + ++ /* set up signal handlers to catch USR1 and HUP when restarting Apache */ ++ signal(SIGUSR1, terminate_self); ++ signal(SIGHUP, terminate_self); ++ + /* Loop, waiting for data on standard input */ + + for (;;) +*************** +*** 416,418 **** +--- 422,432 ---- + } + return log_fd; + } ++ ++ void terminate_self(int sig) ++ { ++ time_t time_now = time(NULL); ++ DEBUG(("%s (%d): received signal USR1; terminating.\n", ++ timestamp(time_now), time_now)); ++ exit(6); ++ } diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-strftime.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-strftime.patch new file mode 100644 index 000000000000..12d561776f8c --- /dev/null +++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-strftime.patch @@ -0,0 +1,26 @@ +--- a/src/cronoutils.c Mon Dec 20 00:34:44 1999 ++++ b/src/cronoutils.c Mon Feb 11 03:19:32 2002 +@@ -204,9 +204,21 @@ + { + if (ch == '%') + { +- ch = *spec++; +- if (!ch) break; ++ do { ++ ch = *spec++; ++ if (!ch) break; + ++ switch(ch) { ++ case '_': ++ case '-': ++ case '0': ++ continue; ++ } ++ break; ++ } while(1); ++ ++ if(!ch) break; ++ + switch (ch) + { + case 'y': /* two digit year */ diff --git a/app-admin/cronolog/files/cronolog-1.6.2-umask.patch b/app-admin/cronolog/files/cronolog-1.6.2-umask.patch new file mode 100644 index 000000000000..446c1460bee1 --- /dev/null +++ b/app-admin/cronolog/files/cronolog-1.6.2-umask.patch @@ -0,0 +1,86 @@ +Add umask support to cronolog. + +Patch-by: Mike Doty <kingtaco@gentoo.org> +Signed-off-By: Robin H. Johnson <robbat2@gentoo.org> + +--- a/src/cronolog.c.orig 2010-01-22 16:49:41.000000000 -0800 ++++ b/src/cronolog.c 2010-01-22 17:31:50.000000000 -0800 +@@ -106,7 +106,8 @@ + + #ifndef _WIN32 + #define SETUGID_USAGE " -u USER, --set-uid=USER change to USER before doing anything (name or UID)\n" \ +- " -g GROUP, --set-gid=GROUP change to GROUP before doing anything (name or GID)\n" ++ " -g GROUP, --set-gid=GROUP change to GROUP before doing anything (name or GID)\n" \ ++ " -U OCTAL, --umask=OCTAL sets umask of file/directory creation\n" + #else + #define SETUGID_USAGE "" + #endif +@@ -134,7 +135,7 @@ + /* Definition of the short and long program options */ + + #ifndef _WIN32 +-char *short_options = "ad:eop:s:z:H:P:S:l:hVx:u:g:"; ++char *short_options = "ad:eop:s:z:H:P:S:l:hVx:u:g:U:"; + #else + char *short_options = "ad:eop:s:z:H:P:S:l:hVx:"; + #endif +@@ -157,10 +158,16 @@ + { "once-only", no_argument, NULL, 'o' }, + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'V' }, ++ { "umask", required_argument, NULL, 'U' }, + { NULL, 0, NULL, 0 } + }; + #endif + ++#ifndef _WIN32 ++static mode_t saved_umask = 0; ++static mode_t new_umask = 0; ++#endif ++ + /* Main function. + */ + int +@@ -193,6 +200,11 @@ + int log_fd = -1; + + #ifndef _WIN32 ++ new_umask=umask(0); ++ umask(new_umask); ++#endif ++ ++#ifndef _WIN32 + while ((ch = getopt_long(argc, argv, short_options, long_options, NULL)) != EOF) + #else + while ((ch = getopt(argc, argv, short_options)) != EOF) +@@ -267,6 +279,9 @@ + new_gid = parse_gid(optarg, argv[0]); + change_gid = 1; + break; ++ case 'U': ++ new_umask = (mode_t)strtol(optarg, NULL, 8); ++ break; + #endif + case 'o': + periodicity = ONCE_ONLY; +@@ -443,6 +458,9 @@ + timestamp(*pnext_period), *pnext_period, + *pnext_period - time_now)); + ++#ifndef _WIN32 ++ saved_umask=umask(new_umask); ++#endif + log_fd = open(pfilename, O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE, FILE_MODE); + + #ifndef DONT_CREATE_SUBDIRS +@@ -459,6 +477,10 @@ + exit(2); + } + ++#ifndef _WIN32 ++ umask(saved_umask); ++#endif ++ + if (linkname) + { + create_link(pfilename, linkname, linktype, prevlinkname); diff --git a/app-admin/cronolog/metadata.xml b/app-admin/cronolog/metadata.xml new file mode 100644 index 000000000000..0e5ed8f4355e --- /dev/null +++ b/app-admin/cronolog/metadata.xml @@ -0,0 +1,16 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription lang="en"> + Cronolog is a simple filter program that reads log file entries from + standard input and writes each entry to the output file specified by a + filename template and the current date and time. When the expanded + filename changes, the current file is closed and a new one opened. + cronolog is intended to be used in conjunction with a Web server, such + as Apache, to split the access log into daily or monthly logs. + </longdescription> + <upstream> + <remote-id type="github">fordmason/cronolog</remote-id> + </upstream> +</pkgmetadata> |