diff options
6 files changed, 94 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..c712e5f50e48 --- /dev/null +++ b/sys-auth/microsoft-identity-broker/Manifest @@ -0,0 +1 @@ +DIST microsoft-identity-broker_2.0.0_amd64.deb 83941724 BLAKE2B 6e7c347cd466b4fb77841c4c19cf368538adf17a1b197fcf5a8ca6555f3660f8d6684d6bcb400441f9cc06f0765b26cf379d29a16f15d2f90da445d80f89ae89 SHA512 60535f64f867fcd748f550b4dd5a9bb29d527b3632dc7d44a72041ad36ccb691e762417bdc0230ead6ad8c0ab3099f0a343a5be7ab4c982fd3c27753712ac462 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/* +} |