summaryrefslogtreecommitdiff
path: root/sys-auth/microsoft-identity-broker
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/microsoft-identity-broker')
-rw-r--r--sys-auth/microsoft-identity-broker/Manifest6
-rw-r--r--sys-auth/microsoft-identity-broker/files/lsb-release-ubuntu-22.044
-rw-r--r--sys-auth/microsoft-identity-broker/files/os-release-ubuntu-22.0412
-rw-r--r--sys-auth/microsoft-identity-broker/files/wrapper9
-rw-r--r--sys-auth/microsoft-identity-broker/metadata.xml8
-rw-r--r--sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild60
6 files changed, 99 insertions, 0 deletions
diff --git a/sys-auth/microsoft-identity-broker/Manifest b/sys-auth/microsoft-identity-broker/Manifest
new file mode 100644
index 000000000000..a626fb69dc92
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/Manifest
@@ -0,0 +1,6 @@
+AUX lsb-release-ubuntu-22.04 104 BLAKE2B 16eaf37f53ac271cc3581cc70532732683fd42aa147cf2e6ef069d4a1642964bac2a28e2f89a83cbb1a6cd2710cf4d98e9007eca49eedb4fe0895f2356725d74 SHA512 29b2a258de8ae3b40ec76cce0096a3663034f19f504c032820d4736a124e6d5c0b6548b340ba12a7f4b9601f81654dd946edbaf96525bd2b7747037941b2b3c6
+AUX os-release-ubuntu-22.04 388 BLAKE2B e90862164a22548587471df2687d30623cf5f8ff75b0fbf3349016708c7f07def4a0801c05689c53b9956e122018bcef6f6d65e9950dde33fce674c9a8940e4e SHA512 5af419ff0c339d549fbb01c3c73f1b98d17d406f20f934c49fdb50279baf427a3ec628b41ba0bac229b48afcad8b3ebf262f78d7f31fb2054d7f5a6485cadcaa
+AUX wrapper 290 BLAKE2B f8af7507db9e3a2cf934ca94efac28c4e475ee6e0064f8501006c6f807b8c525b09f98cb7c8424af60cd2a1e5e2e03ed48f897eb6e4ef4a26169e2766a28b622 SHA512 e1c158bc29c53008b7d74cd263f06053b360348cebd13e38d84b00c395e328e927532941b4e1a1a67e07f367f612d768224c3f17817c6d901a8581c07c5d3582
+DIST microsoft-identity-broker_2.0.0_amd64.deb 83941724 BLAKE2B 6e7c347cd466b4fb77841c4c19cf368538adf17a1b197fcf5a8ca6555f3660f8d6684d6bcb400441f9cc06f0765b26cf379d29a16f15d2f90da445d80f89ae89 SHA512 60535f64f867fcd748f550b4dd5a9bb29d527b3632dc7d44a72041ad36ccb691e762417bdc0230ead6ad8c0ab3099f0a343a5be7ab4c982fd3c27753712ac462
+EBUILD microsoft-identity-broker-2.0.0.ebuild 1770 BLAKE2B 879d6de49001eea211df7e7274ffa6a75412262bc768dcb458a9f698b1c2eea43c5430ff29f39626577136cb5e51eb3d74634b550c53b5fa944d9cdf9c2015fe SHA512 65c941879a1222381e0a450c02aca2285b2f38c7293a18711a4630dfb8e97a9a2f2ce454f71b02de519a84f45f270dd2fff5ac9ded8604e98590c23d677948ce
+MISC metadata.xml 248 BLAKE2B 97ed0d2320e1aa2d1cca6b63b0cf9cb07669ea73ac0dad7a8f7db4f510d3b2dc28cbf5a7c019f15ac87c25c5e51e619386694b49d21fc19f4092047c8e382287 SHA512 23bb29604f7cc644073025158d751004189a85fe6be88a7817afebad685c3b73f21cdb3e5d05f16699baa5d6b52f1e3a1f365b1ad7ea09bfcd204182e646f203
diff --git a/sys-auth/microsoft-identity-broker/files/lsb-release-ubuntu-22.04 b/sys-auth/microsoft-identity-broker/files/lsb-release-ubuntu-22.04
new file mode 100644
index 000000000000..58947887cf3e
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/files/lsb-release-ubuntu-22.04
@@ -0,0 +1,4 @@
+DISTRIB_ID=Ubuntu
+DISTRIB_RELEASE=22.04
+DISTRIB_CODENAME=jammy
+DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
diff --git a/sys-auth/microsoft-identity-broker/files/os-release-ubuntu-22.04 b/sys-auth/microsoft-identity-broker/files/os-release-ubuntu-22.04
new file mode 100644
index 000000000000..290cf851f61a
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/files/os-release-ubuntu-22.04
@@ -0,0 +1,12 @@
+NAME="Ubuntu"
+VERSION="22.04.4 LTS (Jammy Jellyfish)"
+ID=ubuntu
+ID_LIKE=debian
+PRETTY_NAME="Ubuntu 22.04.4 LTS"
+VERSION_ID="22.04"
+HOME_URL="https://www.ubuntu.com/"
+SUPPORT_URL="https://help.ubuntu.com/"
+BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
+PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
+VERSION_CODENAME=jammy
+UBUNTU_CODENAME=jammy
diff --git a/sys-auth/microsoft-identity-broker/files/wrapper b/sys-auth/microsoft-identity-broker/files/wrapper
new file mode 100644
index 000000000000..f419769bebba
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/files/wrapper
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+exec bwrap \
+ --bind / / \
+ --dev-bind /dev /dev \
+ --ro-bind /etc/microsoft-identity-broker/lsb-release /etc/lsb-release \
+ --ro-bind /etc/microsoft-identity-broker/os-release /etc/os-release \
+ -- \
+ /usr/share/microsoft-identity-broker/bin/"${0##*/}" "${@}"
diff --git a/sys-auth/microsoft-identity-broker/metadata.xml b/sys-auth/microsoft-identity-broker/metadata.xml
new file mode 100644
index 000000000000..374cd4dedb33
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild b/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild
new file mode 100644
index 000000000000..f2f58f3974aa
--- /dev/null
+++ b/sys-auth/microsoft-identity-broker/microsoft-identity-broker-2.0.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit java-pkg-2 prefix systemd unpacker
+
+FAKE_OS="ubuntu-22.04"
+DESCRIPTION="Microsoft Authentication Broker to access a corporate environment"
+HOMEPAGE="https://learn.microsoft.com/mem/intune/"
+SRC_URI="https://packages.microsoft.com/ubuntu/22.04/prod/pool/main/${PN:0:1}/${PN}/${PN}_${PV}_amd64.deb"
+S="${WORKDIR}"
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+RESTRICT="bindist mirror"
+
+RDEPEND="
+ acct-user/microsoft-identity-broker
+ acct-group/microsoft-identity-broker
+ sys-apps/bubblewrap
+ sys-apps/dbus
+ virtual/jre:11
+"
+
+src_unpack() {
+ unpack_deb ${A}
+}
+
+src_configure() {
+ sed -i -r "s:^Exec(Start)?=.*/([^/]+):Exec\1=${EPREFIX}/usr/bin/\2:" \
+ usr/lib/systemd/*/*.service usr/share/dbus-1/*/*.service || die
+}
+
+src_install() {
+ newbin $(prefixify_ro "${FILESDIR}"/wrapper) microsoft-identity-broker
+ dosym microsoft-identity-broker /usr/bin/microsoft-identity-device-broker
+
+ java-pkg_dojar opt/microsoft/identity-broker/lib/*.jar
+
+ java-pkg_dolauncher microsoft-identity-broker \
+ --main com.microsoft.identity.broker.service.IdentityBrokerService \
+ --java_args '${MICROSOFT_IDENTITY_BROKER_OPTS}' \
+ -into /usr/share/${PN}
+
+ java-pkg_dolauncher microsoft-identity-device-broker \
+ --main com.microsoft.identity.broker.service.DeviceBrokerService \
+ --java_args '${MICROSOFT_IDENTITY_DEVICE_BROKER_OPTS}' \
+ -into /usr/share/${PN}
+
+ insinto /etc/microsoft-identity-broker
+ newins "${FILESDIR}/lsb-release-${FAKE_OS}" lsb-release
+ newins "${FILESDIR}/os-release-${FAKE_OS}" os-release
+
+ insinto /usr/share
+ doins -r usr/share/dbus-1
+
+ systemd_dounit usr/lib/systemd/system/*
+ systemd_douserunit usr/lib/systemd/user/*
+}