From f3ed97c31d0e7121ec62e9927a4b0d08fa79f29c Mon Sep 17 00:00:00 2001 From: Joerg Deckert Date: Mon, 25 May 2020 08:45:36 +0200 Subject: [PATCH] Commit with ebuilds from https://bugs.gentoo.org/608540 --- README.md | 20 ++- acct-group/guacamole/Manifest | 1 + acct-group/guacamole/guacamole-0.ebuild | 8 ++ acct-user/guacamole/Manifest | 1 + acct-user/guacamole/guacamole-0.ebuild | 13 ++ metadata/layout.conf | 1 + net-misc/guacamole-server/files/guacd | 23 ++++ net-misc/guacamole-server/files/guacd.service | 29 +++++ .../guacamole-server-1.1.0.ebuild | 69 ++++++++++ profiles/repo_name | 1 + unitas-guacamole-overlay.xml | 10 ++ .../files/guacamole.properties | 35 ++++++ .../guacamole-client-1.1.0.ebuild | 119 ++++++++++++++++++ 13 files changed, 328 insertions(+), 2 deletions(-) create mode 100644 acct-group/guacamole/Manifest create mode 100644 acct-group/guacamole/guacamole-0.ebuild create mode 100644 acct-user/guacamole/Manifest create mode 100644 acct-user/guacamole/guacamole-0.ebuild create mode 100644 metadata/layout.conf create mode 100644 net-misc/guacamole-server/files/guacd create mode 100644 net-misc/guacamole-server/files/guacd.service create mode 100644 net-misc/guacamole-server/guacamole-server-1.1.0.ebuild create mode 100644 profiles/repo_name create mode 100644 unitas-guacamole-overlay.xml create mode 100644 www-apps/guacamole-client/files/guacamole.properties create mode 100644 www-apps/guacamole-client/guacamole-client-1.1.0.ebuild diff --git a/README.md b/README.md index af14d41..1ac1de2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,20 @@ -## unitas-guacamole +## Gentoo Overlay unitas-guacamole -Gentoo repository for Apache Guacamole clientless remote desktop gateway +Gentoo repository for the Apache Guacamole clientless remote desktop gateway +Das ist ein Gentoo Portage Overlay der Unitas Network GmbH. +Dieses enthält überwiegend Ebuilds für unsere interne Nutzung, +es wird keinerlei Garantie für die Fehlerfreiheit übernommen. + +Nutzung +------- + +Die Installation erfolgt z.B. mittels: + +``` + # emerge -av layman + # cd /etc/layman/overlays + # wget https://dev.unitas-network.de/raw/Gentoo/unitas-guacamole.git/master/unitas-guacamole-overlay.xml + # layman -L + # layman -a unitas +``` diff --git a/acct-group/guacamole/Manifest b/acct-group/guacamole/Manifest new file mode 100644 index 0000000..3843ac9 --- /dev/null +++ b/acct-group/guacamole/Manifest @@ -0,0 +1 @@ +EBUILD guacamole-0.ebuild 146 BLAKE2B db70c395f3b1bf0874a0fde7fd1d13d107a446e352a134cd29d15a11873f85000643f13cff0dca0c765f35e9ce3543138e4b14bad2a60f56307cca08bc1977e3 SHA512 a22e071a80e0856aad2b2de855e7a4a5019144194ba7b57c90093d3601a9d3f6089b82c5bb9b69fdbefbd1595178b85220153c33a6f5f3b677bc330e592726eb diff --git a/acct-group/guacamole/guacamole-0.ebuild b/acct-group/guacamole/guacamole-0.ebuild new file mode 100644 index 0000000..a4d5d53 --- /dev/null +++ b/acct-group/guacamole/guacamole-0.ebuild @@ -0,0 +1,8 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-group + +ACCT_GROUP_ID=311 diff --git a/acct-user/guacamole/Manifest b/acct-user/guacamole/Manifest new file mode 100644 index 0000000..5ad2fc9 --- /dev/null +++ b/acct-user/guacamole/Manifest @@ -0,0 +1 @@ +EBUILD guacamole-0.ebuild 288 BLAKE2B 75603a66766e96f60a430d16ce773fe25a5d7cd615301c33cc9e6dfe07c7ead7dc26bf68be2f454ea360171f1bb8491f8a6517da9e07b9b3f988717b4740b93e SHA512 576ae2a28db15eafd5c86b63da98d4fe051561c40366d356946d13200231dd3c8050d3f45ff95d17136dbda234419a1c2db3076d0d963d7babd90abb568df8f9 diff --git a/acct-user/guacamole/guacamole-0.ebuild b/acct-user/guacamole/guacamole-0.ebuild new file mode 100644 index 0000000..6c27528 --- /dev/null +++ b/acct-user/guacamole/guacamole-0.ebuild @@ -0,0 +1,13 @@ +# Copyright 2019-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit acct-user + +DESCRIPTION="A user for Guacamole Guacamole server" +ACCT_USER_ID=311 +ACCT_USER_HOME=/var/spool/guacamole +ACCT_USER_GROUPS=( guacamole ) + +acct-user_add_deps diff --git a/metadata/layout.conf b/metadata/layout.conf new file mode 100644 index 0000000..d43e61c --- /dev/null +++ b/metadata/layout.conf @@ -0,0 +1 @@ +masters = gentoo diff --git a/net-misc/guacamole-server/files/guacd b/net-misc/guacamole-server/files/guacd new file mode 100644 index 0000000..d5e6cb9 --- /dev/null +++ b/net-misc/guacamole-server/files/guacd @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +DAEMON="/usr/sbin/guacd" +PIDFILE="/run/guacamole/guacd.pid" + +depend() { + use net +} + +start() { + checkpath -q -d -m 0755 -o guacamole:guacamole /run/guacamole/ + ebegin "Starting Guacamole server" + start-stop-daemon --start --user guacamole:guacamole --exec "${DAEMON}" -- -p "${PIDFILE}" + eend $? "Failed to start Guacamole server" +} + +stop() { + ebegin "Stopping Guacamole server" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? "Failed to stop Guacamole server" +} diff --git a/net-misc/guacamole-server/files/guacd.service b/net-misc/guacamole-server/files/guacd.service new file mode 100644 index 0000000..5462741 --- /dev/null +++ b/net-misc/guacamole-server/files/guacd.service @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[Unit] +Description=Guacamole Server +Documentation=man:guacd(8) +After=network.target + +[Service] +User=guacamole +ExecStart=/usr/sbin/guacd -f +Restart=on-abnormal + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/guacamole-server/guacamole-server-1.1.0.ebuild b/net-misc/guacamole-server/guacamole-server-1.1.0.ebuild new file mode 100644 index 0000000..408b8a9 --- /dev/null +++ b/net-misc/guacamole-server/guacamole-server-1.1.0.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2020 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit systemd + +DESCRIPTION="This is the proxy-daemon used by www-apps/guacamole" + +HOMEPAGE="https://guacamole.apache.org/" +SRC_URI="http://mirrors.ircam.fr/pub/apache/guacamole/${PV}/source/guacamole-server-${PV}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="encode pulseaudio rdp ssh telnet vnc vorbis webp" +REQUIRED_USE="pulseaudio? ( vnc )" + +RDEPEND=" + acct-group/guacamole + acct-user/guacamole + x11-libs/cairo + media-libs/libpng:0= + virtual/jpeg:0 + dev-libs/ossp-uuid + app-text/ghostscript-gpl[-X] + encode? ( media-video/ffmpeg ) + rdp? ( net-misc/freerdp ) + ssh? ( + net-libs/libssh2 + media-fonts/dejavu + media-fonts/terminus-font + x11-libs/pango ) + telnet? ( + net-libs/libtelnet + media-fonts/dejavu + media-fonts/terminus-font + x11-libs/pango ) + vnc? ( + net-libs/libvncserver[threads] + pulseaudio? ( media-sound/pulseaudio ) ) + dev-libs/openssl:0= + vorbis? ( media-libs/libvorbis ) + webp? ( media-libs/libwebp ) +" +DEPEND="${RDEPEND}" + +src_configure() { + local myconf="--without-terminal --without-pango" + + if use ssh || use telnet; then + myconf="--with-terminal --with-pango" + fi + + econf ${myconf} \ + $(use_enable encode guacenc) \ + $(use_with ssh) \ + $(use_with rdp) \ + $(use_with vnc) \ + $(use_with pulseaudio pulse) \ + $(use_with vorbis) \ + $(use_with telnet) \ + $(use_with webp) +} + +src_install() { + default + doinitd "${FILESDIR}/guacd" + systemd_dounit "${FILESDIR}/guacd.service" +} diff --git a/profiles/repo_name b/profiles/repo_name new file mode 100644 index 0000000..2ec0970 --- /dev/null +++ b/profiles/repo_name @@ -0,0 +1 @@ +unitas-guacamole diff --git a/unitas-guacamole-overlay.xml b/unitas-guacamole-overlay.xml new file mode 100644 index 0000000..7690061 --- /dev/null +++ b/unitas-guacamole-overlay.xml @@ -0,0 +1,10 @@ + + + + Gentoo Portage Overlay for the Apache Guacamole clientless remote desktop gateway. + It contains ebuilds mainly for internal use without any + warranty. + https://www.unitas-network.de + + + diff --git a/www-apps/guacamole-client/files/guacamole.properties b/www-apps/guacamole-client/files/guacamole.properties new file mode 100644 index 0000000..6bebaa4 --- /dev/null +++ b/www-apps/guacamole-client/files/guacamole.properties @@ -0,0 +1,35 @@ +# Hostname and port of guacamole proxy +guacd-hostname: localhost +guacd-port: 4822 + +# ---- MySQL properties +#mysql-hostname: localhost +#mysql-port: 3306 +#mysql-database: guacamole +#mysql-username: guacamole +#mysql-password: some_password + + +# ---- PostgreSQL properties +#postgresql-hostname: localhost +#postgresql-port: 3306 +#postgresql-database: guacamole +#postgresql-username: guacamole +#postgresql-password: some_password + + +# ---- LDAP properties +#ldap-hostname: localhost +#ldap-port: 389 +#ldap-user-base-dn: ou=people,dc=example,dc=net +#ldap-username-attribute: uid +#ldap-config-base-dn: ou=groups,dc=example,dc=net + + +# ---- SQL Server properties +#sqlserver-hostname: localhost +#sqlserver-port: 1433 +#sqlserver-database: guacamole_db +#sqlserver-username: guacamole_user +#sqlserver-password: some_password +#sqlserver-driver: microsoft2005 diff --git a/www-apps/guacamole-client/guacamole-client-1.1.0.ebuild b/www-apps/guacamole-client/guacamole-client-1.1.0.ebuild new file mode 100644 index 0000000..d297014 --- /dev/null +++ b/www-apps/guacamole-client/guacamole-client-1.1.0.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2020 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils +DESCRIPTION="Guacamole is a clientless remote desktop gateway" +HOMEPAGE="https://guacamole.apache.org/" +SRC_URI="http://mirrors.ircam.fr/pub/apache/guacamole/${PV}/source/${P}.tar.gz" + +LICENSE="MIT" + +SLOT="0" + +KEYWORDS="~x86 ~amd64" + +IUSE="ldap +mysql postgres" + +REQUIRED_USE="|| ( ldap mysql postgres )" + +DEPEND="dev-java/maven-bin" + +RDEPEND="${DEPEND} + www-servers/tomcat:8.5 + virtual/jre:1.8 + mysql? ( dev-java/jdbc-mysql ) + postgres? ( dev-java/jdbc-postgresql ) + ldap? ( net-nds/openldap )" + +# To enable Maven access to https://repo.maven.apache.org/maven2 +RESTRICT="network-sandbox" +MY_PN="guacamole" +GUACAMOLE_HOME="/etc/${MY_PN}" +CLASSPATH="${GUACAMOLE_HOME}/lib" + +src_compile() { + mvn package -Drat.skip=true +} + +src_install() { + insinto "${GUACAMOLE_HOME}/extensions" + #doins extensions/guacamole-auth-cas/target/guacamole-auth-cas-1.1.0.jar + #doins extensions/guacamole-auth-totp/target/guacamole-auth-totp-1.1.0.jar + doins extensions/guacamole-auth-quickconnect/target/guacamole-auth-quickconnect-1.1.0.jar + #doins extensions/guacamole-auth-openid/target/guacamole-auth-openid-1.1.0.jar + doins extensions/guacamole-auth-header/target/guacamole-auth-header-1.1.0.jar + #doins extensions/guacamole-auth-duo/target/guacamole-auth-duo-1.1.0.jar + + if use mysql || use postgres; then + insinto "${GUACAMOLE_HOME}/extensions" + doins extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/target/guacamole-auth-jdbc-base-1.1.0.jar + fi + + if use mysql; then + insinto "${GUACAMOLE_HOME}/extensions" + doins extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/target/guacamole-auth-jdbc-mysql-1.1.0.jar + + insinto "/usr/share/${PN}/schema/mysql" + find "${S}/extensions/${MY_PN}-auth-jdbc/modules/${MY_PN}-auth-jdbc-mysql/schema/" -name '*.sql' -exec doins '{}' + + + elog "Please add a mysql database and a user and load the sql files in /usr/share/${PN}/schema/ into it." + elog "If this is an update, then you will need to apply the appropriate update script in the location above." + elog "You will also need to adjust the DB properties in ${GUACAMOLE_HOME}/guacamole.properties!" + elog "The default user and it's password is \"guacadmin\"." + elog "-" + fi + + if use postgres; then + insinto "${GUACAMOLE_HOME}/extensions" + doins extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/target/guacamole-auth-jdbc-postgresql-1.1.0.jar + + insinto "/usr/share/${PN}/schema/postgres" + find "${S}/extensions/${MY_PN}-auth-jdbc/modules/${MY_PN}-auth-jdbc-postgresql/schema/" -name '*.sql' -exec doins '{}' + + + elog "Please add a postgresql database and a user and load the sql files in /usr/share/${PN}/schema/ into it." + elog "If this is an update, then you will need to apply the appropriate update script in the location above." + elog "You will also need to adjust the DB properties in ${GUACAMOLE_HOME}/guacamole.properties!" + elog "The default user and it's password is \"guacadmin\"." + elog "-" + fi + + if use ldap; then + insinto "${GUACAMOLE_HOME}/extensions" + doins extensions/guacamole-auth-ldap/target/guacamole-auth-ldap-1.1.0.jar + + insinto "/usr/share/${PN}/schema" + doins "${S}/extensions/${MY_PN}-auth-ldap/schema/guacConfigGroup.ldif" "${S}/extensions/${MY_PN}-auth-ldap/schema/guacConfigGroup.schema" + + elog "You will need to add and load the .schema file in /usr/share/${PN}/schema/ to your ldap server." + elog "You will also need to adjust the DB properties in ${GUACAMOLE_HOME}/guacamole.properties!" + elog "There is also an example .lidf file for creating the users." + elog "-" + fi + + insinto "${GUACAMOLE_HOME}" + doins "${FILESDIR}"/guacamole.properties + doins "${S}/${MY_PN}/doc/example/user-mapping.xml" + doins "${S}/${MY_PN}/src/main/resources/logback.xml" + keepdir ${CLASSPATH} + + echo "GUACAMOLE_HOME=${GUACAMOLE_HOME}" >98guacamole + doenvd 98guacamole + + insinto "/usr/share/${PN}" + newins "${S}/${MY_PN}/target/${MY_PN}-${PV}.war" "${MY_PN}.war" + + elog "Guacamole split in two components, please install net-mis/guacamole-server in a computer when you need a Guacamole proxy" + elog + elog "If it is an update, please make sure to delete the old webapp in /var/lib/tomcat-8.5/webapps/ first!" + elog "To deploy guacamole with tomcat, you will need to link the war file and create the configuration!" + elog "ln -sf /var/lib/${MY_PN}/${MY_PN}.war /var/lib/tomcat-8.5/webapps/" + elog "You will also need to adjust the configuration in ${GUACAMOLE_HOME}/${MY_PN}.properties" + elog "With systemd make sure that the var GUACAMOLE_HOME is set to ${GUACAMOLE_HOME}. for example via /etc/conf/tomcat." + elog "See https://guacamole.apache.org/doc/gug/configuring-guacamole.html for a basic setup" + elog "or https://guacamole.apache.org/doc/gug/jdbc-auth.html for a database for authentication and host definitions." + elog + elog "Please install www-server/apache or www-servre/nginx for a proxying Guacamole see: https://guacamole.apache.org/doc/gug/proxying-guacamole.html" +} +