Split the Repos
This commit is contained in:
commit
64f10d16d9
15
app-antivirus/clamav/Manifest
Normal file
15
app-antivirus/clamav/Manifest
Normal file
@ -0,0 +1,15 @@
|
||||
AUX clamav-0.99.3-bytecode_api.patch 1531 SHA256 b0619bca555a8069289bb7299e0708cfdc86b566197b2c2e780619bfdf26aa0d SHA512 05d5d9ce0aa64a178a1dfce0e37e2648f42a31a78b89c6d54203899a8334d0ef5a0f1484803932e9a09745bed3f11865c9ccedf175e7e09fcb4f3d621aa6f029 WHIRLPOOL 151d2a5545d923ec4bbe29347db4f9c2d6f84fdd1a89467d2d21b14b2a1e78ebb405c2b3e871406408c0b1463ea0d395393d66e3a33a0472ea0f56e5e35b5a58
|
||||
AUX clamav-0.99.3-gcc-6.patch 3438 SHA256 8da02e24c963c066dc9035c40637062ad214e5cc466666f7e3c102c55b3a4550 SHA512 37789921ad39493a5d8f7798fd42d3307c1e3fcee32436f93032b73f280301395f0aa1f478230eefbc45d9325cbcffb08cb25fd4b50126007f6162a11b4249a7 WHIRLPOOL 02f11840ddd21b8f674e47948c78dac6c8522f14bcbf559955b371982400f897f77cfd549f328ccfa0829898456b2624a0408855c4962bc74983897953df9fb9
|
||||
AUX clamav-0.99.3-pcre2-compile-erroffset.patch 540 SHA256 17a7e7bb7e2abad63a3525a908aa8b20647fd0747838be55c73a5c2ea075531d SHA512 6f2dd207accbc409c7e7155e3c04cf50255d4b6683ada24a559c23375ec4fa333f93118a25c8275cd8d6be7f950200c3730fd8174cc4a0450fe2160f2b86b536 WHIRLPOOL 9afd68a77f4d75a0615fd61c9dcf930b34cb7d8d30c6b107abd5b64c779d52dac9db7eb8c8acc937e78f120e21537d649aca0a4e286014d616f9bed3d44fecf1
|
||||
AUX clamav-milter.README.gentoo 1124 SHA256 5e7b142b68964bc3463b077e5698fa77cace45ea9612258b1e1849cee944dd11 SHA512 1c6160e48eddd28f83ec5f24757f788781cef55789d1934dfccc12c7c5e5635a226d26b0983cab7344c142f5a2f1db172640b1d0e6c840a6fa83abed9be1211a WHIRLPOOL f85b17448fd93205e2f38d024b96410cc8d143d077201e0a1b8f4cda95ae2447a70eded4cb90968a593ad2637229300fa04bfe5dba96d3d68c2d09c105ee3f16
|
||||
AUX clamav-milter.service 284 SHA256 b371725acfd102b6b7ee15ab0059e8795b7d3716d041d0dc11d0fe8f7454d5a9 SHA512 442148ac3c42ecbb893de5c6edde337b72a745d20f6c5ffa33131f9a0b2daadcffac39b686ada986a5ab500ea7b9153c448abc1b819e15fef488da1812bb0cee WHIRLPOOL 56b4ed79e06c764df37022f0638ceddb5fe8185c54b2e460b076a46ed4f5a68b67fb7966d424dabe836bfd7d6b9d770eb60cad4633ee17083baa50ad2c0a89cd
|
||||
AUX clamav-milter.service-r1 303 SHA256 c1e553156c14bfb007df467c13be0b3885ea79b4777711b6417fac5371461d90 SHA512 5dc30e3c57d9bff6595155e8299336c579c713aed429ab770f10d7678dd74691a135aa2070a825ddb726fdabcb001c19caeb993c1cd9a6fcf95d1d47f7160540 WHIRLPOOL d2cb6e8caa83845d2f9ca7ffd7f2d0382a633a34463599515d46dcfde87fadfffdeed62f4763b5f519268bd03b99c49c19c3196359eab06062866ca38f96d680
|
||||
AUX clamav.logrotate 391 SHA256 ed58224e76d6555e737780dc3985e2b29267328458302f116eae9ebfdc3cd11f SHA512 ef54facfa0ad830ea6eef499b92a1ffb37e719940385621dacd17062e556aa0d1f24104b3130a9a263f23621ab53f39283c10870a355ed6d505cc0e511b57224 WHIRLPOOL e6195dd3c51c27c437ff88a1283cb9eb12a9bad3266261e9d26cbc33d0b4e3afa2d9c624898ba2bf6557ac46de74c09a7b210de8bd1189babd4d0fcbd6ba84ed
|
||||
AUX clamd.conf 234 SHA256 17bf4fe3596dc5b145e4163d85181e2edcaa214df3cf9072d852ba0e7a569891 SHA512 ec069cf7aaf10b42a701938b57e1fde1ee15afd1d4af928edfa7e5d505ba8b3edaaceac449da0f4ac6beea09a3fb73453526ba0cd3a04e13259c1a2720f42f78 WHIRLPOOL 667ad1567bb398a20785096f2c2c7c72be4853ee3b0674c4fcc20eb2c9123815c273f40938961e348252e3376c4402a3f952b2a72d3bb3f0907aadb7ab77b8ed
|
||||
AUX clamd.conf-r1 129 SHA256 28ebd47810b0568fc7692218867d6804a1df70290681462f5555e230ca817732 SHA512 b85fd99c80242fb66380dfdef34387a2eff9326a1cb726940ab4bc450308e4942e57d1eb1cad979348f8aac685b53e2fa722cef0dab1f2ea2c958f2a5f818918 WHIRLPOOL 44f1e0b678855db44123261402c4e82e0493a60869bcf0a7ebcc5c4db23072efba3f550ee115b5c49a688895b67e1d012defb36c4aa0564732a2642d78f72695
|
||||
AUX clamd.initd-r6 3253 SHA256 7b502b8ca6672ee85d67e6c2e210118b05cee8170ebab4308df192f0f8064de3 SHA512 cf2bda1e12af495d1a3d05fb4b92da4e2ccf0369f1b33382cc6cc21f31c68fa74a1f95ff098bdc6ebfb994aad1e72173437a80bd0e0e7c3223add26a824d9b6b WHIRLPOOL e26ed038b16cae246b53754d01622463d579cf1a4802b0d8aedf4ee7beb6eed6ce42518538835c15603a0c9bc96872a0edf2a19d3303375ab4ec3f6287986a95
|
||||
AUX clamd.service 202 SHA256 5d82b056a82d0b677ebb803c3580ef035686a095e2322c7e81ec17bff64b7061 SHA512 799d3f33ca69841882f86f6853dd0dc6d8af73db8cfa5ce6dd6c873c5e7bc07d29bfe0f85cfb77edf2b0d8c05de73988d06148b993996ce639c5d0eeac908647 WHIRLPOOL 77face4c80d71a53015bb9658bd5a78558125bccb4ff9c10a43503afe4cdb738efcb20f80dd3f2718c8af352ba64923f34b366a7c57707b8c1da36bc5f4aa6d1
|
||||
AUX clamd_at.service 228 SHA256 c3c552a663be5506794720c216b567c86c184c8127d1bb064d1541ac6bbfa77c SHA512 69a0ca31a7288b5494d8c85ce5ff859a8f34b8a93f573eded90c270099ecac30e01d8549a07a160d74bfdc3c5401c3fd625b178080ea2c02520aab91252739e7 WHIRLPOOL ad22ebbc1fcca467b507cb4da18a3b80f5b516fd505b8cd3df0181e912b818c57e74922e7835f24b83ea7d5d5316d415d1fda9d6889c6620e88ef143bafe4aad
|
||||
AUX freshclamd.service 191 SHA256 dd5ff6c79ee360da5f2221c4d9110a2a8886d86293f6c93c16bf74fdb126593c SHA512 aaf78e763d2aa9c17fc95edb1550547b6681a91fd239a86535e5193d36ff0e152c51c3a3957542f80d5b170805f296159958ac347886981ddd324bec4237da92 WHIRLPOOL f3d5273151e6cc0b2a245db07ea526b9a7d051efcfa902924ca63529618318524c359fb638b10caed38313f93fc283175ae9d2ec9314556593d818518931512c
|
||||
DIST clamav-0.99.3.tar.gz 16082645 SHA256 00fa5292a6e00a3a4035b826267748965d5d2c4943d8ff417d740238263e8e84 SHA512 0d3c75d571ed4aa4937ef2b743a39a9a144f5adfd6f56f71046e5a8387b8ed7c3c4d9a4196aa85750f9ec4dc545720fdd659289d0cce086ab13a7cc505a0ab3e WHIRLPOOL 543392a94a7a8f2ef0f8657531aa349fdd1192cbeb1f7eac19a333c35bbe95fef758aabf7584177a5bba6e58cf5416cd11cc1d3c8da0f90ac7b93de56beccc34
|
||||
EBUILD clamav-0.99.3.ebuild 5113 SHA256 5e959f3350477d1d4842fa975e475575db37c59920b1ae628fd158d21842c7c8 SHA512 d358f928559c82b164e7e53536cea62b1aa08a45e7e8edf8d52916e62a3f8bd965d0cb730922be625c91daa58f8f9125ec5784e8f3b4e9b6ad558b159197a7f3 WHIRLPOOL 767db1ffd3f07acc4bf90b7854a0279090ad7eb1cc50235cbeaf0f66c375ab5fe8055ce95dabfda03771b2b51dab0599731f4fcfb433605b54cfeb160633fb0c
|
157
app-antivirus/clamav/clamav-0.99.3.ebuild
Normal file
157
app-antivirus/clamav/clamav-0.99.3.ebuild
Normal file
@ -0,0 +1,157 @@
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools eutils flag-o-matic user systemd
|
||||
|
||||
DESCRIPTION="Clam Anti-Virus Scanner"
|
||||
HOMEPAGE="http://www.clamav.net/"
|
||||
SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="bzip2 clamdtop iconv ipv6 libressl milter metadata-analysis-api selinux static-libs uclibc"
|
||||
|
||||
CDEPEND="bzip2? ( app-arch/bzip2 )
|
||||
clamdtop? ( sys-libs/ncurses:0 )
|
||||
iconv? ( virtual/libiconv )
|
||||
metadata-analysis-api? ( dev-libs/json-c:= )
|
||||
milter? ( || ( mail-filter/libmilter mail-mta/sendmail ) )
|
||||
dev-libs/libtommath
|
||||
>=sys-libs/zlib-1.2.2
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
sys-devel/libtool
|
||||
|| ( dev-libs/libpcre2 >dev-libs/libpcre-6 )
|
||||
!!<app-antivirus/clamav-0.99"
|
||||
# hard block clamav < 0.99 due to linking problems Bug #567680
|
||||
# openssl is now *required* see this link as to why
|
||||
# http://blog.clamav.net/2014/02/introducing-openssl-as-dependency-to.html
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig"
|
||||
RDEPEND="${CDEPEND}
|
||||
selinux? ( sec-policy/selinux-clamav )"
|
||||
|
||||
DOCS=( AUTHORS BUGS ChangeLog FAQ INSTALL NEWS README UPGRADE )
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-bytecode_api.patch
|
||||
"${FILESDIR}"/${P}-pcre2-compile-erroffset.patch
|
||||
"${FILESDIR}"/${P}-gcc-6.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup clamav
|
||||
enewuser clamav -1 -1 /dev/null clamav
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use ppc64 && append-flags -mminimal-toc
|
||||
use uclibc && export ac_cv_type_error_t=yes
|
||||
|
||||
econf \
|
||||
$(use_enable bzip2) \
|
||||
$(use_enable clamdtop) \
|
||||
$(use_enable ipv6) \
|
||||
$(use_enable milter) \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_with iconv) \
|
||||
$(use_with metadata-analysis-api libjson /usr) \
|
||||
--cache-file="${S}"/config.cache \
|
||||
--disable-experimental \
|
||||
--disable-gcc-vcheck \
|
||||
--disable-zlib-vcheck \
|
||||
--enable-id-check \
|
||||
--with-dbdir="${EPREFIX}"/var/lib/clamav \
|
||||
--with-system-tommath \
|
||||
--with-zlib="${EPREFIX}"/usr
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
rm -rf "${ED}"/var/lib/clamav
|
||||
newinitd "${FILESDIR}"/clamd.initd-r6 clamd
|
||||
newconfd "${FILESDIR}"/clamd.conf-r1 clamd
|
||||
|
||||
systemd_dotmpfilesd "${FILESDIR}/tmpfiles.d/clamav.conf"
|
||||
systemd_newunit "${FILESDIR}/clamd_at.service" "clamd@.service"
|
||||
systemd_dounit "${FILESDIR}/clamd.service"
|
||||
systemd_dounit "${FILESDIR}/freshclamd.service"
|
||||
|
||||
keepdir /var/lib/clamav
|
||||
fowners clamav:clamav /var/lib/clamav
|
||||
keepdir /var/log/clamav
|
||||
fowners clamav:clamav /var/log/clamav
|
||||
|
||||
dodir /etc/logrotate.d
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/clamav.logrotate clamav
|
||||
|
||||
# Modify /etc/{clamd,freshclam}.conf to be usable out of the box
|
||||
sed -i -e "s:^\(Example\):\# \1:" \
|
||||
-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.pid:" \
|
||||
-e "s:.*\(LocalSocket\) .*:\1 ${EPREFIX}/var/run/clamav/clamd.sock:" \
|
||||
-e "s:.*\(User\) .*:\1 clamav:" \
|
||||
-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamd.log:" \
|
||||
-e "s:^\#\(LogTime\).*:\1 yes:" \
|
||||
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
|
||||
"${ED}"/etc/clamd.conf.sample || die
|
||||
sed -i -e "s:^\(Example\):\# \1:" \
|
||||
-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/freshclam.pid:" \
|
||||
-e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \
|
||||
-e "s:^\#\(UpdateLogFile\) .*:\1 ${EPREFIX}/var/log/clamav/freshclam.log:" \
|
||||
-e "s:^\#\(NotifyClamd\).*:\1 ${EPREFIX}/etc/clamd.conf:" \
|
||||
-e "s:^\#\(ScriptedUpdates\).*:\1 yes:" \
|
||||
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
|
||||
"${ED}"/etc/freshclam.conf.sample || die
|
||||
|
||||
if use milter ; then
|
||||
# MilterSocket one to include ' /' because there is a 2nd line for
|
||||
# inet: which we want to leave
|
||||
dodoc "${FILESDIR}"/clamav-milter.README.gentoo
|
||||
sed -i -e "s:^\(Example\):\# \1:" \
|
||||
-e "s:.*\(PidFile\) .*:\1 ${EPREFIX}/var/run/clamav/clamav-milter.pid:" \
|
||||
-e "s+^\#\(ClamdSocket\) .*+\1 unix:${EPREFIX}/var/run/clamav/clamd.sock+" \
|
||||
-e "s:.*\(User\) .*:\1 clamav:" \
|
||||
-e "s+^\#\(MilterSocket\) /.*+\1 unix:${EPREFIX}/var/run/clamav/clamav-milter.sock+" \
|
||||
-e "s:^\#\(AllowSupplementaryGroups\).*:\1 yes:" \
|
||||
-e "s:^\#\(LogFile\) .*:\1 ${EPREFIX}/var/log/clamav/clamav-milter.log:" \
|
||||
"${ED}"/etc/clamav-milter.conf.sample || die
|
||||
cat >> "${ED}"/etc/conf.d/clamd <<-EOF
|
||||
MILTER_NICELEVEL=19
|
||||
START_MILTER=no
|
||||
EOF
|
||||
|
||||
systemd_newunit "${FILESDIR}/clamav-milter.service-r1" clamav-milter.service
|
||||
fi
|
||||
|
||||
for i in clamd freshclam clamav-milter
|
||||
do
|
||||
[[ -f "${D}"/etc/"${i}".conf.sample ]] && mv "${D}"/etc/"${i}".conf{.sample,}
|
||||
done
|
||||
|
||||
prune_libtool_files --all
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake quick-check
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use milter ; then
|
||||
elog "For simple instructions how to setup the clamav-milter read the"
|
||||
elog "clamav-milter.README.gentoo in /usr/share/doc/${PF}"
|
||||
fi
|
||||
if test -z $(find "${ROOT}"var/lib/clamav -maxdepth 1 -name 'main.c*' -print -quit) ; then
|
||||
ewarn "You must run freshclam manually to populate the virus database files"
|
||||
ewarn "before starting clamav for the first time.\n"
|
||||
fi
|
||||
}
|
50
app-antivirus/clamav/files/clamav-0.99.3-bytecode_api.patch
Normal file
50
app-antivirus/clamav/files/clamav-0.99.3-bytecode_api.patch
Normal file
@ -0,0 +1,50 @@
|
||||
Description: fix compatibility with zlib 1.2.9 and newer
|
||||
Author: Marc Deslauriers <marc.deslauriers@canonical.com>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1692073
|
||||
|
||||
--- a/libclamav/bytecode_api.c 2017-08-08 15:20:06.651685637 -0400
|
||||
+++ b/libclamav/bytecode_api.c 2017-08-15 15:45:14.645714766 -0400
|
||||
@@ -811,8 +811,20 @@ int32_t cli_bcapi_inflate_init(struct cl
|
||||
cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n");
|
||||
return -1;
|
||||
}
|
||||
- memset(&stream, 0, sizeof(stream));
|
||||
- ret = inflateInit2(&stream, windowBits);
|
||||
+
|
||||
+ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
|
||||
+ if (!b) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ ctx->inflates = b;
|
||||
+ ctx->ninflates = n;
|
||||
+ b = &b[n-1];
|
||||
+
|
||||
+ b->from = from;
|
||||
+ b->to = to;
|
||||
+ b->needSync = 0;
|
||||
+ memset(&b->stream, 0, sizeof(stream));
|
||||
+ ret = inflateInit2(&b->stream, windowBits);
|
||||
switch (ret) {
|
||||
case Z_MEM_ERROR:
|
||||
cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n");
|
||||
@@ -829,20 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cl
|
||||
cli_dbgmsg("bytecode api: inflateInit2: unknown error %d\n", ret);
|
||||
return -1;
|
||||
}
|
||||
-
|
||||
- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
|
||||
- if (!b) {
|
||||
- inflateEnd(&stream);
|
||||
- return -1;
|
||||
- }
|
||||
- ctx->inflates = b;
|
||||
- ctx->ninflates = n;
|
||||
- b = &b[n-1];
|
||||
-
|
||||
- b->from = from;
|
||||
- b->to = to;
|
||||
- b->needSync = 0;
|
||||
- memcpy(&b->stream, &stream, sizeof(stream));
|
||||
return n-1;
|
||||
}
|
||||
|
63
app-antivirus/clamav/files/clamav-0.99.3-gcc-6.patch
Normal file
63
app-antivirus/clamav/files/clamav-0.99.3-gcc-6.patch
Normal file
@ -0,0 +1,63 @@
|
||||
diff --git a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
|
||||
index 59ff6aa..1325394 100644
|
||||
--- a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
|
||||
+++ b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
|
||||
@@ -169,3 +169,3 @@ public:
|
||||
KeyLength+1;
|
||||
- unsigned Alignment = alignof<StringMapEntry>();
|
||||
+ unsigned Alignment = alignOf<StringMapEntry>();
|
||||
|
||||
diff --git a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
|
||||
index 6a7a1a6..979e597 100644
|
||||
--- a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
|
||||
+++ b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
|
||||
@@ -51,8 +51,8 @@ struct AlignOf {
|
||||
|
||||
-/// alignof - A templated function that returns the mininum alignment of
|
||||
+/// alignOf - A templated function that returns the mininum alignment of
|
||||
/// of a type. This provides no extra functionality beyond the AlignOf
|
||||
/// class besides some cosmetic cleanliness. Example usage:
|
||||
-/// alignof<int>() returns the alignment of an int.
|
||||
+/// alignOf<int>() returns the alignment of an int.
|
||||
template <typename T>
|
||||
-static inline unsigned alignof() { return AlignOf<T>::Alignment; }
|
||||
+static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
|
||||
|
||||
diff --git a/libclamav/c++/llvm/include/llvm/Support/Allocator.h b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
|
||||
index 4a7251f..17caf5e 100644
|
||||
--- a/libclamav/c++/llvm/include/llvm/Support/Allocator.h
|
||||
+++ b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
|
||||
@@ -203,3 +203,3 @@ public:
|
||||
for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
|
||||
- Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
|
||||
+ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>());
|
||||
if (Ptr + sizeof(T) <= End)
|
||||
|
||||
diff --git a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
|
||||
index 88044c7..86b0f40 100644
|
||||
--- a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
|
||||
+++ b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
|
||||
@@ -417,3 +417,3 @@ namespace llvm {
|
||||
ileAllocator.Allocate(sizeof(IndexListEntry),
|
||||
- alignof<IndexListEntry>()));
|
||||
+ alignOf<IndexListEntry>()));
|
||||
|
||||
diff --git a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
|
||||
index 824021c..757ca50 100644
|
||||
--- a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
|
||||
+++ b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
|
||||
@@ -569,3 +569,3 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
|
||||
// Calculate what the SS field value should be...
|
||||
- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
|
||||
+ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
|
||||
unsigned SS = SSTable[Scale.getImm()];
|
||||
|
||||
diff --git a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
|
||||
index 9564fe0..b2b7986 100644
|
||||
--- a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
|
||||
+++ b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
|
||||
@@ -332,3 +332,3 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
|
||||
// Calculate what the SS field value should be...
|
||||
- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
|
||||
+ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
|
||||
unsigned SS = SSTable[Scale.getImm()];
|
@ -0,0 +1,12 @@
|
||||
--- clamav-0.99.2/libclamav/regex_pcre.c~ 2017-11-28 14:40:56.484208243 +0100
|
||||
+++ clamav-0.99.2/libclamav/regex_pcre.c 2017-11-28 14:41:07.301207800 +0100
|
||||
@@ -112,7 +112,8 @@ int cli_pcre_addoptions(struct cli_pcre_
|
||||
#if USING_PCRE2
|
||||
int cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override)
|
||||
{
|
||||
- int errornum, erroffset;
|
||||
+ int errornum;
|
||||
+ size_t erroffset;
|
||||
pcre2_general_context *gctx;
|
||||
pcre2_compile_context *cctx;
|
||||
|
44
app-antivirus/clamav/files/clamav-milter.README.gentoo
Normal file
44
app-antivirus/clamav/files/clamav-milter.README.gentoo
Normal file
@ -0,0 +1,44 @@
|
||||
Nick Hadaway <raker@gentoo.org>
|
||||
Updated by Andrea Barisani <lcars@gentoo.org>
|
||||
18/05/2004
|
||||
|
||||
Setting up clamav-milter on Gentoo Linux
|
||||
|
||||
Step 1 - Configure clamd
|
||||
|
||||
Check /etc/clamd.conf, default values should work out of the box but
|
||||
read and understand all the options especially if you are going to
|
||||
use it on production boxes.
|
||||
|
||||
Step 2 - Tell the init script to start clamd as well as freshclam and the
|
||||
milter itself.
|
||||
|
||||
nano -w /etc/conf.d/clamd
|
||||
|
||||
START_CLAMD=yes
|
||||
START_FRESHCLAM=yes
|
||||
START_MILTER=yes
|
||||
|
||||
Step 3 - Edit sendmail.mc
|
||||
|
||||
Add these lines to sendmail.mc before any any other
|
||||
INPUT_MAIL_FILTER lines and before MAILER(local)
|
||||
NOTE: ANY INPUT_MAIL_FILTER definitions put before these lines
|
||||
will be discarded due to the use of confINPUT_MAIL_FILTERS
|
||||
Make this your first mail filter. :)
|
||||
|
||||
INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock, F=, T=S:4m;R:4m')dnl
|
||||
define(`confINPUT_MAIL_FILTERS', `clmilter')dnl
|
||||
|
||||
Step 4 - Rebuild sendmail.cf
|
||||
|
||||
cd /etc/mail
|
||||
m4 sendmail.mc > sendmail.cf
|
||||
|
||||
Step 5 - Start clamad
|
||||
|
||||
/etc/init.d/clamd start
|
||||
|
||||
Step 6 - Restart sendmail
|
||||
|
||||
/etc/init.d/sendmail restart
|
12
app-antivirus/clamav/files/clamav-milter.service
Normal file
12
app-antivirus/clamav/files/clamav-milter.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Milter module for the ClamAV scanner
|
||||
After=nss-lookup.target network.target
|
||||
Before=sendmail.service
|
||||
Before=postfix.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/clamav-milter -c /etc/clamav-milter.conf --nofork=yes
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
13
app-antivirus/clamav/files/clamav-milter.service-r1
Normal file
13
app-antivirus/clamav/files/clamav-milter.service-r1
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=Milter module for the ClamAV scanner
|
||||
After=nss-lookup.target network.target
|
||||
Before=sendmail.service
|
||||
Before=postfix.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/clamav/clamav-milter.pid
|
||||
ExecStart=/usr/sbin/clamav-milter -c /etc/clamav-milter.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
17
app-antivirus/clamav/files/clamav.logrotate
Normal file
17
app-antivirus/clamav/files/clamav.logrotate
Normal file
@ -0,0 +1,17 @@
|
||||
/var/log/clamav/clamd.log {
|
||||
su clamav clamav
|
||||
missingok
|
||||
postrotate
|
||||
/etc/init.d/clamd logfix
|
||||
/bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/clamav/freshclam.log {
|
||||
su clamav clamav
|
||||
missingok
|
||||
postrotate
|
||||
/etc/init.d/clamd logfix
|
||||
/bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 2>/dev/null || true
|
||||
endscript
|
||||
}
|
9
app-antivirus/clamav/files/clamd.conf
Normal file
9
app-antivirus/clamav/files/clamd.conf
Normal file
@ -0,0 +1,9 @@
|
||||
# Config file for /etc/init.d/clamd
|
||||
|
||||
# NOTICE: Since clamav-0.85-r1, only START_CLAMD and START_FRESHCLAM settings
|
||||
# are used, other are silently ignored
|
||||
|
||||
START_CLAMD=yes
|
||||
START_FRESHCLAM=yes
|
||||
CLAMD_NICELEVEL=3
|
||||
FRESHCLAM_NICELEVEL=19
|
7
app-antivirus/clamav/files/clamd.conf-r1
Normal file
7
app-antivirus/clamav/files/clamd.conf-r1
Normal file
@ -0,0 +1,7 @@
|
||||
# Config file for /etc/init.d/clamd
|
||||
|
||||
START_CLAMD=yes
|
||||
START_FRESHCLAM=yes
|
||||
CLAMD_NICELEVEL=3
|
||||
FRESHCLAM_NICELEVEL=19
|
||||
IONICE_LEVEL=2
|
128
app-antivirus/clamav/files/clamd.initd-r6
Normal file
128
app-antivirus/clamav/files/clamd.initd-r6
Normal file
@ -0,0 +1,128 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
daemon_clamd="/usr/sbin/clamd"
|
||||
daemon_freshclam="/usr/bin/freshclam"
|
||||
daemon_milter="/usr/sbin/clamav-milter"
|
||||
|
||||
extra_commands="logfix"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
provide antivirus
|
||||
}
|
||||
|
||||
get_config() {
|
||||
clamconf | sed 's/["=]//g' | \
|
||||
awk "{
|
||||
if(\$0==\"Config file: $1.conf\") S=1
|
||||
if(S==1&&\$0==\"\") {
|
||||
print \"$3\"
|
||||
exit
|
||||
}
|
||||
if(S==1&&\$1~\"^$2\$\") {
|
||||
print \$2!=\"disabled\"?\$2:\"$3\"
|
||||
exit
|
||||
}
|
||||
}"
|
||||
}
|
||||
|
||||
start() {
|
||||
# populate variables and fix log file permissions
|
||||
logfix
|
||||
|
||||
if [ "${START_CLAMD}" = "yes" ]; then
|
||||
checkpath --quiet --mode 755 \
|
||||
--owner "${clamd_user}":"${clamd_user}" \
|
||||
--directory `dirname ${clamd_socket}`
|
||||
if [ -S "${clamd_socket}" ]; then
|
||||
rm -f ${clamd_socket}
|
||||
fi
|
||||
ebegin "Starting clamd"
|
||||
start-stop-daemon --start --quiet \
|
||||
--nicelevel ${CLAMD_NICELEVEL:-0} \
|
||||
--ionice ${IONICE_LEVEL:-0} \
|
||||
--exec ${daemon_clamd}
|
||||
eend $? "Failed to start clamd"
|
||||
fi
|
||||
|
||||
if [ "${START_FRESHCLAM}" = "yes" ]; then
|
||||
checkpath --quiet --mode 755 \
|
||||
--owner "${clamd_user}":"${clamd_user}" \
|
||||
--directory `dirname ${clamd_socket}`
|
||||
ebegin "Starting freshclam"
|
||||
start-stop-daemon --start --quiet \
|
||||
--nicelevel ${FRESHCLAM_NICELEVEL:-0} \
|
||||
--ionice ${IONICE_LEVEL:-0} \
|
||||
--exec ${daemon_freshclam} -- -d
|
||||
retcode=$?
|
||||
if [ ${retcode} = 1 ]; then
|
||||
eend 0
|
||||
einfo "Virus databases are already up to date."
|
||||
else
|
||||
eend ${retcode} "Failed to start freshclam"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${START_MILTER}" = "yes" ]; then
|
||||
if [ -z "${MILTER_CONF_FILE}" ]; then
|
||||
MILTER_CONF_FILE="/etc/clamav-milter.conf"
|
||||
fi
|
||||
|
||||
ebegin "Starting clamav-milter"
|
||||
start-stop-daemon --start --quiet \
|
||||
--nicelevel ${MILTER_NICELEVEL:-0} \
|
||||
--ionice ${IONICE_LEVEL:-0} \
|
||||
--exec ${daemon_milter} -- -c ${MILTER_CONF_FILE}
|
||||
eend $? "Failed to start clamav-milter"
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ "${START_CLAMD}" = "yes" ]; then
|
||||
ebegin "Stopping clamd"
|
||||
start-stop-daemon --stop --quiet --name clamd
|
||||
eend $? "Failed to stop clamd"
|
||||
fi
|
||||
if [ "${START_FRESHCLAM}" = "yes" ]; then
|
||||
ebegin "Stopping freshclam"
|
||||
start-stop-daemon --stop --quiet --name freshclam
|
||||
eend $? "Failed to stop freshclam"
|
||||
fi
|
||||
if [ "${START_MILTER}" = "yes" ]; then
|
||||
ebegin "Stopping clamav-milter"
|
||||
start-stop-daemon --stop --quiet --name clamav-milter
|
||||
eend $? "Failed to stop clamav-milter"
|
||||
fi
|
||||
}
|
||||
|
||||
logfix() {
|
||||
clamd_socket=$(get_config clamd LocalSocket /run/clamav/clamd.sock)
|
||||
clamd_user=$(get_config clamd User clamav)
|
||||
freshclam_user=$(get_config freshclam DatabaseOwner clamav)
|
||||
|
||||
if [ "${START_CLAMD}" = "yes" ]; then
|
||||
# fix clamd log permissions
|
||||
# (might be clobbered by logrotate or something)
|
||||
local logfile=$(get_config clamd LogFile)
|
||||
if [ -n "${logfile}" ]; then
|
||||
checkpath --quiet \
|
||||
--owner "${clamd_user}":"${clamd_user}" \
|
||||
--mode 640 \
|
||||
--file ${logfile}
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "${START_FRESHCLAM}" = "yes" ]; then
|
||||
# fix freshclam log permissions
|
||||
# (might be clobbered by logrotate or something)
|
||||
local logfile=$(get_config freshclam UpdateLogFile)
|
||||
if [ -n "${logfile}" ]; then
|
||||
checkpath --quiet \
|
||||
--owner "${freshclam_user}":"${freshclam_user}" \
|
||||
--mode 640 \
|
||||
--file ${logfile}
|
||||
fi
|
||||
fi
|
||||
}
|
12
app-antivirus/clamav/files/clamd.service
Normal file
12
app-antivirus/clamav/files/clamd.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=clamd scanner daemon
|
||||
After=nss-lookup.target network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/clamd
|
||||
Restart=on-failure
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
12
app-antivirus/clamav/files/clamd_at.service
Normal file
12
app-antivirus/clamav/files/clamd_at.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=clamd scanner (%i) daemon
|
||||
After=nss-lookup.target network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/clamd -c /etc/clamd%i.conf
|
||||
Restart=on-failure
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
10
app-antivirus/clamav/files/freshclamd.service
Normal file
10
app-antivirus/clamav/files/freshclamd.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=clamav updater
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/clamav/freshclam.pid
|
||||
ExecStart=/usr/bin/freshclam -d -p /run/clamav/freshclam.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
5
app-emulation/vmware-vsphere-cli/Manifest
Normal file
5
app-emulation/vmware-vsphere-cli/Manifest
Normal file
@ -0,0 +1,5 @@
|
||||
AUX makefile.patch 1128 SHA256 6c700f94685f7a6a273528fbabb1770ad550af92a0c72aa62bb3302cffac442a SHA512 7cbb1d118d905d63817984ea5b18828c32e2af796ce69b2b244caf31b2c8456d25ac9109eb69381b2baf281dd11b25e91f3c82ea64af2854aaf62b16f6b5b902 WHIRLPOOL 556d55e63b8be28a02ed3d958179b0c7d7dae7a595097ac812027c75adde03f8b4ba31c005a4a4adfb3627d9b73c7a44febb19a999ec92ad547eb3122d65d6df
|
||||
DIST VMware-vSphere-CLI-5.5.0-2043780.x86_64.tar.gz 26894969 SHA256 23e4ae5fdab120ff73bb1163297c6c98b0b3d14e8134ed7fad7e21204d902003 SHA512 0b6674c6c720860870fd22ea488ae38512e3c0c0880244edd862100678178daf5bd175ae9932d318dc4082384af7959177555b12527e1e9d2c91e34ae6746dfc WHIRLPOOL 9a67e5aa48fd9cd4fb37f1bc6b9a5e76eda320321e6582ec7ddedfe8bdc1d36b7df4bd7a8af5dccca7f4e597e22f1685261b2281e08f4c70bafe413228d153d5
|
||||
DIST VMware-vSphere-CLI-6.5.0-4566394.x86_64.tar.gz 53518799 SHA256 c41be99106f819c7661b3902c268036b59e9aa6618dbf7cedb1949bff55c8438 SHA512 e20ca55509a9f14084686b79f98c29486d5c0ff8ef26df01b454dedd65088998fb6bfcb6f178d74e7b9b64b63d185e30c9bfc2f802f149f499a2c8ec017bd1af WHIRLPOOL 10d96cf5ab30883ff32176a970daca88295ec677385d9358693c759f07994c0af6ed7de4fb32e6608f21851e26f605a4daf38a2de8cc3d50f0d880a2f3b51944
|
||||
EBUILD vmware-vsphere-cli-5.5.0.2043780.ebuild 3012 SHA256 726ad7d15c6a82a1e28d334e301637cc795cd3b60c701f51c8d3625310ae3237 SHA512 0d02f091ac7afea0f6e6502bd3e4fc7894f5a6a2a14625ecaec3f9802b8edb18443cee03ab07525b14a024073935bc2c10da3ab829dd3a8239c71d67f554c92a WHIRLPOOL d17b0284094d7ce2264dcc97db4c5de0de07ea38374bdc63340f18711d302069491bbf178b85e0279a49548ca9be32d440e477f5f881cb97ec3047729c1fdb40
|
||||
EBUILD vmware-vsphere-cli-6.5.0.4566394.ebuild 2944 SHA256 4f517ef206852b141a7ecbd7e185684d9aca1749200c1c5590f2af73ab588134 SHA512 3e9de243f0e31f01e35ab22106a921f94fb08a3eaa4308d59df41eff9680df34c1cbe76b626594d2669489cd343ba6fbd56601cfe61371d58aa680fdd08c193d WHIRLPOOL 3ddc9254f681b46be8f34dd85d0518cfa5a7e99ee52d3b7d47efbd48f6584ed5fd140bffff6097701ed0ef19c361423b30fd9d40e0740b8caa53698245fdc414
|
48
app-emulation/vmware-vsphere-cli/files/makefile.patch
Normal file
48
app-emulation/vmware-vsphere-cli/files/makefile.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/Makefile.PL b/Makefile.PL
|
||||
index 046e794..429dc42 100644
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -81,43 +81,5 @@ WriteMakefile(
|
||||
# /usr/bin/perl, and attempt to find a reasonable spot if you
|
||||
# are running some other perl.
|
||||
#
|
||||
- macro => {
|
||||
- # vmware apps
|
||||
- INST_VMWARE_APPS => 'apps',
|
||||
- DEST_VMWARE_APPS => (
|
||||
- $Config{perlpath} eq '/usr/bin/perl' ?
|
||||
- '/usr/lib/vmware-viperl/apps' :
|
||||
- '$(INSTALLSITESCRIPT)/apps'
|
||||
- ),
|
||||
- # vmware docs
|
||||
- INST_VMWARE_DOC => 'doc',
|
||||
- DEST_VMWARE_DOC => (
|
||||
- $Config{perlpath} eq '/usr/bin/perl' ?
|
||||
- '/usr/share/doc/vmware-viperl/doc' :
|
||||
- '$(SITEPREFIX)/doc'
|
||||
- ),
|
||||
- },
|
||||
);
|
||||
|
||||
-#
|
||||
-# Additional targets for installing apps and doc.
|
||||
-#
|
||||
-sub MY::postamble {
|
||||
- return <<'MAKE';
|
||||
-install :: install_vmware_apps install_vmware_doc
|
||||
- $(NOECHO) $(NOOP)
|
||||
-
|
||||
-install_vmware_apps :
|
||||
- $(NOECHO) $(MOD_INSTALL) \
|
||||
- $(INST_VMWARE_APPS) $(DEST_VMWARE_APPS)
|
||||
-
|
||||
-install_vmware_doc :
|
||||
- $(NOECHO) $(MOD_INSTALL) \
|
||||
- $(INST_VMWARE_DOC) $(DEST_VMWARE_DOC)
|
||||
-
|
||||
-clean ::
|
||||
- $(RM_RF) VMware WSMan
|
||||
-
|
||||
-MAKE
|
||||
-}
|
||||
-
|
@ -0,0 +1,140 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# Unlike many other binary packages the user doesn't need to agree to a licence
|
||||
# to download VMWare. The agreeing to a licence is part of the configure step
|
||||
# which the user must run manually.
|
||||
|
||||
# TODO https://communities.vmware.com/thread/488747?start=0&tstart=0
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils perl-module versionator
|
||||
|
||||
MY_PV=$(replace_version_separator 3 '-' )
|
||||
MY_PN="VMware-vSphere-CLI-${MY_PV}"
|
||||
|
||||
DESCRIPTION="VMware vSphere Command-Line Interface"
|
||||
HOMEPAGE="http://www.vmware.com/"
|
||||
SRC_URI=" amd64? ( https://gentoorepo.in.edevau.net/edevau/2017/${MY_PN}.x86_64.tar.gz ) "
|
||||
|
||||
LICENSE="vmware"
|
||||
IUSE=""
|
||||
SLOT="0"
|
||||
KEYWORDS="-* x86 amd64"
|
||||
RESTRICT="strip"
|
||||
|
||||
DEPEND="
|
||||
>=dev-lang/perl-5
|
||||
dev-libs/expat
|
||||
dev-libs/glib:2
|
||||
dev-libs/libxml2
|
||||
dev-libs/openssl:0.9.8
|
||||
dev-perl/Archive-Zip
|
||||
dev-perl/Class-MethodMaker
|
||||
dev-perl/Crypt-SSLeay
|
||||
dev-perl/Data-Dump
|
||||
dev-perl/Data-Dumper-Concise
|
||||
dev-perl/HTML-Parser
|
||||
dev-perl/SOAP-Lite
|
||||
dev-perl/URI
|
||||
dev-perl/Data-UUID
|
||||
dev-perl/XML-LibXML
|
||||
dev-perl/XML-NamespaceSupport
|
||||
dev-perl/XML-SAX
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/libxml-perl
|
||||
virtual/perl-Compress-Raw-Zlib
|
||||
virtual/perl-IO-Compress
|
||||
virtual/perl-version
|
||||
sys-fs/e2fsprogs
|
||||
sys-libs/zlib"
|
||||
# !app-emulation/vmware-server
|
||||
# !app-emulation/vmware-vix
|
||||
# !app-emulation/vmware-workstation"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S=${WORKDIR}/${PN}-distrib
|
||||
|
||||
pkg_setup() {
|
||||
if use x86; then
|
||||
MY_P="${MY_PN}.i386"
|
||||
elif use amd64; then
|
||||
MY_P="${MY_PN}.x86_64"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
VMWARE_GROUP=${VMWARE_GROUP:-vmware}
|
||||
VMWARE_INSTALL_DIR=/opt/${PN//-//}
|
||||
|
||||
shortname="vcli"
|
||||
product="vmware-vcli"
|
||||
config_dir="/etc/vmware-vcli"
|
||||
product_name="vSphere CLI"
|
||||
|
||||
enewgroup ${VMWARE_GROUP}
|
||||
|
||||
# We won't want any perl scripts from VMware
|
||||
rm -f *.pl bin/*.pl
|
||||
rm -f etc/installer.sh
|
||||
|
||||
epatch "${FILESDIR}"/makefile.patch
|
||||
|
||||
perl-module_src_prepare
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# We loop through our directories and copy everything to our system.
|
||||
for x in apps bin
|
||||
do
|
||||
if [[ -e "${S}"/${x} ]]
|
||||
then
|
||||
dodir "${VMWARE_INSTALL_DIR}"/${x}
|
||||
cp -pPR "${S}"/${x}/* "${D}""${VMWARE_INSTALL_DIR}"/${x} || die "copying ${x}"
|
||||
fi
|
||||
done
|
||||
|
||||
perl-module_src_install
|
||||
|
||||
# init script
|
||||
if [[ -e "${FILESDIR}/${PN}.rc" ]]
|
||||
then
|
||||
newinitd "${FILESDIR}"/${PN}.rc ${product}
|
||||
fi
|
||||
|
||||
# create the environment
|
||||
local envd="${T}/90vmware-cli"
|
||||
cat > "${envd}" <<-EOF
|
||||
PATH='${VMWARE_INSTALL_DIR}/bin'
|
||||
ROOTPATH='${VMWARE_INSTALL_DIR}/bin'
|
||||
EOF
|
||||
doenvd "${envd}"
|
||||
|
||||
# Last, we check for any mime files.
|
||||
if [[ -e "${FILESDIR}/${PN}.xml" ]]
|
||||
then
|
||||
insinto /usr/share/mime/packages
|
||||
doins "${FILESDIR}"/${PN}.xml
|
||||
fi
|
||||
|
||||
if [[ -e doc/EULA ]]
|
||||
then
|
||||
insinto "${VMWARE_INSTALL_DIR}"/doc
|
||||
doins doc/EULA
|
||||
fi
|
||||
|
||||
doman man/*
|
||||
|
||||
# create the configuration
|
||||
#dodir "${config_dir}"
|
||||
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[[ -d "${config_dir}" ]] && chown -R root:${VMWARE_GROUP} ${config_dir}
|
||||
|
||||
ewarn "In order to run ${product_name}, you have to"
|
||||
ewarn "be in the '${VMWARE_GROUP}' group."
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# Unlike many other binary packages the user doesn't need to agree to a licence
|
||||
# to download VMWare. The agreeing to a licence is part of the configure step
|
||||
# which the user must run manually.
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils perl-module versionator
|
||||
|
||||
MY_PV=$(replace_version_separator 3 '-' )
|
||||
MY_PN="VMware-vSphere-CLI-${MY_PV}"
|
||||
|
||||
DESCRIPTION="VMware vSphere Command-Line Interface"
|
||||
HOMEPAGE="http://www.vmware.com/"
|
||||
SRC_URI=" amd64? ( https://gentoorepo.in.edevau.net/edevau/2017/${MY_PN}.x86_64.tar.gz ) "
|
||||
|
||||
LICENSE="vmware"
|
||||
IUSE=""
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~x86 ~amd64"
|
||||
RESTRICT="strip"
|
||||
|
||||
DEPEND="
|
||||
>=dev-lang/perl-5
|
||||
dev-libs/expat
|
||||
dev-libs/glib:2
|
||||
dev-libs/libxml2
|
||||
dev-libs/openssl:0.9.8
|
||||
dev-perl/Archive-Zip
|
||||
dev-perl/Class-MethodMaker
|
||||
dev-perl/Crypt-SSLeay
|
||||
dev-perl/Data-Dump
|
||||
dev-perl/Data-Dumper-Concise
|
||||
dev-perl/HTML-Parser
|
||||
dev-perl/SOAP-Lite
|
||||
dev-perl/URI
|
||||
dev-perl/Data-UUID
|
||||
dev-perl/XML-LibXML
|
||||
dev-perl/XML-NamespaceSupport
|
||||
dev-perl/XML-SAX
|
||||
dev-perl/libwww-perl
|
||||
dev-perl/libxml-perl
|
||||
virtual/perl-Compress-Raw-Zlib
|
||||
virtual/perl-IO-Compress
|
||||
virtual/perl-version
|
||||
sys-fs/e2fsprogs
|
||||
sys-libs/zlib"
|
||||
# !app-emulation/vmware-server
|
||||
# !app-emulation/vmware-vix
|
||||
# !app-emulation/vmware-workstation"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S=${WORKDIR}/${PN}-distrib
|
||||
|
||||
pkg_setup() {
|
||||
if use x86; then
|
||||
MY_P="${MY_PN}.i386"
|
||||
elif use amd64; then
|
||||
MY_P="${MY_PN}.x86_64"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
VMWARE_GROUP=${VMWARE_GROUP:-vmware}
|
||||
VMWARE_INSTALL_DIR=/opt/${PN//-//}
|
||||
|
||||
shortname="vcli"
|
||||
product="vmware-vcli"
|
||||
config_dir="/etc/vmware-vcli"
|
||||
product_name="vSphere CLI"
|
||||
|
||||
enewgroup ${VMWARE_GROUP}
|
||||
|
||||
# We won't want any perl scripts from VMware
|
||||
rm -f *.pl bin/*.pl
|
||||
rm -f etc/installer.sh
|
||||
|
||||
epatch "${FILESDIR}"/makefile.patch
|
||||
|
||||
perl-module_src_prepare
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# We loop through our directories and copy everything to our system.
|
||||
for x in apps bin
|
||||
do
|
||||
if [[ -e "${S}"/${x} ]]
|
||||
then
|
||||
dodir "${VMWARE_INSTALL_DIR}"/${x}
|
||||
cp -pPR "${S}"/${x}/* "${D}""${VMWARE_INSTALL_DIR}"/${x} || die "copying ${x}"
|
||||
fi
|
||||
done
|
||||
|
||||
perl-module_src_install
|
||||
|
||||
# init script
|
||||
if [[ -e "${FILESDIR}/${PN}.rc" ]]
|
||||
then
|
||||
newinitd "${FILESDIR}"/${PN}.rc ${product}
|
||||
fi
|
||||
|
||||
# create the environment
|
||||
local envd="${T}/90vmware-cli"
|
||||
cat > "${envd}" <<-EOF
|
||||
PATH='${VMWARE_INSTALL_DIR}/bin'
|
||||
ROOTPATH='${VMWARE_INSTALL_DIR}/bin'
|
||||
EOF
|
||||
doenvd "${envd}"
|
||||
|
||||
# Last, we check for any mime files.
|
||||
if [[ -e "${FILESDIR}/${PN}.xml" ]]
|
||||
then
|
||||
insinto /usr/share/mime/packages
|
||||
doins "${FILESDIR}"/${PN}.xml
|
||||
fi
|
||||
|
||||
if [[ -e doc/EULA ]]
|
||||
then
|
||||
insinto "${VMWARE_INSTALL_DIR}"/doc
|
||||
doins doc/EULA
|
||||
fi
|
||||
|
||||
doman man/*
|
||||
|
||||
# create the configuration
|
||||
#dodir "${config_dir}"
|
||||
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[[ -d "${config_dir}" ]] && chown -R root:${VMWARE_GROUP} ${config_dir}
|
||||
|
||||
ewarn "In order to run ${product_name}, you have to"
|
||||
ewarn "be in the '${VMWARE_GROUP}' group."
|
||||
}
|
8
app-misc/homeassistant-bin/Manifest
Normal file
8
app-misc/homeassistant-bin/Manifest
Normal file
@ -0,0 +1,8 @@
|
||||
AUX homeassistant.conf.d 16428 BLAKE2B f11391c5c3dcc75a209a8b31bb74da92626c1b17da01c48e7b53b07a194f6ccb16b82bd8cf91ac274fd448ee4fdbcadb051cd5de1737b6a734936b80803de1ee SHA512 c51f3ac9ab67b55abfe3b5267e008c0283023ab066d1bf454bcb8b43212d76ae2b939b2320a4fd065c02a98fb755315c3a20a60a04287ef2a4937bd6129d8aa7
|
||||
AUX homeassistant.init.d 893 BLAKE2B 6726ad973f667de85c95bb0a50cda88b13a59eef3adc14cd3cdd77d76410f97ad4d5d614dba2163933f30600f45f7879fdee81e19b98d91bfdfc91e5465f8182 SHA512 ffc124f546734ec46a0fb8049f1f293d69269c54fe25f12e0ccc3baaff4563e612ad2c36d345c9b4d99fcb9b91f44cfb786c752e21799b582d7604e4e996ce2d
|
||||
AUX homeassistant.logrotate 280 BLAKE2B a1e5ecf35df38b4928415af19c72bb3012fa8ea8f39d71c63c4efbc91df76aa644ecea6d66a6cefac80ef03678f6fbf918b7f9efd5651128c4961e578a822f58 SHA512 9aa3305c605ae2deccac9b69d43cdf50c9dd67bc0abfe5a576cbd866bdc3ba92bdcc824b3e5990d903bad3685abdfec66b4a8bae122a7ea79dabb5f6e8b08613
|
||||
AUX homeassistant.service 261 BLAKE2B 54819aa30aa5564aca693fa2dd70ad4a9831929a33f1042542e2555fa1ec2cb5cefd746b6abc308bc970f627803279dc3caf5fbf3de5c94b3fd73760e1343a38 SHA512 83f6ba1782f844c290f349ff50bdea8d8d88d41e2f39f3f7d5a015a0f463a4c8f7328acbd3838380cf6ca78090b39ebdbeb5e3f39607b5e307c0e53ff55ee697
|
||||
AUX recorder.yaml 114 BLAKE2B af04840805aa13124208584e7f1d40335905a083ee7deead5c0e4324c969f2a231c801c23e42075782950aba7535496d92747bf03efd73a80b0d07e8492d18f6 SHA512 cb4e353e54fb6dc7034569b8d62ddcdca92680c23c2c4e1ce707d21cf95e93f41a0c44521d8c3ee90b68c830f6b8e65dab82ae64bfa09727ae384550f7de0c94
|
||||
AUX update-homeassistant 1326 BLAKE2B 917bdd332c4e5dea5177eecd11a7f8d72b911fddfdc8e5eb54960c526fe8c735e20d44e570cf7aeb99669d2a9670c70da1c5fbc30efb284d1f0f330799de6e24 SHA512 3c05f0d6d1bde0e1526c3e679568794c07091e7856dfd8793e13feec6f22725ddaa3163ca2c81d9df86cf73573f932e561743f05de420b350a0b68f6a9582aca
|
||||
EBUILD homeassistant-bin-0.76.0.ebuild 2873 BLAKE2B 8bcbcfff6b2613a00714c06588b4292268d84feca3f34a665243dc541e57322a5754b1fb71a3841e7d35aafb6b3acdf3d3dfd3b468caec159408016b4a2dd22a SHA512 452fce27032fb1e60309663b85285ee8baaad1b0665c9121a149fda8a9ac72e9fa7d2ee4d477b4346debd3feb961824e7bb4d90a58f4c504eb89b8b5f8fa6643
|
||||
EBUILD homeassistant-bin-0.76.2.ebuild 2873 BLAKE2B 8bcbcfff6b2613a00714c06588b4292268d84feca3f34a665243dc541e57322a5754b1fb71a3841e7d35aafb6b3acdf3d3dfd3b468caec159408016b4a2dd22a SHA512 452fce27032fb1e60309663b85285ee8baaad1b0665c9121a149fda8a9ac72e9fa7d2ee4d477b4346debd3feb961824e7bb4d90a58f4c504eb89b8b5f8fa6643
|
241
app-misc/homeassistant-bin/files/homeassistant.conf.d
Normal file
241
app-misc/homeassistant-bin/files/homeassistant.conf.d
Normal file
@ -0,0 +1,241 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<title>homeassistant.conf.d\files\homeassistant-bin\app-misc - user/lmiphay.git - Personal overlay of Paul Healy</title>
|
||||
<meta name='generator' content='cgit v1.2.1'/>
|
||||
<meta name='robots' content='index,follow'/>
|
||||
<link rel='stylesheet' type='text/css' href='/cgit.css'/>
|
||||
<link rel='shortcut icon' href='//www.gentoo.org/favicon.ico'/>
|
||||
<link rel='alternate' title='Atom feed' href='https://gitweb.gentoo.org/user/lmiphay.git/atom/app-misc/homeassistant-bin/files/homeassistant.conf.d?h=master' type='application/atom+xml'/>
|
||||
<link rel='vcs-git' href='git://anongit.gentoo.org/user/lmiphay.git' title='user/lmiphay.git Git repository'/>
|
||||
<link rel='vcs-git' href='https://anongit.gentoo.org/git/user/lmiphay.git' title='user/lmiphay.git Git repository'/>
|
||||
<link rel='vcs-git' href='http://anongit.gentoo.org/git/user/lmiphay.git' title='user/lmiphay.git Git repository'/>
|
||||
<link rel='vcs-git' href='git+ssh://git@git.gentoo.org/user/lmiphay.git' title='user/lmiphay.git Git repository'/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="theme-color" content="#54487a">
|
||||
<meta name="description" content="Browse the Gentoo Git repositories">
|
||||
<link href="https://assets.gentoo.org/tyrian/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link href="https://assets.gentoo.org/tyrian/tyrian.min.css" rel="stylesheet" media="screen">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="site-title">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="site-title-buttons">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong>Get Gentoo!</strong></a>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">
|
||||
<span class="fa fa-fw fa-map-o"></span> <span class="hidden-xs">gentoo.org sites</span> <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
|
||||
<li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li>
|
||||
<li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
|
||||
<li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
|
||||
<li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
|
||||
<li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
|
||||
<li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logo">
|
||||
<a href="/" title="Back to the homepage" class="site-logo">
|
||||
<object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml">
|
||||
<img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo">
|
||||
</object>
|
||||
</a>
|
||||
<span class="site-label">GitWeb</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="tyrian-navbar" role="navigation">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse navbar-main-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/repo/gentoo.git">Gentoo Repository</a></li>
|
||||
<li><a href="/repo/">Repositories</a></li>
|
||||
<li><a href="/proj/">Projects</a></li>
|
||||
<li><a href="/dev/">Developer Overlays</a></li>
|
||||
<li><a href="/user/">User Overlays</a></li>
|
||||
<li><a href="/data/">Data</a></li>
|
||||
<li><a href="/sites/">Websites</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div id='cgit'><table id='header'>
|
||||
<tr>
|
||||
<td class='logo' rowspan='2'><a href='/'><img src='/cgit.png' alt='cgit logo'/></a></td>
|
||||
<td class='main'><a href='/'>index</a> : <a title='user/lmiphay.git' href='/user/lmiphay.git/'>user/lmiphay.git</a></td><td class='form'><form method='get'>
|
||||
<select name='h' onchange='this.form.submit();'>
|
||||
<option value='master' selected='selected'>master</option>
|
||||
</select> <input type='submit' value='switch'/></form></td></tr>
|
||||
<tr><td class='sub'>Personal overlay of Paul Healy</td><td class='sub right'>Paul Healy <lmiphay@gmail.com></td></tr></table>
|
||||
<table class='tabs'><tr><td>
|
||||
<a href='/user/lmiphay.git/about/'>about</a><a href='/user/lmiphay.git/'>summary</a><a href='/user/lmiphay.git/refs/'>refs</a><a href='/user/lmiphay.git/log/app-misc/homeassistant-bin/files/homeassistant.conf.d'>log</a><a class='active' href='/user/lmiphay.git/tree/app-misc/homeassistant-bin/files/homeassistant.conf.d'>tree</a><a href='/user/lmiphay.git/commit/app-misc/homeassistant-bin/files/homeassistant.conf.d'>commit</a><a href='/user/lmiphay.git/diff/app-misc/homeassistant-bin/files/homeassistant.conf.d'>diff</a></td><td class='form'><form class='right' method='get' action='/user/lmiphay.git/log/app-misc/homeassistant-bin/files/homeassistant.conf.d'>
|
||||
<select name='qt'>
|
||||
<option value='grep'>log msg</option>
|
||||
<option value='author'>author</option>
|
||||
<option value='committer'>committer</option>
|
||||
<option value='range'>range</option>
|
||||
</select>
|
||||
<input class='txt' type='search' size='10' name='q' value=''/>
|
||||
<input type='submit' value='search'/>
|
||||
</form>
|
||||
</td></tr></table>
|
||||
<div class='path'>path: <a href='/user/lmiphay.git/tree/'>root</a>/<a href='/user/lmiphay.git/tree/app-misc'>app-misc</a>/<a href='/user/lmiphay.git/tree/app-misc/homeassistant-bin'>homeassistant-bin</a>/<a href='/user/lmiphay.git/tree/app-misc/homeassistant-bin/files'>files</a>/<a href='/user/lmiphay.git/tree/app-misc/homeassistant-bin/files/homeassistant.conf.d'>homeassistant.conf.d</a></div><div class='content'>blob: 401cb10f0827753cf6ef48b95d4c923234195029 (<a href='/user/lmiphay.git/plain/app-misc/homeassistant-bin/files/homeassistant.conf.d'>plain</a>)
|
||||
<table summary='blob content' class='blob'>
|
||||
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
|
||||
<a id='n2' href='#n2'>2</a>
|
||||
<a id='n3' href='#n3'>3</a>
|
||||
<a id='n4' href='#n4'>4</a>
|
||||
<a id='n5' href='#n5'>5</a>
|
||||
<a id='n6' href='#n6'>6</a>
|
||||
<a id='n7' href='#n7'>7</a>
|
||||
<a id='n8' href='#n8'>8</a>
|
||||
<a id='n9' href='#n9'>9</a>
|
||||
</pre></td>
|
||||
<td class='lines'><pre><code><style>.highlight .hll { background-color: #ffffcc }
|
||||
.highlight .c { color: #888888 } /* Comment */
|
||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
|
||||
.highlight .ch { color: #888888 } /* Comment.Hashbang */
|
||||
.highlight .cm { color: #888888 } /* Comment.Multiline */
|
||||
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
|
||||
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
|
||||
.highlight .c1 { color: #888888 } /* Comment.Single */
|
||||
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #333333 } /* Generic.Heading */
|
||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
||||
.highlight .go { color: #888888 } /* Generic.Output */
|
||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #666666 } /* Generic.Subheading */
|
||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
|
||||
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
|
||||
.highlight .na { color: #336699 } /* Name.Attribute */
|
||||
.highlight .nb { color: #003388 } /* Name.Builtin */
|
||||
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
|
||||
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
|
||||
.highlight .nd { color: #555555 } /* Name.Decorator */
|
||||
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
|
||||
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
|
||||
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
|
||||
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
|
||||
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
|
||||
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
|
||||
.highlight .nv { color: #336699 } /* Name.Variable */
|
||||
.highlight .ow { color: #008800 } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
|
||||
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
|
||||
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
|
||||
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
|
||||
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
|
||||
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
|
||||
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
|
||||
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
|
||||
.highlight .vc { color: #336699 } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
|
||||
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
|
||||
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */</style><div class="highlight"><pre><span></span><span class="err">#</span> <span class="n">Copyright</span> <span class="mi">1999</span><span class="p">-</span><span class="mi">2018</span> <span class="n">Gentoo</span> <span class="n">Foundation</span>
|
||||
<span class="err">#</span> <span class="n">Distributed</span> <span class="n">under</span> <span class="n">the</span> <span class="n">terms</span> <span class="n">of</span> <span class="n">the</span> <span class="n">GNU</span> <span class="n">General</span> <span class="n">Public</span> <span class="n">License</span> <span class="n">v2</span>
|
||||
|
||||
<span class="err">#</span> <span class="p">/</span><span class="n">etc</span><span class="p">/</span><span class="n">conf</span><span class="p">.</span><span class="n">d</span><span class="p">/</span><span class="n">homeassistant</span><span class="p">:</span> <span class="n">configuration</span> <span class="k">for</span> <span class="p">/</span><span class="n">etc</span><span class="p">/</span><span class="n">init</span><span class="p">.</span><span class="n">d</span><span class="p">/</span><span class="n">homeassistant</span>
|
||||
|
||||
<span class="err">#</span> <span class="n">Switches</span> <span class="n">to</span> <span class="n">pass</span> <span class="n">to</span> <span class="n">hass</span><span class="p">.</span> <span class="n">See</span> <span class="err">'</span><span class="n">hass</span> <span class="p">--</span><span class="n">help</span><span class="err">'</span> <span class="k">for</span>
|
||||
<span class="err">#</span> <span class="n">a</span> <span class="n">description</span> <span class="n">of</span> <span class="n">the</span> <span class="n">possible</span> <span class="n">switches</span><span class="p">.</span>
|
||||
<span class="err">#</span>
|
||||
<span class="n">HASS_OPTS</span><span class="p">=</span><span class="s">""</span>
|
||||
</pre></div>
|
||||
</code></pre></td></tr></table>
|
||||
</div> <!-- class=content -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-offset-2 col-md-7">
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<h3 class="footerhead">Questions or comments?</h3>
|
||||
Please feel free to <a href="https://www.gentoo.org/inside-gentoo/contact/">contact us</a>.
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-2 col-sm-3 col-md-2">
|
||||
<ul class="footerlinks three-icons">
|
||||
<li><a href="https://twitter.com/gentoo" title="@Gentoo on Twitter"><span class="fa fa-twitter fa-fw"></span></a></li>
|
||||
<li><a href="https://plus.google.com/+Gentoo" title="+Gentoo on Google+"><span class="fa fa-google-plus fa-fw"></span></a></li>
|
||||
<li><a href="https://www.facebook.com/gentoo.org" title="Gentoo on Facebook"><span class="fa fa-facebook fa-fw"></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-10 col-sm-9 col-md-10">
|
||||
<strong>© 2001–2018 Gentoo Foundation, Inc.</strong><br>
|
||||
<small>
|
||||
Gentoo is a trademark of the Gentoo Foundation, Inc.
|
||||
The contents of this document, unless otherwise expressly stated, are licensed under the
|
||||
<a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="license">CC-BY-SA-3.0</a> license.
|
||||
The <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="https://assets.gentoo.org/tyrian/jquery.min.js"></script>
|
||||
<script src="https://assets.gentoo.org/tyrian/bootstrap.min.js"></script>
|
||||
</div> <!-- id=cgit -->
|
||||
</body>
|
||||
</html>
|
35
app-misc/homeassistant-bin/files/homeassistant.init.d
Normal file
35
app-misc/homeassistant-bin/files/homeassistant.init.d
Normal file
@ -0,0 +1,35 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Open-source home automation platform"
|
||||
|
||||
user="homeassistant:homeassistant"
|
||||
|
||||
stdoutlog="/var/log/homeassistant/stdout.log"
|
||||
serverlog="/var/log/homeassistant/server.log"
|
||||
warningslog="/var/log/homeassistant/warnings.log"
|
||||
|
||||
start_stop_daemon_args="--user $user --stdout $stdoutlog --stderr $serverlog --retry 10"
|
||||
|
||||
command="/opt/homeassistant/bin/hass"
|
||||
command_args="
|
||||
--config /etc/homeassistant
|
||||
--log-file $warningslog
|
||||
--log-rotate-days 9
|
||||
${HASS_OPTS}
|
||||
"
|
||||
|
||||
command_background=yes
|
||||
pidfile=/run/homeassistant.pid
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after bootmisc
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --file --owner $user --mode 0644 $stdoutlog
|
||||
checkpath --file --owner $user --mode 0644 $serverlog
|
||||
checkpath --file --owner $user --mode 0644 $warningslog
|
||||
}
|
13
app-misc/homeassistant-bin/files/homeassistant.logrotate
Normal file
13
app-misc/homeassistant-bin/files/homeassistant.logrotate
Normal file
@ -0,0 +1,13 @@
|
||||
# logrotate script for homeassistant
|
||||
|
||||
/var/log/homeassistant/stdout.log /var/log/homeassistant/server.log {
|
||||
daily
|
||||
missingok
|
||||
copytruncate
|
||||
rotate 9
|
||||
compress
|
||||
notifempty
|
||||
su root root
|
||||
olddir /var/log/homeassistant/old
|
||||
}
|
||||
|
12
app-misc/homeassistant-bin/files/homeassistant.service
Normal file
12
app-misc/homeassistant-bin/files/homeassistant.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Home Assistant
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=homeassistant
|
||||
ExecStart=/opt/homeassistant/bin/hass --log-file /var/log/homeassistant/homeassistant.log --config /etc/homeassistant
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
4
app-misc/homeassistant-bin/files/recorder.yaml
Normal file
4
app-misc/homeassistant-bin/files/recorder.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
recorder:
|
||||
purge_interval: 2
|
||||
purge_keep_days: 10
|
||||
db_url: sqlite:///var/db/homeassistant/home-assistant_v2.db
|
48
app-misc/homeassistant-bin/files/update-homeassistant
Normal file
48
app-misc/homeassistant-bin/files/update-homeassistant
Normal file
@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script will:
|
||||
# 1. stop homeassistant if it is running (wait/kill it if it fails to stop)
|
||||
# 2. backs up /opt/homeassistant (moves it to: /opt/homeassistant-OLD_VERSION)
|
||||
# 3. merges the new version of homeassistant
|
||||
# 4. re-starts homeassistant if the merge was successful
|
||||
|
||||
prog="homeassistant"
|
||||
atom="app-misc/${prog}-bin"
|
||||
|
||||
if /etc/init.d/${prog} --ifstarted stop ; then
|
||||
echo "${prog} stopped"
|
||||
else
|
||||
echo "failed to stop, sleeping/killing: ${prog}"
|
||||
sleep 10
|
||||
pkill -9 -f "/opt/${prog}/bin/python3"
|
||||
/etc/init.d/${prog} zap
|
||||
fi
|
||||
|
||||
installed_version()
|
||||
{
|
||||
equery --no-color list -F '$fullversion' "${atom}" | tail -1
|
||||
}
|
||||
|
||||
version=$(installed_version)
|
||||
|
||||
if [ -d "/opt/${prog}" ] ; then
|
||||
if [ ! -d "/opt/${prog}-v${version}" ] ; then
|
||||
echo "backing up previous version as v${version}"
|
||||
echo "rollback by: mv /opt/${prog}-v${version} /opt/${prog}"
|
||||
mv "/opt/${prog}" "/opt/${prog}-v${version}"
|
||||
else
|
||||
echo "Previous backup found - (re-)move it manually and run the script again"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if emerge -v1 "${atom}" ; then
|
||||
echo "${atom} $(installed_version) merge successful"
|
||||
/etc/init.d/${prog} --ifstopped start
|
||||
echo "now check the logs in /var/log/${prog}; e.g."
|
||||
echo " tail -f /var/log/${prog}/server.log"
|
||||
exit 0
|
||||
else
|
||||
echo "${atom} merge failed"
|
||||
exit 1
|
||||
fi
|
113
app-misc/homeassistant-bin/homeassistant-bin-0.76.0.ebuild
Normal file
113
app-misc/homeassistant-bin/homeassistant-bin-0.76.0.ebuild
Normal file
@ -0,0 +1,113 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PYTHON_COMPAT=( python3_5 python3_6 )
|
||||
|
||||
inherit user readme.gentoo-r1 eutils distutils-r1 systemd
|
||||
|
||||
MY_PN="${PN/-bin/}"
|
||||
|
||||
DESCRIPTION="Home automation platform (Python 3 required)"
|
||||
HOMEPAGE="https://home-assistant.io"
|
||||
SRC_URI="" # pip installs HA version $PV from PyPI
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="maint"
|
||||
|
||||
DEPEND="
|
||||
${PYTHON_DEPS}
|
||||
!app-misc/homeassistant
|
||||
>=dev-lang/python-3.5.4
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
dev-python/virtualenv[${PYTHON_USEDEP}]
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
app-admin/logrotate
|
||||
maint? (
|
||||
app-crypt/certbot
|
||||
app-crypt/ssl-cert-check
|
||||
net-misc/dropbox-uploader
|
||||
virtual/logger
|
||||
)
|
||||
"
|
||||
|
||||
INSTALL_DIR="/opt/${MY_PN}"
|
||||
|
||||
DISABLE_AUTOFORMATTING=1
|
||||
DOC_CONTENTS="
|
||||
The HA interface listens on port 8123 - this _will_ take a minute or two to appear
|
||||
|
||||
hass configuration is in: /etc/${MY_PN}
|
||||
For openrc daemon command line arguments are configured in: /etc/conf.d/${MY_PN}
|
||||
|
||||
logging is to: /var/log/${MY_PN}/{server,errors,stdout}.log
|
||||
|
||||
The sqlite db is by default in: /etc/${MY_PN}
|
||||
To move it after ${MY_PN} has run once and while ${MY_PN} is stopped:
|
||||
- add /etc/${MY_PN}/recorder.yaml to /etc/${MY_PN}/configuration.yaml
|
||||
- mv /etc/${MY_PN}/home-assistant_v2.db /var/db/${MY_PN}
|
||||
|
||||
support thread at:
|
||||
https://community.home-assistant.io/t/gentoo-homeassistant-0-59-2-ebuild/35577
|
||||
|
||||
The script /usr/bin/update-homeassistant can be used to update homeassistant-bin (it keeps
|
||||
a backup of the previous virtualenv under /opt). The script is for openrc only at the moment.
|
||||
"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup "${MY_PN}"
|
||||
enewuser "${MY_PN}" -1 -1 "$INSTALL_DIR" "${MY_PN}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
true
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin "${FILESDIR}/update-homeassistant"
|
||||
|
||||
keepdir "$INSTALL_DIR"
|
||||
|
||||
keepdir "/etc/${MY_PN}"
|
||||
insinto "/etc/${MY_PN}"
|
||||
doins "${FILESDIR}/recorder.yaml"
|
||||
fowners -R "${MY_PN}:${MY_PN}" "/etc/${MY_PN}"
|
||||
|
||||
python3.5 -m venv "${D}/$INSTALL_DIR"
|
||||
# for no output from pip add: --quiet
|
||||
# note the venv has a python3, but no python3.5
|
||||
VIRTUAL_ENV="$INSTALL_DIR" "${D}/$INSTALL_DIR/bin/python3" -m pip --no-cache-dir install "${MY_PN}==${PV}"
|
||||
sed -i "1c#!$INSTALL_DIR/bin/python3" "${D}/$INSTALL_DIR/bin/hass"
|
||||
fowners -R "${MY_PN}:${MY_PN}" "$INSTALL_DIR"
|
||||
|
||||
newconfd "${FILESDIR}/${MY_PN}.conf.d" "${MY_PN}"
|
||||