[arch-commits] Commit in keycloak/repos (9 files)

Sven-Hendrik Haase svenstaro at gemini.archlinux.org
Fri Dec 17 18:35:38 UTC 2021


    Date: Friday, December 17, 2021 @ 18:35:38
  Author: svenstaro
Revision: 1076464

archrelease: copy trunk to community-testing-any

Added:
  keycloak/repos/community-testing-any/
  keycloak/repos/community-testing-any/PKGBUILD
    (from rev 1076463, keycloak/trunk/PKGBUILD)
  keycloak/repos/community-testing-any/common.sh
    (from rev 1076463, keycloak/trunk/common.sh)
  keycloak/repos/community-testing-any/keycloak.service
    (from rev 1076463, keycloak/trunk/keycloak.service)
  keycloak/repos/community-testing-any/keycloak.sysusers
    (from rev 1076463, keycloak/trunk/keycloak.sysusers)
  keycloak/repos/community-testing-any/keycloak.tmpfiles
    (from rev 1076463, keycloak/trunk/keycloak.tmpfiles)
  keycloak/repos/community-testing-any/layers.conf
    (from rev 1076463, keycloak/trunk/layers.conf)
  keycloak/repos/community-testing-any/pin-java-version.patch
    (from rev 1076463, keycloak/trunk/pin-java-version.patch)
  keycloak/repos/community-testing-any/postgresql-module.xml
    (from rev 1076463, keycloak/trunk/postgresql-module.xml)

------------------------+
 PKGBUILD               |   88 +++++++++++++++++++++++++++++++++++++++++++++++
 common.sh              |    3 +
 keycloak.service       |   27 ++++++++++++++
 keycloak.sysusers      |    1 
 keycloak.tmpfiles      |    5 ++
 layers.conf            |    1 
 pin-java-version.patch |   27 ++++++++++++++
 postgresql-module.xml  |   12 ++++++
 8 files changed, 164 insertions(+)

Copied: keycloak/repos/community-testing-any/PKGBUILD (from rev 1076463, keycloak/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1,88 @@
+# Maintainer: Sven-Hendrik Haase <svenstaro at archlinux.org>
+# Contributor: Nikita Volodin <volodin.n at gmail dot com>
+
+pkgname=keycloak
+pkgver=16.0.0
+_postgresql_jdbc=42.3.1
+_java=11
+pkgrel=1
+pkgdesc="Open Source Identity and Access Management For Modern Applications and Services"
+arch=('any')
+url="https://www.keycloak.org/"
+license=('Apache')
+depends=("java-runtime=${_java}" 'grep' 'bash' 'coreutils' 'util-linux')
+makedepends=('maven' 'git' "java-environment=${_java}")
+backup=(
+  opt/keycloak/standalone/configuration/application-roles.properties
+  opt/keycloak/standalone/configuration/application-users.properties
+  opt/keycloak/standalone/configuration/logging.properties
+  opt/keycloak/standalone/configuration/mgmt-groups.properties
+  opt/keycloak/standalone/configuration/mgmt-users.properties
+  opt/keycloak/standalone/configuration/standalone-ha.xml
+  opt/keycloak/standalone/configuration/standalone.xml
+)
+options=(emptydirs)
+source=(https://github.com/keycloak/keycloak/archive/$pkgver/$pkgname-$pkgver.tar.gz
+        keycloak.service
+        keycloak.sysusers
+        keycloak.tmpfiles
+        layers.conf
+        postgresql-module.xml
+        https://jdbc.postgresql.org/download/postgresql-${_postgresql_jdbc}.jar
+        common.sh
+        pin-java-version.patch)
+sha512sums=('353974b17a94495bcc82e0e1b6b8f2b2e56b939c203d4e7af92400b883fff385dfe591b9f5bcfd468202259ef1f2d05c77c29f8482ddc44a8bc274347f450fe1'
+            'dd10a38e4c8867de6d1fcbb4939c6c5946684842462eba3d5355bf1de13fa059edfd5eba37adce587c824ddd618b6bb88d4bbe1ee568ca5abd0f72296da3ddfe'
+            'c53b734598ccf675930754514bd2af628355025197e77541e5acb8718629a8ece763c814e8373278758a30475e6a716febeff10bdebf0847d914bc193e732c79'
+            '9382b42f09040e34fe1a27d9ff4fb87cabd41525ca26f8ea9629df0169cf93d95cc4bb62bcc5c2ca30efdfd7eeeb13a6f090df9a05823baf701ba729a47f6fd1'
+            'd54a04c120edb933c4f7168460bd813ff92a4e3771cedcabfeeb76c5d3e057b3cd0d0486dc11ddbd91e8d87ca90193e4c74cc3414e45106dd556d455ac7e60b2'
+            '5eece4f3eb57372969f0e5319804198b546455828e938ff7f37bbcfb58be08efde43a5b0376c98f359c4bc5eb069e0cd9410daefe19da1c03e9e9c57d3c1b75b'
+            '51cf3d0de9d9f0d41591aa32d5fabbc711991daf4b11531f5d1bd9d288a089861624c9f58e195c869e6a11f0651046ed0f183bffce977566181582c9ab8c3aab'
+            '4ae3f9fc42bfee602480c1c8cc2d65b44305622b426b74070758fe1c92a06ff12901ffebacbfe2ba34cbf783a8787f6073f74db3674c96e7a6109ed5b45d3a07'
+            'cb7d95aef66303c7935714c58c51aa1714419c455a6f46c32a79e80dbe4b6523d0dd77bb5f606c5cfdf0380f01220af720f93285658fc19a38b860344a2b9198')
+
+prepare() {
+  cd $pkgname-$pkgver
+  patch -Np1 -i "$srcdir"/pin-java-version.patch
+}
+
+build() {
+  cd $pkgname-$pkgver
+
+  export PATH="/usr/lib/jvm/java-${_java}-openjdk/bin:$PATH"
+  mvn -Pdistribution \
+    -s maven-settings.xml \
+    -pl distribution/server-dist \
+    -am \
+    -Dmaven.test.skip \
+    clean install
+}
+
+package() {
+  cd $pkgname-$pkgver
+
+  mkdir -p "$pkgdir/opt"
+  cp -r "distribution/server-dist/target/keycloak-$pkgver" "$pkgdir/opt/keycloak"
+  install -Dm 644 "$srcdir"/layers.conf -t "$pkgdir/opt/keycloak/modules"
+  install -d "$pkgdir"/opt/keycloak/standalone/{data,log}
+
+  install -Dm644 "$srcdir"/postgresql-${_postgresql_jdbc}.jar "$pkgdir"/opt/keycloak/modules/system/layers/keycloak/org/postgresql/main/postgresql-${_postgresql_jdbc}.jar
+  sed "s/@JDBC_POSTGRESQL_JAR@/postgresql-${_postgresql_jdbc}.jar/g" "$srcdir"/postgresql-module.xml > "$pkgdir"/opt/keycloak/modules/system/layers/keycloak/org/postgresql/main/module.xml
+
+  install -d "$pkgdir/"{etc,var/log,var/lib/keycloak}
+  ln -s /opt/keycloak/standalone/configuration "$pkgdir/etc/keycloak"
+  ln -s /opt/keycloak/standalone/log "$pkgdir/var/log/keycloak"
+  ln -s /opt/keycloak/standalone/deployments "$pkgdir/var/lib/keycloak/deployments"
+
+  install -Dm644 "$srcdir"/keycloak.service "$pkgdir"/usr/lib/systemd/system/keycloak.service
+  install -Dm644 "$srcdir"/keycloak.sysusers "$pkgdir"/usr/lib/sysusers.d/keycloak.conf
+  install -Dm644 "$srcdir"/keycloak.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/keycloak.conf
+
+  mkdir -p "$pkgdir"/usr/bin
+  ln -s /opt/keycloak/bin/kcadm.sh "$pkgdir"/usr/bin/kcadm
+  ln -s /opt/keycloak/bin/kcreg.sh "$pkgdir"/usr/bin/kcreg
+
+  install -Dm644 "$srcdir"/common.sh "$pkgdir"/opt/keycloak/bin/common.sh
+}
+
+# vim: ts=2 sw=2 et:

Copied: keycloak/repos/community-testing-any/common.sh (from rev 1076463, keycloak/trunk/common.sh)
===================================================================
--- community-testing-any/common.sh	                        (rev 0)
+++ community-testing-any/common.sh	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1,3 @@
+# Pin java version
+export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
+export JAVA="$JAVA_HOME/bin/java"

Copied: keycloak/repos/community-testing-any/keycloak.service (from rev 1076463, keycloak/trunk/keycloak.service)
===================================================================
--- community-testing-any/keycloak.service	                        (rev 0)
+++ community-testing-any/keycloak.service	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1,27 @@
+[Unit]
+Description=Keycloak server
+After=network-online.target
+Wants=network-online.target systemd-networkd-wait-online.service
+
+[Service]
+User=keycloak
+Group=keycloak
+ExecStart=/opt/keycloak/bin/standalone.sh
+WorkingDirectory=/opt/keycloak
+ReadWritePaths=/opt/keycloak/standalone/data /opt/keycloak/standalone/tmp /opt/keycloak/standalone/log /opt/keycloak/standalone/configuration /opt/keycloak/standalone/deployments
+
+# Hardening options
+CapabilityBoundingSet=
+AmbientCapabilities=
+NoNewPrivileges=true
+ProtectHome=true
+ProtectSystem=strict
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectControlGroups=true
+PrivateTmp=true
+PrivateDevices=true
+LockPersonality=true
+
+[Install]
+WantedBy=multi-user.target

Copied: keycloak/repos/community-testing-any/keycloak.sysusers (from rev 1076463, keycloak/trunk/keycloak.sysusers)
===================================================================
--- community-testing-any/keycloak.sysusers	                        (rev 0)
+++ community-testing-any/keycloak.sysusers	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1 @@
+u keycloak - "keycloak user" /opt/keycloak -

Copied: keycloak/repos/community-testing-any/keycloak.tmpfiles (from rev 1076463, keycloak/trunk/keycloak.tmpfiles)
===================================================================
--- community-testing-any/keycloak.tmpfiles	                        (rev 0)
+++ community-testing-any/keycloak.tmpfiles	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1,5 @@
+z /opt/keycloak/standalone/tmp - keycloak keycloak -
+z /opt/keycloak/standalone/data - keycloak keycloak -
+z /opt/keycloak/standalone/log - keycloak keycloak -
+Z /opt/keycloak/standalone/configuration - keycloak keycloak -
+Z /opt/keycloak/standalone/deployments - keycloak keycloak -

Copied: keycloak/repos/community-testing-any/layers.conf (from rev 1076463, keycloak/trunk/layers.conf)
===================================================================
--- community-testing-any/layers.conf	                        (rev 0)
+++ community-testing-any/layers.conf	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1 @@
+layers=keycloak

Copied: keycloak/repos/community-testing-any/pin-java-version.patch (from rev 1076463, keycloak/trunk/pin-java-version.patch)
===================================================================
--- community-testing-any/pin-java-version.patch	                        (rev 0)
+++ community-testing-any/pin-java-version.patch	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1,27 @@
+diff --git a/integration/client-cli/admin-cli/src/main/bin/kcadm.sh b/integration/client-cli/admin-cli/src/main/bin/kcadm.sh
+index a7bfc6a48a..770e28c332 100755
+--- a/integration/client-cli/admin-cli/src/main/bin/kcadm.sh
++++ b/integration/client-cli/admin-cli/src/main/bin/kcadm.sh
+@@ -20,7 +20,7 @@ if [ "x$RESOLVED_NAME" = "x" ]; then
+ fi
+ 
+ DIRNAME=`dirname "$RESOLVED_NAME"`
++. "$DIRNAME/common.sh"
+ 
+-
+-java $KC_OPTS -cp $DIRNAME/client/keycloak-admin-cli-${project.version}.jar org.keycloak.client.admin.cli.KcAdmMain "$@"
++$JAVA $KC_OPTS -cp $DIRNAME/client/keycloak-admin-cli-${project.version}.jar org.keycloak.client.admin.cli.KcAdmMain "$@"
+ 
+diff --git a/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh b/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh
+index 83bd4b70e4..0acb8692ce 100755
+--- a/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh
++++ b/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh
+@@ -20,4 +20,6 @@ if [ "x$RESOLVED_NAME" = "x" ]; then
+ fi
+ 
+ DIRNAME=`dirname "$RESOLVED_NAME"`
+-java $KC_OPTS -cp $DIRNAME/client/keycloak-client-registration-cli-${project.version}.jar org.keycloak.client.registration.cli.KcRegMain "$@"
+\ No newline at end of file
++. "$DIRNAME/common.sh"
++
++$JAVA $KC_OPTS -cp $DIRNAME/client/keycloak-client-registration-cli-${project.version}.jar org.keycloak.client.registration.cli.KcRegMain "$@"

Copied: keycloak/repos/community-testing-any/postgresql-module.xml (from rev 1076463, keycloak/trunk/postgresql-module.xml)
===================================================================
--- community-testing-any/postgresql-module.xml	                        (rev 0)
+++ community-testing-any/postgresql-module.xml	2021-12-17 18:35:38 UTC (rev 1076464)
@@ -0,0 +1,12 @@
+<?xml version="1.0" ?>
+<module xmlns="urn:jboss:module:1.3" name="org.postgresql">
+
+    <resources>
+        <resource-root path="@JDBC_POSTGRESQL_JAR@"/>
+    </resources>
+
+    <dependencies>
+        <module name="javax.api"/>
+        <module name="javax.transaction.api"/>
+    </dependencies>
+</module>



More information about the arch-commits mailing list