diff options
5 files changed, 843 insertions, 9 deletions
diff --git a/net-misc/unifi-controller-bin/Manifest b/net-misc/unifi-controller-bin/Manifest index 06acec02..55c5db3f 100644 --- a/net-misc/unifi-controller-bin/Manifest +++ b/net-misc/unifi-controller-bin/Manifest @@ -17,8 +17,17 @@ DIST unifi-5.6.30_api.sh 5167 BLAKE2B bbfaad98431003e2c7dbbb119f3df52f6c3b9f0a86 DIST unifi-5.6.30_sysvinit_all.deb 50209900 BLAKE2B 1a2f252de8d41c196a67c3ac7847ad4437a048fc722d31de99478adc2b7df3897ccf74427a89ae2681fb7d4fed298417364cc969b197feb1ae4fa5eb6242aa29 SHA512 a0446789d0f37e45cdc941df7b15c91f2731ad3d02db24e8bb415becccb3d79b870425371788d1eb481c7187fc1d3dd981c55f0c62791dcc20b6896f0dbc37cf DIST unifi-5.6.37_api.sh 5167 BLAKE2B bbfaad98431003e2c7dbbb119f3df52f6c3b9f0a866f098d85e652660d7e33944044973c54cf554c25544025bedf5c120e4cb1b9d3dea78a5beae96a9ba7e1a0 SHA512 e8b250e6c363fcda8f5550fb7d3f6d352fa0af458a0d0907177835f6236c37374336e877687644abb1f018fae4a33efa411b286bf1a39488966253b3b4a06600 DIST unifi-5.6.37_sysvinit_all.deb 50275940 BLAKE2B 3cfa54199f1c6a6b2cca292b5f09376a2e5cd8128b384bef117f1130b320d3c7944c13add48428bcb555ec830b97e784437715444b46e9a0fa2a8adf8933e281 SHA512 10e7f4447bb23dd7a513cfb6b9218e3eee16d8a33091f3a3893264c333427a0169f2683b1b77b54fe7719feba0ab1ea23e20c953a55b9e1516c700bbbc1d514e +DIST unifi-5.6.39-7b9a227a14_api.sh 5167 BLAKE2B bbfaad98431003e2c7dbbb119f3df52f6c3b9f0a866f098d85e652660d7e33944044973c54cf554c25544025bedf5c120e4cb1b9d3dea78a5beae96a9ba7e1a0 SHA512 e8b250e6c363fcda8f5550fb7d3f6d352fa0af458a0d0907177835f6236c37374336e877687644abb1f018fae4a33efa411b286bf1a39488966253b3b4a06600 +DIST unifi-5.6.39-7b9a227a14_changelog.txt 174637 BLAKE2B 5b1d7a296145907e1f5ee16bc1442ef7154c25471d49b3ef76baf12c2cc1d68aa2dc307ec763a195b47f407801380830345dbde43d23f54364120f51d802406c SHA512 6b40af259585d3e6fa6ed18efdc7ca2eee2271f71daff5afda2bc216340f1d218ebef35e5a9b8485d2761ca9bf0d6fa6a4361f51ffe5f5a26760ee433a16194d +DIST unifi-5.6.39-7b9a227a14_sysvinit_all.deb 50273730 BLAKE2B eab5a66409a9a97122156291e82241be1eeb869ebc35e298fb4f9977036ab86f4751f647166fe2b2a8f256031d533fc38c9a73fd9c87e52a465b97fd532a1fad SHA512 99463ff746113f687ea0af0e910f295ace242ab221ac851ff370f5fdce655c3835acec99a04dc1cec217ce31d4a5e84d057d7b29ebb08e385562ac8b90401e5d DIST unifi-5.7.23_api.sh 5167 BLAKE2B bbfaad98431003e2c7dbbb119f3df52f6c3b9f0a866f098d85e652660d7e33944044973c54cf554c25544025bedf5c120e4cb1b9d3dea78a5beae96a9ba7e1a0 SHA512 e8b250e6c363fcda8f5550fb7d3f6d352fa0af458a0d0907177835f6236c37374336e877687644abb1f018fae4a33efa411b286bf1a39488966253b3b4a06600 DIST unifi-5.7.23_sysvinit_all.deb 64571866 BLAKE2B 195350f722bdbd11c7df98f970b134abd89825aa910abc76b84eff2cbdfb977db2edcb0318b00aef9e86c930f747745d33a96cf55bd9ea9b1ca243168fbbdfe0 SHA512 ba34ccdc2fbd34317a651a9374ac91f692ca2c3a013600cd5081e9665e10b082e6b0404e380ab13305854aaebfb7f0d5ddbf137f6c79a93023814076e0901043 +DIST unifi-5.7.28-5c442c6b54_api.sh 5167 BLAKE2B bbfaad98431003e2c7dbbb119f3df52f6c3b9f0a866f098d85e652660d7e33944044973c54cf554c25544025bedf5c120e4cb1b9d3dea78a5beae96a9ba7e1a0 SHA512 e8b250e6c363fcda8f5550fb7d3f6d352fa0af458a0d0907177835f6236c37374336e877687644abb1f018fae4a33efa411b286bf1a39488966253b3b4a06600 +DIST unifi-5.7.28-5c442c6b54_changelog.txt 192825 BLAKE2B acfedd66d027ef1e22bf12cf29acbb66c924ff50010ef6361ee1e85f9bee998e236cd93046978dbce06762b0fccb1e62e74688afc5f40d370d1b2fb17888fe5e SHA512 f70be97ff823a078f202aa094904d041bd567901ada24081f0a05f30e5bd5d8ce0d21bcb8a49164ebb3f6e62208b18372ea3de9e9a8a8ad9db44445473f776c6 +DIST unifi-5.7.28-5c442c6b54_sysvinit_all.deb 66290008 BLAKE2B 23686ea4b89cb78a3500ae7497505b329cab290eef1d77694db704758aaf899b484448765ae66ea12ad05c6027df1f5385205aa8cc1d296548f19e78bb798c61 SHA512 036022fdf37e35af115e7e1d93255be44970e0f88d7d0dd472e6f1a40cb83a8949192fbc012468370f2035043424234423adddb93a7cc1096611699027e76420 +DIST unifi-5.8.21-2a76eef78d_api.sh 5167 BLAKE2B bbfaad98431003e2c7dbbb119f3df52f6c3b9f0a866f098d85e652660d7e33944044973c54cf554c25544025bedf5c120e4cb1b9d3dea78a5beae96a9ba7e1a0 SHA512 e8b250e6c363fcda8f5550fb7d3f6d352fa0af458a0d0907177835f6236c37374336e877687644abb1f018fae4a33efa411b286bf1a39488966253b3b4a06600 +DIST unifi-5.8.21-2a76eef78d_changelog.txt 206756 BLAKE2B 901ccd1c2f89d4fd789c0c07cc163650ea9060d8e5edd0e7090f2ca95cb36404bdfa3cb10ef23e263451fbca76c6697e343b7ee28fa08353aa8beeccc5b1320f SHA512 8fde9dfee7e3c0afc4d6c095e9b3cc67b47b983af0260c19f6bab6b8d2ced09d4acfb213349f2a696e72bdd5c4331e872423d27a61804050a5409df318140880 +DIST unifi-5.8.21-2a76eef78d_sysvinit_all.deb 66789360 BLAKE2B fec3327a492aad31443b1a3c95eac6987c5225b6689a0f25c5d0d714f0dbf1943cb48b04767d8ec8b3ffbf76db1c645dcfc2464968236e0b816f11531226b6b3 SHA512 ca1ea360b9eb420983cb19065d7cde601919cb595dbead744f05c5d7b964cf4e2367abb8a6db3a07a4d26a24c85291f6938490308b1be471cb16669eba924402 EBUILD unifi-controller-bin-5.5.24.ebuild 6995 BLAKE2B 1a0bd574d3563340d362819e46c7cff7ed071d13d2120eef7f29db7cc77340c336727653521183357bb0802279dc5c557b7b25cc5fee13d42040eb4dd4c71475 SHA512 9dca6b2ec2613d3055e4aed7467cd018c6bc22fe301481d83d3ae90377bc549234029f0c78c2e3295e7273bedd345f9a1934d8591c014d94ea0609bf0333bbab EBUILD unifi-controller-bin-5.6.19.ebuild 7691 BLAKE2B 9bf124fa6457d83b6fc1a59e263cf657875326eaf0760354c7dbe97d40f5a91e8c8396d4d526444bc7c3c955ef19c6b385663a26cdb58a403108a28a91dc8a42 SHA512 30ad29fce7077b8ce552d844a0e8add8d8eb33f1a19b2de91843aec9c438aad1ac372e756cc99a6e85a9d93d03722565e19db008f6efdf55aad670c6bc9195df EBUILD unifi-controller-bin-5.6.20.ebuild 7691 BLAKE2B 9bf124fa6457d83b6fc1a59e263cf657875326eaf0760354c7dbe97d40f5a91e8c8396d4d526444bc7c3c955ef19c6b385663a26cdb58a403108a28a91dc8a42 SHA512 30ad29fce7077b8ce552d844a0e8add8d8eb33f1a19b2de91843aec9c438aad1ac372e756cc99a6e85a9d93d03722565e19db008f6efdf55aad670c6bc9195df @@ -27,4 +36,7 @@ EBUILD unifi-controller-bin-5.6.26.ebuild 7691 BLAKE2B 9bf124fa6457d83b6fc1a59e2 EBUILD unifi-controller-bin-5.6.29.ebuild 7691 BLAKE2B 9bf124fa6457d83b6fc1a59e263cf657875326eaf0760354c7dbe97d40f5a91e8c8396d4d526444bc7c3c955ef19c6b385663a26cdb58a403108a28a91dc8a42 SHA512 30ad29fce7077b8ce552d844a0e8add8d8eb33f1a19b2de91843aec9c438aad1ac372e756cc99a6e85a9d93d03722565e19db008f6efdf55aad670c6bc9195df EBUILD unifi-controller-bin-5.6.30.ebuild 7691 BLAKE2B 9bf124fa6457d83b6fc1a59e263cf657875326eaf0760354c7dbe97d40f5a91e8c8396d4d526444bc7c3c955ef19c6b385663a26cdb58a403108a28a91dc8a42 SHA512 30ad29fce7077b8ce552d844a0e8add8d8eb33f1a19b2de91843aec9c438aad1ac372e756cc99a6e85a9d93d03722565e19db008f6efdf55aad670c6bc9195df EBUILD unifi-controller-bin-5.6.37.ebuild 7691 BLAKE2B 9bf124fa6457d83b6fc1a59e263cf657875326eaf0760354c7dbe97d40f5a91e8c8396d4d526444bc7c3c955ef19c6b385663a26cdb58a403108a28a91dc8a42 SHA512 30ad29fce7077b8ce552d844a0e8add8d8eb33f1a19b2de91843aec9c438aad1ac372e756cc99a6e85a9d93d03722565e19db008f6efdf55aad670c6bc9195df -EBUILD unifi-controller-bin-5.7.23.ebuild 8085 BLAKE2B 6a11f6f72e604eaaa7b626c5aaea98120461de0fa12b08d83045fee42598ffee61b2612a99f5cbd737c91bd89a4426cd6cb003dfb22aba235574c5fa49dee04a SHA512 a2f8ae5de8b720fe47e687197a2b11028f55477ce8a2c234c4fcdbbdac02674e3b06b2f8bd5ba43225cb414e76ba6eccbc7cb20b4a611d205670ccfb13fdeb49 +EBUILD unifi-controller-bin-5.6.39_rc.ebuild 8521 BLAKE2B 9a6a7cd0698f99181bd5751f2ce90e74454c79660593db82cb04e7a83f23862b090d230541f92c35a6870f277f439a32bd8dbdadfae6f0e080843dba1220a2db SHA512 4002eddd921b0d73b34cafd9898770ce31d5bbb0028b5374240075c7625decf8b811b579b1eecf588f6f08a1bf17ac452def15a570da8cf53c6b5bc1a7baf2a8 +EBUILD unifi-controller-bin-5.7.23.ebuild 8541 BLAKE2B ba4d0b66c20e23b5840317f6e8b44591dee58d527e43cc041f9a2d2c4616f98118953ce05e9d08e9f777e5d047508284d57c91674e451307dc76da4cc28e60c0 SHA512 fd1a5d0ef3a9765d7f641a841889bfd3a7f9933e4425388d94f0c1eae735fb3d1c7032779cbca8edbb9f208abf41b77b491413fd78a85d04d825997e73ba05cb +EBUILD unifi-controller-bin-5.7.28_rc.ebuild 8860 BLAKE2B 87deb99d532e3bac79ad8a6df26a9a09b0d83722346f934c552e57993c314826dc4b0ce2342bde7d3e9fea45d1cdda2947218ae2dd762a6d66298caf2753dde7 SHA512 f3f9630f6ab203a7c181f6d7036d5389f47b6e4d2357374a3b1f192736908d3dcab5299ef3de93e30c652d4883e19346959f041c1d52bd2581a0f23a5c90649f +EBUILD unifi-controller-bin-5.8.21_rc.ebuild 8973 BLAKE2B 8696c69d64586de2687f420a9581936cba371293a59b573852c8dae0fa7dabd6abf62ef02dba36dbe265b078454d360e650973b28688d126bbb18dd8006cf3ce SHA512 93ead936857928d1fdbb7c4953672c45318c34bdf6a47e490b5c56716b2bf186101cc7fb53e0b4ce018c90eb9c1ff369938c64cee94999aab0ffbc7885c2b5ee diff --git a/net-misc/unifi-controller-bin/unifi-controller-bin-5.6.39_rc.ebuild b/net-misc/unifi-controller-bin/unifi-controller-bin-5.6.39_rc.ebuild new file mode 100644 index 00000000..54d073a1 --- /dev/null +++ b/net-misc/unifi-controller-bin/unifi-controller-bin-5.6.39_rc.ebuild @@ -0,0 +1,267 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +CHECKREQS_DISK_VAR="500M" + +inherit check-reqs unpacker user + +MY_HASH="7b9a227a14" +MY_DOC="317/2" + +MY_P="${P/-bin}" +MY_PN="${PN/-bin}" +MY_PV="${PV/_rc}${MY_HASH:+-${MY_HASH}}" + +DESCRIPTION="Ubiquiti UniFi Controller" +HOMEPAGE="https://www.ubnt.com/download/unifi/" +SRC_URI=" + http://dl.ubnt.com/unifi/${MY_PV}/unifi_sysvinit_all.deb -> unifi-${MY_PV}_sysvinit_all.deb + doc? ( + https://community.ubnt.com/ubnt/attachments/ubnt/Blog_UniFi/${MY_DOC}/UniFi-changelog-5.6.x.txt -> unifi-${MY_PV}_changelog.txt + ) + tools? ( + https://dl.ubnt.com/unifi/${MY_PV}/unifi_sh_api -> unifi-${MY_PV}_api.sh + )" +RESTRICT="mirror" + +LICENSE="GPL-3 UBNT-20170717" +SLOT="0" +KEYWORDS="~aarch64 ~amd64 ~arm ~x86" +IUSE="doc nls rpi1 systemd +tools" +UNIFI_LINGUAS=( ca cs da de_DE el en es_ES nl pl pt_PT ru sv tr zh_CN ) +IUSE+=" ${UNIFI_LINGUAS[@]/#/linguas_}" + +# debian control dependencies: +# binutils +# coreutils +# jsvc +# mongodb-server (>=2.4.10) | mongodb-10gen (>=2.4.14) | mongodb-org-server (>=2.6.0) +# openjdk-7-jre-headless | java8-runtime-headless + +# The version of mongodb bundled with the Mac edition is v2.4.14 at the moment, +# but currently the oldest ebuild (and only v2.x) is v2.6.12. The default +# version is currently v3.0.14 - but this crashes with the UniFi code, possibly +# documented in https://jira.mongodb.org/browse/SERVER-22334. +# As a result, we'll only accept the oldest or newer versions as dependencies. +# Ubiquiti recommend the use of MongoDB 3.4.x. +DEPEND=" + || ( + ~dev-db/mongodb-2.6.12 + >=dev-db/mongodb-3.2 + ) + <dev-db/mongodb-3.6 + >=virtual/jre-1.7.0 + <virtual/jre-1.9.0 +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +QA_PREBUILT="opt/${MY_P}/lib/native/*/*/libubnt_webrtc_jni.so" + +pkg_setup () { + # unifi controller uses mongodb as a data-store, and mongo immediately + # requires >3GB of space on creation of a new store, if journaling is + # enabled. By default, UniFi disables mongo's journal - but if you + # override this option then bear in mind that you'll need an additional + # 3GB(!) of space on your /var partition, or you'll need to relocate + # /var/lib/unifi to a larger drive. + # 500M is the bare minimum required for a single AP and a handful of + # clients - the likelihood is that (much?) more space will be required + # in time... + check-reqs_pkg_setup + + enewgroup unifi + enewuser unifi -1 -1 /var/lib/unifi unifi +} + +src_unpack () { + local file + for file in ${A}; do + if [[ "${file}" == *.jar ]]; then + cp -r "${DISTDIR}"/"${file}" "${S}"/ + elif [[ "${file}" == *.deb ]]; then + unpack_deb "${file}" || die + else + cp "${DISTDIR}"/"${file}" "${WORKDIR}"/ + fi + done + cd "${S}" + + if [[ "${ARCH}" == "aarch64" ]]; then + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + elif [[ "${ARCH}" == "arm" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + use rpi1 && rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + elif [[ "${ARCH}" == "amd64" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + else # [[ "${ARCH}" == "x86" ]] + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + fi + rmdir -p \ + usr/lib/unifi/lib/native/Linux/aarch64 \ + usr/lib/unifi/lib/native/Linux/armv7 \ + usr/lib/unifi/lib/native/Linux/x86_64 \ + 2>/dev/null + + rm -r usr/lib/unifi/lib/native/Windows + if [[ ${CHOST} == *-darwin* ]] ; then + rm -r usr/lib/unifi/lib/native/Linux + else + rm -r usr/lib/unifi/lib/native/Mac + fi + rmdir usr/lib/unifi/lib/native 2>/dev/null + + rm -r usr/lib/unifi/{bin,conf} +} + +src_prepare () { + local lingua='' + + default + + if use nls && (( ${#UNIFI_LINGUAS[@]} )); then + for lingua in ${UNIFI_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r usr/lib/unifi/webapps/ROOT/app-unifi/locales/"${lingua}" || die + fi + done + fi + + echo "CONFIG_PROTECT=\"${EPREFIX%/}/var/lib/unifi/data\"" > "${T}/90${MY_PN}" +} + +src_install () { + local d + for d in conf data db logs run; do # Do we still need conf & db? + if [[ -d usr/lib/unifi/${d} ]]; then + rmdir usr/lib/unifi/${d} || die "Cannot remove directory 'unifi/${d}': ${?}" + fi + done + + insinto /opt/"${MY_P}" + doins -r usr/lib/unifi/* || die "Installation failed" + + keepdir /var/lib/unifi/backup + keepdir /var/lib/unifi/conf # ? + keepdir /var/lib/unifi/data + keepdir /var/lib/unifi/db # ? + keepdir /var/lib/unifi/webapp/work + keepdir /var/log/unifi + + mkdir -p "${ED%/}"/var/run/unifi # Try to keep QA checker happy - this is created by the init script + + dosym /var/lib/unifi/backup /opt/"${MY_P}"/backup + dosym /var/lib/unifi/conf /opt/"${MY_P}"/conf + dosym /var/lib/unifi/data /opt/"${MY_P}"/data + dosym /var/lib/unifi/db /opt/"${MY_P}"/db + dosym /var/lib/unifi/webapp/work /opt/"${MY_P}"/work + dosym /var/log/unifi /opt/"${MY_P}"/logs + dosym /var/run/unifi /opt/"${MY_P}"/run + + # <sigh> + dodir /opt/"${MY_P}"/bin + dosym /usr/bin/mongod /opt/"${MY_P}"/bin/mongod + + if use tools; then + insinto /opt/"${MY_P}"/bin + newins "${WORKDIR}"/unifi-${MY_PV}_api.sh unifi-api.sh + fperms 755 /opt/"${MY_P}"/bin/unifi-api.sh + fi + + use doc && newdoc "unifi-${MY_PV}_changelog.txt" CHANGELOG-5.6.txt + + insinto /var/lib/unifi/data + doins "${FILESDIR}"/system.properties + + fowners -R unifi:unifi \ + /var/lib/unifi \ + /var/log/unifi + + newinitd "${FILESDIR}"/unifi.initd unifi || + die "Could not create init script" + newconfd "${FILESDIR}"/unifi.confd unifi || + die "Could not create conf file" + sed -i -e "s|%INST_DIR%|/opt/${MY_P}|g" \ + "${ED%/}"/etc/{init,conf}.d/unifi \ + || die "Could not customise init scripts" + + doenvd "${T}/90${MY_PN}" || die "Could not configure environment" + + if use systemd; then + sed -i -e "s|/usr/lib/unifi|${ED%/}/opt/${MY_P}|" \ + lib/systemd/system/unifi.service \ + || die "Could not customise systemd unit file" + systemd_dounit lib/systemd/system/unifi.service + fi + + rmdir -p "${ED%/}"/var/run/unifi 2>/dev/null # Try to keep QA checker happy - this is created by the init script +} + +pkg_postinst() { + elog "By default, ${MY_P} uses the following ports:" + elog + elog " Web Interface: 8080" + elog " API: 8443" + elog " Portal HTTP redirect: 8880" + elog " Portal HTTPS redirect: 8843" + elog " STUN: 3478" + elog + elog "... and will attempt to connect to mongodb on localhost:27117" + elog + elog "Additionally, ports 8881 and 8882 are reserved, and 6789 is used" + elog "for determining throughput." + elog + elog "All of these ports may be customised by editing" + elog + elog " /opt/${MY_P}/data/system.properties" + elog + elog "... but please note that the file will be re-written on each" + elog "startup/shutdown, and any changes to the comments will be lost." + elog + elog "These settings cannot be passed as '-D' parameters to Java," + elog "${MY_P} only uses values from the properties file." + elog + elog "If the Web Interface/Inform port is changed from the default of" + elog "8080, then all managed devices must be updated via debug console" + elog "with the command:" + elog + elog " set-inform http://<controller IP>:<new port>/inform" + elog + elog "... before they will be able to reconnect." + + if has_version '>=dev-java/oracle-jdk-bin-1.8.0.151' && has_version '<dev-java/oracle-jdk-bin-1.8.0.162'; then + elog + ewarn "Oracle Java SDK releases 1.8.0r151 to 1.8.0r161 prevent the" + ewarn "UniFi Guest Portal from operating correctly - please upgrade" + ewarn "or downgrade your Java installation to avoid this issue" + fi + + elog + ewarn "From ${PN}-5.6.20, the default behaviour is to immediately" + ewarn "attempt to allocate 1GB of memory on startup. If running on a" + ewarn "memory-constrained system, please edit:" + ewarn + ewarn " /opt/${MY_P}/data/system.properties" + ewarn + ewarn "... in order to set appropriate Java XMS and XMX (minimum and" + ewarn "maximum memory constraints) values" +} + +pkg_prerm() { + local link + + # Clean-up any remaining symlinks, which would otherwise be protected and + # not removed... + if [[ -z "${REPLACED_BY_VERSION:-}" || "${REPLACED_BY_VERSION}" != "${PVR}" ]]; then + for link in data logs run work; do + [[ -L "${EPREFIX%/}"/opt/"${MY_P}"/${link} ]] && + rm "${EPREFIX%/}"/opt/"${MY_P}"/${link} + done + fi +} diff --git a/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.23.ebuild b/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.23.ebuild index fe6b6cbb..80afe643 100644 --- a/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.23.ebuild +++ b/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.23.ebuild @@ -24,7 +24,7 @@ LICENSE="GPL-3 UBNT-20170717" SLOT="0" KEYWORDS="amd64 arm x86" IUSE="nls rpi1 systemd +tools" -UNIFI_LINGUAS=( ca cs da de_DE el en es_ES nl pl pt_PT sv tr zh_CN ) +UNIFI_LINGUAS=( ca cs da de_DE el en es_ES nl pl pt_PT ru sv tr zh_CN ) IUSE+=" ${UNIFI_LINGUAS[@]/#/linguas_}" # debian control dependencies: @@ -82,16 +82,26 @@ src_unpack () { done cd "${S}" - if [[ "${ARCH}" == "arm" ]]; then + if [[ "${ARCH}" == "aarch64" ]]; then + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + elif [[ "${ARCH}" == "arm" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + use rpi1 && rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so - use rpi1 && rm usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so elif [[ "${ARCH}" == "amd64" ]]; then - rm usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so else # [[ "${ARCH}" == "x86" ]] + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so - rm usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so fi - rmdir -p usr/lib/unifi/lib/native/Linux/x86_64 usr/lib/unifi/lib/native/Linux/armhf 2>/dev/null + rmdir -p \ + usr/lib/unifi/lib/native/Linux/aarch64 \ + usr/lib/unifi/lib/native/Linux/armv7 \ + usr/lib/unifi/lib/native/Linux/x86_64 \ + 2>/dev/null rm -r usr/lib/unifi/lib/native/Windows if [[ ${CHOST} == *-darwin* ]] ; then @@ -105,10 +115,11 @@ src_unpack () { } src_prepare () { + local lingua='' + default - if use nls; then - local lingua='' + if use nls && (( ${#UNIFI_LINGUAS[@]} )); then for lingua in ${UNIFI_LINGUAS[@]}; do if ! use linguas_${lingua}; then rm -r usr/lib/unifi/webapps/ROOT/app-unifi/locales/"${lingua}" || die diff --git a/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.28_rc.ebuild b/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.28_rc.ebuild new file mode 100644 index 00000000..322d7f74 --- /dev/null +++ b/net-misc/unifi-controller-bin/unifi-controller-bin-5.7.28_rc.ebuild @@ -0,0 +1,272 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +CHECKREQS_DISK_VAR="500M" + +inherit check-reqs unpacker user + +MY_HASH="5c442c6b54" +MY_DOC="316/2" + +MY_P="${P/-bin}" +MY_PN="${PN/-bin}" +MY_PV="${PV/_rc}${MY_HASH:+-${MY_HASH}}" + +DESCRIPTION="Ubiquiti UniFi Controller" +HOMEPAGE="https://www.ubnt.com/download/unifi/" +SRC_URI=" + http://dl.ubnt.com/unifi/${MY_PV}/unifi_sysvinit_all.deb -> unifi-${MY_PV}_sysvinit_all.deb + doc? ( + https://community.ubnt.com/ubnt/attachments/ubnt/Blog_UniFi/${MY_DOC}/UniFi-changelog-5.7.x.txt -> unifi-${MY_PV}_changelog.txt + ) + tools? ( + https://dl.ubnt.com/unifi/${MY_PV}/unifi_sh_api -> unifi-${MY_PV}_api.sh + )" +RESTRICT="mirror" + +LICENSE="GPL-3 UBNT-20170717" +SLOT="0" +KEYWORDS="~aarch64 ~amd64 ~arm ~x86" +IUSE="doc nls rpi1 systemd +tools" +UNIFI_LINGUAS=( ca cs da de_DE el en es_ES nl pl pt_PT ru sv tr zh_CN ) +IUSE+=" ${UNIFI_LINGUAS[@]/#/linguas_}" + +# debian control dependencies: +# binutils +# coreutils +# jsvc +# mongodb-server (>=2.4.10) | mongodb-10gen (>=2.4.14) | mongodb-org-server (>=2.6.0) +# openjdk-7-jre-headless | java8-runtime-headless + +# The version of mongodb bundled with the Mac edition is v2.4.14 at the moment, +# but currently the oldest ebuild (and only v2.x) is v2.6.12. The default +# version is currently v3.0.14 - but this crashes with the UniFi code, possibly +# documented in https://jira.mongodb.org/browse/SERVER-22334. +# As a result, we'll only accept the oldest or newer versions as dependencies. +# Ubiquiti recommend the use of MongoDB 3.4.x. +DEPEND=" + || ( + ~dev-db/mongodb-2.6.12 + >=dev-db/mongodb-3.2 + ) + <dev-db/mongodb-3.6 + >=virtual/jre-1.8.0 + <virtual/jre-1.9.0 +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +QA_PREBUILT="opt/${MY_P}/lib/native/*/*/libubnt_webrtc_jni.so" + +pkg_setup () { + # unifi controller uses mongodb as a data-store, and mongo immediately + # requires >3GB of space on creation of a new store, if journaling is + # enabled. By default, UniFi disables mongo's journal - but if you + # override this option then bear in mind that you'll need an additional + # 3GB(!) of space on your /var partition, or you'll need to relocate + # /var/lib/unifi to a larger drive. + # 500M is the bare minimum required for a single AP and a handful of + # clients - the likelihood is that (much?) more space will be required + # in time... + check-reqs_pkg_setup + + enewgroup unifi + enewuser unifi -1 -1 /var/lib/unifi unifi +} + +src_unpack () { + local file + for file in ${A}; do + if [[ "${file}" == *.jar ]]; then + cp -r "${DISTDIR}"/"${file}" "${S}"/ + elif [[ "${file}" == *.deb ]]; then + unpack_deb "${file}" || die + else + cp "${DISTDIR}"/"${file}" "${WORKDIR}"/ + fi + done + cd "${S}" + + if [[ "${ARCH}" == "aarch64" ]]; then + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + elif [[ "${ARCH}" == "arm" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + use rpi1 && rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + elif [[ "${ARCH}" == "amd64" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + else # [[ "${ARCH}" == "x86" ]] + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_webrtc_jni.so + fi + rmdir -p \ + usr/lib/unifi/lib/native/Linux/aarch64 \ + usr/lib/unifi/lib/native/Linux/armv7 \ + usr/lib/unifi/lib/native/Linux/x86_64 \ + 2>/dev/null + + rm -r usr/lib/unifi/lib/native/Windows + if [[ ${CHOST} == *-darwin* ]] ; then + rm -r usr/lib/unifi/lib/native/Linux + else + rm -r usr/lib/unifi/lib/native/Mac + fi + rmdir usr/lib/unifi/lib/native 2>/dev/null + + rm -r usr/lib/unifi/{bin,conf} +} + +src_prepare () { + local lingua='' + + default + + if use nls && (( ${#UNIFI_LINGUAS[@]} )); then + for lingua in ${UNIFI_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r usr/lib/unifi/webapps/ROOT/app-unifi/locales/"${lingua}" || die + fi + done + fi + + echo "CONFIG_PROTECT=\"${EPREFIX%/}/var/lib/unifi/data\"" > "${T}/90${MY_PN}" +} + +src_install () { + local d + for d in conf data db logs run; do # Do we still need conf & db? + if [[ -d usr/lib/unifi/${d} ]]; then + rmdir usr/lib/unifi/${d} || die "Cannot remove directory 'unifi/${d}': ${?}" + fi + done + + insinto /opt/"${MY_P}" + doins -r usr/lib/unifi/* || die "Installation failed" + + keepdir /var/lib/unifi/backup + keepdir /var/lib/unifi/conf # ? + keepdir /var/lib/unifi/data + keepdir /var/lib/unifi/db # ? + keepdir /var/lib/unifi/webapp/work + keepdir /var/log/unifi + + mkdir -p "${ED%/}"/var/run/unifi # Try to keep QA checker happy - this is created by the init script + + dosym /var/lib/unifi/backup /opt/"${MY_P}"/backup + dosym /var/lib/unifi/conf /opt/"${MY_P}"/conf + dosym /var/lib/unifi/data /opt/"${MY_P}"/data + dosym /var/lib/unifi/db /opt/"${MY_P}"/db + dosym /var/lib/unifi/webapp/work /opt/"${MY_P}"/work + dosym /var/log/unifi /opt/"${MY_P}"/logs + dosym /var/run/unifi /opt/"${MY_P}"/run + + # <sigh> + dodir /opt/"${MY_P}"/bin + dosym /usr/bin/mongod /opt/"${MY_P}"/bin/mongod + + if use tools; then + insinto /opt/"${MY_P}"/bin + newins "${WORKDIR}"/unifi-${MY_PV}_api.sh unifi-api.sh + fperms 755 /opt/"${MY_P}"/bin/unifi-api.sh + fi + + use doc && newdoc "unifi-${MY_PV}_changelog.txt" CHANGELOG-5.7.txt + + insinto /var/lib/unifi/data + doins "${FILESDIR}"/system.properties + + fowners -R unifi:unifi \ + /var/lib/unifi \ + /var/log/unifi + + newinitd "${FILESDIR}"/unifi.initd unifi || + die "Could not create init script" + newconfd "${FILESDIR}"/unifi.confd unifi || + die "Could not create conf file" + sed -i -e "s|%INST_DIR%|/opt/${MY_P}|g" \ + "${ED%/}"/etc/{init,conf}.d/unifi \ + || die "Could not customise init scripts" + + doenvd "${T}/90${MY_PN}" || die "Could not configure environment" + + if use systemd; then + sed -i -e "s|/usr/lib/unifi|${ED%/}/opt/${MY_P}|" \ + lib/systemd/system/unifi.service \ + || die "Could not customise systemd unit file" + systemd_dounit lib/systemd/system/unifi.service + fi + + rmdir -p "${ED%/}"/var/run/unifi 2>/dev/null # Try to keep QA checker happy - this is created by the init script +} + +pkg_postinst() { + elog "By default, ${MY_P} uses the following ports:" + elog + elog " Web Interface: 8080" + elog " API: 8443" + elog " Portal HTTP redirect: 8880" + elog " Portal HTTPS redirect: 8843" + elog " STUN: 3478" + elog + elog "... and will attempt to connect to mongodb on localhost:27117" + elog + elog "Additionally, ports 8881 and 8882 are reserved, and 6789 is used" + elog "for determining throughput." + elog + elog "All of these ports may be customised by editing" + elog + elog " /opt/${MY_P}/data/system.properties" + elog + elog "... but please note that the file will be re-written on each" + elog "startup/shutdown, and any changes to the comments will be lost." + elog + elog "These settings cannot be passed as '-D' parameters to Java," + elog "${MY_P} only uses values from the properties file." + elog + elog "If the Web Interface/Inform port is changed from the default of" + elog "8080, then all managed devices must be updated via debug console" + elog "with the command:" + elog + elog " set-inform http://<controller IP>:<new port>/inform" + elog + elog "... before they will be able to reconnect." + + if has_version '>=dev-java/oracle-jdk-bin-1.8.0.151' && has_version '<dev-java/oracle-jdk-bin-1.8.0.162'; then + elog + ewarn "Oracle Java SDK releases 1.8.0r151 to 1.8.0r161 prevent the" + ewarn "UniFi Guest Portal from operating correctly - please upgrade" + ewarn "or downgrade your Java installation to avoid this issue" + fi + + elog + ewarn "From ${PN}-5.6.20, the default behaviour is to immediately" + ewarn "attempt to allocate 1GB of memory on startup. If running on a" + ewarn "memory-constrained system, please edit:" + ewarn + ewarn " /opt/${MY_P}/data/system.properties" + ewarn + ewarn "... in order to set appropriate Java XMS and XMX (minimum and" + ewarn "maximum memory constraints) values" + elog + ewarn "UniFi Controller 5.7+ does not support UAP-AC and UAP-AC-Outdoor" + ewarn "models, or the PicoM2:" + ewarn " https://community.ubnt.com/t5/UniFi-Updates-Blog/UAP-AC-UAP-AC-Outdoor-LTS-Announcement/ba-p/2059058" + ewarn " https://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-5-7-23-Stable-has-been-released/ba-p/2318813" +} + +pkg_prerm() { + local link + + # Clean-up any remaining symlinks, which would otherwise be protected and + # not removed... + if [[ -z "${REPLACED_BY_VERSION:-}" || "${REPLACED_BY_VERSION}" != "${PVR}" ]]; then + for link in data logs run work; do + [[ -L "${EPREFIX%/}"/opt/"${MY_P}"/${link} ]] && + rm "${EPREFIX%/}"/opt/"${MY_P}"/${link} + done + fi +} diff --git a/net-misc/unifi-controller-bin/unifi-controller-bin-5.8.21_rc.ebuild b/net-misc/unifi-controller-bin/unifi-controller-bin-5.8.21_rc.ebuild new file mode 100644 index 00000000..7dbcd930 --- /dev/null +++ b/net-misc/unifi-controller-bin/unifi-controller-bin-5.8.21_rc.ebuild @@ -0,0 +1,272 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +CHECKREQS_DISK_VAR="500M" + +inherit check-reqs unpacker user + +MY_HASH="2a76eef78d" +MY_DOC="319/2" + +MY_P="${P/-bin}" +MY_PN="${PN/-bin}" +MY_PV="${PV/_rc}${MY_HASH:+-${MY_HASH}}" + +DESCRIPTION="Ubiquiti UniFi Controller" +HOMEPAGE="https://www.ubnt.com/download/unifi/" +SRC_URI=" + http://dl.ubnt.com/unifi/${MY_PV}/unifi_sysvinit_all.deb -> unifi-${MY_PV}_sysvinit_all.deb + doc? ( + https://community.ubnt.com/ubnt/attachments/ubnt/Blog_UniFi/${MY_DOC}/UniFi-changelog-5.8.x.txt -> unifi-${MY_PV}_changelog.txt + ) + tools? ( + https://dl.ubnt.com/unifi/${MY_PV}/unifi_sh_api -> unifi-${MY_PV}_api.sh + )" +RESTRICT="mirror" + +LICENSE="GPL-3 UBNT-20170717" +SLOT="0" +KEYWORDS="~aarch64 ~amd64 ~arm ~x86" +IUSE="doc nls rpi1 systemd +tools" +UNIFI_LINGUAS=( ca cs da de_DE el en es_ES fr nl pl pt_PT ru sv tr zh_CN ) +IUSE+=" ${UNIFI_LINGUAS[@]/#/linguas_}" + +# debian control dependencies: +# binutils +# coreutils +# jsvc +# mongodb-server (>=2.4.10) | mongodb-10gen (>=2.4.14) | mongodb-org-server (>=2.6.0) +# openjdk-7-jre-headless | java8-runtime-headless + +# The version of mongodb bundled with the Mac edition is v2.4.14 at the moment, +# but currently the oldest ebuild (and only v2.x) is v2.6.12. The default +# version is currently v3.0.14 - but this crashes with the UniFi code, possibly +# documented in https://jira.mongodb.org/browse/SERVER-22334. +# As a result, we'll only accept the oldest or newer versions as dependencies. +# Ubiquiti recommend the use of MongoDB 3.4.x. +DEPEND=" + || ( + ~dev-db/mongodb-2.6.12 + >=dev-db/mongodb-3.2 + ) + <dev-db/mongodb-3.6 + >=virtual/jre-1.8.0 + <virtual/jre-1.9.0 +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +QA_PREBUILT="opt/${MY_P}/lib/native/*/*/libubnt_webrtc_jni.so" + +pkg_setup () { + # unifi controller uses mongodb as a data-store, and mongo immediately + # requires >3GB of space on creation of a new store, if journaling is + # enabled. By default, UniFi disables mongo's journal - but if you + # override this option then bear in mind that you'll need an additional + # 3GB(!) of space on your /var partition, or you'll need to relocate + # /var/lib/unifi to a larger drive. + # 500M is the bare minimum required for a single AP and a handful of + # clients - the likelihood is that (much?) more space will be required + # in time... + check-reqs_pkg_setup + + enewgroup unifi + enewuser unifi -1 -1 /var/lib/unifi unifi +} + +src_unpack () { + local file + for file in ${A}; do + if [[ "${file}" == *.jar ]]; then + cp -r "${DISTDIR}"/"${file}" "${S}"/ + elif [[ "${file}" == *.deb ]]; then + unpack_deb "${file}" || die + else + cp "${DISTDIR}"/"${file}" "${WORKDIR}"/ + fi + done + cd "${S}" + + if [[ "${ARCH}" == "aarch64" ]]; then + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_{webrtc,sdnotify}_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_{webrtc,sdnotify}_jni.so + elif [[ "${ARCH}" == "arm" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_{webrtc,sdnotify}_jni.so + use rpi1 && rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_{webrtc,sdnotify}_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_{webrtc,sdnotify}_jni.so + elif [[ "${ARCH}" == "amd64" ]]; then + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_{webrtc,sdnotify}_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_{webrtc,sdnotify}_jni.so + else # [[ "${ARCH}" == "x86" ]] + rm usr/lib/unifi/lib/native/Linux/aarch64/libubnt_{webrtc,sdnotify}_jni.so + rm usr/lib/unifi/lib/native/Linux/armv7/libubnt_{webrtc,sdnotify}_jni.so + rm usr/lib/unifi/lib/native/Linux/x86_64/libubnt_{webrtc,sdnotify}_jni.so + fi + rmdir -p \ + usr/lib/unifi/lib/native/Linux/aarch64 \ + usr/lib/unifi/lib/native/Linux/armv7 \ + usr/lib/unifi/lib/native/Linux/x86_64 \ + 2>/dev/null + + rm -r usr/lib/unifi/lib/native/Windows + if [[ ${CHOST} == *-darwin* ]] ; then + rm -r usr/lib/unifi/lib/native/Linux + else + rm -r usr/lib/unifi/lib/native/Mac + fi + rmdir usr/lib/unifi/lib/native 2>/dev/null + + rm -r usr/lib/unifi/{bin,conf} +} + +src_prepare () { + local lingua='' + + default + + if use nls && (( ${#UNIFI_LINGUAS[@]} )); then + for lingua in ${UNIFI_LINGUAS[@]}; do + if ! use linguas_${lingua}; then + rm -r usr/lib/unifi/webapps/ROOT/app-unifi/locales/"${lingua}" || die + fi + done + fi + + echo "CONFIG_PROTECT=\"${EPREFIX%/}/var/lib/unifi/data\"" > "${T}/90${MY_PN}" +} + +src_install () { + local d + for d in conf data db logs run; do # Do we still need conf & db? + if [[ -d usr/lib/unifi/${d} ]]; then + rmdir usr/lib/unifi/${d} || die "Cannot remove directory 'unifi/${d}': ${?}" + fi + done + + insinto /opt/"${MY_P}" + doins -r usr/lib/unifi/* || die "Installation failed" + + keepdir /var/lib/unifi/backup + keepdir /var/lib/unifi/conf # ? + keepdir /var/lib/unifi/data + keepdir /var/lib/unifi/db # ? + keepdir /var/lib/unifi/webapp/work + keepdir /var/log/unifi + + mkdir -p "${ED%/}"/var/run/unifi # Try to keep QA checker happy - this is created by the init script + + dosym /var/lib/unifi/backup /opt/"${MY_P}"/backup + dosym /var/lib/unifi/conf /opt/"${MY_P}"/conf + dosym /var/lib/unifi/data /opt/"${MY_P}"/data + dosym /var/lib/unifi/db /opt/"${MY_P}"/db + dosym /var/lib/unifi/webapp/work /opt/"${MY_P}"/work + dosym /var/log/unifi /opt/"${MY_P}"/logs + dosym /var/run/unifi /opt/"${MY_P}"/run + + # <sigh> + dodir /opt/"${MY_P}"/bin + dosym /usr/bin/mongod /opt/"${MY_P}"/bin/mongod + + if use tools; then + insinto /opt/"${MY_P}"/bin + newins "${WORKDIR}"/unifi-${MY_PV}_api.sh unifi-api.sh + fperms 755 /opt/"${MY_P}"/bin/unifi-api.sh + fi + + use doc && newdoc "unifi-${MY_PV}_changelog.txt" CHANGELOG-5.8.txt + + insinto /var/lib/unifi/data + doins "${FILESDIR}"/system.properties + + fowners -R unifi:unifi \ + /var/lib/unifi \ + /var/log/unifi + + newinitd "${FILESDIR}"/unifi.initd unifi || + die "Could not create init script" + newconfd "${FILESDIR}"/unifi.confd unifi || + die "Could not create conf file" + sed -i -e "s|%INST_DIR%|/opt/${MY_P}|g" \ + "${ED%/}"/etc/{init,conf}.d/unifi \ + || die "Could not customise init scripts" + + doenvd "${T}/90${MY_PN}" || die "Could not configure environment" + + if use systemd; then + sed -i -e "s|/usr/lib/unifi|${ED%/}/opt/${MY_P}|" \ + lib/systemd/system/unifi.service \ + || die "Could not customise systemd unit file" + systemd_dounit lib/systemd/system/unifi.service + fi + + rmdir -p "${ED%/}"/var/run/unifi 2>/dev/null # Try to keep QA checker happy - this is created by the init script +} + +pkg_postinst() { + elog "By default, ${MY_P} uses the following ports:" + elog + elog " Web Interface: 8080" + elog " API: 8443" + elog " Portal HTTP redirect: 8880" + elog " Portal HTTPS redirect: 8843" + elog " STUN: 3478" + elog + elog "... and will attempt to connect to mongodb on localhost:27117" + elog + elog "Additionally, ports 8881 and 8882 are reserved, and 6789 is used" + elog "for determining throughput." + elog + elog "All of these ports may be customised by editing" + elog + elog " /opt/${MY_P}/data/system.properties" + elog + elog "... but please note that the file will be re-written on each" + elog "startup/shutdown, and any changes to the comments will be lost." + elog + elog "These settings cannot be passed as '-D' parameters to Java," + elog "${MY_P} only uses values from the properties file." + elog + elog "If the Web Interface/Inform port is changed from the default of" + elog "8080, then all managed devices must be updated via debug console" + elog "with the command:" + elog + elog " set-inform http://<controller IP>:<new port>/inform" + elog + elog "... before they will be able to reconnect." + + if has_version '>=dev-java/oracle-jdk-bin-1.8.0.151' && has_version '<dev-java/oracle-jdk-bin-1.8.0.162'; then + elog + ewarn "Oracle Java SDK releases 1.8.0r151 to 1.8.0r161 prevent the" + ewarn "UniFi Guest Portal from operating correctly - please upgrade" + ewarn "or downgrade your Java installation to avoid this issue" + fi + + elog + ewarn "From ${PN}-5.6.20, the default behaviour is to immediately" + ewarn "attempt to allocate 1GB of memory on startup. If running on a" + ewarn "memory-constrained system, please edit:" + ewarn + ewarn " /opt/${MY_P}/data/system.properties" + ewarn + ewarn "... in order to set appropriate Java XMS and XMX (minimum and" + ewarn "maximum memory constraints) values" + elog + ewarn "UniFi Controller 5.7+ does not support UAP-AC and UAP-AC-Outdoor" + ewarn "models, or the PicoM2:" + ewarn " https://community.ubnt.com/t5/UniFi-Updates-Blog/UAP-AC-UAP-AC-Outdoor-LTS-Announcement/ba-p/2059058" + ewarn " https://community.ubnt.com/t5/UniFi-Updates-Blog/UniFi-5-7-23-Stable-has-been-released/ba-p/2318813" +} + +pkg_prerm() { + local link + + # Clean-up any remaining symlinks, which would otherwise be protected and + # not removed... + if [[ -z "${REPLACED_BY_VERSION:-}" || "${REPLACED_BY_VERSION}" != "${PVR}" ]]; then + for link in data logs run work; do + [[ -L "${EPREFIX%/}"/opt/"${MY_P}"/${link} ]] && + rm "${EPREFIX%/}"/opt/"${MY_P}"/${link} + done + fi +} |