updated vzlogger

This commit is contained in:
layman 2020-04-01 21:31:05 +02:00
parent df8d00dc33
commit 1b252aae1b
4 changed files with 42 additions and 6 deletions

View File

@ -1,2 +1,4 @@
AUX vzlogger-9999-curl_tls1_2.patch 694 BLAKE2B b26f6617961aa822fec087b25f078ba293a85a19f49f486781f136907be15699a57a1decbe2367cb9eb06b86a39f0f0855412dccea5fe2963c802413d531ce68 SHA512 e304c71e644b3d732945b0cd44f24667da0b99a65691e682816d85571fd262ab5ea69842a741e942435ded45a69b8d3dbf3e5059e0feffdf661590ffdde730af
AUX vzlogger.logrotate 71 BLAKE2B ac41e0c56cd3ddc1432635ce2ef9c6e383dab49422215b6610ebbff8890916308caf22cc6d10c86e126190dfb8d18f2c6b13f2078c7febcab7a48ca52878f6e5 SHA512 cbb813856a949bd4e11a552def0ce18e55f7127e8a03c7e5d42302f49e79bba004a9f80789f554899c7f5304b555bcc2d85ad837b00e8201550c1a642b64c17a
EBUILD vzlogger-9999.ebuild 1650 BLAKE2B 17dbd79609f3924c19c9eaa5085d9fa0ffedb92ece66884aee271642561fbf4f8113002e012590cfe581af4b8261d686000ef52f0b86f8e9c2a9c724f9e0ef07 SHA512 3e39a14c70b58ae00c7ab8cea99e98627cd0a85b6593b6ab811dc7b9a9826d4e34162fcec254600c837430662418a11f2c5dfbc6d02637fa91b78502a2c21d0b
AUX vzlogger.service 254 BLAKE2B 3466c9d10ef4e67382f52de0967bfd7256a872244907a5cb4a2fb14d90d26df180698d14b39430e5e8f848157a82065b12194f70b95af8e072c9f8d5db1a325a SHA512 3a0e295c2c6f8467ee070db67adb1bdfca7afd1b958fd193c83bd2f59edd10079ecff9177b098c34bed594cfc13886b15609a7665aa5ab9827223040c04de64f
EBUILD vzlogger-9999.ebuild 1963 BLAKE2B c19dad23ce0c562e4dab71b865593165b2d77bc1cac0770745176bde755af435021322c652c10cbb99cde3d1e2b769612b0d95314eaf185ae036422a87145464 SHA512 fa62b8f94e82d713584acd72382e2de1b11ce416aba49b13c07ba5341e1c916f46ef54b6d0fa147ef99302fc852dbcef6c115dd3d57c6e804b27f25a67f7744f

View File

@ -0,0 +1,11 @@
diff -ur vzlogger-9999.orig/src/api/Volkszaehler.cpp vzlogger-9999/src/api/Volkszaehler.cpp
--- vzlogger-9999.orig/src/api/Volkszaehler.cpp 2020-03-31 17:55:49.961228856 +0200
+++ vzlogger-9999/src/api/Volkszaehler.cpp 2020-03-31 18:01:16.903767753 +0200
@@ -122,6 +122,7 @@
curl_easy_setopt(_api.curl, CURLOPT_URL, _url.c_str());
curl_easy_setopt(_api.curl, CURLOPT_HTTPHEADER, _api.headers);
curl_easy_setopt(_api.curl, CURLOPT_VERBOSE, options.verbosity());
+ curl_easy_setopt(_api.curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
curl_easy_setopt(_api.curl, CURLOPT_DEBUGFUNCTION, curl_custom_debug_callback);
curl_easy_setopt(_api.curl, CURLOPT_DEBUGDATA, channel().get());

View File

@ -0,0 +1,14 @@
[Unit]
Description=vzlogger
After=syslog.target network.target
After=mysql.service ntp.service
[Service]
Type=exec
ExecStart=/usr/bin/vzlogger -c /etc/vzlogger.conf
ExecReload=
StandardOutput=journal
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -22,8 +22,9 @@ SLOT="0"
IUSE="+logrotate +microhttpd ocr oms +sml systemd"
RDEPEND="dev-libs/json-c
app-misc/mosquitto
logrotate? ( app-admin/logrotate )
microhttpd? ( net-libs/libmicrohttpd )
microhttpd? ( >=net-libs/libmicrohttpd-0.9 )
ocr? ( media-libs/leptonica app-text/tesseract )
oms? ( sci-libs/libmbus )
sml? ( sci-libs/libsml )
@ -32,17 +33,22 @@ DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
#epatch "${FILESDIR}"/"${P}"-curl_tls1_2.patch
default
cmake-utils_src_prepare
sed -e "s/ share\/doc\/vzlogger-\${VZLOGGER_MAJOR_VERSION}-\${VZLOGGER_MINOR_VERSION}$/ share\/doc\/vzlogger-${PV}/" \
-i ${S}/CMakeLists.txt \
|| die "sed failed"
sed -e "s:Wno-system-headers:Wno-system-headers -Wno-error=deprecated-copy:" \
-i ${S}/modules/CompilerFlags.cmake \
|| die "sed failed"
sed -e "s@ExecStart=/usr/local/bin/vzlogger@ExecStart=/usr/bin/vzlogger@" \
-i ${S}/etc/vzlogger.service \
|| die "sed failed"
#sed -e "s@ExecStart=/usr/local/bin/vzlogger@ExecStart=/usr/bin/vzlogger@" \
# -i ${S}/etc/vzlogger.service \
#|| die "sed failed"
}
src_configure() {
@ -53,6 +59,9 @@ src_configure() {
-DENABLE_OCR_TESSERACT=$(usex ocr)
-DENABLE_OMS=$(usex oms)
-DENABLE_SML=$(usex sml)
-DJSON_HOME=/usr
-DMICROHTTPD_HOME=/usr
-DSML_HOME=/usr
)
cmake-utils_src_configure
}
@ -68,5 +77,5 @@ src_install() {
newins ${FILESDIR}/vzlogger.logrotate vzlogger
fi
use systemd && systemd_dounit ${S}/etc/vzlogger.service
use systemd && systemd_dounit ${FILESDIR}/vzlogger.service
}