Sync with portage [Thu Apr 5 08:05:31 MSK 2018].
This commit is contained in:
parent
236e2f9361
commit
9c82746498
1089 changed files with 10997 additions and 11603 deletions
Binary file not shown.
Binary file not shown.
|
@ -23,6 +23,7 @@ PATCHES=(
|
|||
"${FILESDIR}"/${PN}-2.5.37-gcc45.patch
|
||||
"${FILESDIR}"/${PN}-2.5.37-gcc47.patch
|
||||
"${FILESDIR}"/${PN}-2.5.37-disable-tests.patch
|
||||
"${FILESDIR}"/${PN}-2.5.37-gcc7.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
|
|
22
app-accessibility/epos/files/epos-2.5.37-gcc7.patch
Normal file
22
app-accessibility/epos/files/epos-2.5.37-gcc7.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
Bug: https://bugs.gentoo.org/638596
|
||||
|
||||
--- a/src/nnet/matrix.cc
|
||||
+++ b/src/nnet/matrix.cc
|
||||
@@ -63,7 +63,7 @@
|
||||
template<class T> void CMatrix<T>::multiplyByTransponed (const CMatrix &y, CMatrix &retval)
|
||||
{
|
||||
int i,j,k;
|
||||
- assert (cols == y.cols);
|
||||
+ this->assert (cols == y.cols);
|
||||
if (cols != y.cols) { retval.Realloc (0,0); return; }
|
||||
|
||||
T sum;
|
||||
@@ -80,7 +80,7 @@
|
||||
template<class T> void CMatrix<T>::transponedMultiply (const CMatrix &y, CMatrix &retval)
|
||||
{
|
||||
int i,j,k;
|
||||
- assert (rows == y.rows);
|
||||
+ this->assert (rows == y.rows);
|
||||
if (rows != y.rows) { retval.Realloc (0,0); return; }
|
||||
|
||||
T sum;
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="5"
|
||||
|
@ -15,7 +15,7 @@ SRC_URI="http://www.festvox.org/packed/festival/${PV}/${MY_P}-release.tar.gz
|
|||
|
||||
LICENSE="FESTIVAL HPND BSD rc regexp-UofT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
|
||||
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 sparc ~x86 ~x86-fbsd"
|
||||
IUSE="nas X"
|
||||
|
||||
RDEPEND="
|
||||
|
|
Binary file not shown.
1
app-admin/go-updater/Manifest
Normal file
1
app-admin/go-updater/Manifest
Normal file
|
@ -0,0 +1 @@
|
|||
DIST go-updater-0.1.0.tar.gz 1754 BLAKE2B 720a328e8f28d2f0b28400053776ff8dbe52e24be7b20812d01b148bde72eda948acb5867b8ca16af7b40d20e36d36d3ffbd846c4992bb1dbe2af6db0069e765 SHA512 321f7faaec62b653c2b01f6f2e2c0104b536e63dfeb6aacd72c493d3fdc7b3bc5b96d6eff02ec1603adde1879dacbd51f4ced37c3cd94361120cc482432cb8a5
|
24
app-admin/go-updater/go-updater-0.1.0.ebuild
Normal file
24
app-admin/go-updater/go-updater-0.1.0.ebuild
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
DESCRIPTION="Checks if Gentoo go packages are compiled with the system's golang version"
|
||||
HOMEPAGE="https://github.com/mrueg/go-updater"
|
||||
SRC_URI="https://github.com/mrueg/go-updater/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-go/goversion"
|
||||
|
||||
src_compile() {
|
||||
:;
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
dodoc README.md
|
||||
}
|
11
app-admin/go-updater/metadata.xml
Normal file
11
app-admin/go-updater/metadata.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>mrueg@gentoo.org</email>
|
||||
<name>Manuel Rüger</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">mrueg/go-updater</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
|
@ -21,3 +21,4 @@ DIST github.com-spf13-jwalterweatherman-12bd96e66386c1960ab0f74ced1362f66f552f7b
|
|||
DIST github.com-spf13-pflag-4c012f6dcd9546820e378d0bdda4d8fc772cdfea.tar.gz 40078 BLAKE2B 4a15afdf122a58dd006d57da88176fd2804d98706ac3d8c496dc14b084851288dd28bad95f7871d738f0487db46aa7969dffbdf005c14fc6f46bcd0ad7e0f673 SHA512 4f4d606bfe94ea51a6cde535f16078602f1d63bd2896aed52bb53b3d219510ab38ad4bdc692da2eb355c9361041d7322db6424f63783bcc367343a1666cdf297
|
||||
DIST github.com-spf13-viper-25b30aa063fc18e48662b86996252eabdcf2f0c7.tar.gz 30849 BLAKE2B 8e66dbb5c90c47e66ea72848d86602861791fe3198ce6cde5ea87330f15dd19cdd249788bebc31b2a66577c20edeef01c8beb59a4140d57167c4b13d33118a04 SHA512 4acd37411683d753d81d839e83c2257bc424c42b8e295868da84cb045db131be063b0e5a0fb88c587332582f356186659d5a181e65ae1838e868576543c1fecd
|
||||
DIST kube-bench-0.0.11.tar.gz 175361 BLAKE2B 844e252ccf270561154f1bab9c02144ff10a0594d71a2cd6e63a828ecabee2132a8756848642c475bfa705f360a5d69812519f705ad7c4717d5a4bf9d84cbd1b SHA512 52debf132bae38588f0b49c54f07d2550fc254665a0549b7369fb34b6884724624a44d14e6ea1120dc0c2586f2647b56d30e66695f2d8829c3f26ec5f2443f38
|
||||
DIST kube-bench-0.0.12.tar.gz 175549 BLAKE2B f909caa4735ed4c6698b756bea24ffbf176c1ff111130ed17f421c894dbefbec28e88305701ab42e40c255dbc4f4a748db2d3ede29951cf38715afd1f61cefe6 SHA512 c91de2ca9b1cb5769885dfb7691c95680f2a82d22e0df3b0060135281c3e42a8824302ec14b3f462ad2f76fa39c32bf93721428c2f3e9a50dbebcacfc6d840a4
|
||||
|
|
59
app-admin/kube-bench/kube-bench-0.0.12.ebuild
Normal file
59
app-admin/kube-bench/kube-bench-0.0.12.ebuild
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
EGO_PN="github.com/aquasecurity/kube-bench"
|
||||
|
||||
EGO_VENDOR=(
|
||||
"github.com/fatih/color 570b54cabe6b8eb0bc2dfce68d964677d63b5260"
|
||||
"github.com/fsnotify/fsnotify 4da3e2cfbabc9f751898f250b49f2439785783a1"
|
||||
"github.com/golang/glog 23def4e6c14b4da8ac2ed8007337bc5eb5007998"
|
||||
"github.com/hashicorp/hcl 23c074d0eceb2b8a5bfdbb271ab780cde70f05a8"
|
||||
"github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
|
||||
"github.com/jinzhu/gorm 5174cc5c242a728b435ea2be8a2f7f998e15429b"
|
||||
"github.com/jinzhu/inflection 1c35d901db3da928c72a72d8458480cc9ade058f"
|
||||
"github.com/lib/pq 83612a56d3dd153a94a629cd64925371c9adad78"
|
||||
"github.com/magiconair/properties 49d762b9817ba1c2e9d0c69183c2b4a8b8f1d934"
|
||||
"github.com/mattn/go-colorable 5411d3eea5978e6cdc258b30de592b60df6aba96"
|
||||
"github.com/mattn/go-isatty 57fdcb988a5c543893cc61bce354a6e24ab70022"
|
||||
"github.com/mitchellh/mapstructure 06020f85339e21b2478f756a78e295255ffa4d6a"
|
||||
"github.com/pelletier/go-toml 0131db6d737cfbbfb678f8b7d92e55e27ce46224"
|
||||
"github.com/spf13/afero 57afd63c68602b63ed976de00dd066ccb3c319db"
|
||||
"github.com/spf13/cast acbeb36b902d72a7a4c18e8f3241075e7ab763e4"
|
||||
"github.com/spf13/cobra 7b2c5ac9fc04fc5efafb60700713d4fa609b777b"
|
||||
"github.com/spf13/jwalterweatherman 12bd96e66386c1960ab0f74ced1362f66f552f7b"
|
||||
"github.com/spf13/pflag 4c012f6dcd9546820e378d0bdda4d8fc772cdfea"
|
||||
"github.com/spf13/viper 25b30aa063fc18e48662b86996252eabdcf2f0c7"
|
||||
"golang.org/x/sys e24f485414aeafb646f6fca458b0bf869c0880a1 github.com/golang/sys"
|
||||
"golang.org/x/text e19ae1496984b1c655b8044a65c0300a3c878dd3 github.com/golang/text"
|
||||
"gopkg.in/yaml.v2 c95af922eae69f190717a0b7148960af8c55a072 github.com/go-yaml/yaml"
|
||||
)
|
||||
|
||||
inherit golang-build golang-vcs-snapshot bash-completion-r1
|
||||
|
||||
ARCHIVE_URI="https://github.com/aquasecurity/kube-bench/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
${EGO_VENDOR_URI}"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DESCRIPTION="Kubernetes Bench for Security runs the CIS Kubernetes Benchmark"
|
||||
HOMEPAGE="https://github.com/aquasecurity/kube-bench"
|
||||
SRC_URI="${ARCHIVE_URI}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
src_compile() {
|
||||
pushd src/${EGO_PN} || die
|
||||
GOPATH="${S}" go build -o ${PN} . || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin src/${EGO_PN}/${PN}
|
||||
insinto /etc/kube-bench
|
||||
doins -r src/${EGO_PN}/cfg
|
||||
}
|
|
@ -1,2 +1 @@
|
|||
DIST kubectx-0.4.0_p20180118.tar.gz 398084 BLAKE2B fda8cae93e221fc4732b7cedbd44465541cdd7f31b29fbbfde781ea34b2c2d644ad6735d6bf7fa1ebcf04cc2b9dc3ac8e883808cd04c8a256b004a3293cee240 SHA512 04123596724dfc4dacc0beb578c716a3909d98d7df7dbf3c1439b5bb29ac14ea7b366be3e2252550ed89474c58ce83b028af79b0cd288f1ecd62c6c3f2729f62
|
||||
DIST kubectx-0.4.1.tar.gz 397910 BLAKE2B 60b0ac75cf6358a3660c3e59f85e5c27a670095ad973edbf2b53350726b48f1036aa90dd999cf149c10956a43692389ab2e87c63bce3b711ae2c7cb894157753 SHA512 dcaf1c8f71f69037f9341ff29befb2507d7bfa11a25e6e864000b802fe1221d6b47f2f78faa6c490711e65d0dda4b289e5ed1ffc261e4d2142054f48d1aac140
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit vcs-snapshot bash-completion-r1
|
||||
|
||||
COMMIT="b2992aa0df9143c25d64843b3ee40fbcd7332f07"
|
||||
|
||||
DESCRIPTION="Fast way to switch between clusters and namespaces in kubectl"
|
||||
HOMEPAGE="https://github.com/ahmetb/kubectx"
|
||||
SRC_URI="https://github.com/ahmetb/kubectx/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="sys-cluster/kubectl"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/include
|
||||
doins utils.bash
|
||||
dobin kubectx kubens
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins completion/kubectx.zsh _kubectx
|
||||
newins completion/kubens.zsh _kubens
|
||||
|
||||
newbashcomp completion/kubectx.bash kubectx
|
||||
newbashcomp completion/kubens.bash kubens
|
||||
}
|
|
@ -12,7 +12,7 @@ SRC_URI="mirror://gentoo/${P}.tar.gz"
|
|||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm ~mips ~ppc ~s390 ~sh sparc x86"
|
||||
KEYWORDS="amd64 arm ~mips ppc ~s390 ~sh sparc x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=sys-apps/sed-4"
|
||||
|
|
|
@ -1,22 +1,8 @@
|
|||
DIST rsyslog-8.19.0.tar.gz 2279714 BLAKE2B ae736b72e00ba6ba338476d8fc349f2b958f0c8f8b08417ed6cc192fcb17182f4c95018fbe973355b90833fab723211d653f4ac2a0fe9ef385ebe6d34251e4de SHA512 77c40c9d76591ed3561ec76242be2c647848533df5599320ea988cbc200614c47930e0b63f190d31a0c1cec2443d57ca374f07e0909f11eba8a4bd4b8eee0e44
|
||||
DIST rsyslog-8.24.0.tar.gz 2374240 BLAKE2B a708ed52dcc0182acbfb6d7adee8f1670c60e65e87b2240f88330622b515dbe1cc45a2bb3233cb630be4658b8cae394bab7839167808dd41d75632c76932a77e SHA512 b25b8ae72133376f732f54863c97aea3c8dfbf37c62c6a61840932996913c9d4e63155a24ffc577db48a18514f3e35b6fb109b1864380ba93ddf3fa6d84d728d
|
||||
DIST rsyslog-8.25.0.tar.gz 2386720 BLAKE2B 192f0084b0aa9588606c458494634d6f1445598371de4ce160ade647b44abdbd6456125060f46fc62bbaa8f981c31247a91b8dedd41f89e83a4ee021c9828dad SHA512 0e97db84cc8fe9fd6e3ffb5a78b32fd213e22833c6ed605329c579132d127b7d65b3f66c64e6bddeb1967aa9ed90645a7c24b9d5e643f95bdaf48ed9fc82cb5f
|
||||
DIST rsyslog-8.26.0.tar.gz 2393148 BLAKE2B 660853aae1f0853b0df66755cb64c569692b849816b92d41421c3650502eab069163d65445fe49e7c005a7bba9ead6cfe36b125a715b4fd8cd24a78dae7d2484 SHA512 96cb3af0e05b3e2941f7d2b3558e36836818037ef424f13a8ae2ac8a1e2aa0c7a4eedf3366c8360c7d8eb4515aecc7f3665690646009c650b66689067069af19
|
||||
DIST rsyslog-8.27.0.tar.gz 2435123 BLAKE2B ebd95d5995d604a16495c2c760bfc65348a2b696a2aec838ba06d2eac379627d2b8495f03177aa8813d012d6163073cde71d442a63fe2da173bdcb55c90f458a SHA512 dad957c21d9f7ed3a97a1ed87658fe9381dad00365bd2f5af2396dde3dc4a9f96db17c4df9eb9bd02562cc538f99bf8e2ca00229680d6b7892179161265db753
|
||||
DIST rsyslog-8.28.0.tar.gz 2471122 BLAKE2B 48ed55cbf02eca22591c3d1d59db8f956e4d852cbabb4ae8837767a2c843209a53becbe2a9f595290b44d79c8813414c20954ce1ccaa08bf0786423df79344e3 SHA512 e27ba0ff22e945393536abc5bc6e234d8849db291a5056429b59b47abe15fb060fc5c26efedcfe347b386d438b3f8a029ae4577a1d803666701431677f628cb1
|
||||
DIST rsyslog-8.29.0.tar.gz 2447907 BLAKE2B dd3a34e4c1b4edc989d58369933b94b11d89c044ca81715062cebaacae5003463ed233f26358418651f63643bd6d7cdfb4f3192324d59d596c87480e37f40493 SHA512 6e0a69f2ac36fcfd0714b2b7053bd263ca8875d2aba7ad6452223eb8677edfa1cf4978989661614dd65dd1822f0123599d565679c8faa3960f136c8d9472e952
|
||||
DIST rsyslog-8.30.0.tar.gz 2468224 BLAKE2B 3c5c94661abc2e34d688ca08d6dea0d2bcca9f287f45328a0d1b240bcb1b9223800207ce8759da823fa3acd974fcc70f01565f95fbcec108f8f71c7cb14a2409 SHA512 90e172d08ba7548252fc9744f71259dadf5a40afef405516e7b1601620913ca4b2ffc4859b16f369b9c1974ea10f4e41bc2d987e3d6bf9aabeb979f7de6aefe0
|
||||
DIST rsyslog-8.31.0.tar.gz 2498675 BLAKE2B 8b80394ea3919dba29a431f3c5c1fc337a9e60a886a3c258c3895eb4341a941d8af6370ceb0d2e212934f64ab38c7238e99f40e1dc27e648bd4b75e158586a28 SHA512 aab888dda8df3ad7ff404767a58539cdc0bb92d0e537b703cf5833555688dd6d8223889b8d70bf8c594339a51831b57df7a65b397d8b40cded608dfb007befe7
|
||||
DIST rsyslog-8.32.0.tar.gz 2478990 BLAKE2B 21bfc93b55da107bec2eddb89cb42d76990ced2675caeb6e73183a109f9bc8293bde43f202bb56007f9ea4e49de385b004c158059cb13e8d3d376bf050ca445a SHA512 eea85d77bf3624fbad6f0838fa2a4af7c14d853c8f120f14cf697cdfda7f7e0692dab684d2ddd07fe44a0bcd50cf91baf69af1bb63dc9d60e19146f1150155ac
|
||||
DIST rsyslog-8.33.1.tar.gz 2494338 BLAKE2B 680ad2c062386e4e3e6c6e1a83cf0001d63da305edae9df527d1079a2fa13b8715e3cbfa211ca908e0005f1762becfd88369a7cd1488134564980137f0e98d86 SHA512 c4b426409e89463a8e8f7f9d0267f2fa1df1a84e947ce7bf91255db88b4cad5b7e607c476ba2db0543af069c44cdbb35330e0839696bf83668200e8ac009c6a0
|
||||
DIST rsyslog-docs-8.19.0.tar.gz 4271094 BLAKE2B c866f66fc1ae9ef8c227a2e03bab4a815e408ccaafe9da97f8b6b6f6b89bb33d0c8a9e004552d5a1287a19bc8f3677517259a4f9bcebffbbeff506d80454945b SHA512 120f229a641119649fc897948fb0934039a95d0ef63e68b10ab635620d84988d794fd5dc33617353028e786513a86b3a1cd0c4fef9c755dab5bedd8e0246532e
|
||||
DIST rsyslog-docs-8.24.0.tar.gz 4344877 BLAKE2B a3d9ea90580c3e24e3c40c07f871740cdf33ad4206627586bfb42523a758cbd18f5303f35f2fa036e492dece9a83d9c151b60023aed99f63c42ed8f9bf7da9f1 SHA512 b55cde1485a7baec6d4c4928107c22a078cf412a2994c0dfcbb12c47b49c3b263af8a64011b1329567cf86e04927b9e383581dc868eaea81d554adada6b3786b
|
||||
DIST rsyslog-docs-8.25.0.tar.gz 4359583 BLAKE2B 349e057d3c94ca6fc92753459f8fca011927e82a787cc50685ebe1c5a40a624e4f74764b04cf00f5c250cd65eb6e2862d7225790cc029cd7256c072d63db1726 SHA512 e0068ec00bbda2d1cf7f14105ad83e82bea9291ed5d5fda3ffcff2db32747b65e7b6d65743a3221aeca03be9c6efcee1db7f03c2da115a3aed60848556befa71
|
||||
DIST rsyslog-docs-8.26.0.tar.gz 4381345 BLAKE2B d90a4af06b3b48e5bab75751e0bd06564b6a846068ce324aa9e9b26c1e5e1d40841f573806444f290d3227e31d1fb498265437341be946badfe35c8455427352 SHA512 5c05c13b3ae6be431343b7a5b3b2cb8676804d6d58d98826e6b44d685bb30fdaf3ced27d66a29908b40f1839bac45d1834d060ddf05d01477474ab3f45f973c8
|
||||
DIST rsyslog-docs-8.27.0.tar.gz 4411093 BLAKE2B 67f6e3cf77973b07c9a19816beb16c9cce4b32b4609ab458501e7b0be9795c2138a83756d9590f03b0acde23f8b762df1c308c0ab7210a24122476ad14860770 SHA512 08d935ecad070d65e7169a56c6a4d35d49e895b4f7cfe4d747939d8a92bdadd0fc3be7cc47d23d233a33b964f2a4d809a34b37419d2e42c3f8c183120412ab2c
|
||||
DIST rsyslog-8.34.0.tar.gz 2545544 BLAKE2B 66caf277a814563027183ecf267d76067c384adf8d6d7b8543203df9a7c37242722dd35445e4446aacf1e680f5f3957cea40ece8a284ef2a393b4a71e3a2b49c SHA512 69eaececa2f8b98799deac8e6cb2cf635a5117da7a21cbb0b880b7df1d83c6ccf16133dab099a6e5fb865f34c2dad164a1bf1952d16ca116af3b1dd35d15065e
|
||||
DIST rsyslog-docs-8.28.0.tar.gz 4424901 BLAKE2B 9753b1a48b9d3bb045f2d088de5df0bbe5bc9045a82a5cab98b27c2df7648ac312929a173ec34c81ced46cb0eba336d708204b73b57413686769afa882dceaa5 SHA512 c085e09149cfc27ce0cd22edf9ad3f81b111f491fbea79afbc3172882065bd8324e366e3b5d09c885c1a3aa63fe8fbbe154d66488319d4ffc0867f938e1ab07d
|
||||
DIST rsyslog-docs-8.29.0.tar.gz 4473644 BLAKE2B 18fc4aea0551f1ad770cd882aaf512424f8d4fc9f00ba6c4c8e9bbbcb0ea4d4da4ba31c53bad23e28ed761e27e6378657b085cb0d72cebdc233ba25160023daa SHA512 791633b93693c1eacde965e07ced863b96d1bfa488fc5c4770424825ab702cae7babd5286e552da5e17d1d7779f228c61a1527b9726dffea31bbb3b4e80525dc
|
||||
DIST rsyslog-docs-8.30.0.tar.gz 4487378 BLAKE2B 7d39fc7642ec2122f254dd6660a13efa4b214ee669fe5772b4d68a8ce94ed5ac3ca2500c23b5752924b5befca2a66c228b6f2bb48c7b9f72a2a4b98e2a14810b SHA512 8068bb9bb8408447bff49730e9aac105eab1bd610592dd524e7639b668b2d05a4836d3a9862622445a0bb8d8b140db67c861dad6ec207d11049ac368e363684d
|
||||
DIST rsyslog-docs-8.31.0.tar.gz 4484950 BLAKE2B 8ee4346a095942133bb473509f275c625fdb4a1aa81293a15604bdb95670ff0676677fe5481be3bc2ea7097b2c8de7fd3b0eb8033701522b372bffe44325a10a SHA512 51a63fa520d8176e183afa44ccf889374810dddfd5fdb363ed06b134bfbe0d1a94085e4836cf3bb2a07cb83564bbb87cef3763ac9429a5efc50aff276542defa
|
||||
DIST rsyslog-docs-8.32.0.tar.gz 5368254 BLAKE2B 6d1efb191698bb1cfb03660167e5dcf9eea8f2fd2e459c350cd55aa24afcc5fb44d2bc0ef5590c6951326fbd0215aecbd59a6122e88ff449f566b37d1ee00d56 SHA512 e64eba3c40eab35e266826fb7e183418f38eb008f2a21ddf2c523d1e42aacaa20f882a561e5df67a979463048b58232fa82759645a21dc6962f6836ac8f57bce
|
||||
DIST rsyslog-docs-8.33.1.tar.gz 6770438 BLAKE2B e076688d7559c16986241149c00f6df603e2c90771222f4f91dc944fbdeace3dbc6e47fc82602f852a7407e064fe31df0a1c2940d521ae6ae21f5663518bfeb7 SHA512 fcc8ffee372c0b0dc2ab1b76dcf68a66ce820996cf2d46a2b5c6fd40e6fad5ef3c33da97a2e88956751597c20cf0c4a9b6537c22db0b3b46d1a734a9d9f95df5
|
||||
DIST rsyslog-docs-8.34.0.tar.gz 7419160 BLAKE2B 928e6a4044d6d2161483f934e6c2cd5e489a3ec95b823419d7d57b98a7dd6c73f4d28d17c238471592fe1c692b626b57c7bf647e926c1c38ff5a774e5d2defd5 SHA512 edf9aa63c777624c3dc27dfd64b38893b9b4c9b56941df1d7a8c6bc3cb4cbbfb83e8c356cbefeab7c688ecb6017b66ed99931cb71b69b7c927b4743548dd40d4
|
||||
|
|
|
@ -1,160 +0,0 @@
|
|||
Patch to allow building of tcpflood without librelp
|
||||
|
||||
Cherry pick of
|
||||
https://github.com/rsyslog/rsyslog/commit/73e3b7ab2f8a3974d31844b492ad02d61ed5727f
|
||||
https://github.com/rsyslog/rsyslog/pull/1493
|
||||
|
||||
|
||||
Gentoo-Bug: https://bugs.gentoo.org/613264
|
||||
Gentoo-Bug: https://bugs.gentoo.org/614424
|
||||
|
||||
diff -u b/tests/tcpflood.c b/tests/tcpflood.c
|
||||
--- b/tests/tcpflood.c
|
||||
+++ b/tests/tcpflood.c
|
||||
@@ -96,7 +96,9 @@
|
||||
#include <string.h>
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
+#ifdef ENABLE_RELP
|
||||
#include <librelp.h>
|
||||
+#endif
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
@@ -149,7 +151,9 @@
|
||||
static int numConnections = 1; /* number of connections to create */
|
||||
static int softLimitConnections = 0; /* soft connection limit, see -c option description */
|
||||
static int *sockArray; /* array of sockets to use */
|
||||
+#ifdef ENABLE_RELP
|
||||
static relpClt_t **relpCltArray; /* array of sockets to use */
|
||||
+#endif
|
||||
static int msgNum = 0; /* initial message number to start with */
|
||||
static int bShowProgress = 1; /* show progress messages */
|
||||
static int bSilent = 0; /* completely silent operation */
|
||||
@@ -216,6 +220,7 @@
|
||||
static int sendTLS(int i, char *buf, int lenBuf);
|
||||
static void closeTLSSess(int __attribute__((unused)) i);
|
||||
|
||||
+#ifdef ENABLE_RELP
|
||||
/* RELP subsystem */
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-security"
|
||||
@@ -235,6 +240,7 @@
|
||||
CHKRELP(relpEngineSetEnableCmd(pRelpEngine, (unsigned char*)"syslog",
|
||||
eRelpCmdState_Required));
|
||||
}
|
||||
+#endif /* #ifdef ENABLE_RELP */
|
||||
|
||||
/* prepare send subsystem for UDP send */
|
||||
static int
|
||||
@@ -273,6 +279,7 @@
|
||||
port = targetPort;
|
||||
}
|
||||
if(transport == TP_RELP_PLAIN) {
|
||||
+ #ifdef ENABLE_RELP
|
||||
relpRetVal relp_r;
|
||||
relpClt_t *relpClt;
|
||||
char relpPort[16];
|
||||
@@ -286,6 +293,7 @@
|
||||
return(1);
|
||||
}
|
||||
*fd = 1; /* mimic "all ok" state */
|
||||
+ #endif
|
||||
} else { /* TCP, with or without TLS */
|
||||
if((sock=socket(AF_INET, SOCK_STREAM, 0))==-1) {
|
||||
perror("\nsocket()");
|
||||
@@ -336,8 +344,10 @@
|
||||
sessArray = calloc(numConnections, sizeof(gnutls_session_t));
|
||||
# endif
|
||||
sockArray = calloc(numConnections, sizeof(int));
|
||||
+ #ifdef ENABLE_RELP
|
||||
if(transport == TP_RELP_PLAIN)
|
||||
relpCltArray = calloc(numConnections, sizeof(relpClt_t*));
|
||||
+ #endif
|
||||
for(i = 0 ; i < numConnections ; ++i) {
|
||||
if(i % 10 == 0) {
|
||||
if(bShowProgress)
|
||||
@@ -356,8 +366,10 @@
|
||||
* at least something.
|
||||
*/
|
||||
if(transport == TP_RELP_PLAIN) {
|
||||
+ #ifdef ENABLE_RELP
|
||||
CHKRELP(relpEngineCltDestruct(pRelpEngine,
|
||||
relpCltArray+i));
|
||||
+ #endif
|
||||
} else { /* TCP and TLS modes */
|
||||
if(transport == TP_TLS)
|
||||
closeTLSSess(i);
|
||||
@@ -403,14 +415,13 @@
|
||||
|
||||
if(bShowProgress)
|
||||
if(write(1, " close connections", sizeof(" close connections")-1)){}
|
||||
- //if(transport == TP_RELP_PLAIN)
|
||||
- //sleep(10); /* we need to let librelp settle a bit */
|
||||
for(i = 0 ; i < numConnections ; ++i) {
|
||||
if(i % 10 == 0 && bShowProgress) {
|
||||
lenMsg = sprintf(msgBuf, "\r%5.5d", i);
|
||||
if(write(1, msgBuf, lenMsg)){}
|
||||
}
|
||||
if(transport == TP_RELP_PLAIN) {
|
||||
+ #ifdef ENABLE_RELP
|
||||
relpRetVal relpr;
|
||||
if(sockArray[i] != -1) {
|
||||
relpr = relpEngineCltDestruct(pRelpEngine, relpCltArray+i);
|
||||
@@ -419,6 +430,7 @@
|
||||
}
|
||||
sockArray[i] = -1;
|
||||
}
|
||||
+ #endif
|
||||
} else { /* TCP and TLS modes */
|
||||
if(sockArray[i] != -1) {
|
||||
/* we try to not overrun the receiver by trying to flush buffers
|
||||
@@ -610,6 +622,7 @@
|
||||
offsSendBuf = lenBuf;
|
||||
}
|
||||
} else if(transport == TP_RELP_PLAIN) {
|
||||
+ #ifdef ENABLE_RELP
|
||||
relpRetVal relp_ret;
|
||||
if(sockArray[socknum] == -1) {
|
||||
/* connection was dropped, need to re-establish */
|
||||
@@ -627,6 +640,7 @@
|
||||
printf("\nrelpCltSendSyslog() failed with relp error code %d\n",
|
||||
relp_ret);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
if(lenSend != lenBuf) {
|
||||
printf("\r%5.5d\n", i);
|
||||
@@ -1106,7 +1120,9 @@
|
||||
transport = TP_RELP_PLAIN;
|
||||
# else
|
||||
fprintf(stderr, "compiled without RELP support: "
|
||||
- "\"-Trelp-plain\" not supported!\n");
|
||||
+ "\"-Trelp-plain\" not supported!\n"
|
||||
+ "(add --enable-relp to ./configure options "
|
||||
+ "if desired)\n");
|
||||
exit(1);
|
||||
# endif
|
||||
} else {
|
||||
@@ -1168,7 +1184,9 @@
|
||||
if(transport == TP_TLS) {
|
||||
initTLS();
|
||||
} else if(transport == TP_RELP_PLAIN) {
|
||||
+ #ifdef ENABLE_RELP
|
||||
initRELP_PLAIN();
|
||||
+ #endif
|
||||
}
|
||||
|
||||
if(openConnections() != 0) {
|
||||
@@ -1183,9 +1201,11 @@
|
||||
|
||||
closeConnections(); /* this is important so that we do not finish too early! */
|
||||
|
||||
+ #ifdef ENABLE_RELP
|
||||
if(transport == TP_RELP_PLAIN) {
|
||||
CHKRELP(relpEngineDestruct(&pRelpEngine));
|
||||
}
|
||||
+ #endif
|
||||
|
||||
if(nConnDrops > 0 && !bSilent)
|
||||
printf("-D option initiated %ld connection closures\n", nConnDrops);
|
|
@ -1,39 +0,0 @@
|
|||
--- a/contrib/imzmq3/imzmq3.c
|
||||
+++ b/contrib/imzmq3/imzmq3.c
|
||||
@@ -403,7 +403,7 @@ static rsRetVal createSocket(instanceConf_t* info, void** sock) {
|
||||
|
||||
/* Do the bind/connect... */
|
||||
if (info->action==ACTION_CONNECT) {
|
||||
- rv = zsocket_connect(*sock, info->description);
|
||||
+ rv = zsocket_connect(*sock, "%s", info->description);
|
||||
if (rv == -1) {
|
||||
errmsg.LogError(0,
|
||||
RS_RET_INVALID_PARAMS,
|
||||
@@ -413,7 +413,7 @@ static rsRetVal createSocket(instanceConf_t* info, void** sock) {
|
||||
}
|
||||
DBGPRINTF("imzmq3: connect for %s successful\n",info->description);
|
||||
} else {
|
||||
- rv = zsocket_bind(*sock, info->description);
|
||||
+ rv = zsocket_bind(*sock, "%s", info->description);
|
||||
if (rv == -1) {
|
||||
errmsg.LogError(0,
|
||||
RS_RET_INVALID_PARAMS,
|
||||
--- a/contrib/omzmq3/omzmq3.c
|
||||
+++ b/contrib/omzmq3/omzmq3.c
|
||||
@@ -242,14 +242,14 @@ static rsRetVal initZMQ(instanceData* pData) {
|
||||
if (pData->action == ACTION_BIND) {
|
||||
/* bind asserts, so no need to test return val here
|
||||
which isn't the greatest api -- oh well */
|
||||
- if(-1 == zsocket_bind(pData->socket, (char*)pData->description)) {
|
||||
+ if(-1 == zsocket_bind(pData->socket, "%s", (char*)pData->description)) {
|
||||
errmsg.LogError(0, RS_RET_NO_ERRCODE, "omzmq3: bind failed for %s: %s",
|
||||
pData->description, zmq_strerror(errno));
|
||||
ABORT_FINALIZE(RS_RET_NO_ERRCODE);
|
||||
}
|
||||
DBGPRINTF("omzmq3: bind to %s successful\n",pData->description);
|
||||
} else {
|
||||
- if(-1 == zsocket_connect(pData->socket, (char*)pData->description)) {
|
||||
+ if(-1 == zsocket_connect(pData->socket, "%s", (char*)pData->description)) {
|
||||
errmsg.LogError(0, RS_RET_NO_ERRCODE, "omzmq3: connect failed for %s: %s",
|
||||
pData->description, zmq_strerror(errno));
|
||||
ABORT_FINALIZE(RS_RET_NO_ERRCODE);
|
|
@ -1,27 +0,0 @@
|
|||
From 1a7d3a088969b47798bc1da712ca2772f91a7c02 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Vymazal <jvymazal@redhat.com>
|
||||
Date: Wed, 31 May 2017 16:26:56 +0200
|
||||
Subject: [PATCH] Ignoring NONAME error from getaddrinfo so we have hostname
|
||||
set even without working network
|
||||
|
||||
---
|
||||
runtime/net.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/runtime/net.c b/runtime/net.c
|
||||
index 2d8de9429..edffc677a 100644
|
||||
--- a/runtime/net.c
|
||||
+++ b/runtime/net.c
|
||||
@@ -1188,7 +1188,11 @@ getLocalHostname(uchar **ppName)
|
||||
memset(&flags, 0, sizeof(flags));
|
||||
flags.ai_flags = AI_CANONNAME;
|
||||
int error = getaddrinfo((char*)hnbuf, NULL, &flags, &res);
|
||||
- if (error != 0) {
|
||||
+ if (error != 0 &&
|
||||
+ error != EAI_NONAME && error != EAI_AGAIN && error != EAI_FAIL) {
|
||||
+ /* If we get one of errors above, network is probably
|
||||
+ * not working yet, so we fall back to local hostname below
|
||||
+ */
|
||||
dbgprintf("getaddrinfo: %s\n", gai_strerror(error));
|
||||
ABORT_FINALIZE(RS_RET_IO_ERROR);
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1695,12 +1695,14 @@ AM_CONDITIONAL(ENABLE_KAFKA_TESTS, test x$enable_kafka_tests = xyes)
|
||||
|
||||
# omkafka works with older library
|
||||
if test "x$enable_omkafka" = "xyes"; then
|
||||
- PKG_CHECK_MODULES([LIBRDKAFKA], [librdkafka],, [
|
||||
- AC_CHECK_LIB([rdkafka], [rd_kafka_produce], [
|
||||
- AC_MSG_WARN([librdkafka is missing but library present, using -lrdkafka])
|
||||
- LIBRDKAFKA_LIBS=-lrdkafka
|
||||
- ], [
|
||||
- AC_MSG_ERROR([could not find rdkafka library])
|
||||
+ PKG_CHECK_MODULES([LIBRDKAFKA], [rdkafka],, [
|
||||
+ PKG_CHECK_MODULES([LIBRDKAFKA], [librdkafka],, [
|
||||
+ AC_CHECK_LIB([rdkafka], [rd_kafka_produce], [
|
||||
+ AC_MSG_WARN([librdkafka is missing but library present, using -lrdkafka])
|
||||
+ LIBRDKAFKA_LIBS=-lrdkafka
|
||||
+ ], [
|
||||
+ AC_MSG_ERROR([could not find rdkafka library])
|
||||
+ ])
|
||||
])
|
||||
])
|
||||
AC_CHECK_HEADERS([librdkafka/rdkafka.h])
|
||||
@@ -1708,12 +1710,13 @@ fi
|
||||
|
||||
# imkafka needs newer library
|
||||
if test "x$enable_imkafka" = "xyes"; then
|
||||
- PKG_CHECK_MODULES(LIBRDKAFKA, rdkafka >= 0.9.1)
|
||||
- AC_CHECK_LIB([rdkafka], [rd_kafka_produce], [
|
||||
- AC_MSG_WARN([librdkafka is missing but library present, using -lrdkafka])
|
||||
- LIBRDKAFKA_LIBS=-lrdkafka
|
||||
- ], [
|
||||
- AC_MSG_ERROR([could not find rdkafka library])
|
||||
+ PKG_CHECK_MODULES([LIBRDKAFKA], [rdkafka >= 0.9.1],, [
|
||||
+ AC_CHECK_LIB([rdkafka], [rd_kafka_produce], [
|
||||
+ AC_MSG_WARN([librdkafka is missing but library present, using -lrdkafka])
|
||||
+ LIBRDKAFKA_LIBS=-lrdkafka
|
||||
+ ], [
|
||||
+ AC_MSG_ERROR([could not find rdkafka library])
|
||||
+ ])
|
||||
])
|
||||
AC_CHECK_HEADERS([librdkafka/rdkafka.h])
|
||||
fi
|
|
@ -1,22 +0,0 @@
|
|||
https://github.com/rsyslog/rsyslog/issues/1838
|
||||
|
||||
--- a/plugins/imgssapi/imgssapi.c
|
||||
+++ b/plugins/imgssapi/imgssapi.c
|
||||
@@ -291,7 +291,7 @@ finalize_it:
|
||||
|
||||
|
||||
static rsRetVal
|
||||
-doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd)
|
||||
+doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd, int *const oserr)
|
||||
{
|
||||
DEFiRet;
|
||||
int allowedMethods;
|
||||
@@ -307,7 +307,7 @@ doRcvData(tcps_sess_t *pSess, char *buf, size_t lenBuf, ssize_t *piLenRcvd)
|
||||
CHKiRet(TCPSessGSSRecv(pSess, buf, lenBuf, piLenRcvd));
|
||||
} else {
|
||||
*piLenRcvd = lenBuf;
|
||||
- CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd) != RS_RET_OK);
|
||||
+ CHKiRet(netstrm.Rcv(pSess->pStrm, (uchar*) buf, piLenRcvd, oserr));
|
||||
}
|
||||
|
||||
finalize_it:
|
|
@ -0,0 +1,13 @@
|
|||
https://github.com/rsyslog/rsyslog/issues/2612
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -254,7 +254,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(, return __builtin_expect(main != 0, 1))],
|
||||
# speeds up processig.
|
||||
# note that when automic operations are enabled but not available, they
|
||||
# will silently NOT be used!
|
||||
-AC_ARG_ENABLE(regexp,
|
||||
+AC_ARG_ENABLE(atomic_operations,
|
||||
[AS_HELP_STRING([--enable-atomic-operations],[Enable atomic operation support @<:@default=yes@:>@])],
|
||||
[case "${enableval}" in
|
||||
yes) enable_atomic_operations="yes" ;;
|
|
@ -14,6 +14,7 @@
|
|||
<flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag>
|
||||
<flag name="kafka">Build the Apache Kafka input/output module (requires <pkg>dev-libs/librdkafka</pkg>)</flag>
|
||||
<flag name="kerberos">Build the GSSAPI input and output module (requires <pkg>virtual/krb5</pkg>)</flag>
|
||||
<flag name="kubernetes">Build the kubernetes modify plugin (requires <pkg>net-misc/curl</pkg>)</flag>
|
||||
<flag name="libressl">Use <pkg>dev-libs/libressl</pkg> for building the rfc5424hmac modify module (requires rfc5424hmac USE flag)</flag>
|
||||
<flag name="mdblookup">Build the MaxMind DB lookup message modify plugin using <pkg>dev-libs/libmaxminddb</pkg></flag>
|
||||
<flag name="mongodb">Build the MongoDB output module (requires <pkg>dev-libs/libmongo-client</pkg>)</flag>
|
||||
|
|
|
@ -1,444 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="amd64 arm ~arm64 hppa x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.2:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.1:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.5:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-208 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
doins "${FILESDIR}/${BRANCH}/50-default.conf"
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,448 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="amd64 arm ~arm64 hppa x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.24.0-fix-tcpflood-without-librelp-r1.patch )
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.3:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.1:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.12:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-208 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
doins "${FILESDIR}/${BRANCH}/50-default.conf"
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,450 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.24.0-fix-tcpflood-without-librelp-r1.patch )
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.3:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.1:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.12:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-208 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
doins "${FILESDIR}/${BRANCH}/50-default.conf"
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,452 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="amd64 ~arm ~arm64 hppa x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/8-stable/${PN}-8.26.0-fix-zmq3-format-security.patch
|
||||
)
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.3:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.12:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-208 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
doins "${FILESDIR}/${BRANCH}/50-default.conf"
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,456 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="amd64 ~arm ~arm64 ~hppa x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/8-stable/${PN}-8.26.0-fix-zmq3-format-security.patch
|
||||
"${FILESDIR}"/8-stable/${PN}-8.27.0-fix-librdkafka-detection.patch
|
||||
"${FILESDIR}"/8-stable/${PN}-8.27.0-fix-hostname-detection-when-getaddrinfo-fails.patch
|
||||
"${FILESDIR}"/8-stable/${PN}-8.27.0-fix-mmnormalize-tests.patch
|
||||
)
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.3:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.12:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-208 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka imkafka)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
doins "${FILESDIR}/${BRANCH}/50-default.conf"
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
@ -6,7 +6,7 @@ EAPI="6"
|
|||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
HOMEPAGE="https://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
|
@ -39,12 +39,12 @@ else
|
|||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="amd64 ~arm ~arm64 hppa x86"
|
||||
KEYWORDS="hppa"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.27.0-fix-mmnormalize-tests.patch )
|
||||
|
@ -69,7 +69,7 @@ RDEPEND="
|
|||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
mysql? ( virtual/libmysqlclient:= )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
|
@ -1,451 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.27.0-fix-mmnormalize-tests.patch )
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.3:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.14:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-208 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka imkafka)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,451 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools eutils linux-info systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/rsyslog/${PN}.git"
|
||||
|
||||
DOC_REPO_URI="https://github.com/rsyslog/${PN}-doc.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
MY_PV=${PV%_rc*}
|
||||
MY_FILENAME="${PN}-${PV}.tar.gz"
|
||||
MY_FILENAME_DOCS="${PN}-docs-${PV}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
_tmp_last_index=$(($(get_last_version_component_index ${PV})+1))
|
||||
_tmp_suffix=$(get_version_component_range ${_tmp_last_index} ${PV})
|
||||
if [[ ${_tmp_suffix} = *rc* ]]; then
|
||||
MY_URL_PREFIX="${_tmp_suffix}/"
|
||||
fi
|
||||
|
||||
# Cleaning up temporary variables
|
||||
unset _tmp_last_index
|
||||
unset _tmp_suffix
|
||||
else
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86"
|
||||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.30.0-fix-kerberos.patch )
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.7:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
grok? ( >=dev-libs/grok-0.9.2 )
|
||||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/libmongo-client-0.1.4 )
|
||||
mysql? ( virtual/mysql )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
||||
)
|
||||
omhttpfs? ( >=net-misc/curl-7.35.0 )
|
||||
omudpspoof? ( >=net-libs/libnet-1.1.6 )
|
||||
postgres? ( >=dev-db/postgresql-8.4.20:= )
|
||||
rabbitmq? ( >=net-libs/rabbitmq-c-0.3.0:= )
|
||||
redis? ( >=dev-libs/hiredis-0.11.0:= )
|
||||
relp? ( >=dev-libs/librelp-1.2.14:= )
|
||||
rfc3195? ( >=dev-libs/liblogging-1.0.1:=[rfc3195] )
|
||||
rfc5424hmac? (
|
||||
!libressl? ( >=dev-libs/openssl-0.9.8y:0= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
snmp? ( >=net-analyzer/net-snmp-5.7.2 )
|
||||
ssl? ( >=net-libs/gnutls-2.12.23:0= )
|
||||
systemd? ( >=sys-apps/systemd-234 )
|
||||
uuid? ( sys-apps/util-linux:0= )
|
||||
zeromq? (
|
||||
>=net-libs/zeromq-4.1.1:=
|
||||
>=net-libs/czmq-3.0.0
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-devel/autoconf-archive-2015.02.24
|
||||
virtual/pkgconfig
|
||||
test? ( sys-libs/libfaketime )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
DEPEND+=" >=sys-devel/bison-2.4.3"
|
||||
DEPEND+=" >=dev-python/docutils-0.12"
|
||||
fi
|
||||
|
||||
CONFIG_CHECK="~INOTIFY_USER"
|
||||
WARNING_INOTIFY_USER="CONFIG_INOTIFY_USER isn't set. Imfile module on this system will only support polling mode!"
|
||||
|
||||
src_unpack() {
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
git-r3_fetch
|
||||
git-r3_checkout
|
||||
else
|
||||
unpack ${P}.tar.gz
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
local _EGIT_BRANCH=
|
||||
if [[ -n "${EGIT_BRANCH}" ]]; then
|
||||
# Cannot use rsyslog commits/branches for documentation repository
|
||||
_EGIT_BRANCH=${EGIT_BRANCH}
|
||||
unset EGIT_BRANCH
|
||||
fi
|
||||
|
||||
git-r3_fetch "${DOC_REPO_URI}"
|
||||
git-r3_checkout "${DOC_REPO_URI}" "${S}"/docs
|
||||
|
||||
if [[ -n "${_EGIT_BRANCH}" ]]; then
|
||||
# Restore previous EGIT_BRANCH information
|
||||
EGIT_BRANCH=${_EGIT_BRANCH}
|
||||
fi
|
||||
else
|
||||
cd "${S}" || die "Cannot change dir into '${S}'"
|
||||
mkdir docs || die "Failed to create docs directory"
|
||||
cd docs || die "Failed to change dir into '${S}/docs'"
|
||||
unpack ${MY_FILENAME_DOCS}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Maintainer notes:
|
||||
# * Guardtime support is missing because libgt isn't yet available
|
||||
# in portage.
|
||||
# * Hadoop's HDFS file system output module is currently not
|
||||
# supported in Gentoo because nobody is able to test it
|
||||
# (JAVA dependency).
|
||||
# * dev-libs/hiredis doesn't provide pkg-config (see #504614,
|
||||
# upstream PR 129 and 136) so we need to export HIREDIS_*
|
||||
# variables because rsyslog's build system depends on pkg-config.
|
||||
|
||||
if use redis; then
|
||||
export HIREDIS_LIBS="-L${EPREFIX}/usr/$(get_libdir) -lhiredis"
|
||||
export HIREDIS_CFLAGS="-I${EPREFIX}/usr/include"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
--disable-debug-symbols
|
||||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
--enable-impstats
|
||||
--enable-imptcp
|
||||
# Message Modificiation Plugins without depedencies
|
||||
--enable-mmanon
|
||||
--enable-mmaudit
|
||||
--enable-mmcount
|
||||
--enable-mmfields
|
||||
--enable-mmjsonparse
|
||||
--enable-mmpstrucdata
|
||||
--enable-mmrm1stspace
|
||||
--enable-mmsequence
|
||||
--enable-mmutf8fix
|
||||
# Output Modification Plugins without dependencies
|
||||
--enable-mail
|
||||
--enable-omprog
|
||||
--enable-omruleset
|
||||
--enable-omstdout
|
||||
--enable-omuxsock
|
||||
# Misc
|
||||
--enable-pmaixforwardedfrom
|
||||
--enable-pmciscoios
|
||||
--enable-pmcisconames
|
||||
--enable-pmlastmsg
|
||||
--enable-pmsnare
|
||||
# DB
|
||||
$(use_enable dbi libdbi)
|
||||
$(use_enable mongodb ommongodb)
|
||||
$(use_enable mysql)
|
||||
$(use_enable postgres pgsql)
|
||||
$(use_enable redis omhiredis)
|
||||
# Debug
|
||||
$(use_enable debug)
|
||||
$(use_enable debug diagtools)
|
||||
$(use_enable debug memcheck)
|
||||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka imkafka)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
$(use_enable omhttpfs)
|
||||
$(use_enable omudpspoof)
|
||||
$(use_enable rabbitmq omrabbitmq)
|
||||
$(use_enable relp)
|
||||
$(use_enable rfc3195)
|
||||
$(use_enable rfc5424hmac mmrfc5424addhmac)
|
||||
$(use_enable snmp)
|
||||
$(use_enable snmp mmsnmptrapd)
|
||||
$(use_enable ssl gnutls)
|
||||
$(use_enable systemd imjournal)
|
||||
$(use_enable systemd omjournal)
|
||||
$(use_enable usertools)
|
||||
$(use_enable uuid)
|
||||
$(use_enable zeromq imczmq)
|
||||
$(use_enable zeromq imzmq3)
|
||||
$(use_enable zeromq omczmq)
|
||||
$(use_enable zeromq omzmq3)
|
||||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
default
|
||||
|
||||
if use doc && [[ "${PV}" == "9999" ]]; then
|
||||
einfo "Building documentation ..."
|
||||
local doc_dir="${S}/docs"
|
||||
cd "${doc_dir}" || die "Cannot chdir into \"${doc_dir}\"!"
|
||||
sphinx-build -b html source build || die "Building documentation failed!"
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local _has_increased_ulimit=
|
||||
|
||||
# Sometimes tests aren't executable (i.e. when added via patch)
|
||||
einfo "Adjusting permissions of test scripts ..."
|
||||
find "${S}"/tests -type f -name '*.sh' \! -perm -111 -exec chmod a+x '{}' \; || \
|
||||
die "Failed to adjust test scripts permission"
|
||||
|
||||
if ulimit -n 3072; then
|
||||
_has_increased_ulimit="true"
|
||||
fi
|
||||
|
||||
if ! emake --jobs 1 check; then
|
||||
eerror "Test suite failed! :("
|
||||
|
||||
if [[ -z "${_has_increased_ulimit}" ]]; then
|
||||
eerror "Probably because open file limit couldn't be set to 3072."
|
||||
fi
|
||||
|
||||
if has userpriv ${FEATURES}; then
|
||||
eerror "Please try to reproduce the test suite failure with FEATURES=-userpriv " \
|
||||
"before you submit a bug report."
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
"${FILESDIR}"/${BRANCH}/README.gentoo
|
||||
)
|
||||
|
||||
use doc && local HTML_DOCS=( "${S}/docs/build/." )
|
||||
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}/${BRANCH}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${BRANCH}/${PN}.initd-r1" ${PN}
|
||||
|
||||
keepdir /var/empty/dev
|
||||
keepdir /var/spool/${PN}
|
||||
keepdir /etc/ssl/${PN}
|
||||
keepdir /etc/${PN}.d
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.conf" ${PN}.conf
|
||||
|
||||
insinto /etc/rsyslog.d/
|
||||
newins "${FILESDIR}/${BRANCH}/50-default-r1.conf" 50-default.conf
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins "${FILESDIR}/${BRANCH}/${PN}.logrotate" ${PN}
|
||||
|
||||
if use mysql; then
|
||||
insinto /usr/share/doc/${PF}/scripts/mysql
|
||||
doins plugins/ommysql/createDB.sql
|
||||
fi
|
||||
|
||||
if use postgres; then
|
||||
insinto /usr/share/doc/${PF}/scripts/pgsql
|
||||
doins plugins/ompgsql/createDB.sql
|
||||
fi
|
||||
|
||||
prune_libtool_files --modules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local advertise_readme=0
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
# This is a new installation
|
||||
|
||||
advertise_readme=1
|
||||
|
||||
if use mysql || use postgres; then
|
||||
echo
|
||||
elog "Sample SQL scripts for MySQL & PostgreSQL have been installed to:"
|
||||
elog " /usr/share/doc/${PF}/scripts"
|
||||
fi
|
||||
|
||||
if use ssl; then
|
||||
echo
|
||||
elog "To create a default CA and certificates for your server and clients, run:"
|
||||
elog " emerge --config =${PF}"
|
||||
elog "on your logging server. You can run it several times,"
|
||||
elog "once for each logging client. The client certificates will be signed"
|
||||
elog "using the CA certificate generated during the first run."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${advertise_readme} -gt 0 ]]; then
|
||||
# We need to show the README file location
|
||||
|
||||
echo ""
|
||||
elog "Please read"
|
||||
elog ""
|
||||
elog " ${EPREFIX}/usr/share/doc/${PF}/README.gentoo*"
|
||||
elog ""
|
||||
elog "for more details."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if ! use ssl ; then
|
||||
einfo "There is nothing to configure for rsyslog unless you"
|
||||
einfo "used USE=ssl to build it."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Make sure the certificates directory exists
|
||||
local CERTDIR="${EROOT}/etc/ssl/${PN}"
|
||||
if [[ ! -d "${CERTDIR}" ]]; then
|
||||
mkdir "${CERTDIR}" || die
|
||||
fi
|
||||
einfo "Your certificates will be stored in ${CERTDIR}"
|
||||
|
||||
# Create a default CA if needed
|
||||
if [[ ! -f "${CERTDIR}/${PN}_ca.cert.pem" ]]; then
|
||||
einfo "No CA key and certificate found in ${CERTDIR}, creating them for you..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_ca.privkey.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = Portage automated CA
|
||||
ca
|
||||
cert_signing_key
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-self-signed \
|
||||
--load-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--outfile "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_ca.privkey.pem"
|
||||
|
||||
# Create the server certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the SERVER you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for server ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_server
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
else
|
||||
einfo "Found existing ${CERTDIR}/${PN}_ca.cert.pem, skipping CA and SERVER creation."
|
||||
fi
|
||||
|
||||
# Create a client certificate
|
||||
echo
|
||||
einfon "Please type the Common Name of the CLIENT you wish to create a certificate for: "
|
||||
read -r CN
|
||||
|
||||
einfo "Creating private key and certificate for client ${CN}..."
|
||||
certtool --generate-privkey \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.key.pem" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.key.pem"
|
||||
|
||||
cat > "${T}/${PF}.$$" <<- _EOF
|
||||
cn = ${CN}
|
||||
tls_www_client
|
||||
dns_name = ${CN}
|
||||
expiration_days = 3650
|
||||
_EOF
|
||||
|
||||
certtool --generate-certificate \
|
||||
--outfile "${CERTDIR}/${PN}_${CN}.cert.pem" \
|
||||
--load-privkey "${CERTDIR}/${PN}_${CN}.key.pem" \
|
||||
--load-ca-certificate "${CERTDIR}/${PN}_ca.cert.pem" \
|
||||
--load-ca-privkey "${CERTDIR}/${PN}_ca.privkey.pem" \
|
||||
--template "${T}/${PF}.$$" &>/dev/null
|
||||
chmod 400 "${CERTDIR}/${PN}_${CN}.cert.pem"
|
||||
|
||||
rm -f "${T}/${PF}.$$"
|
||||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|||
inherit autotools eutils linux-info python-any-r1 systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
HOMEPAGE="https://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
|
@ -44,8 +44,8 @@ else
|
|||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/8-stable/${PN}-8.32.0-fix-building-without-curl-r3.patch )
|
||||
|
@ -71,7 +71,7 @@ RDEPEND="
|
|||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
|
||||
mysql? ( virtual/mysql )
|
||||
mysql? ( virtual/libmysqlclient:= )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
|
@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|||
inherit autotools eutils linux-info python-any-r1 systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
HOMEPAGE="https://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
|
@ -44,8 +44,8 @@ else
|
|||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
fi
|
||||
|
||||
|
@ -69,7 +69,7 @@ RDEPEND="
|
|||
kerberos? ( virtual/krb5 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
|
||||
mysql? ( virtual/mysql )
|
||||
mysql? ( virtual/libmysqlclient:= )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
@ -7,7 +7,7 @@ PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
|
|||
inherit autotools eutils linux-info python-any-r1 systemd
|
||||
|
||||
DESCRIPTION="An enhanced multi-threaded syslogd with database support and more"
|
||||
HOMEPAGE="http://www.rsyslog.com/"
|
||||
HOMEPAGE="https://www.rsyslog.com/"
|
||||
|
||||
BRANCH="8-stable"
|
||||
|
||||
|
@ -24,9 +24,9 @@ else
|
|||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
# Upstream URL schema:
|
||||
# RC: http://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# http://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
# RC: https://www.rsyslog.com/files/download/rsyslog/rc/rsyslog-8.18.0.tar.gz
|
||||
# https://www.rsyslog.com/files/download/rsyslog/rc2/rsyslog-8.18.0.tar.gz
|
||||
# Release: https://www.rsyslog.com/files/download/rsyslog/rsyslog-8.18.0.tar.gz
|
||||
|
||||
MY_URL_PREFIX=
|
||||
if [[ ${PV} = *_rc* ]]; then
|
||||
|
@ -44,23 +44,24 @@ else
|
|||
fi
|
||||
|
||||
SRC_URI="
|
||||
http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( http://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-${MY_PV}.tar.gz -> ${MY_FILENAME}
|
||||
doc? ( https://www.rsyslog.com/files/download/${PN}/${MY_URL_PREFIX}${PN}-doc-${MY_PV}.tar.gz -> ${MY_FILENAME_DOCS} )
|
||||
"
|
||||
|
||||
PATCHES=()
|
||||
PATCHES=( "${FILESDIR}"/${BRANCH}/${PN}-8.34.0-fix-issue2612.patch )
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3 LGPL-3 Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos libressl mdblookup mongodb mysql normalize omhttpfs"
|
||||
IUSE+=" omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
IUSE="curl dbi debug doc elasticsearch +gcrypt grok jemalloc kafka kerberos kubernetes libressl mdblookup mongodb mysql"
|
||||
IUSE+=" normalize omhttpfs omudpspoof postgres rabbitmq redis relp rfc3195 rfc5424hmac snmp ssl systemd test usertools +uuid zeromq"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/libfastjson-0.99.7:=
|
||||
>=dev-libs/libfastjson-0.99.8:=
|
||||
>=dev-libs/libestr-0.1.9
|
||||
>=dev-libs/liblogging-1.0.1:=[stdlog]
|
||||
>=sys-libs/zlib-1.2.5
|
||||
curl? ( >=net-misc/curl-7.35.0 )
|
||||
dbi? ( >=dev-db/libdbi-0.8.3 )
|
||||
elasticsearch? ( >=net-misc/curl-7.35.0 )
|
||||
gcrypt? ( >=dev-libs/libgcrypt-1.5.3:= )
|
||||
|
@ -68,9 +69,10 @@ RDEPEND="
|
|||
jemalloc? ( >=dev-libs/jemalloc-3.3.1:= )
|
||||
kafka? ( >=dev-libs/librdkafka-0.9.0.99:= )
|
||||
kerberos? ( virtual/krb5 )
|
||||
kubernetes? ( >=net-misc/curl-7.35.0 )
|
||||
mdblookup? ( dev-libs/libmaxminddb:= )
|
||||
mongodb? ( >=dev-libs/mongo-c-driver-1.1.10:= )
|
||||
mysql? ( virtual/mysql )
|
||||
mysql? ( virtual/libmysqlclient:= )
|
||||
normalize? (
|
||||
>=dev-libs/libee-0.4.0
|
||||
>=dev-libs/liblognorm-2.0.3:=
|
||||
|
@ -102,6 +104,8 @@ DEPEND="${RDEPEND}
|
|||
${PYTHON_DEPS}
|
||||
)"
|
||||
|
||||
REQUIRED_USE="kubernetes? ( normalize )"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
DEPEND+=" doc? ( >=dev-python/sphinx-1.1.3-r7 )"
|
||||
DEPEND+=" >=sys-devel/flex-2.5.39-r1"
|
||||
|
@ -176,6 +180,7 @@ src_configure() {
|
|||
--disable-generate-man-pages
|
||||
--without-valgrind-testbench
|
||||
$(use_enable test testbench)
|
||||
$(use_enable curl libcurl)
|
||||
# Input Plugins without depedencies
|
||||
--enable-imdiag
|
||||
--enable-imfile
|
||||
|
@ -216,12 +221,14 @@ src_configure() {
|
|||
$(use_enable debug rtinst)
|
||||
$(use_enable debug valgrind)
|
||||
# Misc
|
||||
$(use_enable curl fmhttp)
|
||||
$(use_enable elasticsearch)
|
||||
$(use_enable gcrypt libgcrypt)
|
||||
$(use_enable jemalloc)
|
||||
$(use_enable kafka imkafka)
|
||||
$(use_enable kafka omkafka)
|
||||
$(use_enable kerberos gssapi-krb5)
|
||||
$(use_enable kubernetes mmkubernetes)
|
||||
$(use_enable normalize mmnormalize)
|
||||
$(use_enable mdblookup mmdblookup)
|
||||
$(use_enable grok mmgrok)
|
||||
|
@ -453,5 +460,5 @@ pkg_config() {
|
|||
|
||||
echo
|
||||
einfo "Here is the documentation on how to encrypt your log traffic:"
|
||||
einfo " http://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
einfo " https://www.rsyslog.com/doc/rsyslog_tls.html"
|
||||
}
|
|
@ -1,4 +1,3 @@
|
|||
DIST salt-2016.11.8.tar.gz 10142142 BLAKE2B e6805dae84c0d2e39109c95f603fcb54e1b7d7ff6c27ce555379b69274b3a5d72a1e372081a62c18440deb0955c1ef24a41c5d855a5e622f2ffe51276bd87b25 SHA512 0adc544ca460d13d2adb11b04575bd079a3dad1be3468bea7d32d0b74416b78546e4c86c75551bba09786be8e9810a6e30232414c4f5851cbc9a0fb4b894e0de
|
||||
DIST salt-2016.11.9.tar.gz 10062996 BLAKE2B 5176d04d07a69de21c9c136c201d334614c5675fd78e306a0160fae829b633441cd859f4ba1a0822dfbb9ae716475c53f6eb058187d4acc8a5770dd4ceace577 SHA512 896fd27c111e926e246b51d00b69d41c8f4d25ec0c034c9ff3dc5414f5e93592fd637cdeaecf02b3b98a4e5a7ce478bfda86b15497961078374608d76516593d
|
||||
DIST salt-2017.7.2.tar.gz 11471191 BLAKE2B 0b7184eb4dcb29f2a9603117d1c6fb9c729093c1ff11e18370929ec3fdbfe7bf8c0914f17260c3f613842c23359205a4a84d3e0bcd67476705e50f805bcd7b69 SHA512 959cec404f0fa7c00f78427cba902b8b9c2c0d95016fc70925d8da6d0b97a0284fc034ac92a5c5c313763db4fdcbd1b0391318596b77fe8e0cd1c7e4b3fa928b
|
||||
DIST salt-2017.7.4.tar.gz 11718327 BLAKE2B c197284ee56d039ee7942534af979f0606093ebdf40e0b11a55ca28a2f64c4b584b09b0901d5cb2c350f4ede52636e7927bbed48355d731472970eda5e32632f SHA512 79d7853c2614ed581e441babe6fbb73809816ec53aa47016b5066b771de449d4dcc999927d7e1c92c5ca68c816d27779e34e31ec1408d473a07120d62846de73
|
||||
DIST salt-2017.7.5.tar.gz 11043026 BLAKE2B 9cae4e6ca3b0bac0dc0b9b9a5ae01e0bfb8e8b899aa029b324ac10c8c84024bbc419ace068cd0d2bff84ec6ddf1d13faf68ce34c68c19892c700c38e81da8c7c SHA512 684ffde7d98c73349b386c94de3d9fc09631a78c5d74e37e6dfd90fbb0c94decc529f56b1eba1559ce9932b16083f88e6495ff6cdf071b32a23028e9db47cc3d
|
||||
DIST salt-2018.3.0.tar.gz 13448567 BLAKE2B 9048f9e507ded238bfd54d0aabfefb56522b20ba2479c3bf5aefc47fff0b6ce516709ad6e9109441941a60596d4f06a43c1448a149225f3f87715327a190d313 SHA512 3d64a4d12d4ff7effe644b682b138d8f49fd00523e9cfe3e80bebff9c944a089fb41cbac92e63139633425f49c1eebeb99145290a0bdd1b4f306da86abe9b2e5
|
||||
|
|
|
@ -1,104 +0,0 @@
|
|||
diff --git a/tests/unit/pydsl_test.py b/tests/unit/pydsl_test.py
|
||||
index 57ba81e..b26154e 100644
|
||||
--- a/tests/unit/pydsl_test.py
|
||||
+++ b/tests/unit/pydsl_test.py
|
||||
@@ -298,99 +298,6 @@ class PyDSLRendererTestCase(TestCase):
|
||||
finally:
|
||||
shutil.rmtree(dirpath, ignore_errors=True)
|
||||
|
||||
- def test_rendering_includes(self):
|
||||
- dirpath = tempfile.mkdtemp(dir=integration.SYS_TMP_DIR)
|
||||
- if not os.path.isdir(dirpath):
|
||||
- self.skipTest(
|
||||
- 'The temporary directory {0!r} was not created'.format(
|
||||
- dirpath
|
||||
- )
|
||||
- )
|
||||
- output = os.path.join(dirpath, 'output')
|
||||
- try:
|
||||
- write_to(os.path.join(dirpath, 'aaa.sls'), textwrap.dedent('''\
|
||||
- #!pydsl|stateconf -ps
|
||||
-
|
||||
- include('xxx')
|
||||
- yyy = include('yyy')
|
||||
-
|
||||
- # ensure states in xxx are run first, then those in yyy and then those in aaa last.
|
||||
- extend(state('yyy::start').stateconf.require(stateconf='xxx::goal'))
|
||||
- extend(state('.start').stateconf.require(stateconf='yyy::goal'))
|
||||
-
|
||||
- extend(state('yyy::Y2').cmd.run('echo Y2 extended >> {0}'))
|
||||
-
|
||||
- __pydsl__.set(ordered=True)
|
||||
-
|
||||
- yyy.hello('red', 1)
|
||||
- yyy.hello('green', 2)
|
||||
- yyy.hello('blue', 3)
|
||||
- '''.format(output)))
|
||||
-
|
||||
- write_to(os.path.join(dirpath, 'xxx.sls'), textwrap.dedent('''\
|
||||
- #!stateconf -os yaml . jinja
|
||||
-
|
||||
- include:
|
||||
- - yyy
|
||||
-
|
||||
- extend:
|
||||
- yyy::start:
|
||||
- stateconf.set:
|
||||
- - require:
|
||||
- - stateconf: .goal
|
||||
-
|
||||
- yyy::Y1:
|
||||
- cmd.run:
|
||||
- - name: 'echo Y1 extended >> {0}'
|
||||
-
|
||||
- .X1:
|
||||
- cmd.run:
|
||||
- - name: echo X1 >> {1}
|
||||
- - cwd: /
|
||||
- .X2:
|
||||
- cmd.run:
|
||||
- - name: echo X2 >> {2}
|
||||
- - cwd: /
|
||||
- .X3:
|
||||
- cmd.run:
|
||||
- - name: echo X3 >> {3}
|
||||
- - cwd: /
|
||||
-
|
||||
- '''.format(output, output, output, output)))
|
||||
-
|
||||
- write_to(os.path.join(dirpath, 'yyy.sls'), textwrap.dedent('''\
|
||||
- #!pydsl|stateconf -ps
|
||||
-
|
||||
- include('xxx')
|
||||
- __pydsl__.set(ordered=True)
|
||||
-
|
||||
- state('.Y1').cmd.run('echo Y1 >> {0}', cwd='/')
|
||||
- state('.Y2').cmd.run('echo Y2 >> {1}', cwd='/')
|
||||
- state('.Y3').cmd.run('echo Y3 >> {2}', cwd='/')
|
||||
-
|
||||
- def hello(color, number):
|
||||
- state(color).cmd.run('echo hello '+color+' '+str(number)+' >> {3}', cwd='/')
|
||||
- '''.format(output, output, output, output)))
|
||||
-
|
||||
- state_highstate({'base': ['aaa']}, dirpath)
|
||||
- expected = textwrap.dedent('''\
|
||||
- X1
|
||||
- X2
|
||||
- X3
|
||||
- Y1 extended
|
||||
- Y2 extended
|
||||
- Y3
|
||||
- hello red 1
|
||||
- hello green 2
|
||||
- hello blue 3
|
||||
- ''')
|
||||
-
|
||||
- with salt.utils.fopen(output, 'r') as f:
|
||||
- self.assertEqual(sorted(f.read()), sorted(expected))
|
||||
-
|
||||
- finally:
|
||||
- shutil.rmtree(dirpath, ignore_errors=True)
|
||||
-
|
||||
def test_compile_time_state_execution(self):
|
||||
if not sys.stdin.isatty():
|
||||
self.skipTest('Not attached to a TTY')
|
|
@ -1,38 +0,0 @@
|
|||
diff --git a/tests/unit/modules/boto_vpc_test.py b/tests/unit/modules/boto_vpc_test.py
|
||||
index 82dfe28..ced9ee5 100644
|
||||
--- a/tests/unit/modules/boto_vpc_test.py
|
||||
+++ b/tests/unit/modules/boto_vpc_test.py
|
||||
@@ -441,9 +441,9 @@ class BotoVpcTestCase(BotoVpcTestCaseBase):
|
||||
describe_vpc = boto_vpc.describe(vpc_id=vpc.id, **conn_parameters)
|
||||
|
||||
vpc_properties = dict(cidr_block=unicode(cidr_block),
|
||||
- is_default=None,
|
||||
+ is_default=False,
|
||||
state=u'available',
|
||||
- tags={'Name': 'test', 'test': 'testvalue'},
|
||||
+ tags={u'Name': u'test', u'test': u'testvalue'},
|
||||
dhcp_options_id=u'dopt-7a8b9c2d',
|
||||
instance_tenancy=u'default')
|
||||
|
||||
diff --git a/tests/unit/states/pip_test.py b/tests/unit/states/pip_test.py
|
||||
index 6e7d083..9a83951 100644
|
||||
--- a/tests/unit/states/pip_test.py
|
||||
+++ b/tests/unit/states/pip_test.py
|
||||
@@ -37,17 +37,6 @@ class PipStateTest(TestCase, integration.SaltReturnAssertsMixIn):
|
||||
def test_install_requirements_parsing(self):
|
||||
mock = MagicMock(return_value={'retcode': 0, 'stdout': ''})
|
||||
pip_list = MagicMock(return_value={'pep8': '1.3.3'})
|
||||
- with patch.dict(pip_state.__salt__, {'cmd.run_all': mock,
|
||||
- 'pip.list': pip_list}):
|
||||
- with patch.dict(pip_state.__opts__, {'test': True}):
|
||||
- ret = pip_state.installed('pep8=1.3.2')
|
||||
- self.assertSaltFalseReturn({'test': ret})
|
||||
- self.assertInSaltComment(
|
||||
- 'Invalid version specification in package pep8=1.3.2. '
|
||||
- '\'=\' is not supported, use \'==\' instead.',
|
||||
- {'test': ret}
|
||||
- )
|
||||
-
|
||||
mock = MagicMock(return_value={'retcode': 0, 'stdout': ''})
|
||||
pip_list = MagicMock(return_value={'pep8': '1.3.3'})
|
||||
pip_install = MagicMock(return_value={'retcode': 0})
|
|
@ -1,34 +0,0 @@
|
|||
diff --git a/tests/unit/auth_test.py b/tests/unit/auth_test.py
|
||||
index 10b77e9..c40f439 100644
|
||||
--- a/tests/unit/auth_test.py
|
||||
+++ b/tests/unit/auth_test.py
|
||||
@@ -38,12 +38,12 @@ class LoadAuthTestCase(TestCase):
|
||||
|
||||
# Test a case with valid params
|
||||
with patch('salt.utils.format_call') as format_call_mock:
|
||||
- expected_ret = call('fake_func_str', {
|
||||
+ expected_ret = [call('fake_func_str', {
|
||||
'username': 'test_user',
|
||||
'test_password': '',
|
||||
'show_timeout': False,
|
||||
'eauth': 'pam'
|
||||
- }, expected_extra_kws=auth.AUTH_INTERNAL_KEYWORDS)
|
||||
+ }, expected_extra_kws=auth.AUTH_INTERNAL_KEYWORDS)]
|
||||
ret = self.lauth.load_name(valid_eauth_load)
|
||||
format_call_mock.assert_has_calls(expected_ret)
|
||||
|
||||
@@ -53,12 +53,12 @@ class LoadAuthTestCase(TestCase):
|
||||
'test_password': '',
|
||||
'eauth': 'pam'}
|
||||
with patch('salt.utils.format_call') as format_call_mock:
|
||||
- expected_ret = call('fake_groups_function_str', {
|
||||
+ expected_ret = [call('fake_groups_function_str', {
|
||||
'username': 'test_user',
|
||||
'test_password': '',
|
||||
'show_timeout': False,
|
||||
'eauth': 'pam'
|
||||
- }, expected_extra_kws=auth.AUTH_INTERNAL_KEYWORDS)
|
||||
+ }, expected_extra_kws=auth.AUTH_INTERNAL_KEYWORDS)]
|
||||
self.lauth.get_groups(valid_eauth_load)
|
||||
format_call_mock.assert_has_calls(expected_ret)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
diff --git a/tests/unit/modules/cron_test.py b/tests/unit/modules/cron_test.py
|
||||
index 017eabd..dac0122 100644
|
||||
--- a/tests/unit/modules/cron_test.py
|
||||
+++ b/tests/unit/modules/cron_test.py
|
||||
@@ -573,10 +573,10 @@ class PsTestCase(TestCase):
|
||||
@patch('salt.modules.cron._write_cron_lines')
|
||||
@patch('salt.modules.cron.list_tab', new=MagicMock(return_value=STUB_SIMPLE_CRON_DICT))
|
||||
def test_set_special(self, write_cron_lines_mock):
|
||||
- expected_write_call = call('DUMMY_USER',
|
||||
+ expected_write_call = [call('DUMMY_USER',
|
||||
['5 0 * * * /tmp/no_script.sh\n',
|
||||
'# Lines below here are managed by Salt, do not edit\n',
|
||||
- '@hourly echo Hi!\n'])
|
||||
+ '@hourly echo Hi!\n'])]
|
||||
ret = cron.set_special('DUMMY_USER', '@hourly', 'echo Hi!')
|
||||
write_cron_lines_mock.assert_has_calls(expected_write_call)
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
diff --git a/tests/unit/modules/darwin_sysctl_test.py b/tests/unit/modules/darwin_sysctl_test.py
|
||||
index 51e8f23..36d005f 100644
|
||||
--- a/tests/unit/modules/darwin_sysctl_test.py
|
||||
+++ b/tests/unit/modules/darwin_sysctl_test.py
|
||||
@@ -64,18 +64,6 @@ class DarwinSysctlTestCase(TestCase):
|
||||
'net.inet.icmp.icmplim', 50), ret)
|
||||
|
||||
@patch('os.path.isfile', MagicMock(return_value=False))
|
||||
- def test_persist_no_conf_failure(self):
|
||||
- '''
|
||||
- Tests adding of config file failure
|
||||
- '''
|
||||
- with patch('salt.utils.fopen', mock_open()) as m_open:
|
||||
- helper_open = m_open()
|
||||
- helper_open.write.assertRaises(CommandExecutionError,
|
||||
- darwin_sysctl.persist,
|
||||
- 'net.inet.icmp.icmplim',
|
||||
- 50, config=None)
|
||||
-
|
||||
- @patch('os.path.isfile', MagicMock(return_value=False))
|
||||
def test_persist_no_conf_success(self):
|
||||
'''
|
||||
Tests successful add of config file when previously not one
|
||||
diff --git a/tests/unit/modules/linux_sysctl_test.py b/tests/unit/modules/linux_sysctl_test.py
|
||||
index 08fc80f..c6e40b8 100644
|
||||
--- a/tests/unit/modules/linux_sysctl_test.py
|
||||
+++ b/tests/unit/modules/linux_sysctl_test.py
|
||||
@@ -82,18 +82,6 @@ class LinuxSysctlTestCase(TestCase):
|
||||
'net.ipv4.ip_forward', 1), ret)
|
||||
|
||||
@patch('os.path.isfile', MagicMock(return_value=False))
|
||||
- def test_persist_no_conf_failure(self):
|
||||
- '''
|
||||
- Tests adding of config file failure
|
||||
- '''
|
||||
- with patch('salt.utils.fopen', mock_open()) as m_open:
|
||||
- helper_open = m_open()
|
||||
- helper_open.write.assertRaises(CommandExecutionError,
|
||||
- linux_sysctl.persist,
|
||||
- 'net.ipv4.ip_forward',
|
||||
- 1, config=None)
|
||||
-
|
||||
- @patch('os.path.isfile', MagicMock(return_value=False))
|
||||
def test_persist_no_conf_success(self):
|
||||
'''
|
||||
Tests successful add of config file when previously not one
|
|
@ -1,37 +0,0 @@
|
|||
diff --git a/tests/unit/modules/grains_test.py b/tests/unit/modules/grains_test.py
|
||||
index 3473c03..ea37d66 100644
|
||||
--- a/tests/unit/modules/grains_test.py
|
||||
+++ b/tests/unit/modules/grains_test.py
|
||||
@@ -1,6 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import copy
|
||||
+import os.path
|
||||
+import tempfile
|
||||
|
||||
# Import Salt Testing libs
|
||||
from salttesting import TestCase, skipIf
|
||||
@@ -20,8 +22,8 @@ from salt.modules import grains as grainsmod
|
||||
from salt.utils import dictupdate
|
||||
|
||||
grainsmod.__opts__ = {
|
||||
- 'conf_file': '/tmp/__salt_test_grains',
|
||||
- 'cachedir': '/tmp/__salt_test_grains_cache_dir'
|
||||
+ 'conf_file': os.path.join(tempfile.gettempdir(), '__salt_test_grains'),
|
||||
+ 'cachedir': os.path.join(tempfile.gettempdir(), '__salt_test_grains_cache_dir')
|
||||
}
|
||||
|
||||
grainsmod.__salt__ = {}
|
||||
diff --git a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
|
||||
index 3cfb2f0..b3f3bee 100644
|
||||
--- a/tests/unit/states/archive_test.py
|
||||
+++ b/tests/unit/states/archive_test.py
|
||||
@@ -69,7 +69,7 @@ class ArchiveTest(TestCase):
|
||||
'cmd.run_all': mock_run}):
|
||||
filename = os.path.join(
|
||||
tmp_dir,
|
||||
- 'files/test/_tmp_test_archive_.tar'
|
||||
+ 'files/test/' + tempfile.gettempdir().replace('/', '_') + '_test_archive_.tar'
|
||||
)
|
||||
for test_opts, ret_opts in zip(test_tar_opts, ret_tar_opts):
|
||||
ret = archive.extracted(tmp_dir,
|
|
@ -1,56 +0,0 @@
|
|||
diff --git a/tests/unit/modules/mount_test.py b/tests/unit/modules/mount_test.py
|
||||
index 282539d..c88a7a8 100644
|
||||
--- a/tests/unit/modules/mount_test.py
|
||||
+++ b/tests/unit/modules/mount_test.py
|
||||
@@ -103,12 +103,6 @@ class MountTestCase(TestCase):
|
||||
self.assertTrue(mount.rm_fstab('name', 'device'))
|
||||
|
||||
mock = MagicMock(return_value={'name': 'name'})
|
||||
- with patch.object(mount, 'fstab', mock):
|
||||
- with patch('salt.utils.fopen', mock_open()) as m_open:
|
||||
- helper_open = m_open()
|
||||
- helper_open.write.assertRaises(CommandExecutionError,
|
||||
- mount.rm_fstab,
|
||||
- config=None)
|
||||
|
||||
def test_set_fstab(self):
|
||||
'''
|
||||
@@ -143,12 +137,6 @@ class MountTestCase(TestCase):
|
||||
self.assertTrue(mount.rm_automaster('name', 'device'))
|
||||
|
||||
mock = MagicMock(return_value={'name': 'name'})
|
||||
- with patch.object(mount, 'fstab', mock):
|
||||
- with patch('salt.utils.fopen', mock_open()) as m_open:
|
||||
- helper_open = m_open()
|
||||
- helper_open.write.assertRaises(CommandExecutionError,
|
||||
- mount.rm_automaster,
|
||||
- 'name', 'device')
|
||||
|
||||
def test_set_automaster(self):
|
||||
'''
|
||||
diff --git a/tests/unit/modules/puppet_test.py b/tests/unit/modules/puppet_test.py
|
||||
index 6a43fd4..3be039c 100644
|
||||
--- a/tests/unit/modules/puppet_test.py
|
||||
+++ b/tests/unit/modules/puppet_test.py
|
||||
@@ -91,10 +91,6 @@ class PuppetTestCase(TestCase):
|
||||
with patch('salt.utils.fopen', mock_open()):
|
||||
self.assertTrue(puppet.disable())
|
||||
|
||||
- with patch('salt.utils.fopen', mock_open()) as m_open:
|
||||
- helper_open = m_open()
|
||||
- helper_open.write.assertRaises(CommandExecutionError,
|
||||
- puppet.disable)
|
||||
|
||||
def test_status(self):
|
||||
'''
|
||||
@@ -154,10 +150,6 @@ class PuppetTestCase(TestCase):
|
||||
mock_open(read_data="resources: 1")):
|
||||
self.assertDictEqual(puppet.summary(), {'resources': 1})
|
||||
|
||||
- with patch('salt.utils.fopen', mock_open()) as m_open:
|
||||
- helper_open = m_open()
|
||||
- helper_open.write.assertRaises(CommandExecutionError,
|
||||
- puppet.summary)
|
||||
|
||||
def test_plugin_sync(self):
|
||||
'''
|
|
@ -1,35 +0,0 @@
|
|||
diff --git a/tests/unit/modules/boto_secgroup_test.py b/tests/unit/modules/boto_secgroup_test.py
|
||||
index f1c6bb1..07fd8ec 100644
|
||||
--- a/tests/unit/modules/boto_secgroup_test.py
|
||||
+++ b/tests/unit/modules/boto_secgroup_test.py
|
||||
@@ -192,30 +192,6 @@ class BotoSecgroupTestCase(TestCase):
|
||||
**conn_parameters)
|
||||
self.assertEqual(group_vpc.id, retrieved_group_id)
|
||||
|
||||
- @mock_ec2
|
||||
- def test_get_config_single_rule_group_name(self):
|
||||
- '''
|
||||
- tests return of 'config' when given group name. get_config returns an OrderedDict.
|
||||
- '''
|
||||
- group_name = _random_group_name()
|
||||
- ip_protocol = u'tcp'
|
||||
- from_port = 22
|
||||
- to_port = 22
|
||||
- cidr_ip = u'0.0.0.0/0'
|
||||
- rules_egress = [{'to_port': -1, 'from_port': -1, 'ip_protocol': u'-1', 'cidr_ip': u'0.0.0.0/0'}]
|
||||
-
|
||||
- conn = boto.ec2.connect_to_region(region, **boto_conn_parameters)
|
||||
- group = conn.create_security_group(name=group_name, description=group_name)
|
||||
- group.authorize(ip_protocol=ip_protocol, from_port=from_port, to_port=to_port, cidr_ip=cidr_ip)
|
||||
- # setup the expected get_config result
|
||||
- expected_get_config_result = OrderedDict([('name', group.name), ('group_id', group.id), ('owner_id', u'111122223333'),
|
||||
- ('description', group.description),
|
||||
- ('rules', [{'to_port': to_port, 'from_port': from_port,
|
||||
- 'ip_protocol': ip_protocol, 'cidr_ip': cidr_ip}]),
|
||||
- ('rules_egress', rules_egress)])
|
||||
- secgroup_get_config_result = boto_secgroup.get_config(group_id=group.id, **conn_parameters)
|
||||
- self.assertEqual(expected_get_config_result, secgroup_get_config_result)
|
||||
-
|
||||
@skipIf(True, 'test skipped due to error in moto return - fixed in '
|
||||
'https://github.com/spulec/moto/commit/cc0166964371f7b5247a49d45637a8f936ccbe6f')
|
||||
@mock_ec2
|
|
@ -1,69 +0,0 @@
|
|||
diff --git a/tests/unit/states/boto_vpc_test.py b/tests/unit/states/boto_vpc_test.py
|
||||
index 53b6a24e4d..96b5630627 100644
|
||||
--- a/tests/unit/states/boto_vpc_test.py
|
||||
+++ b/tests/unit/states/boto_vpc_test.py
|
||||
@@ -179,16 +179,6 @@ class BotoVpcResourceTestCaseMixin(BotoVpcTestCaseMixin):
|
||||
self.assertTrue(exists)
|
||||
|
||||
@mock_ec2
|
||||
- def test_present_when_resource_exists(self):
|
||||
- vpc = self._create_vpc(name='test')
|
||||
- resource = self._create_resource(vpc_id=vpc.id, name='test')
|
||||
- with patch.dict('salt.utils.boto.__salt__', funcs):
|
||||
- resource_present_result = salt_states['boto_vpc.{0}_present'.format(self.resource_type)](
|
||||
- name='test', vpc_name='test', **self.extra_kwargs)
|
||||
- self.assertTrue(resource_present_result['result'])
|
||||
- self.assertEqual(resource_present_result['changes'], {})
|
||||
-
|
||||
- @mock_ec2
|
||||
@skipIf(True, 'Disabled pending https://github.com/spulec/moto/issues/493')
|
||||
def test_present_with_failure(self):
|
||||
vpc = self._create_vpc(name='test')
|
||||
@@ -210,18 +200,6 @@ class BotoVpcResourceTestCaseMixin(BotoVpcTestCaseMixin):
|
||||
self.assertEqual(resource_absent_result['changes'], {})
|
||||
|
||||
@mock_ec2
|
||||
- def test_absent_when_resource_exists(self):
|
||||
- vpc = self._create_vpc(name='test')
|
||||
- self._create_resource(vpc_id=vpc.id, name='test')
|
||||
-
|
||||
- with patch.dict('salt.utils.boto.__salt__', funcs):
|
||||
- resource_absent_result = salt_states['boto_vpc.{0}_absent'.format(self.resource_type)]('test')
|
||||
- self.assertTrue(resource_absent_result['result'])
|
||||
- self.assertEqual(resource_absent_result['changes']['new'][self.resource_type], None)
|
||||
- exists = funcs['boto_vpc.resource_exists'](self.resource_type, 'test').get('exists')
|
||||
- self.assertFalse(exists)
|
||||
-
|
||||
- @mock_ec2
|
||||
@skipIf(True, 'Disabled pending https://github.com/spulec/moto/issues/493')
|
||||
def test_absent_with_failure(self):
|
||||
vpc = self._create_vpc(name='test')
|
||||
@@ -293,28 +271,3 @@ class BotoVpcRouteTableTestCase(BotoVpcStateTestCaseBase, BotoVpcResourceTestCas
|
||||
|
||||
new_subnets = changes['new']['subnets_associations']
|
||||
self.assertEqual(new_subnets[0]['subnet_id'], subnet2.id)
|
||||
-
|
||||
- @mock_ec2
|
||||
- def test_present_with_routes(self):
|
||||
- vpc = self._create_vpc(name='test')
|
||||
- igw = self._create_internet_gateway(name='test', vpc_id=vpc.id)
|
||||
-
|
||||
- route_table_present_result = salt_states['boto_vpc.route_table_present'](
|
||||
- name='test', vpc_name='test', routes=[{'destination_cidr_block': '0.0.0.0/0',
|
||||
- 'gateway_id': igw.id},
|
||||
- {'destination_cidr_block': '10.0.0.0/24',
|
||||
- 'gateway_id': 'local'}])
|
||||
- routes = [x['gateway_id'] for x in route_table_present_result['changes']['new']['routes']]
|
||||
-
|
||||
- self.assertEqual(set(routes), set(['local', igw.id]))
|
||||
-
|
||||
- route_table_present_result = salt_states['boto_vpc.route_table_present'](
|
||||
- name='test', vpc_name='test', routes=[{'destination_cidr_block': '10.0.0.0/24',
|
||||
- 'gateway_id': 'local'}])
|
||||
-
|
||||
- changes = route_table_present_result['changes']
|
||||
-
|
||||
- old_routes = [x['gateway_id'] for x in changes['old']['routes']]
|
||||
- self.assertEqual(set(routes), set(old_routes))
|
||||
-
|
||||
- self.assertEqual(changes['new']['routes'][0]['gateway_id'], 'local')
|
|
@ -1,36 +0,0 @@
|
|||
From aa87d67258a5b6742fc53d06c7bdac0f643bc9f1 Mon Sep 17 00:00:00 2001
|
||||
From: Ch3LL <megan.wilhite@gmail.com>
|
||||
Date: Tue, 1 Aug 2017 13:44:32 -0400
|
||||
Subject: [PATCH] Add clean_id function to salt.utils.verify.py
|
||||
|
||||
---
|
||||
salt/utils/verify.py | 11 ++++++++++-
|
||||
1 file changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/salt/utils/verify.py b/salt/utils/verify.py
|
||||
index 5cac0fa651b..a3dc67db336 100644
|
||||
--- a/salt/utils/verify.py
|
||||
+++ b/salt/utils/verify.py
|
||||
@@ -484,12 +484,21 @@ def clean_path(root, path, subdir=False):
|
||||
return ''
|
||||
|
||||
|
||||
+def clean_id(id_):
|
||||
+ '''
|
||||
+ Returns if the passed id is clean.
|
||||
+ '''
|
||||
+ if re.search(r'\.\.{sep}'.format(sep=os.sep), id_):
|
||||
+ return False
|
||||
+ return True
|
||||
+
|
||||
+
|
||||
def valid_id(opts, id_):
|
||||
'''
|
||||
Returns if the passed id is valid
|
||||
'''
|
||||
try:
|
||||
- return bool(clean_path(opts['pki_dir'], id_))
|
||||
+ return bool(clean_path(opts['pki_dir'], id_)) and clean_id(id_)
|
||||
except (AttributeError, KeyError) as e:
|
||||
return False
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
diff --git a/tests/unit/modules/qemu_nbd_test.py b/tests/unit/modules/qemu_nbd_test.py
|
||||
index 615e6b5..fbd24aa 100644
|
||||
--- a/tests/unit/modules/qemu_nbd_test.py
|
||||
+++ b/tests/unit/modules/qemu_nbd_test.py
|
||||
@@ -77,6 +77,7 @@ class QemuNbdTestCase(TestCase):
|
||||
Test if it mount the named image via qemu-nbd
|
||||
and return the mounted roots
|
||||
'''
|
||||
+ tmpdir = os.environ.get('TMPDIR', '/tmp')
|
||||
mock = MagicMock(return_value=True)
|
||||
with patch.dict(qemu_nbd.__salt__, {'cmd.run': mock}):
|
||||
self.assertEqual(qemu_nbd.init('/srv/image.qcow2'), '')
|
||||
@@ -89,7 +90,7 @@ class QemuNbdTestCase(TestCase):
|
||||
'mount.mount': mock,
|
||||
'cmd.retcode': MagicMock(side_effect=[1, 0])}):
|
||||
self.assertDictEqual(qemu_nbd.init('/srv/image.qcow2'),
|
||||
- {'/tmp/nbd/nbd0/nbd0': '/dev/nbd0'})
|
||||
+ {os.path.join(tmpdir, 'nbd/nbd0/nbd0'): '/dev/nbd0'})
|
||||
|
||||
# 'clear' function tests: 1
|
||||
|
||||
diff --git a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
|
||||
index 63e4a53..20b196f 100644
|
||||
--- a/tests/unit/states/archive_test.py
|
||||
+++ b/tests/unit/states/archive_test.py
|
||||
@@ -26,7 +26,7 @@ from salt.ext.six.moves import zip # pylint: disable=import-error,redefined-bui
|
||||
|
||||
# Globals
|
||||
archive.__salt__ = {}
|
||||
-archive.__opts__ = {"cachedir": "/tmp", "test": False}
|
||||
+archive.__opts__ = {"cachedir": os.environ.get('TMPDIR', "/tmp"), "test": False}
|
||||
archive.__env__ = 'test'
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class ArchiveTestCase(TestCase):
|
||||
'cmd.run_all': mock_run}):
|
||||
filename = os.path.join(
|
||||
tmp_dir,
|
||||
- 'files/test/_tmp_test_archive_.tar'
|
||||
+ 'files/test/' + tempfile.gettempdir().replace('/', '_') + '_test_archive_.tar'
|
||||
)
|
||||
for test_opts, ret_opts in zip(test_tar_opts, ret_tar_opts):
|
||||
ret = archive.extracted(tmp_dir,
|
||||
diff --git a/tests/unit/utils/context_test.py b/tests/unit/utils/context_test.py
|
||||
index 71e4330..d6f3f30 100644
|
||||
--- a/tests/unit/utils/context_test.py
|
||||
+++ b/tests/unit/utils/context_test.py
|
||||
@@ -18,7 +18,7 @@ import salt.payload
|
||||
import salt.utils
|
||||
|
||||
__context__ = {'a': 'b'}
|
||||
-__opts__ = {'cachedir': '/tmp'}
|
||||
+__opts__ = {'cachedir': os.environ.get('TMPDIR', '/tmp')}
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
@ -1,33 +0,0 @@
|
|||
diff --git a/tests/unit/modules/inspect_collector_test.py b/tests/unit/modules/inspect_collector_test.py
|
||||
index 9d2fa3ada7..710bbd75a5 100644
|
||||
--- a/tests/unit/modules/inspect_collector_test.py
|
||||
+++ b/tests/unit/modules/inspect_collector_test.py
|
||||
@@ -36,28 +36,6 @@ class InspectorCollectorTestCase(TestCase):
|
||||
self.assertEqual(inspector.dbfile, '/foo/cache/_minion_collector.db')
|
||||
self.assertEqual(inspector.pidfile, '/foo/pid/bar.pid')
|
||||
|
||||
- def test_file_tree(self):
|
||||
- '''
|
||||
- Test file tree.
|
||||
-
|
||||
- :return:
|
||||
- '''
|
||||
-
|
||||
- inspector = Inspector(cachedir='/test', piddir='/test', pidfilename='bar.pid')
|
||||
- tree_root = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'inspectlib', 'tree_test')
|
||||
- expected_tree = (['/a/a/dummy.a', '/a/b/dummy.b', '/b/b.1', '/b/b.2', '/b/b.3'],
|
||||
- ['/a', '/a/a', '/a/b', '/a/c', '/b', '/c'],
|
||||
- ['/a/a/dummy.ln.a', '/a/b/dummy.ln.b', '/a/c/b.1', '/b/b.4',
|
||||
- '/b/b.5', '/c/b.1', '/c/b.2', '/c/b.3'])
|
||||
- tree_result = []
|
||||
- for chunk in inspector._get_all_files(tree_root):
|
||||
- buff = []
|
||||
- for pth in chunk:
|
||||
- buff.append(pth.replace(tree_root, ''))
|
||||
- tree_result.append(buff)
|
||||
- tree_result = tuple(tree_result)
|
||||
- self.assertEqual(expected_tree, tree_result)
|
||||
-
|
||||
def test_get_unmanaged_files(self):
|
||||
'''
|
||||
Test get_unmanaged_files.
|
|
@ -1,47 +0,0 @@
|
|||
diff --git a/tests/unit/modules/qemu_nbd_test.py b/tests/unit/modules/qemu_nbd_test.py
|
||||
index 615e6b5670..fbd24aab86 100644
|
||||
--- a/tests/unit/modules/qemu_nbd_test.py
|
||||
+++ b/tests/unit/modules/qemu_nbd_test.py
|
||||
@@ -77,6 +77,7 @@ class QemuNbdTestCase(TestCase):
|
||||
Test if it mount the named image via qemu-nbd
|
||||
and return the mounted roots
|
||||
'''
|
||||
+ tmpdir = os.environ.get('TMPDIR', '/tmp')
|
||||
mock = MagicMock(return_value=True)
|
||||
with patch.dict(qemu_nbd.__salt__, {'cmd.run': mock}):
|
||||
self.assertEqual(qemu_nbd.init('/srv/image.qcow2'), '')
|
||||
@@ -89,7 +90,7 @@ class QemuNbdTestCase(TestCase):
|
||||
'mount.mount': mock,
|
||||
'cmd.retcode': MagicMock(side_effect=[1, 0])}):
|
||||
self.assertDictEqual(qemu_nbd.init('/srv/image.qcow2'),
|
||||
- {'/tmp/nbd/nbd0/nbd0': '/dev/nbd0'})
|
||||
+ {os.path.join(tmpdir, 'nbd/nbd0/nbd0'): '/dev/nbd0'})
|
||||
|
||||
# 'clear' function tests: 1
|
||||
|
||||
diff --git a/tests/unit/states/archive_test.py b/tests/unit/states/archive_test.py
|
||||
index e699362d8a..c7c7e8a965 100644
|
||||
--- a/tests/unit/states/archive_test.py
|
||||
+++ b/tests/unit/states/archive_test.py
|
||||
@@ -25,7 +25,7 @@ from salt.ext.six.moves import zip # pylint: disable=import-error,redefined-bui
|
||||
|
||||
# Globals
|
||||
archive.__salt__ = {}
|
||||
-archive.__opts__ = {"cachedir": "/tmp", "test": False}
|
||||
+archive.__opts__ = {"cachedir": os.environ.get('TMPDIR', "/tmp"), "test": False}
|
||||
archive.__env__ = 'test'
|
||||
|
||||
|
||||
diff --git a/tests/unit/utils/context_test.py b/tests/unit/utils/context_test.py
|
||||
index 5249d56747..a27ee9ab61 100644
|
||||
--- a/tests/unit/utils/context_test.py
|
||||
+++ b/tests/unit/utils/context_test.py
|
||||
@@ -18,7 +18,7 @@ import salt.payload
|
||||
import salt.utils
|
||||
|
||||
__context__ = {'a': 'b'}
|
||||
-__opts__ = {'cachedir': '/tmp'}
|
||||
+__opts__ = {'cachedir': os.environ.get('TMPDIR', '/tmp')}
|
||||
|
||||
|
||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
|
@ -1,149 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit eutils systemd distutils-r1
|
||||
|
||||
DESCRIPTION="Salt is a remote execution and configuration manager"
|
||||
HOMEPAGE="https://saltstack.com/community/"
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/${PN}stack/${PN}.git"
|
||||
EGIT_BRANCH="develop"
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova"
|
||||
IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax"
|
||||
|
||||
RDEPEND="sys-apps/pciutils
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/markupsafe[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=www-servers/tornado-4.2.1[${PYTHON_USEDEP}]
|
||||
virtual/python-futures[${PYTHON_USEDEP}]
|
||||
libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
|
||||
mako? ( dev-python/mako[${PYTHON_USEDEP}] )
|
||||
ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
|
||||
libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] )
|
||||
openssl? (
|
||||
dev-libs/openssl:*[-bindist]
|
||||
dev-python/pyopenssl[${PYTHON_USEDEP}]
|
||||
)
|
||||
raet? (
|
||||
>=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
zeromq? (
|
||||
>=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
|
||||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
|
||||
portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
|
||||
keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
|
||||
mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
|
||||
redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
|
||||
selinux? ( sec-policy/selinux-salt )
|
||||
timelib? ( dev-python/timelib[${PYTHON_USEDEP}] )
|
||||
nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] )
|
||||
neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] )
|
||||
gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
|
||||
profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
|
||||
vim-syntax? ( app-vim/salt-vim )"
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/psutil[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
dev-python/virtualenv[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
dev-python/timelib[${PYTHON_USEDEP}]
|
||||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
|
||||
!x86? ( dev-python/boto3[${PYTHON_USEDEP}] )
|
||||
>=dev-python/moto-0.3.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
)"
|
||||
|
||||
DOCS=( README.rst AUTHORS )
|
||||
|
||||
REQUIRED_USE="|| ( raet zeromq )"
|
||||
RESTRICT="x86? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2016.11.0-tmpdir.patch"
|
||||
"${FILESDIR}/${PN}-2016.3.1-dont-realpath-tmpdir.patch"
|
||||
"${FILESDIR}/${PN}-2016.3.4-test-nonexist-dirs.patch"
|
||||
"${FILESDIR}/${PN}-2016.11.0-remove-file-tree-test.patch"
|
||||
"${FILESDIR}/${PN}-2016.11.0-broken-tests.patch"
|
||||
)
|
||||
|
||||
python_prepare() {
|
||||
# this test fails because it trys to "pip install distribute"
|
||||
rm tests/unit/{modules,states}/zcbuildout_test.py \
|
||||
tests/unit/modules/{rh_ip,win_network,random_org}_test.py || die
|
||||
|
||||
# https://github.com/saltstack/salt/issues/39095
|
||||
rm tests/unit/utils/parsers_test.py
|
||||
|
||||
# apparently libcloud does not know about this?
|
||||
rm tests/unit/cloud/clouds/dimensiondata_test.py || die
|
||||
|
||||
# seriously? "ValueError: Missing (or not readable) key file: '/home/dany/PRIVKEY.pem'"
|
||||
rm tests/unit/cloud/clouds/gce_test.py || die
|
||||
|
||||
# allow the use of the renamed msgpack
|
||||
sed -i '/^msgpack/d' requirements/base.txt || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
local svc
|
||||
USE_SETUPTOOLS=1 distutils-r1_python_install_all
|
||||
|
||||
for svc in minion master syndic api; do
|
||||
newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc}
|
||||
newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
|
||||
systemd_dounit "${FILESDIR}"/salt-${svc}.service
|
||||
done
|
||||
|
||||
insinto /etc/${PN}
|
||||
doins -r conf/*
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local tempdir
|
||||
# testsuite likes lots of files
|
||||
ulimit -n 3072 || die
|
||||
|
||||
# ${T} is too long a path for the tests to work
|
||||
tempdir="$(mktemp -dup /tmp salt-XXX)"
|
||||
mkdir "${T}/$(basename "${tempdir}")"
|
||||
|
||||
(
|
||||
cleanup() { rm -f "${tempdir}"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
addwrite "${tempdir}"
|
||||
ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}"
|
||||
|
||||
USE_SETUPTOOLS=1 SHELL="/bin/bash" \
|
||||
TMPDIR="${tempdir}" \
|
||||
${EPYTHON} tests/runtests.py \
|
||||
--unit-tests --no-report --verbose
|
||||
|
||||
) || die "testing failed"
|
||||
}
|
|
@ -28,6 +28,7 @@ IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-synt
|
|||
RDEPEND="sys-apps/pciutils
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.3[${PYTHON_USEDEP}]
|
||||
<dev-python/msgpack-0.5.5[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/markupsafe[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
|
||||
|
@ -50,7 +51,10 @@ RDEPEND="sys-apps/pciutils
|
|||
)
|
||||
zeromq? (
|
||||
>=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
|
||||
|| (
|
||||
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
)
|
||||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
|
||||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
|
||||
|
@ -77,7 +81,7 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
|||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
dev-python/virtualenv[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/timelib[${PYTHON_USEDEP}]
|
||||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
|
||||
!x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
|
|
@ -27,12 +27,15 @@ IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-synt
|
|||
|
||||
RDEPEND="sys-apps/pciutils
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/libnacl[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.3[${PYTHON_USEDEP}]
|
||||
<dev-python/msgpack-0.5.5[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/markupsafe[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=www-servers/tornado-4.2.1[${PYTHON_USEDEP}]
|
||||
<www-servers/tornado-5.0[${PYTHON_USEDEP}]
|
||||
virtual/python-futures[${PYTHON_USEDEP}]
|
||||
libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
|
||||
mako? ( dev-python/mako[${PYTHON_USEDEP}] )
|
||||
|
@ -49,11 +52,19 @@ RDEPEND="sys-apps/pciutils
|
|||
)
|
||||
zeromq? (
|
||||
>=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
|
||||
|| (
|
||||
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
|
||||
)
|
||||
)
|
||||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
|
||||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
|
||||
portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
|
||||
portage? (
|
||||
|| (
|
||||
sys-apps/portage[${PYTHON_USEDEP}]
|
||||
sys-apps/portage-mgorny[${PYTHON_USEDEP}]
|
||||
)
|
||||
)
|
||||
keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
|
||||
mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
|
||||
redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
|
||||
|
@ -69,9 +80,10 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
|||
dev-python/pytest-salt[${PYTHON_USEDEP}]
|
||||
dev-python/psutil[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-catchlog[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
dev-python/virtualenv[${PYTHON_USEDEP}]
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/timelib[${PYTHON_USEDEP}]
|
||||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
|
||||
!x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
|
||||
|
@ -87,14 +99,17 @@ REQUIRED_USE="|| ( raet zeromq )"
|
|||
RESTRICT="x86? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/salt-2017.7.0-dont-realpath-tmpdir.patch"
|
||||
"${FILESDIR}/salt-2017.7.2-fix_disk_format.patch"
|
||||
"${FILESDIR}/${PN}-2017.7.0-dont-realpath-tmpdir.patch"
|
||||
"${FILESDIR}/${PN}-2017.7.3-tests.patch"
|
||||
)
|
||||
|
||||
python_prepare() {
|
||||
# remove tests with external dependencies that may not be available
|
||||
rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die
|
||||
rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die
|
||||
rm tests/unit/states/test_boto_vpc.py || die
|
||||
rm tests/unit/modules/test_{kubernetes,vsphere}.py || die
|
||||
|
||||
# allow the use of the renamed msgpack
|
||||
sed -i '/^msgpack/d' requirements/base.txt || die
|
||||
}
|
|
@ -31,3 +31,4 @@ DIST systemrescuecd-x86-5.1.1.iso 517359616 BLAKE2B f139a521076f0345a65bddfd999f
|
|||
DIST systemrescuecd-x86-5.1.2.iso 523479040 BLAKE2B abf6f1e3e05e382b48dcfd4ecde9f70896462418cf36057e3a42dc2366e0b56133deeb6f00363d15d94238c22fb8ac5c88b57ca6c213c9dcc299fa04def5e2cd SHA512 516e60632459dd5408f83035aa265ed4169b13f978a23960a85837c9c8b5bbab70776e22a6e6727184bd9df81cbbeff4a5819d5927ff0ff3a79036bc4c54cfdc
|
||||
DIST systemrescuecd-x86-5.2.0.iso 569669632 BLAKE2B fe31a68df650b46bd875b91c643c8f1daaa60042ea6c59ac452bb99a2792dcdcee62f1b60c329a70c95689af22c1a0fc52a966631af347258d665f55d2f6d8c0 SHA512 42da80a419aa27bea891339dc163a62bff8ba34d74c202a7fd0317592e8870a71ddc7fa9e9ded5e9d2f75dc36ec8417673074ffde60ea472815405456e34876c
|
||||
DIST systemrescuecd-x86-5.2.1.iso 570523648 BLAKE2B 9bb6b2ff7b9930f658baddbf60ef89e86171febcfb48eb0a6ce1bfea8fd3348773a9da948370f9f310dd0e992c40aa64a4ef1442f5cd7f408f847d147074cf1f SHA512 6820f079c9e97ac0d383ed9096a120e7e31771e1d41465f4cf7f5db36a7cb83ccfaae5c5e561181c3b3cb169d4cc4a9a6904a707ecde06a6de4f2456d2a658e4
|
||||
DIST systemrescuecd-x86-5.2.2.iso 572006400 BLAKE2B 2cc95acc529ae8e0525664ffbdfefaf6e4513e8135fa6af120121b0b7930b0203bd17d5d70ccafacfe0064bb8615f45aa22b6e6e3fcee8a005a0315fd9b5cf62 SHA512 7dd1ccd63775e35f6589808416468c4a9314f4a7a5d0cb1f2bc34ffb9eef3a450b0da244dfc9e325d828c39404c0cdcce27cc990eade33762c17a1e32f8db9b5
|
||||
|
|
61
app-admin/systemrescuecd-x86/systemrescuecd-x86-5.2.2.ebuild
Normal file
61
app-admin/systemrescuecd-x86/systemrescuecd-x86-5.2.2.ebuild
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
DESCRIPTION="The .iso image of SystemRescueCD rescue disk, x86 (+ amd64) variant"
|
||||
HOMEPAGE="http://www.sysresccd.org/"
|
||||
# Large ISO mirroring explicitly approved by infra in bug #588766
|
||||
SRC_URI="mirror://sourceforge/systemrescuecd/sysresccd-${PN#*-}/${PV}/${P}.iso"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+isohybrid"
|
||||
|
||||
DEPEND="isohybrid? ( >=sys-boot/syslinux-4 )"
|
||||
|
||||
S=${WORKDIR}
|
||||
|
||||
src_install() {
|
||||
insinto "/usr/share/${PN%-*}"
|
||||
doins "${DISTDIR}/${P}.iso"
|
||||
|
||||
if use isohybrid; then
|
||||
set -- isohybrid -u "${ED}usr/share/${PN%-*}/${P}.iso"
|
||||
echo "${@}"
|
||||
"${@}" || die "${*} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
|
||||
|
||||
# no version newer than ours? we're the newest!
|
||||
if ! has_version ">${CATEGORY}/${PF}"; then
|
||||
ln -f -s -v "${P}.iso" "${f}" || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
local f=${EROOT%/}/usr/share/${PN%-*}/${PN}-newest.iso
|
||||
|
||||
# if there is no version newer than ours installed
|
||||
if ! has_version ">${CATEGORY}/${PF}"; then
|
||||
# and we are truly and completely uninstalled...
|
||||
if [[ ! ${REPLACED_BY_VERSION} ]]; then
|
||||
# then find an older version to set the symlink to
|
||||
local newest_version=$(best_version "<${CATEGORY}/${PF}")
|
||||
|
||||
if [[ ${newest_version} ]]; then
|
||||
# update the symlink
|
||||
ln -f -s -v "${newest_version%-r*}.iso" "${f}" || die
|
||||
else
|
||||
# last version removed? clean up the symlink
|
||||
rm -v "${f}" || die
|
||||
# and the parent directory
|
||||
rmdir "${f%/*}" || die
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
Binary file not shown.
|
@ -13,7 +13,7 @@ SRC_URI="mirror://debian/pool/non-free/u/unace-nonfree/unace-nonfree_${PV}.orig.
|
|||
|
||||
LICENSE="freedist"
|
||||
SLOT="1"
|
||||
KEYWORDS="alpha amd64 arm ~hppa ~ppc ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~sparc-solaris"
|
||||
KEYWORDS="alpha amd64 arm ~hppa ppc ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~sparc-solaris"
|
||||
IUSE=""
|
||||
|
||||
PATCHES=( "${WORKDIR}"/debian/patches/ )
|
||||
|
|
Binary file not shown.
|
@ -1 +1,2 @@
|
|||
DIST backintime-1.1.24.tar.gz 658961 BLAKE2B 88255ea138f31c4540f54d2053616d4c8ce35f7c969b15a9c46422bfed4f0fd2cabb01e0cd4d1505fb84eee31daacb9da36c6bf71225f5b9a1d47d6941e571b2 SHA512 d16b6d3a710154ca8bddf80a8f06835efe84dd2f2435102e06a732f7e6e291b1954864298542658bab2b7bc42d5a6bf1d9338a98c66fd3f888c450b9685cc011
|
||||
DIST backintime-1.2.0_pre20180221.tar.gz 712330 BLAKE2B 9ba40c5f89b9fbdf0b1c381bf2e3edce13553b2c301792627fc037bd2de181804b2dc6cad6e78a02844f8835dcd6415a35590125e832d55187fa2ed1a5fa864b SHA512 ad1bb11ea411904027952809c577de1a5317f40430af9b91b16a2c157d560c72b65c879bb880b557e9b5e333e76a44977a26486f4ed4f45281a5e8b0d4583c2a
|
||||
|
|
88
app-backup/backintime/backintime-1.2.0_pre20180221.ebuild
Normal file
88
app-backup/backintime/backintime-1.2.0_pre20180221.ebuild
Normal file
|
@ -0,0 +1,88 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||
|
||||
COMMIT=45ec81c185789b2dbafd7348d1af039b5183c9ff
|
||||
inherit python-single-r1 gnome2-utils vcs-snapshot
|
||||
|
||||
DESCRIPTION="Backup system inspired by TimeVault and FlyBack"
|
||||
HOMEPAGE="https://backintime.readthedocs.io/ https://github.com/bit-team/backintime/"
|
||||
SRC_URI="https://github.com/bit-team/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="qt5"
|
||||
|
||||
DEPEND="${PYTHON_DEPS}
|
||||
dev-python/dbus-python[${PYTHON_USEDEP}]
|
||||
dev-python/keyring[${PYTHON_USEDEP}]
|
||||
net-misc/openssh
|
||||
net-misc/rsync[xattr,acl]"
|
||||
RDEPEND="${DEPEND}
|
||||
qt5? ( dev-python/PyQt5 )"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
src_prepare() {
|
||||
#fix doc install location
|
||||
sed -e "s:/doc/${PN}-common:/doc/${PF}:g" \
|
||||
-i common/configure || die
|
||||
sed -e "s:/doc/${PN}-qt:/doc/${PF}:g" \
|
||||
-i qt/configure || die
|
||||
sed -e "/addInstallFile \"..\/VERSION/d" \
|
||||
-e "/addInstallFile \"..\/LICENSE/d" \
|
||||
-e "/addInstallFile \"..\/debian\/copyright/d" \
|
||||
-i {qt,common}/configure || die
|
||||
|
||||
if [ -n ${LINGUAS+x} ] ; then
|
||||
cd common/po || die
|
||||
for po in *.po ; do
|
||||
if ! has ${po/.po} ${LINGUAS} ; then
|
||||
rm ${po} || die
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cd "${S}"/common || die
|
||||
./configure --python3 --no-fuse-group || die
|
||||
if use qt5 ; then
|
||||
cd "${S}"/qt || die
|
||||
./configure --python3 || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "${S}"/common || die
|
||||
emake
|
||||
if use qt5 ; then
|
||||
cd "${S}"/qt || die
|
||||
emake
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}"/common || die
|
||||
emake DESTDIR="${D}" install
|
||||
if use qt5 ; then
|
||||
cd "${S}"/qt || die
|
||||
emake DESTDIR="${D}" install
|
||||
fi
|
||||
|
||||
python_optimize "${D}"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
gnome2_icon_cache_update
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{4,5,6} )
|
||||
|
||||
inherit eutils python-single-r1 gnome2-utils git-r3
|
||||
inherit python-single-r1 gnome2-utils git-r3
|
||||
|
||||
DESCRIPTION="Backup system inspired by TimeVault and FlyBack, with a GUI for GNOME and KDE4"
|
||||
DESCRIPTION="Backup system inspired by TimeVault and FlyBack"
|
||||
HOMEPAGE="https://backintime.readthedocs.io/ https://github.com/bit-team/backintime/"
|
||||
EGIT_REPO_URI="https://github.com/bit-team/backintime/"
|
||||
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,7 @@ SRC_URI="http://www.coker.com.au/bonnie++/experimental/${P}.tgz"
|
|||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 sparc x86"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
|
||||
IUSE="debug"
|
||||
|
||||
S="${WORKDIR}/${P}"
|
||||
|
|
Binary file not shown.
|
@ -15,7 +15,7 @@ SRC_URI="http://gregory.kokanosky.free.fr/v4/linux/${P}.tar.gz
|
|||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~ppc ~ppc64 sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
|
||||
KEYWORDS="amd64 ppc ~ppc64 sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
|
||||
IUSE="test"
|
||||
DOCS=( CHANGELOG )
|
||||
|
||||
|
|
Binary file not shown.
|
@ -11,7 +11,7 @@ SRC_URI="https://developers.yubico.com/${PN}/Releases/${P}.tar.xz"
|
|||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0/0.1"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="libressl static-libs test"
|
||||
|
||||
RDEPEND="
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
DIST VeraCrypt_1.19.tar.gz 23235780 BLAKE2B 0d02b3c6783d233f7cc64956eef58077e8a125fd5db28c1374921d8f2ca6dc9e1cde5402917c1ed4e4a626901e24c566ee834a12e41b6bcd150b8d64851f1ebc SHA512 ebce681099e04d938ff0dc10a1af848c82dafd80b165b2431ec355d64e29be4e60d1d63f0d5c9fd1182394080d00f0f573e3ae90f3e2167533dea2b895bd0164
|
||||
DIST VeraCrypt_1.21.tar.gz 24106162 BLAKE2B 5afe48830bde81d91d16f0bdf16010bdbdb885df84b9cd3e48191e468be51a485dfb3fc4f95da71d6d973a2f22dfbb92ee2b912dcf019921b37e1d4479c8c8d8 SHA512 5186d339f8fb0d88acfc35b1e7a916f797e30be93e8f252cca542b6d5c1cd916110111ef7b859d66b1790ce05d7d02bc72def26857eb003ea114a911fcec6c41
|
||||
DIST VeraCrypt_1.22.tar.gz 24820384 BLAKE2B 52fb822d07af96a9f47c17f8aacf13a949fb5a7c5d064a720e003e6d1bfbb5f221a5823720527e1f2c82f08547d77349cc90bc839336a622efcf1836dd97bb88 SHA512 83cdaf673bc9cdeadeb70b2beeabf87a2a9a65d3b0b0cc7fdf9c87671714af1e207ddd1db716302919e2d14414f5d4dd9d8f5203847d72834f53544a04c1a62a
|
||||
|
|
36
app-crypt/veracrypt/files/veracrypt-1.22-sysmacros-fix.patch
Normal file
36
app-crypt/veracrypt/files/veracrypt-1.22-sysmacros-fix.patch
Normal file
|
@ -0,0 +1,36 @@
|
|||
From 0a50becec3a3cca71e575dfec35d69ab295c85cc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?G=C3=B6kt=C3=BCrk=20Y=C3=BCksek?= <gokturk@gentoo.org>
|
||||
Date: Tue, 3 Apr 2018 23:06:20 -0400
|
||||
Subject: [PATCH] Platform/Unix: include <sys/sysmacros.h> for major/minor
|
||||
macros
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Starting with glibc 2.26, macros "major" and "minor" are only
|
||||
available from <sys/sysmacros.h> [0]. The build fails with the
|
||||
following without including this header:
|
||||
|
||||
Unix/FilesystemPath.cpp:84:49: error: ‘major’ was not declared in this scope
|
||||
Unix/FilesystemPath.cpp:84:113: error: ‘minor’ was not declared in this scope
|
||||
|
||||
[0] https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html
|
||||
---
|
||||
src/Platform/Unix/FilesystemPath.cpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/Platform/Unix/FilesystemPath.cpp b/src/Platform/Unix/FilesystemPath.cpp
|
||||
index d6c9cd2..7c28af4 100644
|
||||
--- a/Platform/Unix/FilesystemPath.cpp
|
||||
+++ b/Platform/Unix/FilesystemPath.cpp
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "Platform/StringConverter.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
|
||||
namespace VeraCrypt
|
||||
{
|
||||
--
|
||||
2.16.3
|
||||
|
90
app-crypt/veracrypt/veracrypt-1.22.ebuild
Normal file
90
app-crypt/veracrypt/veracrypt-1.22.ebuild
Normal file
|
@ -0,0 +1,90 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit eutils linux-info pax-utils toolchain-funcs wxwidgets
|
||||
|
||||
DESCRIPTION="Disk encryption with strong security based on TrueCrypt"
|
||||
HOMEPAGE="https://www.veracrypt.fr/en/Home.html"
|
||||
SRC_URI="https://github.com/${PN}/VeraCrypt/archive/VeraCrypt_${PV}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 truecrypt-3.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+asm cpu_flags_x86_sse4_1 cpu_flags_x86_ssse3 +doc X"
|
||||
RESTRICT="bindist mirror"
|
||||
|
||||
WX_GTK_VER="3.0"
|
||||
|
||||
RDEPEND="
|
||||
sys-fs/lvm2
|
||||
sys-fs/fuse:0
|
||||
x11-libs/wxGTK:${WX_GTK_VER}[X?]
|
||||
app-admin/sudo
|
||||
dev-libs/pkcs11-helper
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
asm? ( dev-lang/yasm )
|
||||
"
|
||||
|
||||
S="${WORKDIR}/VeraCrypt-VeraCrypt_${PV}/src"
|
||||
HTML_DOCS=( "${S}"/../doc/html/. )
|
||||
DOCS=( Readme.txt )
|
||||
PATCHES=( "${FILESDIR}"/${PN}-1.22-sysmacros-fix.patch )
|
||||
|
||||
pkg_setup() {
|
||||
local CONFIG_CHECK="~BLK_DEV_DM ~CRYPTO ~CRYPTO_XTS ~DM_CRYPT ~FUSE_FS"
|
||||
linux-info_pkg_setup
|
||||
|
||||
setup-wxwidgets
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local myemakeargs=(
|
||||
NOSTRIP=1
|
||||
NOTEST=1
|
||||
VERBOSE=1
|
||||
CC="$(tc-getCC)"
|
||||
CXX="$(tc-getCXX)"
|
||||
AR="$(tc-getAR)"
|
||||
RANLIB="$(tc-getRANLIB)"
|
||||
TC_EXTRA_CFLAGS="${CFLAGS}"
|
||||
TC_EXTRA_CXXFLAGS="${CXXFLAGS}"
|
||||
TC_EXTRA_LFLAGS="${LDFLAGS}"
|
||||
WX_CONFIG="${WX_CONFIG}"
|
||||
$(usex X "" "NOGUI=1")
|
||||
$(usex asm "" "NOASM=1")
|
||||
$(usex cpu_flags_x86_sse4_1 "SSE41=1" "")
|
||||
$(usex cpu_flags_x86_ssse3 "SSSE3=1" "")
|
||||
)
|
||||
|
||||
emake "${myemakeargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
"${S}/Main/veracrypt" --text --test || die "tests failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin Main/veracrypt
|
||||
use doc && einstalldocs
|
||||
|
||||
newinitd "${FILESDIR}/${PN}.init" ${PN}
|
||||
|
||||
if use X; then
|
||||
local s
|
||||
for s in 16 48 128 256; do
|
||||
newicon -s ${s} Resources/Icons/VeraCrypt-${s}x${s}.xpm veracrypt.xpm
|
||||
done
|
||||
make_desktop_entry ${PN} "VeraCrypt" ${PN} "Utility;Security"
|
||||
fi
|
||||
|
||||
pax-mark -m "${D%/}/usr/bin/veracrypt"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ewarn "VeraCrypt has a very restrictive license. Please be explicitly aware"
|
||||
ewarn "of the limitations on redistribution of binaries or modified source."
|
||||
}
|
Binary file not shown.
|
@ -9,7 +9,7 @@ SRC_URI="http://www.catb.org/~esr/jargon/${P}.tar.gz"
|
|||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ~mips ~ppc ppc64 sparc x86"
|
||||
KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86"
|
||||
IUSE=""
|
||||
|
||||
src_prepare() {
|
||||
|
|
|
@ -12,7 +12,7 @@ SRC_URI="mirror://kernel/linux/kernel/people/gregkh/lkn/lkn_pdf.tar.bz2
|
|||
|
||||
LICENSE="CC-BY-SA-2.5"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh sparc x86"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=""
|
||||
|
|
Binary file not shown.
|
@ -5,8 +5,8 @@ does not have a semicolon (';') as trailing character
|
|||
|
||||
leafpad.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated
|
||||
|
||||
--- data/leafpad.desktop.in
|
||||
+++ data/leafpad.desktop.in
|
||||
--- a/data/leafpad.desktop.in
|
||||
+++ b/data/leafpad.desktop.in
|
||||
@@ -1,10 +1,9 @@
|
||||
[Desktop Entry]
|
||||
-Encoding=UTF-8
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- dialog.c:39:3: error: format not a string literal and no format arguments [-Werror=format-security]
|
||||
|
||||
--- src/dialog.c
|
||||
+++ src/dialog.c
|
||||
--- a/src/dialog.c
|
||||
+++ b/src/dialog.c
|
||||
@@ -36,6 +36,7 @@
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
type,
|
||||
|
@ -18,8 +18,8 @@
|
|||
str);
|
||||
gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||
gtk_dialog_add_buttons(GTK_DIALOG(dialog),
|
||||
--- src/gtkprint.c
|
||||
+++ src/gtkprint.c
|
||||
--- a/src/gtkprint.c
|
||||
+++ b/src/gtkprint.c
|
||||
@@ -165,6 +165,7 @@
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_ERROR,
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
inherit eutils fdo-mime gnome2-utils
|
||||
EAPI=6
|
||||
|
||||
inherit gnome2-utils xdg-utils
|
||||
|
||||
DESCRIPTION="A simple GTK2 text editor"
|
||||
HOMEPAGE="http://tarot.freeshell.org/leafpad/"
|
||||
|
@ -20,13 +21,10 @@ DEPEND="${RDEPEND}
|
|||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
DOCS="AUTHORS ChangeLog NEWS README"
|
||||
|
||||
src_prepare() {
|
||||
epatch \
|
||||
"${FILESDIR}"/${P}-fdo.patch \
|
||||
"${FILESDIR}"/${P}-format-security.patch
|
||||
}
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-fdo.patch
|
||||
"${FILESDIR}"/${P}-format-security.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
|
@ -35,16 +33,12 @@ src_configure() {
|
|||
$(use_enable emacs)
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
gnome2_icon_savelist
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fdo-mime_desktop_database_update
|
||||
xdg_desktop_database_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
fdo-mime_desktop_database_update
|
||||
xdg_desktop_database_update
|
||||
gnome2_icon_cache_update
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -20,4 +20,5 @@ DOCS="README.md"
|
|||
|
||||
CDEPEND=">=app-emacs/dash-2.13.0"
|
||||
DEPEND="${CDEPEND} sys-apps/texinfo"
|
||||
RDEPEND="!!<app-emacs/magit-2.13.0 $CDEPEND"
|
||||
RDEPEND="!!<app-emacs/magit-2.12.1
|
||||
${CDEPEND}"
|
||||
|
|
Binary file not shown.
|
@ -146,7 +146,7 @@ src_configure() {
|
|||
}
|
||||
|
||||
python_compile() {
|
||||
distutils-r1_python_compile build_ext -I ../ -L ../${PN}
|
||||
distutils-r1_python_compile build_ext -I.. -L../lxc/.libs --no-pkg-config
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
DIST qemu-2.11.0-patches-r0.tar.xz 16140 BLAKE2B 2e23908075195a7c28df574525a159e171277a2da6d7c0656a341a2db6a622237106d2dd8de5c9d61b5fb62fa5a163e9657406a2996cebc05baa53d42c5f5d15 SHA512 f7d92c2232398565b8cde294d38dc281c13503fb5967cc7871a2233b7fa354799619445e9ec89c285ef051f62ecef0bd38a135b0093bf5528c0b28c6e580c839
|
||||
DIST qemu-2.11.0.tar.bz2 32816398 BLAKE2B 2014a8246f3cba9069186629d9ec8c221672fcfd3e8cd28a7e57f467add81f7bd84363183ef5cc5d18af91bde9186a4da49c0133c8ead83eae4626b9fc364e99 SHA512 3681700833573c0aa6283af950bfa298970056f1b44489088d8863840a7694512138321f86961ef43b256abf15eddd2612fb9cdbe3d9a358542d4e7037cc2004
|
||||
DIST qemu-2.11.1-patches-r1.tar.xz 2064 BLAKE2B 533c916b01c014bcfa6c733b76aa6da1f12cdf5f0d4ae33136453705a8aca9fdfeef998747cfdc72d19e08fa40ea97e2fd4c21412c030af314605059282f49ef SHA512 12de7b4777ec98871d0786291534f61b37534feef64b556caeab72e020ff14d61fe19d24cb151ebfdb912df2a7ba72c0d882566b368d88d02c9f1354c2adae4a
|
||||
DIST qemu-2.11.1-patches-r2.tar.xz 3652 BLAKE2B 4c3bf7503a838c2a978bcc973ee7d8909d662980aa2ccb71f3bff69a7aa79cc2ed405ed4648914808c64a538c0ceeef2904380cae38ee6c94176a11c9ebdbed3 SHA512 35d3aaeffe7655e739cd6d7c420692fcc6d2d76e49a8fd288f09bec81146075485675d1f912a7fc531ac8497977bcd259e97c260b61a7e854c378f6b9b2d4a79
|
||||
DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 6b6d4e7b8dcf33aeedb0b33bad267da07ad17c2eeeb5fbd2c038d760bc03224e55ba0f03eb248c62bc0e8636c2c660ea76b367eaea96bee16388053f82c8b8a9 SHA512 1b692bbdfc3dc785738c7192aa2a3f9cf53d9f5bf3b3f49fa8692050dc50f7056c8a4d1b527d48ffb2a674a0fd3a46d87addd1eaaa758f35eec1ab5adfe32354
|
||||
|
|
|
@ -1,805 +0,0 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||
|
||||
FIRMWARE_ABI_VERSION="2.9.0-r52"
|
||||
|
||||
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
|
||||
user udev fcaps readme.gentoo-r1 pax-utils l10n
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="git://git.qemu.org/qemu.git"
|
||||
inherit git-r3
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
|
||||
KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 x86 ~x86-fbsd"
|
||||
|
||||
# Gentoo specific patchsets:
|
||||
SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r0.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt
|
||||
glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
|
||||
kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
|
||||
pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
|
||||
spice ssh static static-user systemtap tci test usb usbredir vde
|
||||
+vhost-net virgl virtfs +vnc vte xattr xen xfs"
|
||||
|
||||
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
|
||||
mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
|
||||
sparc64 x86_64"
|
||||
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
|
||||
lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||
armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
|
||||
|
||||
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||
|
||||
# Allow no targets to be built so that people can get a tools-only build.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
gtk2? ( gtk )
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_mips64el? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||
#
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the extranl library.
|
||||
ALL_DEPEND="
|
||||
>=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# softmmu targets (qemu-system-*).
|
||||
SOFTMMU_TOOLS_DEPEND="
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
accessibility? (
|
||||
app-accessibility/brltty[api]
|
||||
app-accessibility/brltty[static-libs(+)]
|
||||
)
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
gnutls? (
|
||||
dev-libs/nettle:=[static-libs(+)]
|
||||
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||
)
|
||||
gtk? (
|
||||
gtk2? (
|
||||
x11-libs/gtk+:2
|
||||
vte? ( x11-libs/vte:0 )
|
||||
)
|
||||
!gtk2? (
|
||||
x11-libs/gtk+:3
|
||||
vte? ( x11-libs/vte:2.91 )
|
||||
)
|
||||
)
|
||||
infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? (
|
||||
sys-libs/ncurses:0=[unicode]
|
||||
sys-libs/ncurses:0=[static-libs(+)]
|
||||
)
|
||||
nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
media-libs/libepoxy[static-libs(+)]
|
||||
media-libs/mesa[static-libs(+)]
|
||||
media-libs/mesa[egl,gbm]
|
||||
)
|
||||
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rbd? ( sys-cluster/ceph[static-libs(+)] )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? (
|
||||
!sdl2? (
|
||||
media-libs/libsdl[X]
|
||||
>=media-libs/libsdl-1.2.11[static-libs(+)]
|
||||
)
|
||||
sdl2? (
|
||||
media-libs/libsdl2[X]
|
||||
media-libs/libsdl2[static-libs(+)]
|
||||
)
|
||||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:=[static-libs(+)] )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
)
|
||||
ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
|
||||
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools:= )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
|
||||
|
||||
X86_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/edk2-ovmf-2017_pre20170505[binary]
|
||||
~sys-firmware/ipxe-1.0.0_p20160620
|
||||
~sys-firmware/seabios-1.10.2[binary,seavgabios]
|
||||
~sys-firmware/sgabios-0.1_pre8
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/edk2-ovmf
|
||||
sys-firmware/ipxe
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
sys-firmware/sgabios
|
||||
)"
|
||||
PPC64_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.10.2[binary,seavgabios]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
)
|
||||
"
|
||||
|
||||
CDEPEND="
|
||||
!static? (
|
||||
${ALL_DEPEND//\[static-libs(+)]}
|
||||
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||
)
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-lang/perl
|
||||
=dev-lang/python-2*
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
static? (
|
||||
${ALL_DEPEND}
|
||||
${SOFTMMU_TOOLS_DEPEND}
|
||||
)
|
||||
static-user? ( ${ALL_DEPEND} )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-qemu )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.5.0-cflags.patch
|
||||
"${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
|
||||
"${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch
|
||||
"${WORKDIR}"/patches
|
||||
)
|
||||
|
||||
STRIP_MASK="/usr/share/qemu/palcode-clipper"
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/s390-netboot.img
|
||||
usr/share/qemu/u-boot.e500"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or1k
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||
kernel module is loaded is to load it on boot.
|
||||
For AMD CPUs the module is called 'kvm-amd'.
|
||||
For Intel CPUs the module is called 'kvm-intel'.
|
||||
Please review /etc/conf.d/modules for how to load these.
|
||||
|
||||
Make sure your user is in the 'kvm' group. Just run
|
||||
$ gpasswd -a <USER> kvm
|
||||
then have <USER> re-login.
|
||||
|
||||
For brand new installs, the default permissions on /dev/kvm might not let
|
||||
you access it. You can tell udev to reset ownership/perms:
|
||||
$ udevadm trigger -c add /dev/kvm
|
||||
|
||||
If you want to register binfmt handlers for qemu user targets:
|
||||
For openrc:
|
||||
# rc-update add qemu-binfmt
|
||||
For systemd:
|
||||
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
if grep -q AuthenticAMD /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD"
|
||||
elif grep -q GenuineIntel /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_INTEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup kvm 78
|
||||
}
|
||||
|
||||
# Sanity check to make sure target lists are kept up-to-date.
|
||||
check_targets() {
|
||||
local var=$1 mak=$2
|
||||
local detected sorted
|
||||
|
||||
pushd "${S}"/default-configs >/dev/null || die
|
||||
|
||||
# Force C locale until glibc is updated. #564936
|
||||
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "${var}: ${sorted}"
|
||||
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||
die "sync ${var} to the list of targets"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
handle_locales() {
|
||||
# Make sure locale list is kept up-to-date.
|
||||
local detected sorted
|
||||
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "PLOCALES: ${sorted}"
|
||||
eerror " po/*.po: ${detected}"
|
||||
die "sync PLOCALES"
|
||||
fi
|
||||
|
||||
# Deal with selective install of locales.
|
||||
if use nls ; then
|
||||
# Delete locales the user does not want. #577814
|
||||
rm_loc() { rm po/$1.po || die; }
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
else
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
rm -f po/*.po
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||
check_targets IUSE_USER_TARGETS linux-user
|
||||
|
||||
# Alter target makefiles to accept CFLAGS set via flag-o
|
||||
sed -i -r \
|
||||
-e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
|
||||
Makefile Makefile.target || die
|
||||
|
||||
default
|
||||
|
||||
# Fix ld and objcopy being called directly
|
||||
tc-export AR LD OBJCOPY
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
# Run after we've applied all patches.
|
||||
handle_locales
|
||||
|
||||
# Remove bundled copy of libfdt
|
||||
rm -r dtc || die
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir="${S}/${buildtype}-build"
|
||||
|
||||
mkdir "${builddir}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--disable-werror
|
||||
# We support gnutls/nettle for crypto operations. It is possible
|
||||
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||
# are enabled), but it's not really worth the hassle. Disable it
|
||||
# all the time to avoid automatically detecting it. #568856
|
||||
--disable-gcrypt
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
--enable-docs
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets. This simplifies building
|
||||
# static user targets (USE=static-user) considerably.
|
||||
conf_notuser() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_notuser accessibility brlapi)
|
||||
$(conf_notuser aio linux-aio)
|
||||
$(conf_notuser bzip2)
|
||||
$(conf_notuser bluetooth bluez)
|
||||
$(conf_notuser caps cap-ng)
|
||||
$(conf_notuser curl)
|
||||
$(conf_notuser fdt)
|
||||
$(conf_notuser glusterfs)
|
||||
$(conf_notuser gnutls)
|
||||
$(conf_notuser gnutls nettle)
|
||||
$(conf_notuser gtk)
|
||||
$(conf_notuser infiniband rdma)
|
||||
$(conf_notuser iscsi libiscsi)
|
||||
$(conf_notuser jpeg vnc-jpeg)
|
||||
$(conf_notuser kernel_linux kvm)
|
||||
$(conf_notuser lzo)
|
||||
$(conf_notuser ncurses curses)
|
||||
$(conf_notuser nfs libnfs)
|
||||
$(conf_notuser numa)
|
||||
$(conf_notuser opengl)
|
||||
$(conf_notuser png vnc-png)
|
||||
$(conf_notuser rbd)
|
||||
$(conf_notuser sasl vnc-sasl)
|
||||
$(conf_notuser sdl)
|
||||
$(conf_notuser seccomp)
|
||||
$(conf_notuser smartcard)
|
||||
$(conf_notuser snappy)
|
||||
$(conf_notuser spice)
|
||||
$(conf_notuser ssh libssh2)
|
||||
$(conf_notuser usb libusb)
|
||||
$(conf_notuser usbredir usb-redir)
|
||||
$(conf_notuser vde)
|
||||
$(conf_notuser vhost-net)
|
||||
$(conf_notuser virgl virglrenderer)
|
||||
$(conf_notuser virtfs)
|
||||
$(conf_notuser vnc)
|
||||
$(conf_notuser vte)
|
||||
$(conf_notuser xen)
|
||||
$(conf_notuser xen xen-pci-passthrough)
|
||||
$(conf_notuser xfs xfsctl)
|
||||
)
|
||||
|
||||
if [[ ! ${buildtype} == "user" ]] ; then
|
||||
# audio options
|
||||
local audio_opts="oss"
|
||||
use alsa && audio_opts="alsa,${audio_opts}"
|
||||
use sdl && audio_opts="sdl,${audio_opts}"
|
||||
use pulseaudio && audio_opts="pa,${audio_opts}"
|
||||
conf_opts+=(
|
||||
--audio-drv-list="${audio_opts}"
|
||||
)
|
||||
use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
|
||||
use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
|
||||
fi
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static-user"
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
tools)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--enable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
esac
|
||||
|
||||
local targets="${buildtype}_targets"
|
||||
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
#bug #647570
|
||||
conf_opts+=( --disable-capstone )
|
||||
|
||||
echo "../configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_setup
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
softmmu_targets=${softmmu_targets#,}
|
||||
user_targets=${user_targets#,}
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||
qemu_src_configure "tools"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake -j1 check
|
||||
emake -j1 check-report.html
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/scripts/qmp/qmp.py"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
# Generate binfmt support files.
|
||||
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||
generate_initd() {
|
||||
local out="${T}/qemu-binfmt"
|
||||
local out_systemd="${T}/qemu.conf"
|
||||
local d="${T}/binfmt.d"
|
||||
|
||||
einfo "Generating qemu binfmt scripts and configuration files"
|
||||
|
||||
# Generate the debian fragments first.
|
||||
mkdir -p "${d}"
|
||||
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||
--debian \
|
||||
--exportdir "${d}" \
|
||||
--qemu-path "${EPREFIX}/usr/bin" \
|
||||
|| die
|
||||
# Then turn the fragments into a shell script we can source.
|
||||
sed -E -i \
|
||||
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||
"${d}"/* || die
|
||||
|
||||
# Generate the init.d script by assembling the fragments from above.
|
||||
local f qcpu package interpreter magic mask
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||
for f in "${d}"/qemu-* ; do
|
||||
source "${f}"
|
||||
|
||||
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||
qcpu=${package#qemu-}
|
||||
case ${qcpu} in
|
||||
arm*) qcpu="arm";;
|
||||
mips*) qcpu="mips";;
|
||||
ppc*) qcpu="ppc";;
|
||||
s390*) qcpu="s390";;
|
||||
sh*) qcpu="sh";;
|
||||
sparc*) qcpu="sparc";;
|
||||
esac
|
||||
|
||||
cat <<EOF >>"${out}"
|
||||
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||
echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
EOF
|
||||
|
||||
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||
|
||||
done
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets.
|
||||
generate_initd
|
||||
doinitd "${T}/qemu-binfmt"
|
||||
|
||||
# Install binfmt/qemu.conf.
|
||||
insinto "/usr/share/qemu/binfmt.d"
|
||||
doins "${T}/qemu.conf"
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dohtml check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
cd "${S}"
|
||||
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the seavgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
# PPC64 loads vgabios-stdvga
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then
|
||||
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
firmware_abi_change() {
|
||||
local pv
|
||||
for pv in ${REPLACING_VERSIONS}; do
|
||||
if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use pin-upstream-blobs && firmware_abi_change; then
|
||||
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||
ewarn " $(best_version sys-firmware/ipxe)"
|
||||
ewarn " $(best_version sys-firmware/seabios)"
|
||||
ewarn " $(best_version sys-firmware/sgabios)"
|
||||
ewarn "This might break resume of hibernated guests (started with a different"
|
||||
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||
ewarn "guest migration ensure that all"
|
||||
ewarn "hosts run at least"
|
||||
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version 'sys-firmware/seabios[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/sgabios)"
|
||||
}
|
|
@ -59,7 +59,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
|||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
|
@ -140,7 +140,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:=[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:= )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
|
@ -22,7 +22,7 @@ else
|
|||
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
|
||||
|
||||
# Gentoo specific patchsets:
|
||||
SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r1.tar.xz"
|
||||
SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r2.tar.xz"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
|
@ -59,7 +59,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
|||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
|
@ -141,7 +141,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:=[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:= )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
|
@ -57,7 +57,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
|||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
sdl2? ( sdl )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio )
|
||||
static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )"
|
||||
|
||||
|
@ -139,7 +139,7 @@ SOFTMMU_TOOLS_DEPEND="
|
|||
)
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:=[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,8 @@
|
|||
DIST libewf-20130128.tar.gz 1978794 BLAKE2B e5d2bd8f4a8b878e13536b89b032d8cee6982272065b2bf325f8a811dff258264118a79496912377337ceb9ad630138b6bedb89e3c3be89a5f6a6fea85ab586b SHA512 94cdd0c3f0d8f535f3462c5adba266302f9b129abacda077ed429fa38af6862fca5a90ba2e606b78607b509769305cc6134c483c7033c20e226596cca2d42b90
|
||||
DIST sleuthkit-4.0.2.tar.gz 7577570 BLAKE2B 7199adce8b85d75a031e7f133ba175ff3ef1f87cae9ba9a3ce02a321b11f0a5bcb9023730df1b35956dc61c15025f9a4a141255f62698800938c90376feed8c9 SHA512 acf1d6006db3e75675eb769034ea78fd78133ac0f83c9caa74ec720c0dd25f95fb1a5df2c652027eeeac53e1fca6a3096b5248db95e3a01ce95e72e779e44f37
|
||||
DIST sleuthkit-4.1.0.tar.gz 7974564 BLAKE2B c736b26713abf7df45b873099fe7886825be3c0fc5cb288e9a207fb9b404df890420ac1664ab45cc3866cb6a69ad31fe9c8e4cb6caa662e5dfc8ee36acdb4670 SHA512 1cfa96bd3746c59c92c3e3f07f5f3f0f6896239bcaec012c43958654bb63794ecf9d7bd28bb9b4ab939558f4b27f03cd87f645ea91a8f9cfbb9037df93ef5223
|
||||
DIST sleuthkit-4.1.2.tar.gz 7990136 BLAKE2B 02aa1545261f6b8a9c03c3f78563aea9e2cf521622fba2b91140de1162c10b5d1f3f7110bef598d45be5612d44e2bf6d4096fd731c486498e2524566a75a8300 SHA512 1f64acf42e86adf275bcd86c63c097210a498ac34ce69e64b3c120d86dffae65b5d57ed9618692dd510f637e940a48a60912dd57c8de840bf3a2b4428baabab8
|
||||
DIST sleuthkit-4.1.3.tar.gz 7952733 BLAKE2B ffdf19904275a6a9f96a822e33097db60ae0c8e9a034813c6a6f917845811ee9e2b7c52db85aacdd3d4d9bf7c2ae8974840849f6922248af5104298952d6ad3a SHA512 66f6ac32da5a21b3505390557ed6cf7bbcfcca69f231e20a7086fd48c5de45a3f064a716837d25eb582d0a89bae3b6ba7e89dcf3159e1cacdb4b5d452d0ce9a2
|
||||
DIST sleuthkit-4.5.0.tar.gz 8611141 BLAKE2B a1ae66bfcb74ce1fec24f80dfe60cd68f1de53119331c38848f7f82de8052eda49d78fdea49e42ada5843094939ef212dece42a5ceb85931a79e02adccda30e6 SHA512 911890cacca739f121681514197104cb2dc3bd219f3e068c4ce61264498c56989359976fc75172e1f456c94e4e25c6206413b0234c36e55736a577b8e664e4b3
|
||||
DIST sleuthkit-4.6.0.tar.gz 8634432 BLAKE2B b45721cdee798d84f0caa0bfe38645346539bb497f5a492c72016a6b3b0246b362ecea676a7a0e788d66cc0dc32335e719912434bd61aa205b7d51b8d4bd7c14 SHA512 dbf880e8503dccb0a686f1d9658d56e9cb40f452127f9b713cf2a4941f4083fa1cf80a886994d58421307a679242cd4ee005b3e874cf429cfb140a597a0dc739
|
||||
DIST sqlite-jdbc-3.8.11.jar 5131732 BLAKE2B 1a04fa9e9cb97fdddc19af2de9efa7b54c0b527642e6e325e31054e4e294e3bc6af00ea291087ed9dd26668d48dae356035fc85212c0eb81656550d552103ed0 SHA512 5f4705101992e8916e29742c560aef0d01eba9dc0d2d984b75a77e56be3c9fd20b284390fe8f9bb54bf9d1f8528c3413922684c446212ca8961ac731543fb179
|
||||
|
|
229
app-forensics/sleuthkit/sleuthkit-4.6.0.ebuild
Normal file
229
app-forensics/sleuthkit/sleuthkit-4.6.0.ebuild
Normal file
|
@ -0,0 +1,229 @@
|
|||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
JAVA_PKG_BSFIX_NAME="build.xml build-unix.xml"
|
||||
inherit autotools java-pkg-opt-2 java-ant-2
|
||||
|
||||
DESCRIPTION="A collection of file system and media management forensic analysis tools"
|
||||
HOMEPAGE="https://www.sleuthkit.org/sleuthkit/"
|
||||
# TODO: sqlite-jdbc does not exist in the tree, we bundle it for now
|
||||
# TODO: Upstream uses a very specific version of libewf which is not in
|
||||
# the tree anymore. So we statically compile and link to sleuthkit.
|
||||
# Hopefully upstream will figure something out in the future.
|
||||
SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz
|
||||
java? ( http://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.8.11/sqlite-jdbc-3.8.11.jar )
|
||||
ewf? ( https://dev.gentoo.org/~gokturk/distfiles/app-forensics/libewf/libewf-20130128.tar.gz )"
|
||||
|
||||
LICENSE="BSD CPL-1.0 GPL-2+ IBM java? ( Apache-2.0 )"
|
||||
SLOT="0/13" # subslot = major soname version
|
||||
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
|
||||
IUSE="aff doc ewf java static-libs test +threads zlib"
|
||||
|
||||
DEPEND="
|
||||
dev-db/sqlite:3
|
||||
dev-lang/perl:*
|
||||
aff? ( app-forensics/afflib )
|
||||
ewf? ( sys-libs/zlib )
|
||||
java? (
|
||||
>=virtual/jdk-1.8:*
|
||||
>=dev-java/c3p0-0.9.5:0
|
||||
>=dev-java/jdbc-postgresql-9.4:0
|
||||
)
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
java? ( >=virtual/jre-1.8:= )
|
||||
"
|
||||
DEPEND="${DEPEND}
|
||||
doc? ( app-doc/doxygen )
|
||||
test? ( >=dev-util/cppunit-1.2.1 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.1.0-tools-shared-libs.patch
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
local f
|
||||
|
||||
unpack ${P}.tar.gz
|
||||
|
||||
# Ick, the upstream is stuck at libewf-20130128 which is
|
||||
# not even in the tree anymore. So we have to bundle it.
|
||||
if use ewf; then
|
||||
pushd "${T}" &>/dev/null || die
|
||||
unpack libewf-20130128.tar.gz
|
||||
export TSK_LIBEWF_SRCDIR="${T}"/libewf-20130128
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# Copy the jar files that don't exist in the tree yet
|
||||
if use java; then
|
||||
TSK_JAR_DIR="${S}/bindings/java/lib"
|
||||
mkdir "${TSK_JAR_DIR}" || die
|
||||
for f in ${A}; do
|
||||
if [[ ${f} =~ .jar$ ]]; then
|
||||
cp "${DISTDIR}"/"${f}" "${TSK_JAR_DIR}" || die
|
||||
fi
|
||||
done
|
||||
export TSK_JAR_DIR
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use ewf; then
|
||||
# Yeah, libewf-20130128 obviously doesn't just nicely compile
|
||||
sed -e 's/LIBUNA_INLINE inline/LIBUNA_INLINE/' \
|
||||
-i "${TSK_LIBEWF_SRCDIR}"/libuna/libuna_inline.h || die
|
||||
fi
|
||||
|
||||
if use java; then
|
||||
pushd "${S}"/bindings/java &>/dev/null || die
|
||||
|
||||
# Prevent "make install" from installing
|
||||
# jar files under /usr/share/java
|
||||
# We'll use the java eclasses for this
|
||||
sed -e '/^jar_DATA/ d;' -i Makefile.am || die
|
||||
|
||||
# Disable dependency retrieval using ivy
|
||||
# We will handle it ourselves
|
||||
sed -e '/name="compile"/ s/, retrieve-deps//' \
|
||||
-e '/name="dist-/ s/, init-ivy//g' \
|
||||
-i build.xml || die
|
||||
|
||||
java-pkg-opt-2_src_prepare
|
||||
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# Override the doxygen output directories
|
||||
if use doc; then
|
||||
sed -e "/^OUTPUT_DIRECTORY/ s|=.*$|= ${T}/doc|" \
|
||||
-i tsk/docs/Doxyfile \
|
||||
-i bindings/java/doxygen/Doxyfile || die
|
||||
fi
|
||||
|
||||
# It's safe to call this even after java-pkg-opt-2_src_prepare
|
||||
# because future calls to eapply_user do nothing and return 0
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
tsk_compile_libewf() {
|
||||
local myeconfargs=(
|
||||
--prefix=/
|
||||
--libdir=/lib
|
||||
--enable-static
|
||||
--disable-shared
|
||||
--disable-winapi
|
||||
--without-libbfio
|
||||
--with-zlib
|
||||
--without-bzip2
|
||||
--without-libhmac
|
||||
--without-openssl
|
||||
--without-libuuid
|
||||
--without-libfuse
|
||||
)
|
||||
# We want to contain our build flags
|
||||
local CFLAGS="${CFLAGS}"
|
||||
local LDFLAGS="${LDFLAGS}"
|
||||
|
||||
pushd "${TSK_LIBEWF_SRCDIR}" &>/dev/null || die
|
||||
|
||||
# Produce relocatable code
|
||||
CFLAGS+=" -fPIC"
|
||||
LDFLAGS+=" -fPIC"
|
||||
econf "${myeconfargs[@]}"
|
||||
|
||||
# Do not waste CPU cycles on building ewftools
|
||||
sed -e '/ewftools/ d' -i Makefile || die
|
||||
emake
|
||||
|
||||
# Only install the headers and the library
|
||||
emake -C libewf DESTDIR="${T}"/image install
|
||||
emake -C include DESTDIR="${T}"/image install
|
||||
|
||||
popd &>/dev/null || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable java)
|
||||
$(use_enable static-libs static)
|
||||
$(use_enable threads multithreading)
|
||||
$(use_with aff afflib)
|
||||
$(use_with ewf libewf)
|
||||
$(use_with zlib)
|
||||
)
|
||||
|
||||
if use ewf; then
|
||||
tsk_compile_libewf
|
||||
myeconfargs+=( $(use_with ewf libewf "${T}"/image) )
|
||||
fi
|
||||
|
||||
if use java; then
|
||||
pushd "${S}"/bindings/java &>/dev/null || die
|
||||
java-ant-2_src_configure
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Create symlinks of jars for the required dependencies
|
||||
if use java; then
|
||||
pushd "${S}"/bindings/java &>/dev/null || die
|
||||
|
||||
java-pkg_jar-from --into "${TSK_JAR_DIR}" c3p0
|
||||
java-pkg_jar-from --into "${TSK_JAR_DIR}" jdbc-postgresql
|
||||
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
# Create the doc output dirs if requested
|
||||
if use doc; then
|
||||
mkdir -p "${T}"/doc/{api-docs,jni-docs} || die
|
||||
fi
|
||||
|
||||
emake all $(usex doc api-docs "")
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local f
|
||||
|
||||
if use java; then
|
||||
pushd "${S}"/bindings/java &>/dev/null || die
|
||||
|
||||
java-pkg_dojar dist/${P}.jar
|
||||
|
||||
# Install the bundled jar files
|
||||
pushd "${TSK_JAR_DIR}" &>/dev/null || die
|
||||
for f in *; do
|
||||
# Skip the symlinks java-pkg_jar-from created
|
||||
[[ -f ${f} ]] || continue
|
||||
|
||||
# Strip the version numbers as per eclass recommendation
|
||||
[[ ${f} =~ -([0-9].)+.jar$ ]] || continue
|
||||
|
||||
java-pkg_newjar "${f}" "${f/${BASH_REMATCH[0]}/.jar}"
|
||||
done
|
||||
popd &>/dev/null || die
|
||||
|
||||
popd &>/dev/null || die
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
# It unconditionally builds both api and jni docs
|
||||
# We install conditionally based on the provided use flags
|
||||
if use doc; then
|
||||
dodoc -r "${T}"/doc/api-docs
|
||||
use java && dodoc -r "${T}"/doc/jni-docs
|
||||
fi
|
||||
|
||||
find "${D}" -name '*.la' -delete || die
|
||||
}
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
@ -20,10 +20,7 @@ CDEPEND="app-i18n/ibus
|
|||
)
|
||||
nls? ( virtual/libintl )"
|
||||
RDEPEND="${CDEPEND}
|
||||
|| (
|
||||
>=dev-db/m17n-db-1.7
|
||||
dev-db/m17n-contrib
|
||||
)"
|
||||
>=dev-db/m17n-db-1.7"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-util/intltool
|
||||
sys-devel/gettext
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
@ -20,10 +20,7 @@ CDEPEND="app-i18n/ibus
|
|||
)
|
||||
nls? ( virtual/libintl )"
|
||||
RDEPEND="${CDEPEND}
|
||||
|| (
|
||||
>=dev-db/m17n-db-1.7
|
||||
dev-db/m17n-contrib
|
||||
)"
|
||||
>=dev-db/m17n-db-1.7"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-util/intltool
|
||||
sys-devel/gettext
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
@ -26,10 +26,7 @@ CDEPEND="${PYTHON_DEPS}
|
|||
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
||||
dev-python/pyxdg[${PYTHON_USEDEP}]"
|
||||
RDEPEND="${CDEPEND}
|
||||
|| (
|
||||
>=dev-db/m17n-db-1.7
|
||||
dev-db/m17n-contrib
|
||||
)"
|
||||
>=dev-db/m17n-db-1.7"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit autotools ltprune python-single-r1
|
||||
|
||||
DESCRIPTION="Japanese handwriting recognition engine"
|
||||
HOMEPAGE="http://tomoe.osdn.jp/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE="hyperestraier mysql python ruby static-libs subversion"
|
||||
RESTRICT="test"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="dev-libs/glib:2
|
||||
hyperestraier? ( app-text/hyperestraier )
|
||||
mysql? ( virtual/libmysqlclient )
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/pygobject:2[${PYTHON_USEDEP}]
|
||||
dev-python/pygtk:2[${PYTHON_USEDEP}]
|
||||
)
|
||||
ruby? ( dev-ruby/ruby-glib2 )
|
||||
subversion? ( dev-vcs/subversion )"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/gtk-doc-am
|
||||
dev-util/intltool
|
||||
virtual/pkgconfig"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-gentoo.patch
|
||||
"${FILESDIR}"/${PN}-export-symbols.patch
|
||||
"${FILESDIR}"/${PN}-glib-2.32.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e "s/use_est=yes/use_est=$(usex hyperestraier)/" \
|
||||
-e "s/use_mysql=yes/use_mysql=$(usex mysql)/" \
|
||||
configure.ac
|
||||
|
||||
sed -i "s/use_svn=yes/use_svn=$(usex subversion)/" macros/svn.m4
|
||||
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable ruby dict-ruby) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_with python python "") \
|
||||
$(use_with ruby) \
|
||||
--with-svn-include="${EPREFIX}"/usr/include \
|
||||
--with-svn-lib="${EPREFIX}"/usr/$(get_libdir)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
prune_libtool_files --modules
|
||||
}
|
Binary file not shown.
|
@ -99,7 +99,7 @@ COMMON_DEPEND="
|
|||
collectd_plugins_memcachec? ( dev-libs/libmemcached )
|
||||
collectd_plugins_modbus? ( dev-libs/libmodbus )
|
||||
collectd_plugins_mqtt? ( app-misc/mosquitto )
|
||||
collectd_plugins_mysql? ( >=virtual/mysql-5.0 )
|
||||
collectd_plugins_mysql? ( virtual/libmysqlclient:= )
|
||||
collectd_plugins_netlink? ( net-libs/libmnl )
|
||||
collectd_plugins_nginx? ( net-misc/curl:0= )
|
||||
collectd_plugins_notify_desktop? ( x11-libs/libnotify )
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue