From 4d851917395d532cef6f20b70a6a27d3f1d991ce Mon Sep 17 00:00:00 2001 From: Recolic Keghart <root@recolic.net> Date: Wed, 23 Feb 2022 20:18:34 +0800 Subject: [PATCH] finished all --- README.md | 6 +++++- msalsdk-dbusclient/PKGBUILD | 28 ++++++++++++++++++++++++++++ msalsdk-dbusclient/x.install | 12 ++++++++++++ msft-identity-broker/PKGBUILD | 30 ++++++++++++++++++++++++++++++ msft-identity-broker/x.install | 25 +++++++++++++++++++++++++ 5 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 msalsdk-dbusclient/PKGBUILD create mode 100644 msalsdk-dbusclient/x.install create mode 100644 msft-identity-broker/PKGBUILD create mode 100644 msft-identity-broker/x.install diff --git a/README.md b/README.md index 0131b66..1be1659 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,9 @@ Copy the following files from enrolled Level-2 machine to unenrolled Level-1 mac /home/YourName/.local/share/keyrings/login.keyring ``` -Reboot, and your level-1 machine can access CORPNET resources! +Reboot. + +Run `seahorse` to double-confirm your "login" keyring is not empty. It may ask you to enter the previous keyring password. + +You are all set! diff --git a/msalsdk-dbusclient/PKGBUILD b/msalsdk-dbusclient/PKGBUILD new file mode 100644 index 0000000..083fe49 --- /dev/null +++ b/msalsdk-dbusclient/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Recolic K <root@recolic.net> + +pkgname=msalsdk-dbusclient +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Microsoft Authentication Library cross platform. Dbus client for talking to MSAL broker" +url="https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msalsdk-dbusclient" +license=("GPL2") +arch=("x86_64") +depends=("glibc>=2.14" "gcc-libs>=3.0" "systemd-libs>=243" "libsdbus-c++0" "msft-identity-broker>=1.0") +makedepends=() +conflicts=() +replaces=() +backup=() +# https://packages.debian.org/bullseye/amd64/libsdbus-c++0/download +source=("source.deb::$url/${pkgname}_${pkgver}_amd64.deb") +validpgpkeys=("") +sha256sums=("78588d17039d3bf3096f1a0476e70eece76d732fd938e447e37a3c3c33af0b36") +install=x.install + +package() { + cd "$srcdir" + ar x source.deb + tar xvzf data.tar.gz + cp -r "$srcdir/usr" "$pkgdir/" +} + + diff --git a/msalsdk-dbusclient/x.install b/msalsdk-dbusclient/x.install new file mode 100644 index 0000000..fbc6300 --- /dev/null +++ b/msalsdk-dbusclient/x.install @@ -0,0 +1,12 @@ +post_install() { + ldconfig +} + +post_upgrade() { + post_install +} + +post_remove() { + ldconfig +} + diff --git a/msft-identity-broker/PKGBUILD b/msft-identity-broker/PKGBUILD new file mode 100644 index 0000000..81c3569 --- /dev/null +++ b/msft-identity-broker/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Recolic K <root@recolic.net> + +pkgname=msft-identity-broker +pkgver=1.0.6 +pkgrel=1 +pkgdesc="msft-identity-broker" +url="https://packages.microsoft.com/ubuntu/20.04/prod/pool/main/m/msft-identity-broker" +license=("GPL2") +arch=("x86_64") +depends=("dbus" "gnome-keyring" "systemd" "jre11-openjdk") +makedepends=() +conflicts=() +replaces=() +backup=() +source=("source.deb::$url/${pkgname}_${pkgver}_amd64.deb") +validpgpkeys=("") +sha256sums=("5523be2d7b0a502b34268f94b1c95d4a892500b1ab69a1ab0e9c9cafb7c62bbb") +install=x.install + +package() { + cd "$srcdir" + ar x source.deb + tar xvzf data.tar.gz + echo "Patching... (Hardcode archlinux java11 JAVA_HOME into xxx.service)" + echo 'Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk"' >> "$srcdir/usr/lib/systemd/system/msft-identity-device-broker.service" + echo 'Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk"' >> "$srcdir/usr/lib/systemd/user/msft-identity-broker.service" + cp -r "$srcdir/usr" "$srcdir/opt" "$pkgdir/" +} + + diff --git a/msft-identity-broker/x.install b/msft-identity-broker/x.install new file mode 100644 index 0000000..e0fb3b1 --- /dev/null +++ b/msft-identity-broker/x.install @@ -0,0 +1,25 @@ +post_install() { + # Recolic: I believe it's not necessary to start the service at all. This service is triggered by edge from libsdbus. + # I don't know why they are doing this. just leave them there. + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload || true + # systemctl restart msft-identity-device-broker.service || true + fi +} + +post_upgrade() { + post_install +} + +pre_remove() { + if [ -d /run/systemd/system ]; then + systemctl stop msft-identity-device-broker.service || true + fi +} + +post_remove() { + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload || true + fi +} + -- GitLab