public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/icaclient/
Date: Sat, 15 Apr 2023 12:43:40 +0000 (UTC)	[thread overview]
Message-ID: <1681562605.e575292be341611ebac6bdbaba694f62fb6f7797.juippis@gentoo> (raw)

commit:     e575292be341611ebac6bdbaba694f62fb6f7797
Author:     Henning Schild <henning <AT> hennsch <DOT> de>
AuthorDate: Fri Mar 31 12:39:12 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Apr 15 12:43:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e575292b

net-misc/icaclient: enable usb redirect support

We need to copy the content of the usb/ subfolder into ICAROOT and
enable the USB support in module.ini. There are udev rules and a daemon
but none of that seems needed.
Users need to be in 'usb' group, mention that in postinst.

Since we have an increasing number of changes to module.ini and the user
might in fact also want to change stuff (like i.e. FIDO2), we move the
file to /etc. Same goes for usb.conf in which users can customize which
USB devices can be redirected.

Closes: https://bugs.gentoo.org/890539
Signed-off-by: Henning Schild <henning <AT> hennsch.de>
Closes: https://github.com/gentoo/gentoo/pull/30352
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 net-misc/icaclient/icaclient-23.3.0.32.ebuild | 33 +++++++++++++++++++++++----
 net-misc/icaclient/metadata.xml               |  1 +
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git a/net-misc/icaclient/icaclient-23.3.0.32.ebuild b/net-misc/icaclient/icaclient-23.3.0.32.ebuild
index 189b58a4df53..2f09e585711e 100644
--- a/net-misc/icaclient/icaclient-23.3.0.32.ebuild
+++ b/net-misc/icaclient/icaclient-23.3.0.32.ebuild
@@ -13,7 +13,7 @@ SRC_URI="amd64? ( linuxx64-${PV}.tar.gz )
 LICENSE="icaclient"
 SLOT="0"
 KEYWORDS="-* ~amd64 ~x86"
-IUSE="l10n_de l10n_es l10n_fr l10n_ja l10n_zh-CN hdx"
+IUSE="l10n_de l10n_es l10n_fr l10n_ja l10n_zh-CN hdx usb"
 RESTRICT="mirror strip fetch"
 
 ICAROOT="/opt/Citrix/ICAClient"
@@ -96,6 +96,7 @@ RDEPEND="
 	x11-libs/pango
 	${BDEPEND}
 	!hdx? ( !media-plugins/hdx-realtime-media-engine )
+	usb? ( sys-apps/systemd-utils )
 "
 DEPENDS=""
 
@@ -129,6 +130,14 @@ src_prepare() {
 	rm lib/UIDialogLibWebKit.so || die
 
 	cp nls/en/module.ini . || die
+	if use usb; then
+		# inspired by debian usb support package postinst
+		sed -i -e 's/^[ \t]*VirtualDriver[ \t]*=.*$/&, GenericUSB/' module.ini || die
+		sed -i -e '/\[ICA 3.0\]/a\GenericUSB=on' module.ini || true
+		echo "[GenericUSB]" >> module.ini || true
+		echo "DriverName=VDGUSB.DLL" >> module.ini
+	fi
+
 	if use hdx; then
 		"${BROOT}${ICAROOT}"/rtme/RTMEconfig -install -ignoremm || die
 		mv new_module.ini module.ini || die
@@ -141,8 +150,19 @@ src_install() {
 
 	dodir "${ICAROOT}"
 
+	keepdir /etc/icaclient
+
+	insinto "${ICAROOT}"
 	exeinto "${ICAROOT}"
 	doexe *.DLL libproxy.so wfica AuthManagerDaemon PrimaryAuthManager selfservice ServiceRecord
+	if use usb; then
+		doexe usb/ctxusb usb/ctxusbd usb/ctx_usb_isactive
+		doins usb/*.DLL
+		insinto /etc/icaclient
+		doins usb/usb.conf
+		dosym ../../../etc/icaclient/usb.conf "${ICAROOT}"/usb.conf
+		insinto "${ICAROOT}"
+	fi
 
 	exeinto "${ICAROOT}"/lib
 	doexe lib/*.so
@@ -152,11 +172,10 @@ src_install() {
 		doins nls/en.UTF-8/eula.txt
 	done
 
-	insinto "${ICAROOT}"
-	doins -r usb
-
 	insinto "${ICAROOT}"/config
 	doins config/*
+	mv "${ED}/${ICAROOT}"/config/module.ini "${ED}"/etc/icaclient/ || die
+	dosym ../../../../etc/icaclient/module.ini "${ICAROOT}"/config/module.ini
 	for tmpl in {appsrv,wfclient}.template ; do
 		newins nls/en/${tmpl} ${tmpl/template/ini}
 	done
@@ -275,6 +294,12 @@ pkg_postinst() {
 			ewarn "not need to be explicitly installed anymore."
 		fi
 	fi
+
+	if use usb; then
+		einfo
+		einfo "Add users of ${CATEGORY}/${PN} to group 'usb' for redirect to work"
+		einfo
+	fi
 }
 
 pkg_postrm() {

diff --git a/net-misc/icaclient/metadata.xml b/net-misc/icaclient/metadata.xml
index 83d0f6942931..3c9ca3ab8356 100644
--- a/net-misc/icaclient/metadata.xml
+++ b/net-misc/icaclient/metadata.xml
@@ -11,5 +11,6 @@
 	</maintainer>
 	<use>
 		<flag name="hdx">Install and enable hdx-realtime-media-engine plugin</flag>
+		<flag name="usb">Allow connecting USB devices to virtual desktops</flag>
 	</use>
 </pkgmetadata>


             reply	other threads:[~2023-04-15 12:43 UTC|newest]

Thread overview: 151+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 12:43 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-27 19:43 [gentoo-commits] repo/gentoo:master commit in: net-misc/icaclient/ Arthur Zamarin
2023-09-19 17:30 Sam James
2023-07-27  6:34 Amy Liffey
2023-07-27  6:34 Amy Liffey
2023-07-26  8:00 Joonas Niilola
2023-06-11  8:22 Joonas Niilola
2023-06-03 16:24 Joonas Niilola
2023-06-03 16:24 Joonas Niilola
2023-04-20 13:16 Sam James
2023-04-15 12:43 Joonas Niilola
2023-03-07  9:09 Joonas Niilola
2023-03-01 13:46 Joonas Niilola
2023-02-06  7:59 Joonas Niilola
2023-02-06  7:59 Joonas Niilola
2023-01-15 11:16 Viorel Munteanu
2023-01-04  5:50 Sam James
2022-11-28  7:05 Joonas Niilola
2022-11-28  7:05 Joonas Niilola
2022-11-10 17:07 Joonas Niilola
2022-11-10 16:15 Joonas Niilola
2022-10-14 13:00 Joonas Niilola
2022-10-14 13:00 Joonas Niilola
2022-10-14 13:00 Joonas Niilola
2022-10-14 13:00 Joonas Niilola
2022-10-14 13:00 Joonas Niilola
2022-07-19 21:00 Conrad Kostecki
2022-07-15  1:47 Sam James
2022-07-15  1:47 Sam James
2022-07-15  1:47 Sam James
2022-07-15  1:47 Sam James
2022-06-30 21:41 Sam James
2022-05-17  9:31 Lars Wendler
2022-05-17  9:31 Lars Wendler
2022-05-13  8:40 Lars Wendler
2022-05-13  8:40 Lars Wendler
2022-05-13  8:40 Lars Wendler
2022-05-12 16:42 Lars Wendler
2022-03-29  6:33 Lars Wendler
2021-10-04 11:01 Lars Wendler
2021-10-04 11:01 Lars Wendler
2021-10-04 11:01 Lars Wendler
2021-08-19 13:05 Lars Wendler
2021-08-19 13:05 Lars Wendler
2021-08-19 13:05 Lars Wendler
2021-07-02 10:51 Lars Wendler
2021-07-02 10:10 Lars Wendler
2021-07-02 10:10 Lars Wendler
2021-07-02 10:10 Lars Wendler
2021-04-30  1:03 Lars Wendler
2021-04-30  1:03 Lars Wendler
2021-04-30  1:03 Lars Wendler
2021-04-16 10:25 David Seifert
2021-03-12 15:22 Lars Wendler
2021-03-12 15:22 Lars Wendler
2021-03-12 15:22 Lars Wendler
2021-01-31 20:36 Lars Wendler
2021-01-31 20:36 Lars Wendler
2021-01-31 20:36 Lars Wendler
2021-01-22 10:47 Lars Wendler
2021-01-16 11:53 Lars Wendler
2021-01-15 14:48 Lars Wendler
2021-01-15 14:48 Lars Wendler
2021-01-15 14:48 Lars Wendler
2020-11-08 11:03 Lars Wendler
2020-11-08 11:03 Lars Wendler
2020-11-05 11:45 Lars Wendler
2020-11-03 12:37 Lars Wendler
2020-11-03 12:37 Lars Wendler
2020-11-03 12:37 Lars Wendler
2020-11-03 12:37 Lars Wendler
2020-11-03 12:37 Lars Wendler
2020-09-16 14:20 Lars Wendler
2020-09-16 14:20 Lars Wendler
2020-09-16 14:20 Lars Wendler
2020-07-02  7:21 Lars Wendler
2020-07-02  7:21 Lars Wendler
2020-07-02  7:21 Lars Wendler
2020-04-27 11:57 Lars Wendler
2020-04-27 11:57 Lars Wendler
2020-04-27 11:57 Lars Wendler
2020-01-31  8:19 Michał Górny
2019-12-16 14:07 Lars Wendler
2019-12-16 14:07 Lars Wendler
2019-12-16 14:01 Lars Wendler
2019-11-11  9:51 Lars Wendler
2019-10-17 12:14 Lars Wendler
2019-10-17 12:14 Lars Wendler
2019-10-17 12:14 Lars Wendler
2019-09-04  8:23 Lars Wendler
2019-09-04  8:23 Lars Wendler
2019-09-04  8:23 Lars Wendler
2019-07-13 17:58 Lars Wendler
2019-07-13 17:58 Lars Wendler
2019-07-05  8:52 Lars Wendler
2019-07-04  7:43 Lars Wendler
2019-07-04  7:43 Lars Wendler
2019-07-04  7:43 Lars Wendler
2019-03-30 11:40 Lars Wendler
2019-03-30 11:40 Lars Wendler
2019-03-30 11:40 Lars Wendler
2019-03-20 13:25 Ben Kohler
2019-02-14 13:48 Lars Wendler
2019-02-14 13:48 Lars Wendler
2019-02-14 13:48 Lars Wendler
2018-12-07 13:08 Lars Wendler
2018-11-24 16:48 Lars Wendler
2018-11-23 21:18 Lars Wendler
2018-11-23 21:18 Lars Wendler
2018-11-23 21:18 Lars Wendler
2018-07-05 16:40 Lars Wendler
2018-06-25 13:51 Lars Wendler
2018-06-11 16:28 Aaron Bauman
2018-03-07 12:01 Lars Wendler
2018-01-29 10:03 Lars Wendler
2018-01-29 10:03 Lars Wendler
2018-01-06 10:28 Lars Wendler
2018-01-04 12:00 Lars Wendler
2018-01-02  8:06 Lars Wendler
2018-01-02  8:06 Lars Wendler
2018-01-02  8:06 Lars Wendler
2018-01-02  8:06 Lars Wendler
2017-12-10 15:03 Ulrich Müller
2017-10-04  8:46 Lars Wendler
2017-10-04  8:46 Lars Wendler
2017-10-04  8:46 Lars Wendler
2017-08-12  8:11 Lars Wendler
2017-08-11 17:21 Lars Wendler
2017-07-25  7:20 Lars Wendler
2017-07-25  7:20 Lars Wendler
2017-07-25  7:20 Lars Wendler
2017-03-30 11:30 Lars Wendler
2017-02-17 17:17 Lars Wendler
2017-01-01 11:34 Agostino Sarubbo
2017-01-01 11:33 Agostino Sarubbo
2016-11-27 16:26 Lars Wendler
2016-10-07 19:59 Lars Wendler
2016-10-07 15:00 Lars Wendler
2016-05-31 12:23 Lars Wendler
2016-05-28  9:32 Pacho Ramos
2016-05-28  9:32 Pacho Ramos
2016-04-25 12:30 Lars Wendler
2016-04-25 12:30 Lars Wendler
2016-02-06 10:16 Patrice Clement
2016-02-06 10:16 Patrice Clement
2016-02-06 10:16 Patrice Clement
2016-01-04 16:22 Lars Wendler
2015-12-06 21:55 Michał Górny
2015-09-18 11:47 Lars Wendler
2015-08-27  5:31 Lars Wendler
2015-08-25 20:04 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1681562605.e575292be341611ebac6bdbaba694f62fb6f7797.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox