Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package himmelblau for openSUSE:Factory 
checked in at 2026-11-19 16:54:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/himmelblau (Old)
 and      /work/SRC/openSUSE:Factory/.himmelblau.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "himmelblau"

Thu Nov 19 16:54:45 2026 rev:57 rq:1398517 version:4.0.8+git0.a969c748

Changes:
--------
--- /work/SRC/openSUSE:Factory/himmelblau/himmelblau.changes    2026-09-12 
21:25:06.766919992 +0200
+++ /work/SRC/openSUSE:Factory/.himmelblau.new.1251/himmelblau.changes  
2026-11-19 16:55:04.308673109 +0100
@@ -1,0 +2,557 @@
+Thu Nov 05 16:42:27 UTC 2026 - Samuel Cabrero <[email protected]>
+
+- Update to version 4.0.8+git0.a969c748:
+  * SELinux fixes based on community feedback
+  * fix: bridge crypto-bigint 0.5 to 0.7
+  * Version 4.0.8
+  * Fix: NixOS: Avoid many packages being built multiple times. (#1916)
+  * Offer the password change on an enrolled device (#1888)
+  * fix(selinux): allow systemd to manage Himmelblau sockets (#1911)
+  * cargo vet
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 5 
updates
+  * chore: refresh cargo vet metadata
+  * Reuse loaded Hello keys
+  * cargo vet
+  * Version 4.0.7
+  * Await idprovider sleeps instead of blocking the runtime (#1883)
+  * Fix Evolution PRT SSO cookie account parsing (#1853)
+  * fix: preserve daemon descriptors only across restarts (#1745)
+  * Avoid inadvertently creating sqlite database when checking for tpm status.
+  * Properly report status in `aad-tool tpm`.
+  * Allow unwraps in socket regression tests
+  * fix: allow disconnected unix-chkpwd socket path
+  * fix: listen on host-namespace himmelblaud sockets
+  * fix: select distro packaging tool
+  * Import Dependabot #1833 pinned action updates
+  * Import Dependabot #1835 pinned action updates
+  * Import Dependabot #1845 pinned action updates
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 1 
update
+  * Unit test HSM type resolution by taking it out of the `tpm_init!` macro.
+  * Avoid accidentally invalidating existing keys when using `hsm_type = 
tpm_if_possible`.
+  * rpm: couple interdependent package versions
+  * Reset completed MFA polling state
+  * cargo fmt
+  * cargo vet
+  * Version 4.0.6
+  * Update cargo vet audits for backport
+  * Fix creation-time SELinux labels for homes and skeleton content (#1826)
+  * sso: do not panic when stderr is closed (#1827)
+  * fix: avoid NSS recursion for mapped users
+  * Skip D-Bus activation of BlueZ when probing for Bluetooth
+  * Preserve lookup eligibility at the NSS boundary
+  * Prevent legacy lookup and stale password cache reuse
+  * fix: avoid caching synthetic user lookups
+  * fix(nix): enable TPM support in Nix packages / NixOS module
+  * fix(ci): Add rpm-build to RPM builder images
+  * Fix blocking client response framing
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 5 
updates
+  * Use Cargo scratch directory for executable o365 test fixtures
+  * Fix stable-4.x auth tests on read-only source mounts
+  * Version 4.0.5
+  * cargo vet
+  * Update cargo vet audits for backport
+  * Update make vet from main branch
+  * Fix casing of attributes passed to `tpm2_createprimary`.
+  * fix: probe Entra authority without redirects
+  * fix: quiet expected user lookup misses
+  * fix: handle Arch installs without VERSION_ID
+  * fix: fetch profile photos without blocking PAM
+  * fix: omit unnamed groups from initgroups
+  * fix(nix): cover su and polkit in PAM services
+  * fix(nix): order PAM module before unix-early
+  * fix(o365): select AppImage architecture
+  * Update libhimmelblau to latest version
+  * deps(rust): bump the all-cargo-updates group with 9 updates
+  * ci(fuzz): install cargo-fuzz with stable
+  * Version 4.0.4
+  * chore: update rustls and der crates
+  * Version 4.0.3
+  * Update cargo vet audits for backport
+  * Fix mapping of local users to profile pictures
+  * fix(selinux): label the Intune policy cache directory
+  * Update libhimmelblau to latest version
+  * Version 4.0.2
+  * fix(auth): gate Intune MFA resource
+  * Version 4.0.1
+  * cargo vet
+  * fix(auth): restore systemd compatibility
+  * Update libhimmelblau to latest version
+  * deps(rust): bump the all-cargo-updates group with 3 updates
+  * ci: add stable 4.x release branch
+  * Increase the recursion limit for fuzz build
+  * chore: refresh cargo vet metadata
+  * Update libhimmelblau
+  * build(deps): bump mozilla-actions/sccache-action from 0.0.10 to 0.0.11
+  * build(deps): bump cachix/install-nix-action from 31.11.0 to 31.11.1
+  * build(deps): bump step-security/harden-runner from 2.20.1 to 2.21.0
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 6 
updates
+  * build(deps): bump github/codeql-action/upload-sarif
+  * fix: install Entra SSO policy for Betterbird
+  * security: restrict SSPR Hello fallback to local logins
+  * Validate OIDC group UUIDs before name matching
+  * Reject Hello password reauth when offline
+  * Block remote Hello PIN during offline auth
+  * Delay breakglass password caching until MFA succeeds
+  * Resolve fedora-cisco-openh264 key import failure
+  * security: authenticate systemd daemon-call bypass
+  * Fix local group membership parsing
+  * ci: limit OBS credential exposure
+  * Preserve Debian PAM account jumps.
+  * fix(auth): borrow TOTP QR string
+  * fix(pam): avoid online try_unseal auth
+  * provide hello totp secret alongside qr code
+  * update auth test socket path to target/
+  * apparmor: allow runc container networking
+  * Install SELinux policy during image builds.
+  * fix(rpm): restore rpmsaved config
+  * fix(auth): set up offline Hello TOTP
+  * fix(profile): preserve desktop session selection
+  * Skip Hello TOTP for local password-only sessions
+  * Fix bad-domain PAM auth lockup
+  * create krb5 config dir
+  * fix(nss): restore initgroups fallback
+  * fix(auth): skip Intune for OIDC
+  * cargo vet
+  * Rewrite idmap in Rust
+  * policies: bound custom compliance script execution
+  * systemd: hide mok-variables from himmelblaud-tasks
+  * Reconcile local groups periodically
+  * Build ARM64 RPM tooling in target images.
+  * fix: keep fonts out of the sandboxed QR greeter SVG
+  * fix: address Copilot review on Arch packaging
+  * fix: keep QR greeter SVG private under runtime dir
+  * feat: detect GNOME version via pacman
+  * feat: wire make arch and pacman install
+  * feat: add Arch PKGBUILD and package builder
+  * fix(o365): avoid busy test script exec
+  * chore: add donation support messaging
+  * cargo vet
+  * Update libhimmelblau 0.8.29 -> 0.8.30
+  * build(deps): bump github/codeql-action/upload-sarif
+  * build(deps): bump step-security/harden-runner from 2.20.0 to 2.20.1
+  * build(deps): bump actions/stale from 10.3.0 to 11.0.0
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 2 
updates
+  * packaging: install default config under /usr/lib/
+  * selinux/apparmor: allow layered configuration paths
+  * docs: document layered configuration precedence
+  * config: support layered configuration files
+  * cargo vet
+  * Remove unused dependency: r-efi:6.0.0
+  * Remove unused dependency: portable-atomic:1.13.1
+  * Remove unused dependency: bs58:0.5.1
+  * Update rust MSRV to 1.85
+  * cargo clippy
+  * chore(deps): upgrade gettext-rs
+  * ci: ignore der 0.8.1 updates
+  * cargo vet
+  * build(deps): bump cachix/install-nix-action from 31.10.7 to 31.11.0
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 7 
updates
+  * build(deps): bump ossf/scorecard-action from 2.4.3 to 2.4.4
+  * build(deps): bump github/codeql-action/upload-sarif
+  * build(deps): bump actions/checkout from 7.0.0 to 7.0.1
+  * Update Cargo.nix
+  * cargo vet
+  * chore(deps): update libwebauthn to 0.9.0
+  * pam: add no_info_prompt to fold info text into the password prompt
+  * fix(nix): added `CacheDirectory` and added it to `ReadWritePaths`
+  * docs: mark orchestrator config experimental
+  * refactor: rename orchestrator config option
+  * Use ok for account stack success.
+  * Support OIDC login group filters.
+  * Add configurable logon script timeout.
+  * cargo audit/cargo vet
+  * Add funding.json wellKnown pointer
+  * Skip Entra post-auth tasks for OIDC.
+  * Add configurable OIDC account ID claims
+  * security: gate the o365 URL handler on a Microsoft 365 origin allowlist
+  * security: reject RFC2307 ids in systemd's dynamic user range
+  * security: reject subid account names containing ':' or control characters
+  * security: bind PamChangeAuthToken to the connecting peer
+  * build(deps): bump actions/checkout from 6.0.2 to 7.0.0
+  * build(deps): bump actions/cache from 6.0.0 to 6.1.0
+  * build(deps): bump step-security/harden-runner from 2.19.4 to 2.20.0
+  * build(deps): bump github/codeql-action/upload-sarif
+  * build(deps): bump cachix/install-nix-action from 31.10.6 to 31.10.7
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 21 
updates
+  * fix(vet): diff crates locally
+  * tools: default cargo vet to codex
+  * fix(broker): satisfy rustfmt and cover broker-interactive QR suppression
+  * fix(broker): prefer Hello PIN for Interactive Edge auth
+  * fix(broker): do not send unicode QR art through pinentry
+  * fix(pam): make account denials terminal
+  * debian: make the pam_allow_groups denial terminal in the account phase
+  * make pin shorter than 6 count towards pin reset count
+  * feat: add additional selinux denies via helper script from Aurora (based 
on Fedora 44 Kionite)
+  * disable apply_policy by default
+  * update githook to /usr/bin/env bash
+  * security: replace rsa with aws-lc shim
+  * chore(cargo): generate patch shims
+  * chore(cargo): switch overrides to patch
+  * l10n: refine Uzbek auth messages
+  * more verboseness in qr postinst
+  * add qr postrm to fedora
+  * add script to remove qr assets
+  * check debian-gdm user instead of version
+  * use debian-gdm user in qr postinst
+  * fix(sso): replace old Mozilla policy URLs
+  * fix(auth): retry failed password changes
+  * feat(oidc): support password grant
+  * i18n: add Slovenian translations
+  * i18n: add Latvian translations
+  * i18n: add Lithuanian translations
+  * i18n: add Croatian translations
+  * i18n: add Estonian translations
+  * i18n: add Vietnamese translations
+  * i18n: add Ukrainian translations
+  * i18n: add Thai translations
+  * i18n: add Swedish translations
+  * i18n: add Slovak translations
+  * i18n: add Romanian translations
+  * i18n: add Polish translations
+  * i18n: add Norwegian Bokmal translations
+  * i18n: add Hungarian translations
+  * i18n: add Hebrew translations
+  * i18n: add Finnish translations
+  * i18n: add Greek translations
+  * i18n: add Danish translations
+  * i18n: add Czech translations
+  * i18n: add Bengali translations
+  * i18n: add Bulgarian translations
+  * i18n: add Korean translations
+  * feat(i18n): add Indonesian locale
+  * i18n: add Dutch translations
+  * i18n: add Arabic translations
+  * feat(i18n): add Uzbek translations
+  * l10n: add Turkish translations
+  * i18n: add Italian translation
+  * i18n: add Japanese translations
+  * i18n: add Simplified Chinese locale
+  * i18n: add Ethiopian language locales
+  * feat(i18n): add Urdu locale
+  * feat(i18n): add Catalan translations
+  * l10n: add Portuguese Portugal locale
+  * i18n: add Brazilian Portuguese translations
+  * i18n: add Canadian French locale
+  * i18n: add Hindi translations
+  * l10n: add Spanish translations
+  * l10n: add Serbian Latin translation
+  * i18n: add French translations
+  * Be more specific about WebAuthn user verification errors
+  * feat(i18n): add translation generator
+  * l10n: add German translations
+  * cargo vet
+  * feat(i18n): add gettext auth framework
+  * Typo fix in doc comment
+  * stop MS Auth related message appearing for OIDC/DAG
+  * add debian files to .gitignore
+  * add opensuse files to .gitignore
+  * fix(nss): avoid locked shadow entries
+  * fix(auth): shorten daemon startup wait
+  * Revert "Work around resume lockout on network down"
+  * Revert "dispatcher: refine Himmelblau restart workaround"
+  * Revert "packaging: disable duplicate NM workaround scripts"
+  * fix(resolver): release db lock before offline auth fallback to prevent 
deadlock
+  * cargo vet
+  * chore(deps): update cmov lockfile
+  * chore(deps): update anyhow to 1.0.103
+  * fix(deps): patch opentelemetry baggage propagation CVE
+  * fix(auth): retry transient fail user existence lookups
+  * fix(rpm): allow tpm2-tss dependency
+  * orchestrator(okta) Include additional okta endpoints
+  * fix(pkg): suggest orchestrator package
+  * feat(orchestrator): add Okta provider
+  * Downgrade error to info in logs, ensure we're returning a proper error
+  * Ensure errors are propagated properly, don't mask response errors
+  * Added interactive user-facing re-prompting on token expiration
+  * fix(nss): depend on systemd users
+  * fix(apparmor): support Debian 12 ABI
+  * fix(orchestrator): allow netavark locks
+  * ci: add Socket firewall checks
+  * chore(orchestrator): drop unused matchers
+  * fix(keycloak): fail on error message
+  * fix(keycloak): label password field
+  * feat(orchestrator): add fail action
+  * fix(keycloak): retry rejected prompts
+  * feat(orchestrator): branch on DOM
+  * fix(orchestrator): normalize input prompts
+  * auth: add password long prompts
+  * fix(qr): label TOTP with username
+  * fix(auth): preserve password prompts
+  * fix(auth): show orchestrator text input
+  * feat(qr): render Keycloak TOTP setup
+  * feat(orchestrator): extract prompt values
+  * fix(keycloak): order new user steps
+  * fix(keycloak): handle password updates
+  * cargo vet
+  * build(deps): bump github/codeql-action from 4.36.0 to 4.36.2
+  * build(deps): bump actions/checkout from 4.2.2 to 7.0.0
+  * build(deps): bump actions/cache from 5.0.5 to 6.0.0
+  * deps(rust): bump the all-cargo-updates group across 1 directory with 24 
updates
+  * pam: wait for himmelblaud during auth startup
+  * packaging: disable duplicate NM workaround scripts
+  * dispatcher: refine Himmelblau restart workaround
+  * pam: add enable_kerberos_cache and fetch_profile_picture
+  * nix: add python, rustc and cargo to shell
+  * fix(sso): update Entra SSO extension
+  * fix(sso): clarify Mozilla policy logs
+  * fix(rpm): clean SSO policy on erase
++++ 260 more lines (skipped)
++++ between /work/SRC/openSUSE:Factory/himmelblau/himmelblau.changes
++++ and /work/SRC/openSUSE:Factory/.himmelblau.new.1251/himmelblau.changes

Old:
----
  conf_example.patch
  himmelblau-3.1.14+git0.7d1ea961.tar.bz2
  o365-url-handler-test-etxtbsy.patch
  python311-build.patch

New:
----
  himmelblau-4.0.8+git0.a969c748.tar.bz2
  himmelblau-rpmlintrc
  nsswitch-himmelblau.conf

----------(Old B)----------
  Old:  * o365-url-handler-test-etxtbsy.patch
  * conf_example.patch
  * python311-build.patch
  Old:- Drop patches now in upstream:
  * o365-url-handler-test-etxtbsy.patch
  * conf_example.patch
  Old:  * conf_example.patch
  * python311-build.patch
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ himmelblau.spec ++++++
--- /var/tmp/diff_new_pack.bmZm69/_old  2026-11-19 16:55:07.483807696 +0100
+++ /var/tmp/diff_new_pack.bmZm69/_new  2026-11-19 16:55:07.485807781 +0100
@@ -23,14 +23,14 @@
 %define chrome_ext_dir      /usr/share/google-chrome/extensions
 
 # SELinux macros
-%if 0%{?suse_version} >= 1600
+%if 0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000
 %define _selinux_sharedir   /usr/share/selinux
 %define _selinux_pkgdir     %{_selinux_sharedir}/packages
 %define _selinux_docdir     %{_docdir}/himmelblau-selinux/selinux
 %endif
 
 Name:           himmelblau
-Version:        3.1.14+git0.7d1ea961
+Version:        4.0.8+git0.a969c748
 Release:        0
 Summary:        Interoperability suite for Microsoft Azure Entra Id
 License:        GPL-3.0-or-later
@@ -39,15 +39,22 @@
 Source:         %{name}-%{version}.tar.bz2
 Source1:        vendor.tar.zst
 Source2:        cargo_config
-Patch0:         python311-build.patch
-Patch1:         conf_example.patch
-Patch2:         o365-url-handler-test-etxtbsy.patch
+Source3:        nsswitch-himmelblau.conf
+Source6:        himmelblau-rpmlintrc
 BuildRequires:  binutils
 BuildRequires:  cargo
 BuildRequires:  cargo-packaging
 BuildRequires:  clang-devel
 BuildRequires:  patchelf
 BuildRequires:  systemd-rpm-macros
+%if 0%{?suse_version}
+BuildRequires:  ca-certificates-mozilla
+BuildRequires:  fdupes
+BuildRequires:  nodejs-default
+%else
+BuildRequires:  nodejs
+%endif
+BuildRequires:  ca-certificates
 %if !0%{?suse_version}
 BuildRequires:  authselect
 %endif
@@ -69,63 +76,68 @@
 BuildRequires:  libudev-devel
 BuildRequires:  libunistring-devel
 BuildRequires:  make
+BuildRequires:  nsswitch-config
 BuildRequires:  openssl-devel
 BuildRequires:  pam-devel
 BuildRequires:  pcre2-devel
 BuildRequires:  pkg-config
 BuildRequires:  policycoreutils
 BuildRequires:  policycoreutils-devel
-%if 0%{?suse_version} < 1600
-# SLE 15.x ships Python 3.6; gen_param_code.py requires Python 3.9+ for 
dataclasses + PEP 585
-BuildRequires:  python311
-%else
 BuildRequires:  python3
-%endif
+BuildRequires:  rpm-build
 BuildRequires:  sqlite3-devel
 BuildRequires:  systemd-mini
 BuildRequires:  tpm2-0-tss-devel
 BuildRequires:  wget
-%if 0%{?suse_version} >= 1600
+%if 0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000
 BuildRequires:  selinux-policy-devel
 BuildRequires:  selinux-tools
 %endif
 ExclusiveArch:  %{rust_tier1_arches}
+Requires:       make
+Requires:       man
+Requires:       policycoreutils
+Requires:       systemd >= 235
+Provides:       aad-cli
+Provides:       aad-common
+Provides:       authd
+Provides:       authd-msentraid
 Recommends:     cron
+Recommends:     himmelblau-apparmor
+Recommends:     himmelblau-selinux
 Recommends:     krb5
 Recommends:     libnss_himmelblau2
 Recommends:     pam-himmelblau
-Recommends:     system-user-tss
-Recommends:     tpm2.0-tools
+Recommends:     (system-user-tss or tpm2-tss)
+Recommends:     (tpm2-tools or tpm2.0-tools)
 Suggests:       himmelblau-sso
-%if 0%{?suse_version} >= 1600
-Requires:       (%{name}-selinux if selinux-policy-targeted)
-%endif
+Suggests:       himmelblau-orchestrator
 
 %description
 Himmelblau is an interoperability suite for Microsoft Azure Entra Id
 and Intune, which allows users to sign into a Linux machine using Azure
 Entra Id credentials.
 
-%if 0%{?suse_version} >= 1600
+%if 0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000
 %package -n himmelblau-selinux
-Summary:        Himmelblau SELinux config
+Summary:        SELinux policy for Himmelblau
 Requires:       %{name} = %{version}
-# The `selinux_requires_min` macro doesn't exist on SLE16.0
-%if 0%{?suse_version} > 1600
-%{selinux_requires_min}
-%else
+Requires:       make
 Requires:       policycoreutils
-%endif
+Requires:       selinux-policy-devel
+BuildArch:      noarch
 
 %description -n himmelblau-selinux
-Himmelblau is an interoperability suite for Microsoft Azure Entra Id
-and Intune, which allows users to sign into a Linux machine using Azure
-Entra Id credentials.
+SELinux policy module sources for Himmelblau, an interoperability suite
+for Microsoft Azure Entra Id and Intune. The policy module is compiled
+and loaded on the host when the package is installed.
 %endif
 
 %package -n pam-himmelblau
 Summary:        Azure Entra Id authentication PAM module
 Requires:       %{name} = %{version}
+Provides:       libpam-aad
+Recommends:     authselect
 Recommends:     (oddjob-mkhomedir if authselect)
 Suggests:       himmelblau-qr-greeter
 Suggests:       authselect
@@ -140,7 +152,9 @@
 Requires:       %{name} = %{version}
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
-
+Requires(post): nsswitch-config
+Requires(postun): nsswitch-config
+Provides:       libnss-aad
 Provides:       nss-himmelblau
 
 %description -n libnss_himmelblau2
@@ -161,10 +175,24 @@
 and Intune, which allows users to sign into a Linux machine using Azure
 Entra Id credentials.
 
+%package -n himmelblau-broker
+Summary:        Azure Entra Id Browser broker service
+Requires:       %{name} = %{version}
+Provides:       microsoft-identity-broker
+
+%description -n himmelblau-broker
+Himmelblau Broker provides Azure Entra Id browser broker service functionality.
+It enables communication between the browser and the authentication backend,
+enabling single sign-on and other authentication features.
+
 %package -n himmelblau-sso
 Summary:        Azure Entra Id Browser SSO
 Requires:       %{name} = %{version}
+Requires:       himmelblau-broker
+Provides:       intune-portal
+Provides:       linux-entra-sso
 Recommends:     curl
+Recommends:     himmelblau-sso-policies
 Recommends:     jq
 Recommends:     libfuse2
 Supplements:    (MozillaFirefox and himmelblau)
@@ -178,6 +206,21 @@
 using native messaging and managed browser policies. It also provides
 web apps for common Office 365 applications (Teams, Outlook, etc).
 
+%package -n himmelblau-sso-policies
+Summary:        Browser policy files for Himmelblau SSO
+Recommends:     himmelblau-sso
+Recommends:     jq
+BuildArch:      noarch
+
+%description -n himmelblau-sso-policies
+Browser policy configuration files for Himmelblau SSO. This package
+installs policy files that automatically configure Chrome/Chromium and
+Firefox to install the required browser extension for SSO functionality.
+
+Install this package if you want automatic browser policy configuration.
+If you prefer to manage browser policies manually, you can skip this
+package and configure the extension installation yourself.
+
 %package -n himmelblau-qr-greeter
 Summary:        Azure Entra Id DAG URL QR code GNOME Shell extension
 Requires:       gnome-shell
@@ -190,31 +233,24 @@
 when a MS DAG URL is detected.
 
 %prep
-%autosetup -a1 -p1
+%autosetup -a1
 
 %build
 make rpm-servicefiles
-# The generated hsm-pin-init unit hardcodes /usr/libexec, but `%{_libexecdir}`
-# differs across SUSE releases (for example SLE15SP7 uses /usr/lib).
-sed -i 
's|^ExecStart=/usr/libexec/himmelblau-init-hsm-pin$|ExecStart=%{_libexecdir}/himmelblau-init-hsm-pin|'
 platform/opensuse/himmelblau-hsm-pin-init.service
-%if !(0%{?suse_version} >= 1600)
+%if !(0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000)
 export HIMMELBLAU_ALLOW_MISSING_SELINUX=1
 %endif
 %{cargo_build} --workspace --exclude himmelblau-fuzz
-%if 0%{?suse_version} >= 1600
-pushd src/selinux/src
-make -f %{_selinux_sharedir}/devel/Makefile NAME=himmelblaud
-popd
-%endif
+scripts/i18n-compile --profile release
 %if !0%{?suse_version}
 make authselect
 %endif
 
 %check
-%if !(0%{?suse_version} >= 1600)
+%if !(0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000)
 export HIMMELBLAU_ALLOW_MISSING_SELINUX=1
 %endif
-%{cargo_test} --workspace --exclude himmelblau-fuzz --exclude qr-greeter
+%{cargo_test} --workspace --exclude himmelblau-fuzz
 
 %install
 # NSS
@@ -224,6 +260,8 @@
 patchelf --set-soname libnss_himmelblau.so.2 
target/release/libnss_himmelblau.so
 install -m 0755 target/release/libnss_himmelblau.so 
%{buildroot}/%{_libdir}/libnss_himmelblau.so.2
 install -m 0644 src/nss/src/nss-himmelblau.tmpfiles.conf 
%{buildroot}/%{_tmpfilesdir}/nss-himmelblau.conf
+install -D -d -m 0755 %{buildroot}/%{_datadir}/nsswitch.conf.d
+install -m 0644 %{SOURCE3} 
%{buildroot}/%{_datadir}/nsswitch.conf.d/50-himmelblau.conf
 
 # PAM
 install -D -d -m 0755 %{buildroot}/%{_pam_moduledir}
@@ -231,6 +269,7 @@
 strip --strip-unneeded target/release/libpam_himmelblau.so
 install -m 0755 target/release/libpam_himmelblau.so 
%{buildroot}/%{_pam_moduledir}/pam_himmelblau.so
 install -m 0644 platform/opensuse/pam-config 
%{buildroot}/usr/lib/pam-config.d/himmelblau.conf
+install -m 0644 platform/opensuse/pam-config-unseal 
%{buildroot}/usr/lib/pam-config.d/himmelblau-unseal.conf
 %if !0%{?suse_version}
 install -D -d -m 0755 %{buildroot}/%{_datadir}/authselect/vendor/himmelblau/
 install -m 0755 platform/el/authselect/* 
%{buildroot}/%{_datadir}/authselect/vendor/himmelblau/
@@ -240,13 +279,13 @@
 install -D -d -m 0755 %{buildroot}%{_sbindir}
 install -D -d -m 0755 %{buildroot}%{_bindir}
 install -D -d -m 0755 %{buildroot}%{_unitdir}
-install -D -d -m 0755 %{buildroot}/%{_sysconfdir}/himmelblau
-install -D -d -m 0755 %{buildroot}%{_datarootdir}/dbus-1/services
+install -D -d -m 0755 %{buildroot}%{_userunitdir}
+install -D -d -m 0755 %{buildroot}%{_prefix}/lib/himmelblau
 install -D -d -m 0755 %{buildroot}%{_sysconfdir}/ssh/sshd_config.d
 install -D -d -m 0755 %{buildroot}%{_sysconfdir}/krb5.conf.d
 install -D -d -m 0755 %{buildroot}/%{_unitdir}/display-manager.service.d/
-install -d -m 0600 %{buildroot}%{_localstatedir}/cache/himmelblau-policies
 install -D -d -m 0755 %{buildroot}%{_datadir}/doc/himmelblau/
+install -D -d -m 0755 %{buildroot}%{_datadir}/doc/himmelblau-sso-policies/
 install -D -d -m 0755 %{buildroot}/%{_tmpfilesdir}/
 install -D -d -m 0755 %{buildroot}%{_mandir}/man1
 install -D -d -m 0755 %{buildroot}%{_mandir}/man5
@@ -254,55 +293,73 @@
 install -D -d -m 0755 %{buildroot}%{_libexecdir}
 strip --strip-unneeded target/release/himmelblaud
 strip --strip-unneeded target/release/himmelblaud_tasks
-strip --strip-unneeded target/release/broker
 strip --strip-unneeded target/release/aad-tool
-install -m 0644 src/config/himmelblau.conf.example 
%{buildroot}/%{_sysconfdir}/himmelblau/himmelblau.conf
+install -m 0644 target/config/himmelblau.conf.example 
%{buildroot}/%{_prefix}/lib/himmelblau/himmelblau.conf
 install -m 0644 src/config/gdm3_service_override.conf 
%{buildroot}/%{_unitdir}/display-manager.service.d/override.conf
 install -m 0755 target/release/aad-tool %{buildroot}/%{_bindir}/
 install -m 0644 platform/opensuse/himmelblaud-tasks.service 
%{buildroot}/%{_unitdir}/
 install -m 0644 platform/opensuse/himmelblaud.service %{buildroot}/%{_unitdir}/
+install -m 0644 platform/opensuse/himmelblaud.socket %{buildroot}/%{_unitdir}/
+install -m 0644 platform/opensuse/himmelblaud-tasks.socket 
%{buildroot}/%{_unitdir}/
+install -m 0644 platform/opensuse/himmelblaud-broker.socket 
%{buildroot}/%{_unitdir}/
 install -m 0644 platform/opensuse/himmelblau-hsm-pin-init.service 
%{buildroot}/%{_unitdir}/
+install -m 0644 platform/opensuse/himmelblau-compliance-check.service 
%{buildroot}/%{_userunitdir}/
+install -m 0644 platform/opensuse/himmelblau-compliance-check.timer 
%{buildroot}/%{_userunitdir}/
 install -m 0755 src/daemon/scripts/himmelblau-init-hsm-pin 
%{buildroot}/%{_libexecdir}/
 install -m 0755 target/release/himmelblaud %{buildroot}/%{_sbindir}/
 install -m 0755 target/release/himmelblaud_tasks %{buildroot}/%{_sbindir}/
 install -m 0644 README.md %{buildroot}/%{_datadir}/doc/himmelblau/README
-install -m 0644 src/config/himmelblau.conf.example 
%{buildroot}/%{_datadir}/doc/himmelblau/
+install -m 0644 target/config/himmelblau.conf.example 
%{buildroot}/%{_datadir}/doc/himmelblau/
 install -m 0644 man/man1/aad-tool.1 %{buildroot}/%{_mandir}/man1/
 install -m 0644 man/man5/himmelblau.conf.5 %{buildroot}/%{_mandir}/man5/
 install -m 0644 man/man8/himmelblaud.8 %{buildroot}/%{_mandir}/man8/
 install -m 0644 man/man8/himmelblaud_tasks.8 %{buildroot}/%{_mandir}/man8/
 install -m 0644 src/daemon/src/himmelblau-policies.tmpfiles.conf 
%{buildroot}/%{_tmpfilesdir}/himmelblau-policies.conf
-install -m 0644 src/daemon/src/himmelblaud.tmpfiles.conf 
%{buildroot}/%{_tmpfilesdir}/himmelblaud.conf
-%if 0%{?suse_version} < 1600
+%if 0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000
+install -D -d -m 0755 %{buildroot}/%{_selinux_pkgdir}/himmelblaud
+install -D -d -m 0755 %{buildroot}/%{_selinux_docdir}
+install -m 0644 src/selinux/src/himmelblaud.te 
%{buildroot}/%{_selinux_pkgdir}/himmelblaud/himmelblaud.te
+install -m 0644 src/selinux/src/himmelblaud.fc 
%{buildroot}/%{_selinux_pkgdir}/himmelblaud/himmelblaud.fc
+install -m 0644 src/selinux/src/himmelblaud.if 
%{buildroot}/%{_selinux_pkgdir}/himmelblaud/himmelblaud.if
+%endif
 pushd %{buildroot}%{_sbindir}
 ln -s himmelblaud rchimmelblaud
 ln -s himmelblaud_tasks rchimmelblaud_tasks
-ln -s broker rcbroker
 popd
-%endif
 
-# SELinux
-%if 0%{?suse_version} >= 1600
-install -D -d -m 0755 %{buildroot}/%{_selinux_pkgdir}/himmelblaud
-install -D -d -m 0755 %{buildroot}/%{_selinux_docdir}
-install -m 0644 src/selinux/src/himmelblaud.pp 
%{buildroot}/%{_selinux_pkgdir}/himmelblaud.pp
-install -m 0644 src/selinux/src/himmelblaud.te 
%{buildroot}/%{_selinux_pkgdir}/himmelblaud/himmelblaud.te
-install -m 0644 src/selinux/src/himmelblaud.fc 
%{buildroot}/%{_selinux_pkgdir}/himmelblaud/himmelblaud.fc
+install -d %{buildroot}%{_datadir}/locale
+cp -a target/release/locale/. %{buildroot}%{_datadir}/locale/
+find %{buildroot}%{_datadir}/locale -type f -exec chmod 0644 {} +
+
+# Aliases for bare language codes that have no catalog of their own
+install -D -m 0644 target/release/locale/pt_BR/LC_MESSAGES/himmelblau.mo   
%{buildroot}%{_datadir}/locale/pt/LC_MESSAGES/himmelblau.mo
+install -D -m 0644 target/release/locale/sr@latin/LC_MESSAGES/himmelblau.mo   
%{buildroot}%{_datadir}/locale/sr/LC_MESSAGES/himmelblau.mo
+%if 0%{?suse_version}
+%fdupes %{buildroot}%{_datadir}/locale
 %endif
 
+%find_lang himmelblau
+
 # SSHD Config
 install -D -d -m 0755 %{buildroot}%{_sysconfdir}/ssh/sshd_config.d
 install -m 0644 platform/el/sshd_config 
%{buildroot}/%{_sysconfdir}/ssh/sshd_config.d/30-himmelblau.conf
 
+# Broker
+install -D -d -m 0755 %{buildroot}%{_datarootdir}/dbus-1/services
+strip --strip-unneeded target/release/broker
+install -m 0755 target/release/broker 
%{buildroot}/%{_sbindir}/himmelblau_broker
+install -m 0644 src/broker/platform/com.microsoft.identity.broker1.service 
%{buildroot}/%{_datadir}/dbus-1/services/
+install -m 0644 src/broker/platform/himmelblau-broker.service 
%{buildroot}/%{_userunitdir}/
+pushd %{buildroot}%{_sbindir}
+ln -s himmelblau_broker rchimmelblau_broker
+popd
+
 # Single Sign On
 strip --strip-unneeded target/release/linux-entra-sso
 install -D -d -m 0755 %{buildroot}%{_libdir}/mozilla/native-messaging-hosts
-install -D -d -m 0755 %{buildroot}%{_sysconfdir}/firefox/policies
 install -D -d -m 0755 %{buildroot}%{chrome_nm_dir}
 install -D -d -m 0755 %{buildroot}%{chromium_nm_dir}
 install -D -d -m 0755 %{buildroot}%{chrome_ext_dir}
-install -D -d -m 0755 %{buildroot}%{chrome_policy_dir}
-install -D -d -m 0755 %{buildroot}%{chromium_policy_dir}
 install -D -d -m 0755 %{buildroot}%{_datadir}/applications/
 %{!?_iconsdir:%global _iconsdir %{_datadir}/icons}
 install -D -d -m 0755 %{buildroot}%{_iconsdir}/hicolor/256x256/apps
@@ -313,14 +370,20 @@
 install -m 0644 src/o365/src/*.png 
%{buildroot}/%{_iconsdir}/hicolor/256x256/apps/
 install -m 0755 target/release/linux-entra-sso 
%{buildroot}/%{_bindir}/linux-entra-sso
 install -m 0644 src/sso/src/firefox/linux_entra_sso.json 
%{buildroot}/%{_libdir}/mozilla/native-messaging-hosts/
-install -m 0644 src/sso-policies/src/firefox/policies.json 
%{buildroot}/%{_sysconfdir}/firefox/policies/
 install -m 0644 src/sso/src/chrome/linux_entra_sso.json 
%{buildroot}/%{chrome_nm_dir}/
 install -m 0644 src/sso/src/chrome/linux_entra_sso.json 
%{buildroot}/%{chromium_nm_dir}/
 install -m 0644 src/sso/src/chrome/extension.json 
%{buildroot}/%{chrome_ext_dir}/jlnfnnolkbjieggibinobhkjdfbpcohn.json
+# The dependency generator does not resolve the interpreter of "env" scripts
+sed -i '1s|^#!/usr/bin/env bash$|#!/bin/bash|' %{buildroot}%{_bindir}/o365 
%{buildroot}%{_bindir}/o365-multi %{buildroot}%{_bindir}/o365-url-handler
+
+# SSO Policies
+install -D -d -m 0755 %{buildroot}%{_sysconfdir}/firefox/policies
+install -D -d -m 0755 %{buildroot}%{chrome_policy_dir}
+install -D -d -m 0755 %{buildroot}%{chromium_policy_dir}
 install -m 0644 src/sso-policies/src/chrome/policies.json 
%{buildroot}/%{chrome_policy_dir}/himmelblau.json
 install -m 0644 src/sso-policies/src/chrome/policies.json 
%{buildroot}/%{chromium_policy_dir}/himmelblau.json
-install -m 0644 platform/opensuse/com.microsoft.identity.broker1.service 
%{buildroot}/%{_datadir}/dbus-1/services/
-install -m 0755 target/release/broker %{buildroot}/%{_sbindir}/
+install -m 0644 src/sso-policies/src/firefox/policies.json 
%{buildroot}/%{_datadir}/doc/himmelblau-sso-policies/firefox-policies.json.example
+install -m 0644 src/sso-policies/src/thunderbird/policies.json 
%{buildroot}/%{_datadir}/doc/himmelblau-sso-policies/thunderbird-policies.json.example
 
 # QR Greeter
 install -D -d -m 0755 
%{buildroot}%{_datarootdir}/gnome-shell/extensions/[email protected]
@@ -329,58 +392,727 @@
 install -m 0644 
target/release/qr-greeter-build/[email protected]/qrselection.js 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/qrselection.js
 install -m 0644 
target/release/qr-greeter-build/[email protected]/metadata.json 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/metadata.json
 install -m 0644 
target/release/qr-greeter-build/[email protected]/stylesheet.css 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/stylesheet.css
-install -m 0644 
target/release/qr-greeter-build/[email protected]/msdag.png 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/msdag.png
-install -m 0644 
target/release/qr-greeter-build/[email protected]/ms-consumer-dag.png
 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/ms-consumer-dag.png
+install -m 0644 
target/release/qr-greeter-build/[email protected]/security-key.svg 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/security-key.svg
+install -m 0644 
target/release/qr-greeter-build/[email protected]/security-key-touch.svg
 
%{buildroot}/%{_datadir}/gnome-shell/extensions/[email protected]/security-key-touch.svg
 
 %post -n libnss_himmelblau2
 /sbin/ldconfig
 
+handle_nsswitch_conf() {
+  conf=$1
+  sed -i '/^passwd:/ {/himmelblau/! s/$/ himmelblau/}' $conf
+  sed -i '/^group:/ {/himmelblau/! s/$/ himmelblau/}' $conf
+  sed -i '/^shadow:/ {/himmelblau/! s/$/ himmelblau/}' $conf
+  sed -i '/^initgroups:/ {/himmelblau/! s/$/ himmelblau/}' $conf
+}
+
+etc_nsswitch_conf="/etc/nsswitch.conf"
+usr_etc_nsswitch_conf="/usr/etc/nsswitch.conf"
+nsswitch_snippet="/usr/share/nsswitch.conf.d/50-himmelblau.conf"
+
+# Where the package ships a nsswitch.conf snippet (the nsswitch-config 
targets),
+# nsswitch-config merges it into /etc/nsswitch.conf. That only works if the 
file
+# is missing or was generated by nsswitch-config: an admin managed file is left
+# untouched and the result is written to /etc/nsswitch.conf.rpmnew.
+use_nsswitch_config() {
+  [ -f "$nsswitch_snippet" ] || return 1
+  command -v nsswitch-config >/dev/null 2>&1 || return 1
+  [ ! -e "$etc_nsswitch_conf" ] || nsswitch-config --is_generated >/dev/null 
2>&1
+}
+
+configured=0
+if use_nsswitch_config && nsswitch-config >/dev/null 2>&1; then
+  configured=1
+fi
+
+if [ "$configured" -eq 0 ]; then
+  if [ -f $etc_nsswitch_conf ]; then
+    handle_nsswitch_conf $etc_nsswitch_conf
+  elif [ -f $usr_etc_nsswitch_conf ]; then
+    cp $usr_etc_nsswitch_conf $etc_nsswitch_conf
+    handle_nsswitch_conf $etc_nsswitch_conf
+  fi
+fi
+
 # Ensure cache directory is created immediately after installation, ignoring 
failures
 systemd-tmpfiles --create /usr/lib/tmpfiles.d/nss-himmelblau.conf 2>/dev/null 
|| systemd-tmpfiles --create 
/usr/lib/x86_64-linux-gnu/tmpfiles.d/nss-himmelblau.conf 2>/dev/null || true
 
-%postun -n libnss_himmelblau2 -p /sbin/ldconfig
+%postun -n libnss_himmelblau2
+/sbin/ldconfig
+
+# Regenerate nsswitch.conf without the snippet of this package
+if [ "${1:-1}" = "0" ] && command -v nsswitch-config >/dev/null 2>&1 &&
+   [ -e /etc/nsswitch.conf ] && nsswitch-config --is_generated >/dev/null 
2>&1; then
+    nsswitch-config >/dev/null 2>&1 || :
+fi
+
+%post -n pam-himmelblau
+# Only create a symlink if it doesn't already exist
+if [ ! -e /lib64/security/pam_himmelblau.so ]; then
+    mkdir -p /lib64/security
+    ln -s /usr/lib64/security/pam_himmelblau.so 
/lib64/security/pam_himmelblau.so
+fi
+
+# Skip PAM configuration on upgrade ($1 >= 2) so admin customizations to
+# /etc/pam.d/*, authselect profiles, or pam-config state aren't reset by
+# a package update. Only the initial install wires PAM up.
+if [ "${1:-1}" -le 1 ]; then
+
+# 1) authselect first (if available)
+authselect_ok=0
+if command -v authselect >/dev/null 2>&1; then
+    feats="$(authselect current 2>/dev/null | awk '/Enabled 
features:/{f=1;next} f && /^-/{print $2}')"
+    if authselect select himmelblau $feats --force >/dev/null 2>&1; then
+        if authselect apply-changes >/dev/null 2>&1; then
+            authselect_ok=1
+        fi
+    fi
+fi
+
+# Helper: validate/fix pam-config account line for pam_himmelblau
+fix_pam_config_account_line() {
+    local pc="/etc/pam.d/common-account-pc"
+    local plain="/etc/pam.d/common-account"
+
+    [ -f "$pc" ] || return 1
+
+    # Detect legacy/simple pam-config output:
+    #   account required|sufficient pam_himmelblau.so ignore_unknown_user
+    if ! grep -Eq 
'^[[:space:]]*account[[:space:]]+(required|sufficient)[[:space:]]+pam_himmelblau\.so([[:space:]]+|$).*ignore_unknown_user'
 "$pc"; then
+        return 0
+    fi
+
+    # Ensure we have a self-managed common-account
+    if [ ! -f "$plain" ]; then
+        sed '/^[[:space:]]*#/d' "$pc" >"$plain" || return 1
+        chmod --reference="$pc" "$plain" || :
+    fi
+
+    # Make explicit himmelblau account denials terminal while preserving
+    # PAM_IGNORE fall-through for local users.
+    sed -i -E \
+        
's#^([[:space:]]*account[[:space:]]+)(required|sufficient)([[:space:]]+pam_himmelblau\.so([[:space:]]+|$).*ignore_unknown_user)#\1[success=ok
 auth_err=die default=ignore]\3#' \
+        "$plain" || return 1
+
+    return 0
+}
+
+# 2) pam-config second (if available)
+pam_config_ok=0
+if command -v pam-config >/dev/null 2>&1; then
+    # Attempt to add himmelblau via pam-config. Older pam-config may not 
recognize --himmelblau at all.
+    if pam-config --add --himmelblau >/dev/null 2>&1; then
+        pam_config_ok=1
+
+        # Validate/fix the known-bad older behavior (account required)
+        fix_pam_config_account_line >/dev/null 2>&1 || :
+    fi
+fi
+
+pamconfig_optout_self_managed_common() {
+    # Convert pam-config-generated common-*-pc into self-managed common-*
+    # per pam-config’s own header instructions.
+    local i pc plain
+
+    for i in account auth password session; do
+        pc="/etc/pam.d/common-${i}-pc"
+        plain="/etc/pam.d/common-${i}"
+
+        [ -f "$pc" ] || continue
+
+        # Only create/refresh common-* if it doesn't exist yet.
+        # (If it already exists, assume admin/system is already self-managed.)
+        if [ ! -f "$plain" ]; then
+            # Strip comment lines (pam-config’s suggestion)
+            sed '/^[[:space:]]*#/d' "$pc" >"$plain" || return 1
+            chmod --reference="$pc" "$plain" 2>/dev/null || :
+        fi
+    done
+
+    return 0
+}
+
+# 3) Final fallback: aad-tool configure-pam --really
+# Only do this if neither authselect nor pam-config was used successfully.
+if [ "$authselect_ok" -ne 1 ] && [ "$pam_config_ok" -ne 1 ]; then
+    if command -v aad-tool >/dev/null 2>&1; then
+        # Opt out of pam-config-managed common-*-pc so future pam-config runs
+        # don’t overwrite the configuration we’re about to install.
+        pamconfig_optout_self_managed_common >/dev/null 2>&1 || :
+        aad-tool configure-pam --really >/dev/null 2>&1 || :
+    fi
+fi
+
+fi  # end upgrade guard
+
+# If GDM is present, ensure keyring consumes the auth token so the keyring 
unlocks
+# like a normal password login.
+GDM_PAM="/etc/pam.d/gdm-password"
+if [ -f "$GDM_PAM" ]; then
+    # If the keyring auth line exists without use_authtok, add it.
+    if grep -Eq 
'^[[:space:]]*auth[[:space:]]+optional[[:space:]]+pam_gnome_keyring\.so' 
"$GDM_PAM" && \
+       ! grep -Eq 
'^[[:space:]]*auth[[:space:]]+optional[[:space:]]+pam_gnome_keyring\.so.*\buse_authtok\b'
 "$GDM_PAM"; then
+        sed -i -E 
'/^[[:space:]]*auth[[:space:]]+optional[[:space:]]+pam_gnome_keyring\.so/ 
{/use_authtok/! s/$/ use_authtok/;}' "$GDM_PAM" || :
+    fi
+fi
+
+%postun -n pam-himmelblau
+if [ "${1:-1}" = "0" ]; then
+    # Only remove a symlink if it exists and is a symlink
+    if [ -L /lib64/security/pam_himmelblau.so ]; then
+        rm -f /lib64/security/pam_himmelblau.so
+    fi
+
+    SYSTEMD_USER_OVERRIDE="/etc/pam.d/systemd-user"
+    SYSTEMD_USER_MARKER="# Managed by pam-himmelblau: systemd-user NSS account 
workaround"
+    if [ -f "$SYSTEMD_USER_OVERRIDE" ] && grep -qxF "$SYSTEMD_USER_MARKER" 
"$SYSTEMD_USER_OVERRIDE"; then
+        rm -f "$SYSTEMD_USER_OVERRIDE"
+    fi
+fi
+
+%preun -n pam-himmelblau
+# $1 is set by RPM: 0=uninstall, 1=upgrade. If your packager doesn’t pass it, 
we default to 0.
+if [ "${1:-0}" -ne 0 ]; then exit 0; fi   # don’t switch on upgrade
+if command -v authselect >/dev/null 2>&1; then
+    if authselect current 2>/dev/null | grep -qE "^Profile ID:\s+himmelblau$"; 
then
+        if   [ -d /usr/share/authselect/default/local   ]; then base=local
+        elif [ -d /usr/share/authselect/default/minimal ]; then base=minimal
+        else base=sssd; fi
+        feats="$(authselect current 2>/dev/null | awk '/Enabled 
features:/{f=1;next} f && /^-/{print $2}')"
+        authselect select "$base" $feats --force >/dev/null 2>&1 || :
+        authselect apply-changes >/dev/null 2>&1 || :
+    fi
+fi
 
 %post
-%service_add_post himmelblaud.service himmelblaud-tasks.service
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+        *" debian "* | *" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+# Detect if running on a Live system where service start should be skipped
+is_live_system() {
+    # Check common Live system indicators
+    grep -q 'boot=live' /proc/cmdline 2>/dev/null && return 0
+    grep -q 'rd.live' /proc/cmdline 2>/dev/null && return 0
+    [ -d /run/live ] && return 0
+    [ -f /.live-installer ] && return 0
+    # Check if running in a container (dracut/systemd-nspawn)
+    systemd-detect-virt -c -q 2>/dev/null && return 0
+    return 1
+}
+
+# Determine if SELinux policy for himmelblaud is loaded.
+# Returns success if SELinux is disabled or the policy is already loaded.
+selinux_policy_loaded() {
+    if ! command -v selinuxenabled >/dev/null 2>&1; then
+        return 0
+    fi
+
+    if ! selinuxenabled; then
+        return 0
+    fi
+
+    # If the policy sources are not installed, don't block service start.
+    if [ ! -d /usr/share/selinux/packages/himmelblaud ]; then
+        return 0
+    fi
+
+    if ! command -v semodule >/dev/null 2>&1; then
+        return 1
+    fi
+
+    semodule -l 2>/dev/null | awk '{print $1}' | grep -qx himmelblaud
+}
 
 # Ensure cache directory is created with correct permissions
 systemd-tmpfiles --create /usr/lib/tmpfiles.d/himmelblau-policies.conf 
2>/dev/null || true
 
-# Ensure private data directory is created with correct permissions
-systemd-tmpfiles --create /usr/lib/tmpfiles.d/himmelblaud.conf 2>/dev/null || 
true
+if is_debian_family; then
+    if [ "$1" != "configure" ]; then
+        exit 0
+    fi
+
+    # The following line should be removed in trixie or trixie+1
+    deb-systemd-helper unmask himmelblaud.service himmelblaud-tasks.service 
himmelblau-hsm-pin-init.service >/dev/null || true
+
+    # was-enabled defaults to true, so new installations run enable.
+    if deb-systemd-helper --quiet was-enabled himmelblaud.service 
himmelblaud-tasks.service himmelblau-hsm-pin-init.service; then
+        # Enables the unit on first installation, creates new
+        # symlinks on upgrades if the unit file has changed.
+        deb-systemd-helper enable himmelblaud.service 
himmelblaud-tasks.service himmelblau-hsm-pin-init.service >/dev/null || true
+    else
+        # Update the statefile to add new symlinks (if any), which need to be
+        # cleaned up on purge. Also remove old symlinks.
+        deb-systemd-helper update-state himmelblaud.service 
himmelblaud-tasks.service himmelblau-hsm-pin-init.service >/dev/null || true
+    fi
+
+    if [ -z "$DPKG_ROOT" ] && [ -d /run/systemd/system ]; then
+        if is_live_system; then
+            echo "Live system detected - skipping service start (HSM PIN will 
be initialized at first boot)"
+        else
+            deb-systemd-invoke daemon-reload --system >/dev/null || true
+            if ! selinux_policy_loaded; then
+                echo "SELinux enabled but himmelblaud policy not loaded yet; 
deferring service start"
+            else
+                deb-systemd-invoke restart himmelblaud.service 
himmelblaud-tasks.service >/dev/null || true
+            fi
+        fi
+    fi
+
+    # was-enabled defaults to true, so new installations run enable.
+    if deb-systemd-helper --user --quiet was-enabled 
himmelblau-compliance-check.timer; then
+        # Globally enable user timer for compliance checks (does not start 
existing sessions).
+        deb-systemd-helper --user enable himmelblau-compliance-check.timer 
>/dev/null || true
+    else
+        # Update the statefile to add new symlinks (if any), which need to be
+        # cleaned up on purge. Also remove old symlinks.
+        deb-systemd-helper --user update-state 
himmelblau-compliance-check.timer >/dev/null || true
+    fi
+else
+    # Presets the units; the restart on upgrade is done in the postun 
scriptlet.
+    %systemd_post himmelblaud.service himmelblaud.socket 
himmelblaud-tasks.service himmelblaud-tasks.socket himmelblaud-broker.socket 
himmelblau-hsm-pin-init.service
+    %systemd_user_post himmelblau-compliance-check.timer
+
+    # The preset above never starts anything, so start the daemons on a fresh 
install.
+    if [ "$1" -eq 1 ] && [ -d /run/systemd/system ]; then
+        if is_live_system; then
+            echo "Live system detected - skipping service start (HSM PIN will 
be initialized at first boot)"
+        elif ! selinux_policy_loaded; then
+            echo "SELinux enabled but himmelblaud policy not loaded yet; 
deferring service start"
+        else
+            systemctl start himmelblaud.service himmelblaud-tasks.service 
>/dev/null 2>&1 || true
+        fi
+    fi
+fi
+
+echo "Support Himmelblau: Financial support helps keep cloud identity for 
Linux open."
+echo "Learn more: https://himmelblau-idm.org/donations/";
 
 %postun
-%service_del_postun himmelblaud.service himmelblaud-tasks.service
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+# Detect if running on a Live system where service start should be skipped
+is_live_system() {
+    # Check common Live system indicators
+    grep -q 'boot=live' /proc/cmdline 2>/dev/null && return 0
+    grep -q 'rd.live' /proc/cmdline 2>/dev/null && return 0
+    [ -d /run/live ] && return 0
+    [ -f /.live-installer ] && return 0
+    # Check if running in a container (dracut/systemd-nspawn)
+    systemd-detect-virt -c -q 2>/dev/null && return 0
+    return 1
+}
+
+# Determine if SELinux policy for himmelblaud is loaded.
+# Returns success if SELinux is disabled or the policy is already loaded.
+selinux_policy_loaded() {
+    if ! command -v selinuxenabled >/dev/null 2>&1; then
+        return 0
+    fi
+
+    if ! selinuxenabled; then
+        return 0
+    fi
+
+    # If the policy sources are not installed, don't block service start.
+    if [ ! -d /usr/share/selinux/packages/himmelblaud ]; then
+        return 0
+    fi
+
+    if ! command -v semodule >/dev/null 2>&1; then
+        return 1
+    fi
+
+    semodule -l 2>/dev/null | awk '{print $1}' | grep -qx himmelblaud
+}
+
+# On full uninstall (purge on Debian, $1=0 on RPM): remove all runtime data,
+# caches, and AccountsService entries for Entra users so GDM stops listing 
them.
+_is_full_remove=0
+if is_debian_family; then
+    if [ "${1:-}" = "purge" ]; then _is_full_remove=1; fi
+else
+    if [ "${1:-1}" = "0" ]; then _is_full_remove=1; fi
+fi
 
-%if 0%{?suse_version} >= 1600
-%postun -n himmelblau-selinux
-%selinux_modules_uninstall himmelblaud
-%endif
+if is_debian_family; then
+    if [ -d /run/systemd/system ] && [ -z "$DPKG_ROOT" ] && [ "$1" = remove ]; 
then
+        deb-systemd-invoke daemon-reload --system >/dev/null || true
+    fi
+
+    if [ "$_is_full_remove" = "1" ] && [ -z "$DPKG_ROOT" ]; then
+        deb-systemd-helper purge himmelblaud.service himmelblaud-tasks.service 
himmelblau-hsm-pin-init.service >/dev/null || true
+        deb-systemd-helper --user purge himmelblau-compliance-check.timer 
>/dev/null || true
+    fi
+else
+    # Restarting on upgrade is done here (not in the post scriptlet) to avoid 
a double restart.
+    if is_live_system; then
+        echo "Live system detected - skipping service restart"
+        %systemd_postun himmelblaud.service himmelblaud.socket 
himmelblaud-tasks.service himmelblaud-tasks.socket himmelblaud-broker.socket 
himmelblau-hsm-pin-init.service
+    elif ! selinux_policy_loaded; then
+        echo "SELinux enabled but himmelblaud policy not loaded yet; skipping 
service restart"
+        %systemd_postun himmelblaud.service himmelblaud.socket 
himmelblaud-tasks.service himmelblaud-tasks.socket himmelblaud-broker.socket 
himmelblau-hsm-pin-init.service
+    else
+        %systemd_postun_with_restart himmelblaud.service himmelblaud.socket 
himmelblaud-tasks.service himmelblaud-tasks.socket himmelblaud-broker.socket 
himmelblau-hsm-pin-init.service
+    fi
+fi
+
+if [ "$_is_full_remove" = "1" ]; then
+    rm -rf /var/cache/himmelblaud/
+    rm -rf /var/cache/nss-himmelblau/
+    rm -rf /var/cache/himmelblau-policies/
+    rm -rf /var/lib/himmelblaud
+    rm -rf /var/lib/private/himmelblaud/
+
+    # Remove AccountsService entries for Entra users (UPN contains @)
+    # so GDM stops showing them on the login screen.
+    if [ -d /var/lib/AccountsService/users ]; then
+        find /var/lib/AccountsService/users -maxdepth 1 -type f -name '*@*' 
-delete || true
+    fi
+fi
 
 %pre
-%service_add_pre himmelblaud.service himmelblaud-tasks.service
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+if ! is_debian_family; then
+    %systemd_pre himmelblaud.service himmelblaud.socket 
himmelblaud-tasks.service himmelblaud-tasks.socket himmelblaud-broker.socket 
himmelblau-hsm-pin-init.service
+fi
+
+# Remove old service files from /etc/systemd/system/ that were installed by 
v1.4.x
+# These take precedence over the new files in /usr/lib/systemd/system/ and lack
+# the LoadCredentialEncrypted directive needed for HSM pin handling.
+# In order to avoid removing user overrides, check against the hashes of known 
old
+# files shipped by the package.
+for OLD_FILE in \
+    "/etc/systemd/system/himmelblaud.service" \
+    "/etc/systemd/system/himmelblaud-tasks.service" \
+    "/etc/systemd/system/gdm3.service.d/override.conf"; do
+    if [ -f "$OLD_FILE" ]; then
+        hash="$(md5sum "$OLD_FILE" 2>/dev/null | awk '{print $1}')"
+        for KNOWN_HASH in \
+            "e3b66fe76769d64610a353adf3dbc595" \
+            "7b0f82a49b6be1c285de8549e611ab66" \
+            "ed238618354f885a2b0c697278ea33e8" \
+            "65b026cc5d5f0f4d600184b6190b8cb3" \
+            "a40d5ca8aedba32f9399acc7e5fdd03d" \
+            "7473a7bee9c4ebde099a658522f21203" \
+            "5e0b319ec558849d4cd08e2d5eaf90e3" \
+            "60ad28a9039e527aa709137fe1f3db00" \
+            "95c442df9bd7c7d94d94292cdda14513" \
+            "73b676e55c6979c601b6c2d93257410f" \
+            "85ab21f2ac8b5c4b60451fa6540771db" \
+            "15501a8e5db36b92eac8a965d544bae8" \
+            "73fa66e462ff429076107e346d5ddbe8" \
+            "f794aaa11243213f8de06f1416f16682" \
+            "bde93199f6dc7b28d5e4e1d67504601b" \
+            "d7e2800688c23d570230296e17b0e6c2" \
+            "db8132b5813a3413b4647529cf7ea8f3" \
+            "8cffb12270663febb99c61e5d013926f" \
+            "ca442221291feb739fb0b078e036f6c9" \
+            "b18d0e9861fc161aa3a4c093f140bdf1" \
+            "337e41fad21375f4ee614caf3b07a2de" \
+            ; do
+            if [ "$hash" = "$KNOWN_HASH" ]; then
+                echo "Removing old service file: $OLD_FILE"
+                rm -f "$OLD_FILE"
+            fi
+        done
+    fi
+done
 
 %preun
-%service_del_preun himmelblaud.service himmelblaud-tasks.service
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+if is_debian_family; then
+    if [ -d /run/systemd/system ]; then
+        if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ]; then
+            deb-systemd-invoke stop himmelblaud.service 
himmelblaud-tasks.service himmelblau-hsm-pin-init.service >/dev/null || true
+        fi
+    fi
+
+    # Globally disable user timer on package removal (not during upgrades)
+    if [ "$1" = remove ] || [ "$1" = purge ]; then
+        deb-systemd-helper --user disable himmelblau-compliance-check.timer 
>/dev/null || true
+    fi
+else
+    %systemd_preun himmelblaud.service himmelblaud.socket 
himmelblaud-tasks.service himmelblaud-tasks.socket himmelblaud-broker.socket 
himmelblau-hsm-pin-init.service
+    %systemd_user_preun himmelblau-compliance-check.timer
+fi
+
+%posttrans
+config_file="/etc/himmelblau/himmelblau.conf"
+saved_config="${config_file}.rpmsave"
+
+# RPM creates .rpmsave after the post scriptlet when an owned config is 
removed during an
+# upgrade, so recover the previous local configuration at transaction end.
+if [ -f "$saved_config" ] && [ ! -e "$config_file" ] && [ ! -L "$config_file" 
]; then
+    echo "Restoring Himmelblau configuration from $saved_config"
+    if ! mv -- "$saved_config" "$config_file"; then
+        echo "Failed to restore Himmelblau configuration from $saved_config" 
>&2
+        exit 1
+    fi
+
+    if command -v systemctl >/dev/null 2>&1; then
+        systemctl try-restart himmelblaud.service himmelblaud-tasks.service 
2>/dev/null || true
+    fi
+fi
 
-%if 0%{?suse_version} >= 1600
+%if 0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000
 %posttrans -n himmelblau-selinux
-%selinux_modules_install %{_selinux_pkgdir}/himmelblaud.pp
+# Detect if running on a Live system where service start should be skipped
+is_live_system() {
+  # Check common Live system indicators
+  grep -q 'boot=live' /proc/cmdline 2>/dev/null && return 0
+  grep -q 'rd.live' /proc/cmdline 2>/dev/null && return 0
+  [ -d /run/live ] && return 0
+  [ -f /.live-installer ] && return 0
+  # Check if running in a container (dracut/systemd-nspawn)
+  systemd-detect-virt -c -q 2>/dev/null && return 0
+  return 1
+}
+
+SELINUX_SRC_DIR="/usr/share/selinux/packages/himmelblaud"
+SELINUX_MAKEFILE="/usr/share/selinux/devel/Makefile"
+SELINUX_POLICYTYPE="targeted"
+
+if [ -e /etc/selinux/config ]; then
+  . /etc/selinux/config
+fi
+
+selinux_configured() {
+  [ "${SELINUX:-}" = "disabled" ] && return 1
+  [ -n "${SELINUXTYPE:-}" ] && [ "$SELINUXTYPE" != "$SELINUX_POLICYTYPE" ] && 
return 1
+  command -v selinuxenabled >/dev/null 2>&1 && selinuxenabled && return 0
+  [ -e /etc/selinux/config ] && [ "${SELINUXTYPE:-}" = "$SELINUX_POLICYTYPE" ]
+}
+
+if selinux_configured; then
+  # Check if SELinux development tools are available
+  if [ ! -f "$SELINUX_MAKEFILE" ]; then
+    echo "Warning: SELinux development Makefile not found at $SELINUX_MAKEFILE"
+    echo "Please install selinux-policy-devel and re-run this script"
+    exit 0
+  fi
+
+  # Compile the policy module from source
+  if [ -d "$SELINUX_SRC_DIR" ]; then
+    echo "Compiling SELinux policy module..."
+    cd "$SELINUX_SRC_DIR"
+    if make -f "$SELINUX_MAKEFILE" himmelblaud.pp; then
+      echo "Installing SELinux policy module..."
+      if semodule -s "$SELINUX_POLICYTYPE" -i himmelblaud.pp; then
+        # Clean up compiled files (keep source for potential recompilation)
+        rm -f himmelblaud.pp tmp/*.* 2>/dev/null || :
+        rmdir tmp 2>/dev/null || :
 
-if command -v selinuxenabled >/dev/null 2>&1 && selinuxenabled && command -v 
restorecon >/dev/null 2>&1; then
+        # Relabel installed binaries
   restorecon -Fv /usr/sbin/himmelblaud /usr/sbin/himmelblaud_tasks 2>/dev/null 
|| :
 
+        # Relabel existing dirs (may not exist on fresh install)
+        [ -d /usr/lib/himmelblau ]            && restorecon -RFv 
/usr/lib/himmelblau || :
   [ -d /etc/himmelblau ]                && restorecon -RFv /etc/himmelblau || :
   [ -d /run/himmelblaud ]               && restorecon -RFv /run/himmelblaud || 
:
   [ -d /var/run/himmelblaud ]           && restorecon -RFv 
/var/run/himmelblaud || :
   [ -d /var/cache/private/himmelblaud ] && restorecon -RFv 
/var/cache/private/himmelblaud || :
   [ -d /var/cache/himmelblaud ]         && restorecon -RFv 
/var/cache/himmelblaud || :
   [ -d /var/cache/nss-himmelblau ]      && restorecon -RFv 
/var/cache/nss-himmelblau || :
+        [ -d /var/cache/himmelblau-policies ] && restorecon -RFv 
/var/cache/himmelblau-policies || :
   [ -d /var/lib/private/himmelblaud ]   && restorecon -RFv 
/var/lib/private/himmelblaud || :
   [ -d /var/lib/himmelblaud ]           && restorecon -RFv 
/var/lib/himmelblaud || :
+
+        # Restart daemons now that the policy is loaded (if present)
+        if [ -z "$DPKG_ROOT" ] && [ -d /run/systemd/system ] && ! 
is_live_system; then
+          systemctl daemon-reload >/dev/null 2>&1 || :
+          systemctl restart himmelblaud.service himmelblaud-tasks.service 
>/dev/null 2>&1 || :
+        fi
+
+        echo "SELinux policy module installed successfully"
+      else
+        echo "Warning: Failed to install SELinux policy module"
+      fi
+    else
+      echo "Warning: Failed to compile SELinux policy module"
+    fi
+  else
+    echo "Warning: SELinux source directory not found at $SELINUX_SRC_DIR"
+  fi
+fi
+
+%postun -n himmelblau-selinux
+if [ "$1" -eq 0 ]; then
+  if command -v selinuxenabled >/dev/null 2>&1 && selinuxenabled; then
+    semodule -r himmelblaud || :
+  fi
 fi
 %endif
 
+%post -n himmelblau-sshd-config
+# Comment out the `KbdInteractiveAuthentication no` line if present
+CONF="/etc/ssh/sshd_config"
+if [ -f "$CONF" ]; then
+    sed -i 
's/^KbdInteractiveAuthentication[[:space:]]\+no/#KbdInteractiveAuthentication 
no/' "$CONF"
+fi
+
+# Restart sshd if systemd is available, to make the config change take effect
+if command -v systemctl >/dev/null 2>&1; then
+    echo "Restarting sshd service..."
+    systemctl restart ssh 2>/dev/null || systemctl restart sshd 2>/dev/null || 
true
+fi
+
+%post -n himmelblau-broker
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+if is_debian_family; then
+    if [ "$1" != "configure" ]; then
+        exit 0
+    fi
+
+    if [ -z "$DPKG_ROOT" ] && [ -d /run/systemd/system ]; then
+        deb-systemd-invoke daemon-reload --user >/dev/null || true
+        deb-systemd-invoke restart --user himmelblau-broker.service >/dev/null 
|| true
+    fi
+else
+    # Reload and restart of user managers is handled by the systemd file
+    # triggers at the end of the transaction.
+    %systemd_user_post himmelblau-broker.service
+fi
+
+%postun -n himmelblau-broker
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+if is_debian_family; then
+    if [ -d /run/systemd/system ]; then
+        if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ]; then
+            deb-systemd-invoke daemon-reload --user >/dev/null || true
+        fi
+    fi
+else
+    # Restarting on upgrade is done here (not in the post scriptlet) to avoid 
a double restart.
+    %systemd_user_postun_with_restart himmelblau-broker.service
+fi
+
+%pre -n himmelblau-broker
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+if ! is_debian_family; then
+    %systemd_user_pre himmelblau-broker.service
+fi
+
+%preun -n himmelblau-broker
+is_debian_family() {
+    (
+        for f in /etc/os-release /usr/lib/os-release; do
+            if [ -r "$f" ]; then
+                . "$f"
+                break
+            fi
+        done
+        case " ${ID:-} ${ID_LIKE:-} " in
+            *" debian "*|*" ubuntu "*) exit 0 ;;
+        esac
+        exit 1
+    )
+}
+
+if is_debian_family; then
+    if [ -d /run/systemd/system ]; then
+        if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ]; then
+            deb-systemd-invoke stop --user himmelblau-broker.service 
>/dev/null || true
+        fi
+    fi
+else
+    %systemd_user_preun himmelblau-broker.service
+fi
+
 %post -n himmelblau-sso
 if command -v update-desktop-database >/dev/null 2>&1; then 
update-desktop-database -q || true; fi
 if [ -d /usr/share/icons/hicolor ] && command -v gtk-update-icon-cache 
>/dev/null 2>&1; then gtk-update-icon-cache -q /usr/share/icons/hicolor || 
true; fi
@@ -389,17 +1121,268 @@
 if command -v update-desktop-database >/dev/null 2>&1; then 
update-desktop-database -q || true; fi
 if [ -d /usr/share/icons/hicolor ] && command -v gtk-update-icon-cache 
>/dev/null 2>&1; then gtk-update-icon-cache -q /usr/share/icons/hicolor || 
true; fi
 
-%files
-%dir %{_sysconfdir}/himmelblau
-%dir %{_localstatedir}/cache/himmelblau-policies
+%post -n himmelblau-sso-policies
+# Himmelblau SSO policies postinst script
+# Merges Firefox/Thunderbird extension configuration into existing policies 
without overwriting
+# (Chrome/Chromium use separate policy files per application, so no merging 
needed)
+
+FIREFOX_EXTENSION_URL="https://github.com/siemens/linux-entra-sso/releases/download/v1.9.1/linux_entra_sso-1.9.1.xpi";
+THUNDERBIRD_EXTENSION_URL="https://github.com/siemens/linux-entra-sso/releases/download/v1.9.1/linux_entra_sso-1.9.1.thunderbird.xpi";
+
+# Function to merge a Mozilla extension into policies.json
+merge_mozilla_policy() {
+    POLICY_FILE="$1"
+    EXTENSION_URL="$2"
+    APP_NAME="$3"
+    EXTENSION_PATTERN="$4"
+    POLICY_DIR=$(dirname "$POLICY_FILE")
+
+    # Ensure directory exists
+    mkdir -p "$POLICY_DIR"
+
+    if [ -f "$POLICY_FILE" ]; then
+        # Check if jq is available for proper JSON merging
+        if command -v jq >/dev/null 2>&1; then
+            # Check if the extension URL is already present and no old managed 
URL remains
+            if jq -e --arg url "$EXTENSION_URL" --arg pattern 
"$EXTENSION_PATTERN" '
+                (.policies.Extensions.Install[]? | select(. == $url)) and
+                ([.policies.Extensions.Install[]? | select(type == "string" 
and test($pattern) and . != $url)] | length == 0)
+            ' "$POLICY_FILE" >/dev/null 2>&1; then
+                echo "$APP_NAME SSO extension already configured in 
$POLICY_FILE"
+                return 0
+            fi
+
+            # Replace old managed SSO extension URLs with the current one.
+            TEMP_FILE=$(mktemp)
+            jq --arg url "$EXTENSION_URL" --arg pattern "$EXTENSION_PATTERN" '
+                .policies.Extensions.Install = (
+                    ([.policies.Extensions.Install[]? | select((type == 
"string" and test($pattern)) | not)] + [$url])
+                    | unique
+                )
+            ' "$POLICY_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$POLICY_FILE"
+            echo "Merged $APP_NAME SSO extension into $POLICY_FILE"
+        else
+            # Without jq, check if our extension is already there
+            if grep -Fq "$EXTENSION_URL" "$POLICY_FILE" 2>/dev/null; then
+                echo "$APP_NAME SSO extension already configured in 
$POLICY_FILE"
+                return 0
+            fi
+            echo "Warning: jq not found. Cannot safely merge into existing 
$POLICY_FILE"
+            echo "Please manually replace old linux_entra_sso URLs in 
policies.Extensions.Install with:"
+            echo "  $EXTENSION_URL"
+        fi
+    else
+        # Create new policy file
+        cat > "$POLICY_FILE" << EOF
+{
+  "policies": {
+    "Extensions": {
+      "Install": [
+        "$EXTENSION_URL"
+      ]
+    }
+  }
+}
+EOF
+        echo "Created $APP_NAME SSO policy at $POLICY_FILE"
+    fi
+}
+
+# Merge Firefox and Thunderbird policies
+merge_mozilla_policy "/etc/firefox/policies/policies.json" 
"$FIREFOX_EXTENSION_URL" "Firefox" "linux_entra_sso-[0-9][0-9.]*\\.xpi$"
+merge_mozilla_policy "/etc/thunderbird/policies/policies.json" 
"$THUNDERBIRD_EXTENSION_URL" "Thunderbird" 
"linux_entra_sso-[0-9][0-9.]*\\.thunderbird\\.xpi$"
+# Betterbird is a Thunderbird fork; it does not read /etc/thunderbird/policies.
+merge_mozilla_policy "/etc/betterbird/policies/policies.json" 
"$THUNDERBIRD_EXTENSION_URL" "Betterbird" 
"linux_entra_sso-[0-9][0-9.]*\\.thunderbird\\.xpi$"
+if [ -d /opt/betterbird ]; then
+    merge_mozilla_policy "/opt/betterbird/distribution/policies.json" 
"$THUNDERBIRD_EXTENSION_URL" "Betterbird" 
"linux_entra_sso-[0-9][0-9.]*\\.thunderbird\\.xpi$"
+fi
+
+echo "Himmelblau SSO Mozilla policy configuration complete"
+
+%postun -n himmelblau-sso-policies
+# Himmelblau SSO policies postrm script
+# Removes Firefox/Thunderbird extension configuration that was merged during 
install
+# (Chrome/Chromium policy files are handled by package manager directly)
+
+FIREFOX_EXTENSION_URL="https://github.com/siemens/linux-entra-sso/releases/download/v1.9.1/linux_entra_sso-1.9.1.xpi";
+THUNDERBIRD_EXTENSION_URL="https://github.com/siemens/linux-entra-sso/releases/download/v1.9.1/linux_entra_sso-1.9.1.thunderbird.xpi";
+
+# Function to remove a Mozilla extension from policies.json
+remove_mozilla_policy() {
+    POLICY_FILE="$1"
+    EXTENSION_URL="$2"
+
+    if [ -f "$POLICY_FILE" ]; then
+        if command -v jq >/dev/null 2>&1; then
+            # Remove the extension URL from the Install array
+            TEMP_FILE=$(mktemp)
+            jq --arg url "$EXTENSION_URL" '
+                if .policies.Extensions.Install then
+                    .policies.Extensions.Install = 
[.policies.Extensions.Install[] | select(. != $url)]
+                else
+                    .
+                end
+            ' "$POLICY_FILE" > "$TEMP_FILE" && mv "$TEMP_FILE" "$POLICY_FILE"
+            echo "Removed Mozilla SSO extension from $POLICY_FILE"
+
+            # If the Install array is now empty, clean up the structure
+            if jq -e '.policies.Extensions.Install == []' "$POLICY_FILE" 
>/dev/null 2>&1; then
+                jq 'del(.policies.Extensions.Install)' "$POLICY_FILE" > 
"$TEMP_FILE" && mv "$TEMP_FILE" "$POLICY_FILE"
+            fi
+            # If Extensions is now empty, clean it up
+            if jq -e '.policies.Extensions == {}' "$POLICY_FILE" >/dev/null 
2>&1; then
+                jq 'del(.policies.Extensions)' "$POLICY_FILE" > "$TEMP_FILE" 
&& mv "$TEMP_FILE" "$POLICY_FILE"
+            fi
+            # If policies is now empty, remove the file
+            if jq -e '.policies == {}' "$POLICY_FILE" >/dev/null 2>&1; then
+                rm -f "$POLICY_FILE"
+                echo "Removed empty policy file $POLICY_FILE"
+            fi
+        else
+            echo "Warning: jq not found. Cannot safely remove SSO extension 
from $POLICY_FILE"
+            echo "Please manually remove the extension URL from 
policies.Extensions.Install:"
+            echo "  $EXTENSION_URL"
+        fi
+    fi
+}
+
+# Only run on Debian purge/remove or RPM erase ($1=0)
+case "$1" in
+    remove|purge|0)
+        # Remove Firefox and Thunderbird policies
+        remove_mozilla_policy "/etc/firefox/policies/policies.json" 
"$FIREFOX_EXTENSION_URL"
+        remove_mozilla_policy "/etc/thunderbird/policies/policies.json" 
"$THUNDERBIRD_EXTENSION_URL"
+        remove_mozilla_policy "/etc/betterbird/policies/policies.json" 
"$THUNDERBIRD_EXTENSION_URL"
+        remove_mozilla_policy "/opt/betterbird/distribution/policies.json" 
"$THUNDERBIRD_EXTENSION_URL"
+
+        echo "Himmelblau SSO Mozilla policy configuration removed"
+        ;;
+esac
+
+%post -n himmelblau-qr-greeter
+if command -v dconf >/dev/null 2>&1; then
+    # Enable extension for GDM user (login screen)
+    if getent passwd Debian-gdm >/dev/null 2>&1; then
+        echo "Enabling Himmelblau QR Greeter GNOME Shell extension for Debian 
GDM greeter..."
+
+        if [ -x /usr/share/gdm/generate-config ]; then
+            mkdir -p /usr/share/gdm/dconf
+
+            cat > /usr/share/gdm/dconf/01-himmelblau-qr-greeter << 'EOF'
+[org/gnome/shell]
+enabled-extensions=['[email protected]']
+EOF
+            echo "Created /usr/share/gdm/dconf/01-himmelblau-qr-greeter"
+
+            if /usr/share/gdm/generate-config; then
+                echo "Regenerated Debian GDM greeter dconf defaults."
+            else
+                echo 'Warning: Debian GDM greeter dconf generation failed' >&2
+            fi
+        else
+            echo 'Info: Debian-gdm user is available but 
/usr/share/gdm/generate-config is not executable; skipping Debian GDM extension 
enable.' >&2
+        fi
+    elif getent passwd gdm >/dev/null 2>&1; then
+        echo "Enabling Himmelblau QR Greeter GNOME Shell extension for GDM 
user..."
+
+        # Create /etc/dconf/profile/gdm if it doesn't exist
+        if [ ! -f /etc/dconf/profile/gdm ]; then
+            mkdir -p /etc/dconf/profile
+            cat > /etc/dconf/profile/gdm << 'EOF'
+user-db:user
+system-db:gdm
+file-db:/usr/share/gdm/greeter-dconf-defaults
+EOF
+            echo "Created /etc/dconf/profile/gdm"
+        fi
+
+        # Create dconf database directory if it doesn't exist
+        mkdir -p /etc/dconf/db/gdm.d
+
+        # Create the extension enablement configuration
+        cat > /etc/dconf/db/gdm.d/01-himmelblau-qr-greeter << 'EOF'
+[org/gnome/shell]
+enabled-extensions=['[email protected]']
+EOF
+        echo "Created /etc/dconf/db/gdm.d/01-himmelblau-qr-greeter"
+    else
+        echo 'Info: neither Debian-gdm nor gdm user is available; skipping GDM 
extension enable.' >&2
+    fi
+
+    # Enable extension for regular users (lockscreen)
+    echo "Enabling Himmelblau QR Greeter GNOME Shell extension for regular 
users..."
+
+    # Create /etc/dconf/profile/user if it doesn't exist
+    if [ ! -f /etc/dconf/profile/user ]; then
+        mkdir -p /etc/dconf/profile
+        cat > /etc/dconf/profile/user << 'EOF'
+user-db:user
+system-db:local
+EOF
+        echo "Created /etc/dconf/profile/user"
+    fi
+
+    # Create dconf database directory if it doesn't exist
+    mkdir -p /etc/dconf/db/local.d
+
+    # Create the extension enablement configuration for regular users
+    cat > /etc/dconf/db/local.d/01-himmelblau-qr-greeter << 'EOF'
+[org/gnome/shell]
+enabled-extensions=['[email protected]']
+EOF
+    echo "Created /etc/dconf/db/local.d/01-himmelblau-qr-greeter"
+
+    # Update dconf database
+    if dconf update; then
+        echo "Himmelblau QR Greeter GNOME Shell extension enabled for all 
users. You must restart GDM or log out and log in for the changes to take 
effect."
+    else
+        echo 'Warning: dconf update failed' >&2
+    fi
+else
+    echo 'Info: dconf not available; skipping automatic extension enable.' >&2
+fi
+
+%postun -n himmelblau-qr-greeter
+case "${1:-}" in
+    remove|purge|0)
+        rm -f /usr/share/gdm/dconf/01-himmelblau-qr-greeter
+        rm -f /etc/dconf/db/gdm.d/01-himmelblau-qr-greeter
+        rm -f /etc/dconf/db/local.d/01-himmelblau-qr-greeter
+
+        if [ -x /usr/share/gdm/generate-config ]; then
+            if /usr/share/gdm/generate-config; then
+                echo "Regenerated Debian GDM greeter dconf defaults."
+            else
+                echo 'Warning: Debian GDM greeter dconf generation failed' >&2
+            fi
+        fi
+
+        if command -v dconf >/dev/null 2>&1; then
+            if dconf update; then
+                echo "Himmelblau QR Greeter GNOME Shell extension dconf 
settings removed."
+            else
+                echo 'Warning: dconf update failed' >&2
+            fi
+        fi
+        ;;
+esac
+
+%files -f himmelblau.lang
+%dir %{_prefix}/lib/himmelblau
+%dir %ghost %dir %attr(0600,root,root) 
%{_localstatedir}/cache/himmelblau-policies
 %dir %{_unitdir}/display-manager.service.d
 %dir %{_datadir}/doc/himmelblau
-%config(noreplace) %{_sysconfdir}/himmelblau/himmelblau.conf
+%{_prefix}/lib/himmelblau/himmelblau.conf
 %{_unitdir}/display-manager.service.d/override.conf
 %{_bindir}/aad-tool
 %{_unitdir}/himmelblaud-tasks.service
 %{_unitdir}/himmelblaud.service
+%{_unitdir}/himmelblaud.socket
+%{_unitdir}/himmelblaud-tasks.socket
+%{_unitdir}/himmelblaud-broker.socket
 %{_unitdir}/himmelblau-hsm-pin-init.service
+%{_userunitdir}/himmelblau-compliance-check.service
+%{_userunitdir}/himmelblau-compliance-check.timer
 %{_libexecdir}/himmelblau-init-hsm-pin
 %{_sbindir}/himmelblaud
 %{_sbindir}/himmelblaud_tasks
@@ -410,38 +1393,32 @@
 %{_mandir}/man8/himmelblaud.8*
 %{_mandir}/man8/himmelblaud_tasks.8*
 %{_tmpfilesdir}/himmelblau-policies.conf
-%{_tmpfilesdir}/himmelblaud.conf
-%if 0%{?suse_version} < 1600
 %{_sbindir}/rchimmelblaud
 %{_sbindir}/rchimmelblaud_tasks
-%endif
-%{_datadir}/dbus-1/services/com.microsoft.identity.broker1.service
-%{_sbindir}/broker
-%if 0%{?suse_version} < 1600
-%{_sbindir}/rcbroker
-%endif
 
-%if 0%{?suse_version} >= 1600
+%if 0%{?suse_version} > 1600 || 0%{?sle_version} >= 160000
 %files -n himmelblau-selinux
 %dir %{_docdir}/himmelblau-selinux
 %dir %{_selinux_docdir}
 %dir %{_selinux_pkgdir}
 %dir %{_selinux_pkgdir}/himmelblaud
-%{_selinux_pkgdir}/himmelblaud.pp
 %{_selinux_pkgdir}/himmelblaud/himmelblaud.te
 %{_selinux_pkgdir}/himmelblaud/himmelblaud.fc
+%{_selinux_pkgdir}/himmelblaud/himmelblaud.if
 %endif
 
 %files -n libnss_himmelblau2
 %dir %{_tmpfilesdir}
 %{_libdir}/libnss_himmelblau.so.2
 %{_tmpfilesdir}/nss-himmelblau.conf
-%ghost %attr(0755,root,root) /%{_localstatedir}/cache/nss-himmelblau
+%{_datadir}/nsswitch.conf.d/50-himmelblau.conf
+%ghost %dir %attr(0755,root,root) /var/cache/nss-himmelblau
 
 %files -n pam-himmelblau
-%{_pam_moduledir}/pam_himmelblau.so
 %dir /usr/lib/pam-config.d
+%{_pam_moduledir}/pam_himmelblau.so
 /usr/lib/pam-config.d/himmelblau.conf
+/usr/lib/pam-config.d/himmelblau-unseal.conf
 %if !0%{?suse_version}
 %dir %{_datadir}/authselect
 %dir %{_datadir}/authselect/vendor
@@ -455,24 +1432,19 @@
 %dir %{_sysconfdir}/ssh/sshd_config.d
 %endif
 
+%files -n himmelblau-broker
+%{_sbindir}/himmelblau_broker
+%{_datadir}/dbus-1/services/com.microsoft.identity.broker1.service
+%{_userunitdir}/himmelblau-broker.service
+%{_sbindir}/rchimmelblau_broker
+
 %files -n himmelblau-sso
 %dir %{_libdir}/mozilla
 %dir %{_libdir}/mozilla/native-messaging-hosts
-%dir %{_sysconfdir}/firefox
-%dir %{_sysconfdir}/firefox/policies
 %dir /etc/chromium
-%dir /etc/chromium/native-messaging-hosts
-%dir /etc/chromium/policies
-%dir /etc/chromium/policies/managed
-%dir /etc/opt/chrome
-%dir /etc/opt/chrome/native-messaging-hosts
-%dir /etc/opt/chrome/policies
-%dir /etc/opt/chrome/policies/managed
 %dir /usr/share/google-chrome
 %dir %{chrome_nm_dir}
 %dir %{chromium_nm_dir}
-%dir %attr(0555,root,root) %{chrome_policy_dir}
-%dir %attr(0555,root,root) %{chromium_policy_dir}
 %dir %{chrome_ext_dir}
 %dir %{_iconsdir}/hicolor
 %dir %{_iconsdir}/hicolor/256x256
@@ -484,12 +1456,23 @@
 %{_iconsdir}/hicolor/256x256/apps/*.png
 %{_bindir}/linux-entra-sso
 %{_libdir}/mozilla/native-messaging-hosts/linux_entra_sso.json
-%config %{_sysconfdir}/firefox/policies/policies.json
-%{chrome_nm_dir}/linux_entra_sso.json
-%{chromium_nm_dir}/linux_entra_sso.json
+%config %{chrome_nm_dir}/linux_entra_sso.json
+%config %{chromium_nm_dir}/linux_entra_sso.json
 %{chrome_ext_dir}/jlnfnnolkbjieggibinobhkjdfbpcohn.json
-%{chrome_policy_dir}/himmelblau.json
-%{chromium_policy_dir}/himmelblau.json
+
+%files -n himmelblau-sso-policies
+%dir /etc/firefox
+%dir /etc/firefox/policies
+%dir /etc/chromium/policies
+%dir /etc/opt/chrome
+%dir /etc/opt/chrome/policies
+%dir %attr(0555,root,root) %{chrome_policy_dir}
+%dir %attr(0555,root,root) %{chromium_policy_dir}
+%dir %{_datadir}/doc/himmelblau-sso-policies
+%config %{chrome_policy_dir}/himmelblau.json
+%config %{chromium_policy_dir}/himmelblau.json
+%{_datadir}/doc/himmelblau-sso-policies/firefox-policies.json.example
+%{_datadir}/doc/himmelblau-sso-policies/thunderbird-policies.json.example
 
 %files -n himmelblau-qr-greeter
 %dir %{_datarootdir}/gnome-shell
@@ -500,6 +1483,6 @@
 %{_datadir}/gnome-shell/extensions/[email protected]/qrselection.js
 %{_datadir}/gnome-shell/extensions/[email protected]/metadata.json
 %{_datadir}/gnome-shell/extensions/[email protected]/stylesheet.css
-%{_datadir}/gnome-shell/extensions/[email protected]/msdag.png
-%{_datadir}/gnome-shell/extensions/[email protected]/ms-consumer-dag.png
+%{_datadir}/gnome-shell/extensions/[email protected]/security-key.svg
+%{_datadir}/gnome-shell/extensions/[email protected]/security-key-touch.svg
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.bmZm69/_old  2026-11-19 16:55:07.538810028 +0100
+++ /var/tmp/diff_new_pack.bmZm69/_new  2026-11-19 16:55:07.541810155 +0100
@@ -2,7 +2,7 @@
        <service name="tar_scm" mode="manual">
                <param 
name="url">https://github.com/himmelblau-idm/himmelblau.git</param>
                <param name="scm">git</param>
-               <param name="revision">stable-3.x</param>
+               <param name="revision">stable-4.x</param>
                <param 
name="versionformat">@PARENT_TAG@+git@TAG_OFFSET@.%h</param>
                <param name="versionrewrite-pattern">himmelblau-(.*)</param>
                <param name="versionrewrite-replacement">\1</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.bmZm69/_old  2026-11-19 16:55:07.564811130 +0100
+++ /var/tmp/diff_new_pack.bmZm69/_new  2026-11-19 16:55:07.567811257 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/himmelblau-idm/himmelblau.git</param>
-              <param 
name="changesrevision">7d1ea961cae172dd844018171e4fbd8d343bfa08</param></service></servicedata>
+              <param 
name="changesrevision">a969c7488164dc67e6159c9ecc5eaa6329eb7664</param></service></servicedata>
 (No newline at EOF)
 

++++++ himmelblau-3.1.14+git0.7d1ea961.tar.bz2 -> 
himmelblau-4.0.8+git0.a969c748.tar.bz2 ++++++
++++ 110152 lines of diff (skipped)

++++++ himmelblau-rpmlintrc ++++++
# rpmlint filters for the himmelblau package

# libnss_himmelblau2 deliberately requires "himmelblau = %{version}-%{release}".
#
# The Shared Library Policy warns about fixed-version dependencies in library
# packages because they get in the way of installing several versions of the
# same library in parallel (libfoo1 / libfoo2). That does not apply here:
#
# * libnss_himmelblau.so.2 is a glibc NSS plugin. The ".2" is glibc's NSS
#   interface version, not a Himmelblau ABI version. nsswitch.conf loads it
#   by name, from a single fixed path, and only one himmelblaud can run on a
#   host, so parallel installation of two versions is impossible anyway.
# * The module is a client of himmelblaud. It links the daemon's
#   request/response types (himmelblau_unix_common) and talks to the daemon
#   over a unix socket using serde_json-serialized messages, with no protocol
#   version negotiation. A partial upgrade, with the NSS module and the daemon
#   from different builds, can silently misparse messages and break user
#   lookups for every process on the system, so both must always be the same
#   build. See "rpm: couple interdependent package versions" (84bd98c3).
#
# Moving the dependency to "the runtime users of the library" as the policy
# suggests would not help: nothing else uses the library, nsswitch does.
addFilter("libnss_himmelblau2.*: W: shlib-fixed-dependency")

# himmelblau-selinux requires selinux-policy-devel on purpose: the policy module
# is compiled from the shipped sources at install time (posttrans), against the
# policy installed on the host, as there is no prebuilt module that fits every
# distribution's base policy.
addFilter("himmelblau.*: E: devel-dependency selinux-policy-devel")

++++++ nsswitch-himmelblau.conf ++++++
# Resolve Entra ID users and groups with the Himmelblau NSS module, after the
# local files (30-compat.conf) and the systemd dynamic users (40-systemd.conf).
# initgroups is intentionally not set: it follows the group database.
passwd: himmelblau
group:  himmelblau
shadow: himmelblau

++++++ vendor.tar.zst ++++++
/work/SRC/openSUSE:Factory/himmelblau/vendor.tar.zst 
/work/SRC/openSUSE:Factory/.himmelblau.new.1251/vendor.tar.zst differ: char 7, 
line 1

Reply via email to