From 1a95f960273f276a4fdefb824336b073d83bcb5e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Dec 2024 02:07:41 +0000 Subject: gentoo auto-resync : 09:12:2024 - 02:07:41 --- app-admin/Manifest.gz | Bin 32334 -> 32336 bytes app-admin/consul/Manifest | 5 - app-admin/consul/consul-1.15.11.ebuild | 62 ------- app-admin/consul/consul-1.15.3.ebuild | 61 ------- app-admin/syslog-ng/Manifest | 2 + .../syslog-ng-4.8.1-kmsg-invalid-argument.patch | 53 ++++++ app-admin/syslog-ng/syslog-ng-4.8.1-r1.ebuild | 195 +++++++++++++++++++++ 7 files changed, 250 insertions(+), 128 deletions(-) delete mode 100644 app-admin/consul/consul-1.15.11.ebuild delete mode 100644 app-admin/consul/consul-1.15.3.ebuild create mode 100644 app-admin/syslog-ng/files/syslog-ng-4.8.1-kmsg-invalid-argument.patch create mode 100644 app-admin/syslog-ng/syslog-ng-4.8.1-r1.ebuild (limited to 'app-admin') diff --git a/app-admin/Manifest.gz b/app-admin/Manifest.gz index 17ad57874b51..4c09bd528759 100644 Binary files a/app-admin/Manifest.gz and b/app-admin/Manifest.gz differ diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest index bd84ec805969..a2d61f9377bb 100644 --- a/app-admin/consul/Manifest +++ b/app-admin/consul/Manifest @@ -5,9 +5,6 @@ AUX consul.logrotated 85 BLAKE2B 8f3212c58295d57e9265dec26b9bfe562c47ca168442180 AUX consul.service 359 BLAKE2B 04a42a1546d2e4dbf57b9d75b32feddd4d0f4f8b6f750b1b4a8c19cd51fdb3cedce2cbe2a1680dcbb407890aa3e75ab9ffc5c88566b3c1e44158b1b480e5119f SHA512 d0f73304d644cf26e609a2136f1107efe36afe54721cbbd6208cfe279629ef5603a94ecd786e83ad37d7828c038f01baa4482872fa65c625646fa73684e3e477 AUX data-dir.json.example 36 BLAKE2B dadf9d7350346db73e4db0d98aaa569fe7caa5d695e25606fb97b252be16f2d3f50630092be39be378821f7e17e4914557a55c620156e7d07ced151d1f977689 SHA512 cca94745ddfdcfedcc612da4a14965d4f51f0eaf519d8395e95b8b6cbe7bcb9987b8fdbffd66fb13edda7164a7b0f26e93e5aeab9e631cbf5e0a3a5c05b84b0b AUX ui.json.example 17 BLAKE2B ecb48d228ee02df0a96b46cd87001742924ee907d7fe05b54c900b6e37e14b8bd7278e5adeaadd164b09129275a804f1014b7fdf64068ba9d9ad957325f9d5fd SHA512 9aebf80a0dd2bc5345285b63c894af8c0d5864f352d97fc3ba7cd6bf22b905ace3bd221cf23092080e9f7d60832384632c2f069d580eef789eb3f81011e9869d -DIST consul-1.15.11-deps.tar.xz 9566892 BLAKE2B 9459a93d78d3e4b991d0cdcfac22603c628c8f9fdacd8d50524a4c826cca66a575f6cd0bdf5fa9033e32b50336c53192567610ed73386f89c3c4e810c1412144 SHA512 d3876433b4ad3e7a062e059ef250bcfba23ede0595d8491f4b39c73c427e28c677b9f6e41317cf853ab8b3b2ce25151a4adf1a13b13a6a73c6e16de7382d2d05 -DIST consul-1.15.11.tar.gz 28951114 BLAKE2B 02378088d1bbc4313ec62d644b583c328bc9cc40ccc18516a1a14ae0d7f8d12007f1a5fa7c5e455ec2e782ba986ce60d37b92369b1f89f7dd69871702cd97b31 SHA512 1c5c8f9a3ad79aa34fd82a49e92ef5a21fb0470d60e3f3413901305121cbb677c75f72ffd5405554424b336d4e5ec426b7c35f458c04b1d5ab9350c2649cd688 -DIST consul-1.15.3-vendor.tar.gz 43434721 BLAKE2B 7595c98cdecf67e9fb412d8fea1d790dc6b1c29f7bc427e1d0872045a05f8873dc6107f196cea04fe0a2f2553d4fbb1f8d501e5e107b2bea3ae841e5d94eda64 SHA512 b69e3a7c1ebb01c7a64f2c6167e63e8a530b81be9aad8b591d0a71f512f5157ba9a564b46f9effe52a5abd3ae61732e7af10c5ba002110f745eb3d94ebcec256 DIST consul-1.18.1-deps.tar.xz 10161908 BLAKE2B da7e3e63470f082bf0f1e92252a2d30cce90c4268e5ad3d180ab4bfed6601e92e26e0a108fe7477a1d596cf44114e97551712bce4c2b3d13c06c3fae0fa948e5 SHA512 f0d3961de4c38052209d79817ba6570fc43f3b9c472c959d591cc8fd23029f32070a98c59c70c02f56b80c214ae60d4a2711ca2ec31472758209538ba00ef786 DIST consul-1.18.1.tar.gz 34424463 BLAKE2B 1c205471fa5d2500e4421eae37159dc3a3f8ebb46ab50266440302ca814834d39fddf0c27f4da5e78a103a2d7411eebf74bd256153b3954c6bc3c384de660a2f SHA512 023ee6f2dff82343f9c3382b531c8fa7f032e1820e09d18f67201c8ae839dfc89b145a8197be2f9c241709541a915a073dd117f5523e17ba0cdaa665bffc2f4c DIST consul-1.18.2-deps.tar.xz 10054328 BLAKE2B ed8dd4188f692b9ea0104eccc9d32668a7d14b85937be1fb4c1fbae584dc7336c1247134e43918a028994a82d003e12e69072a002693194e39b83bac8b51323d SHA512 1f80c5c3af228d939366306b7b9f4cada03d9ca430f3bdf666652a2af71cbee65f4baa68f8c6b11cb474a10b335255320c600bf3663ab2a7167b43dc9d25407a @@ -16,8 +13,6 @@ DIST consul-1.19.1-deps.tar.xz 10102748 BLAKE2B 9d121764915ff191e660450007adaab4 DIST consul-1.19.1.tar.gz 35683711 BLAKE2B 47504c91413388ef3439adc848af19af2e344944845e0a275fb9b5e5df81b13d86002f4df421a467a82b194b738422e90691b281c37ff7807093905eba95ff10 SHA512 d5912b5340e49f38823f265c0a90f09a20d6b7d8920d6d1bcce96ee556e7edf2fca0441afe4b2f65cc50b3c228479ef6babc917c5c0f17fa521c136a5147c899 DIST consul-1.20.1-deps.tar.xz 10033856 BLAKE2B dcd9df79d1f5948eb7ed1c6279a679d1d368271c2dd971451fffe58c7de7d15e6656f9f8fbfd274bd0269a2d6495d5f9d88a5440e82ca71e9ebf50d1dfa1aafa SHA512 7484183b0b38665df7758afb18928d0cc4a96e8df1f71c4654e6527370c74451c96c3f5cc7b055cdd9fe33dd7e9a39b02e9254b4faeb60171043c624947b800b DIST consul-1.20.1.tar.gz 35647978 BLAKE2B 3287c57ea426f5fc0be6c023bd5c3701908d1d2f2309dcb815a1087f2b2c10bc40895d362c56ac53a1daac90d65c8dbb03b55126244608d18eb7bb19f79a8bb0 SHA512 88ddb750f60d87d31713dabd6cc22590fd96ec12d912d08f1d4690839c64e896254e207c029001233b7e47ddf03b171e0daaf24a26437c36199c30632b183163 -EBUILD consul-1.15.11.ebuild 1596 BLAKE2B 042a8ef2dfbd403ad46515f2bc408a0d2209faf44aee9f6638d0e44ba992fa106db11c09dcea395ab275a77c0f4727c7d1c1263469901c6c43612775351fb5e7 SHA512 06bd16ea9b8425fcd81b6505943cb799a08b096d086c71bc7841bccb9702d6f8cc3f04255167ca5cecdc0009d29cc9fe5e81e0de606f6509f89bbd04e0316cbd -EBUILD consul-1.15.3.ebuild 1528 BLAKE2B 2891bd50fc5724c581c1a22744facad77fad5245448e9e23452cefc0107093732917c35c608fadbe305f100e04b363d85160de181b479b38195dce3b4dbedc0c SHA512 d2b62e8516431314efd38428eafa50bd6a7048db64684b89c1f16073b1f5871dc66d27c3d8d78750b38f3248a6814112ea98e4a434384159df92948fd6b2083d EBUILD consul-1.18.1.ebuild 1573 BLAKE2B cd959989546b1b7c133a1e7a63e8e0e7c005b73c5823474513712ae4fc4ca3e3d8eedba2cccb55823fe741bc04de09f3afabe773b868cbb91bf89a16c74de16d SHA512 d1a1939d8653a952c80fe3f4191f86db65992728bc470ccfab106cba4a31c63cd0d20299fedb4a2ebb1237ea7f8ac2e7149bf731c0f8050f81f5da2d4ea27d5a EBUILD consul-1.18.2.ebuild 1597 BLAKE2B f9a4c7afc46daf60b808b5d2f09dc59b7620de8d9100ac6e55833da4010d10cda3e8a4cb48cfebef7e445fd753acb2582d60d48e82d29b224c6745eda8a1ce68 SHA512 e5e37b20f4b674559947a25697918a6987a1ee007033f71ebd61dc0ce1477543d81868cd074dc4a4288dea320dbf898608eb24cc2c0d6bd2bda2b5f3febfb45c EBUILD consul-1.19.1.ebuild 1651 BLAKE2B 6a5e0b1b2df67b5346f170d161dd6101cf7ccaa5277c5d9af58ea8bcd77e016dfd0a907b98425be29ce80225026563e6b88904470ed810361c3c5dcb607fe2d2 SHA512 4239a8b6b2b2a832345c85690029d773591ddd56910467e6e187bdea37a984d77e10ed06bde028bc365dde3ce5dccbf08d3a17cc404cfc8ae78d02fad985f070 diff --git a/app-admin/consul/consul-1.15.11.ebuild b/app-admin/consul/consul-1.15.11.ebuild deleted file mode 100644 index f0597622b535..000000000000 --- a/app-admin/consul/consul-1.15.11.ebuild +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module systemd - -DESCRIPTION="A tool for service discovery, monitoring and configuration" -HOMEPAGE="https://www.consul.io" -GIT_COMMIT="4fc94919996f7b7e5d16145f8d89cc5ee644b094" - -SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz" -LICENSE="BUSL-1.1 MPL-2.0" -LICENSE+=" Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT" -RESTRICT="test" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~x86" - -BDEPEND="dev-go/gox" -COMMON_DEPEND=" - acct-group/consul - acct-user/consul" - DEPEND="${COMMON_DEPEND}" - RDEPEND="${COMMON_DEPEND}" - -S=${WORKDIR}/${P} - -src_prepare() { - default - sed -e 's|^GIT_DATE=.*|GIT_DATE=2024-03-26T21:43:41Z|' -i GNUmakefile || die -} - -src_compile() { - if use x86; then - #924629 pie breaks build on x86 - GOFLAGS=${GOFLAGS//-buildmode=pie} - fi - # The dev target sets causes build.sh to set appropriate XC_OS - # and XC_ARCH, and skips generation of an unused zip file, - # avoiding a dependency on app-arch/zip. - GIT_DESCRIBE="v${PV}" \ - GIT_DIRTY="" \ - GIT_COMMIT="${GIT_COMMIT}" \ - emake dev-build -} - -src_install() { - dobin bin/consul - - keepdir /etc/consul.d - insinto /etc/consul.d - doins "${FILESDIR}/"*.json.example - - keepdir /var/log/consul - fowners consul:consul /var/log/consul - - newinitd "${FILESDIR}/consul.initd" "${PN}" - newconfd "${FILESDIR}/consul.confd" "${PN}" - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotated" "${PN}" - systemd_dounit "${FILESDIR}/consul.service" -} diff --git a/app-admin/consul/consul-1.15.3.ebuild b/app-admin/consul/consul-1.15.3.ebuild deleted file mode 100644 index b3e17cbf517a..000000000000 --- a/app-admin/consul/consul-1.15.3.ebuild +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 -inherit go-module systemd - -DESCRIPTION="A tool for service discovery, monitoring and configuration" -HOMEPAGE="https://www.consul.io" -GIT_COMMIT="7ce982ce1846ca14e567a91fa7f088084e736155" - -SRC_URI="https://github.com/zmedico/consul/archive/v${PV}-vendor.tar.gz -> ${P}-vendor.tar.gz" - -LICENSE="MPL-2.0 Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT" -RESTRICT="test" -SLOT="0" -KEYWORDS="amd64 ~arm64 ~x86" - -BDEPEND="dev-go/gox" -COMMON_DEPEND=" - acct-group/consul - acct-user/consul" - DEPEND="${COMMON_DEPEND}" - RDEPEND="${COMMON_DEPEND}" - -S=${WORKDIR}/${P}-vendor - -src_prepare() { - default - sed -e 's|^GIT_DATE=.*|GIT_DATE=2023-03-30T17:51:19Z|' -i GNUmakefile || die -} - -src_compile() { - if use x86; then - #924629 pie breaks build on x86 - GOFLAGS=${GOFLAGS//-buildmode=pie} - fi - # The dev target sets causes build.sh to set appropriate XC_OS - # and XC_ARCH, and skips generation of an unused zip file, - # avoiding a dependency on app-arch/zip. - GIT_DESCRIBE="v${PV}" \ - GIT_DIRTY="" \ - GIT_COMMIT="${GIT_COMMIT}" \ - emake dev-build -} - -src_install() { - dobin bin/consul - - keepdir /etc/consul.d - insinto /etc/consul.d - doins "${FILESDIR}/"*.json.example - - keepdir /var/log/consul - fowners consul:consul /var/log/consul - - newinitd "${FILESDIR}/consul.initd" "${PN}" - newconfd "${FILESDIR}/consul.confd" "${PN}" - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotated" "${PN}" - systemd_dounit "${FILESDIR}/consul.service" -} diff --git a/app-admin/syslog-ng/Manifest b/app-admin/syslog-ng/Manifest index e86d7bce7e3d..e378e0a681ef 100644 --- a/app-admin/syslog-ng/Manifest +++ b/app-admin/syslog-ng/Manifest @@ -1,5 +1,6 @@ AUX README.hardened 358 BLAKE2B a816cf461b4c3553e979c309ced21537841e24ad805b67f43d5bf06fb77b86959a75c7680df87e7ded7fd72073ad469a06bdec1e739784c82776d04a91bd3add SHA512 75b4af1543436506e28d9b0e2625985ab864d1452604b1514ec030df822c36d90ae062508381610cc1f750082a52545f8678102dc475abff15f0f3c9a838128e AUX syslog-ng-3.28.1-net-snmp.patch 292 BLAKE2B 7833709af12ab6531596bdb3b2c327fd2df3a5da3e3b00a597926f5bc5a1053dd2f37dbf0e89784946e169b9d3408c26da84b5355a309b76e424fc48f07ae4b6 SHA512 3b4b62b6e10fcca501891ce878202f1171c8f6bbd69098215015d1a9a1c571e11aa2d8d83d35145f0b5da9c6231952758b60a7116160d64d995d5b2b870b1904 +AUX syslog-ng-4.8.1-kmsg-invalid-argument.patch 1606 BLAKE2B fdb5976852aff8d0d8bb15c55ea00842f45712b76978fe5ea823882f39909902805391fad94ef4c22069b251b5350d635dbd7280c99213fb488ce5d48d8f7d60 SHA512 a7d460ca1e45c96eff29349b67d7a8f698ed1200eb01f91f4d65fedc6582817bd19b315da91cf16097908f0076313b7ec7e34b1e3e38a129137f3af50e86fe46 AUX syslog-ng.conf.gentoo.hardened.in 4509 BLAKE2B 39f130c008df8d5e31c121246997f8f31d2d8e2a78f1a881f4ca07ade0b3a5386c6e8c3fd8518e2ae471751564263886b8e3b78e8651efe0eeccd1d06c23c2a5 SHA512 0670952e6f5d0405e90bb5cb1ea168832bb2293095250c01a9baaf9e4fcdf8578ecf5b60809bd9e5089096a4d97fa966fcc47324fbe70cfd14266a10eb0001c6 AUX syslog-ng.conf.gentoo.hardened.in-r1 4510 BLAKE2B 9ac299ecb7bbdf24b50251bbd3b73da88f1a5b3bf99a8e360fb1fbef253d88543c011c84bdb1c290b558d8fc0249af6b70835a0fb74c0f6182b2cfbc60bf8b3b SHA512 5bb635b21343f8f3219bcf6c6dc2fed5e1d7235379304546959b657bc889af311938da88bc0f907de62067f96345a7e919f855caa6dac873d6922ea442b92405 AUX syslog-ng.conf.gentoo.in 1198 BLAKE2B a95b1fb9f46655502a41b0381c7388c9b54cfe9b8c3fd68dc68bd473175688e8ae72145a0ef718ef65220ecced7ecab00b39755cf41d4e21a6d375059cf6f309 SHA512 2830d1c5071a50c4aea6288b35c2880988111f29a11a641ee89f001a4ca4319943f87fdb1fd7079988888efa55401e2ed62f7a507c452de137f2e97a445d60e1 @@ -13,5 +14,6 @@ DIST syslog-ng-4.7.1.tar.gz 6877191 BLAKE2B b4a8fa1fe691b96d7e799e57542001829b32 DIST syslog-ng-4.8.1.tar.gz 6956412 BLAKE2B e545107a714e37b51f3c6f652c23a61615b7d3767b3d98ef364e630634c7512b4b08d6790e2635fdb5dab850a45808cd945629e838d3c66b07dfa63ee4d1d35a SHA512 5e20c28aa24deab95dac44edad1855d35d6f9ce474ff4249b3b5492405ff64c9694f40119fdc95b9db53f1aac6b598acc8096e26443caa53c27f7ad32528f9ea EBUILD syslog-ng-4.6.0.ebuild 5299 BLAKE2B d2d453eb67314a57700f8ecfaa94eae172e3b47de41e7022bedc09c956f510d9ab85a021675fb1c5909a83acb113fd6cd7fec12af63e7f4ceef9c3b9bb0c2400 SHA512 0536ff638759b6bdc9982f7849a72573b36bb90bf43684661d634dfdf616185ddd84fe39f4f79035ef89b5391b9c2ad375615c6dd802866274f362618bf51ef4 EBUILD syslog-ng-4.7.1.ebuild 5363 BLAKE2B 9990591ff1f656478ef7facb613ed362cf711768c24392c4f239bee723fd65d03f909476818adf58a6072e596e90ac09a5136f61eddcab1085749cf994af00f6 SHA512 3d3089ae2085a0009c6b5545fa2cebe392eee1d5e31f6948665c93b36d33a228633f94c11f701bcadc2a35431197b8900714732ee049b4ae7374a4e3ec118cbc +EBUILD syslog-ng-4.8.1-r1.ebuild 5461 BLAKE2B 8fcd48bb7e2962c6c806eab4a566ca71763ca6585e765ee9e814623a1e08c0834a58424c681c48066799462d6914d5a868adff7ecd5e2ba58ec9afa6d3c8c227 SHA512 c0dc482906872dafc7a8bc8b000d954176838f9aa9492d27cc7cf79ee0fcfc690ea357d5c4bcc70b47cb87bb5644f4d734b1c6aba9cedb29e0874da4031aee60 EBUILD syslog-ng-4.8.1.ebuild 5356 BLAKE2B 56932818d5b9e4470149215f9b8641037ebe3dcd9d134e87c7a7d708e60a151a02989175f56b3c9d3d4874af9d78a41c480534a634e463d7721d4547d4dc8a08 SHA512 8d3cbcf60504f4f62364927ceab434ca86e34745186c8b30d0e814d5e9cf433c0e4eeaccbf9f35ff382a8b8d3e5c457cc65bdfa94bc8ce263a13c488f7fa745c MISC metadata.xml 1473 BLAKE2B 89d2c90327ef56334e99d081debd682538e25db7f26ec1d369912b67e8bb7b878412f167a1e1020a49baa5165fa2887103b0a3d021fe9c4502d2bd7b56ee681f SHA512 392d0702ddea668bd927cb89b06deaa532b2605d2f1caec46c5c00430dfa8bf3056f8050f7442501aad89c58813a9d1cfa6b46f904323711fc1800d9275702a5 diff --git a/app-admin/syslog-ng/files/syslog-ng-4.8.1-kmsg-invalid-argument.patch b/app-admin/syslog-ng/files/syslog-ng-4.8.1-kmsg-invalid-argument.patch new file mode 100644 index 000000000000..75803d112de7 --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng-4.8.1-kmsg-invalid-argument.patch @@ -0,0 +1,53 @@ +From 2cd1f3abaf077aa0f14de967db55993c06bdad06 Mon Sep 17 00:00:00 2001 +From: Hofi +Date: Fri, 8 Nov 2024 15:46:00 +0100 +Subject: [PATCH] file-reader: added a more detailed, direct check if seek can + be called on the file descriptor + +Signed-off-by: Hofi +--- + modules/affile/file-reader.c | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +diff --git a/modules/affile/file-reader.c b/modules/affile/file-reader.c +index 712bac5c91..203c2086d3 100644 +--- a/modules/affile/file-reader.c ++++ b/modules/affile/file-reader.c +@@ -163,10 +163,26 @@ _recover_state(LogPipe *s, GlobalConfig *cfg, LogProtoServer *proto) + } + + static gboolean +-_can_check_eof(gint fd) ++_can_check_eof(FileReader *self, gint fd) + { + struct stat st; +- return fstat(fd, &st) == 0 && S_ISFIFO(st.st_mode) == 0; ++ ++ if (fstat(fd, &st) == -1 || S_ISFIFO(st.st_mode) || S_ISSOCK(st.st_mode) || S_ISCHR(st.st_mode)) ++ return FALSE; ++ ++ off_t pos = lseek(fd, 0, SEEK_CUR); ++ if (pos == -1) ++ return FALSE; ++ ++ off_t reset = lseek(fd, pos, SEEK_SET); ++ if (reset != pos) ++ { ++ msg_trace("File seek pos is different after testing if seekable", ++ evt_tag_str("follow_filename", self->filename->str), ++ evt_tag_int("fn", fd)); ++ } ++ ++ return TRUE; + } + + static gboolean +@@ -263,7 +279,7 @@ _construct_poll_events(FileReader *self, gint fd) + return NULL; + } + +- if (_can_check_eof(fd)) ++ if (_can_check_eof(self, fd)) + poll_events_set_checker(poll_events, _reader_check_watches, self); + + return poll_events; diff --git a/app-admin/syslog-ng/syslog-ng-4.8.1-r1.ebuild b/app-admin/syslog-ng/syslog-ng-4.8.1-r1.ebuild new file mode 100644 index 000000000000..afc80939e2b7 --- /dev/null +++ b/app-admin/syslog-ng/syslog-ng-4.8.1-r1.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit autotools python-single-r1 systemd + +DESCRIPTION="syslog replacement with advanced filtering features" +HOMEPAGE="https://www.syslog-ng.com/products/open-source-log-management/" +SRC_URI="https://github.com/syslog-ng/syslog-ng/releases/download/${P}/${P}.tar.gz" + +LICENSE="GPL-2+ LGPL-2.1+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="amqp caps dbi geoip2 grpc http json kafka mongodb mqtt pacct python redis smtp snmp test spoof-source systemd tcpd" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} ) + test? ( python )" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-libs/glib-2.10.1:2 + >=dev-libs/ivykis-0.42.4 + >=dev-libs/libpcre2-10.0:= + dev-libs/openssl:0= + !dev-libs/eventlog + >=dev-libs/json-c-0.9:= + amqp? ( >=net-libs/rabbitmq-c-0.8.0:=[ssl] ) + caps? ( sys-libs/libcap ) + dbi? ( >=dev-db/libdbi-0.9.0 ) + geoip2? ( dev-libs/libmaxminddb:= ) + grpc? ( + dev-libs/protobuf:= + net-libs/grpc:= + ) + http? ( net-misc/curl ) + kafka? ( >=dev-libs/librdkafka-1.0.0:= ) + mongodb? ( >=dev-libs/mongo-c-driver-1.2.0 ) + mqtt? ( net-libs/paho-mqtt-c:1.3 ) + python? ( + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ') + ) + redis? ( >=dev-libs/hiredis-0.11.0:= ) + smtp? ( net-libs/libesmtp:= ) + snmp? ( net-analyzer/net-snmp:0= ) + spoof-source? ( net-libs/libnet:1.1 ) + systemd? ( sys-apps/systemd:= ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )" +DEPEND="${RDEPEND} + test? ( dev-libs/criterion )" +BDEPEND=" + >=sys-devel/bison-3.7.6 + sys-devel/flex + virtual/pkgconfig + grpc? ( dev-libs/protobuf:= )" + +DOCS=( AUTHORS NEWS.md CONTRIBUTING.md contrib/syslog-ng.conf.{HP-UX,RedHat,SunOS,doc} + contrib/syslog2ng "${T}/syslog-ng.conf.gentoo.hardened" + "${T}/syslog-ng.logrotate.hardened" "${FILESDIR}/README.hardened" ) +PATCHES=( + "${FILESDIR}"/${PN}-3.28.1-net-snmp.patch + "${FILESDIR}"/${PN}-4.8.1-kmsg-invalid-argument.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + local f + + # disable python-modules test as it requires additional python modules not + # packaged in Gentoo + sed -i '/MAKE/s/.*/exit 0/g' modules/python-modules/test_pymodules.sh || die + + use python && python_fix_shebang . + + # remove bundled libs + rm -r lib/ivykis || die + + # drop scl modules requiring json + if use !json; then + sed -i -r '/cim|elasticsearch|ewmm|graylog2|loggly|logmatic|netskope|nodejs|osquery|slack/d' scl/Makefile.am || die + fi + + # drop scl modules requiring http + if use !http; then + sed -i -r '/slack|telegram/d' scl/Makefile.am || die + fi + + # use gentoo default path + if use systemd; then + sed -e 's@/etc/syslog-ng.conf@/etc/syslog-ng/syslog-ng.conf@g;s@/var/run@/run@g' \ + -i contrib/systemd/syslog-ng@default || die + fi + + for f in syslog-ng.logrotate.hardened.in syslog-ng.logrotate.in; do + sed \ + -e "s#@GENTOO_RESTART@#$(usex systemd "systemctl kill -s HUP syslog-ng@default" \ + "/etc/init.d/syslog-ng reload")#g" \ + "${FILESDIR}/${f}" > "${T}/${f/.in/}" || die + done + + for f in syslog-ng.conf.gentoo.hardened.in-r1 \ + syslog-ng.conf.gentoo.in-r1; do + sed -e "s/@SYSLOGNG_VERSION@/$(ver_cut 1-2)/g" "${FILESDIR}/${f}" > "${T}/${f/.in-r1/}" || die + done + + default + eautoreconf +} + +src_configure() { + # Needs bison/flex. + unset YACC LEX + + local myconf=( + --disable-docs + --disable-java + --disable-java-modules + --disable-riemann + --enable-ipv6 + --enable-manpages + --localstatedir=/var/lib/syslog-ng + --sysconfdir=/etc/syslog-ng + --with-embedded-crypto + --with-ivykis=system + --with-module-dir=/usr/$(get_libdir)/syslog-ng + --with-pidfile-dir=/var/run + --with-python-packages=none + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + $(use_enable amqp) + $(use_with amqp librabbitmq-client system) + $(use_enable caps linux-caps) + $(use_enable dbi sql) + $(use_enable geoip2) + $(use_enable grpc) + $(use_enable grpc cpp) + $(use_enable http) + $(use_enable json) + $(use_enable kafka) + $(use_enable mongodb) + $(use_enable mqtt) + $(usex mongodb --with-mongoc=system "--without-mongoc --disable-legacy-mongodb-options") + $(use_enable pacct) + $(use_enable python) + $(use_enable redis) + $(use_enable smtp) + $(use_enable snmp afsnmp) + $(use_enable spoof-source) + $(use_enable systemd) + $(use_enable tcpd tcp-wrapper) + ) + + econf "${myconf[@]}" +} + +src_install() { + default + + # Install default configuration + insinto /etc/default + doins contrib/systemd/syslog-ng@default + + insinto /etc/syslog-ng + newins "${T}/syslog-ng.conf.gentoo" syslog-ng.conf + + insinto /etc/logrotate.d + newins "${T}/syslog-ng.logrotate" syslog-ng + + newinitd "${FILESDIR}/syslog-ng.rc" syslog-ng + newconfd "${FILESDIR}/syslog-ng.confd" syslog-ng + keepdir /etc/syslog-ng/patterndb.d /var/lib/syslog-ng + find "${D}" -name '*.la' -delete || die + + use python && python_optimize "${ED}/usr/$(get_libdir)/syslog-ng/python" +} + +pkg_postinst() { + # bug #355257 + if ! has_version app-admin/logrotate ; then + elog "It is highly recommended that app-admin/logrotate be emerged to" + elog "manage the log files. ${PN} installs a file in /etc/logrotate.d" + elog "for logrotate to use." + fi + + if use systemd; then + ewarn "The service file for systemd has changed to support multiple instances." + ewarn "To start the default instance issue:" + ewarn "# systemctl start syslog-ng@default" + fi +} -- cgit v1.2.3