[arch-commits] Commit in opensearch-alerting-plugin/repos (3 files)

Leonidas Spyropoulos artafinde at gemini.archlinux.org
Tue Jun 21 08:34:33 UTC 2022


    Date: Tuesday, June 21, 2022 @ 08:34:33
  Author: artafinde
Revision: 1238763

archrelease: copy trunk to community-testing-x86_64

Added:
  opensearch-alerting-plugin/repos/community-testing-x86_64/
  opensearch-alerting-plugin/repos/community-testing-x86_64/0001-Add-support-for-reproducible-builds.patch
    (from rev 1238762, opensearch-alerting-plugin/trunk/0001-Add-support-for-reproducible-builds.patch)
  opensearch-alerting-plugin/repos/community-testing-x86_64/PKGBUILD
    (from rev 1238762, opensearch-alerting-plugin/trunk/PKGBUILD)

------------------------------------------------+
 0001-Add-support-for-reproducible-builds.patch |   34 +++++++++++++++
 PKGBUILD                                       |   49 +++++++++++++++++++++++
 2 files changed, 83 insertions(+)

Copied: opensearch-alerting-plugin/repos/community-testing-x86_64/0001-Add-support-for-reproducible-builds.patch (from rev 1238762, opensearch-alerting-plugin/trunk/0001-Add-support-for-reproducible-builds.patch)
===================================================================
--- community-testing-x86_64/0001-Add-support-for-reproducible-builds.patch	                        (rev 0)
+++ community-testing-x86_64/0001-Add-support-for-reproducible-builds.patch	2022-06-21 08:34:33 UTC (rev 1238763)
@@ -0,0 +1,34 @@
+From f40dbfdcee004f078216b00b1ce46744a8664205 Mon Sep 17 00:00:00 2001
+From: Leonidas Spyropoulos <artafinde at gmail.com>
+Date: Tue, 14 Jun 2022 18:00:54 +0100
+Subject: [PATCH] Add support for reproducible builds
+
+As per gradle [docs] add support to remove timestamps and package with same order which is required from
+[reproducible] builds
+
+[docs]: https://docs.gradle.org/current/userguide/working_with_files.html#sec:archives
+[reproducible]: https://reproducible-builds.org/
+
+Signed-off-by: Leonidas Spyropoulos <artafinde at archlinux.com>
+---
+ build.gradle | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/build.gradle b/build.gradle
+index 60b11af..9a898d3 100644
+--- a/build.gradle
++++ b/build.gradle
+@@ -88,6 +88,10 @@ allprojects {
+         compileKotlin.kotlinOptions.jvmTarget = compileTestKotlin.kotlinOptions.jvmTarget = JavaVersion.VERSION_11
+         compileKotlin.dependsOn ktlint
+     }
++    tasks.withType(AbstractArchiveTask).configureEach {
++        preserveFileTimestamps = false
++        reproducibleFileOrder = true
++    }
+ }
+ 
+ evaluationDependsOnChildren()
+-- 
+2.36.1
+

Copied: opensearch-alerting-plugin/repos/community-testing-x86_64/PKGBUILD (from rev 1238762, opensearch-alerting-plugin/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2022-06-21 08:34:33 UTC (rev 1238763)
@@ -0,0 +1,49 @@
+# Maintainer: Justin Kromlinger <hashworks at archlinux.org>
+
+pkgname=opensearch-alerting-plugin
+pkgver=2.0.1.0
+pkgrel=1
+_opensearchver=2.0.1
+_jdkver=11
+pkgdesc="OpenSearch Alerting Plugin"
+arch=('x86_64')
+url="https://docs-beta.opensearch.org/monitoring-plugins/alerting"
+license=('Apache')
+depends=("opensearch=${_opensearchver}")
+makedepends=("java-environment=${_jdkver}" 'unzip')
+source=(
+  "${pkgname}-${pkgver}.tar.gz::https://github.com/opensearch-project/alerting/archive/${pkgver}.tar.gz"
+  "0001-Add-support-for-reproducible-builds.patch"
+)
+sha256sums=('c58134198c547fe4cf36b306f098d224f3195862290fa47bd20bb5fc8a38ea82'
+            '3bab2d7e8b31b3b1333c072fa91e63e7f6eda8d5ea94f46f0d056de98eb7c228')
+
+prepare() {
+  cd "alerting-${pkgver}"
+  patch -Np1 -i "$srcdir"/0001-Add-support-for-reproducible-builds.patch
+}
+
+build() {
+  cd "alerting-${pkgver}"
+  export JAVA_HOME="/usr/lib/jvm/java-${_jdkver}-openjdk"
+  export PATH="/usr/lib/jvm/java-${_jdkver}-openjdk/bin:$PATH"
+  export GRADLE_OPTS="-Dbuild.snapshot=false -Dopensearch.version=${_opensearchver}"
+  # alertingBwcCluster and integTest (Reaper) requires JDK 14
+  ./gradlew build \
+    --exclude-task ":alerting:alertingBwcCluster#fullRestartClusterTask" \
+    --exclude-task ":alerting:alertingBwcCluster#mixedClusterTask" \
+    --exclude-task ":alerting:alertingBwcCluster#oldVersionClusterTask0" \
+    --exclude-task ":alerting:alertingBwcCluster#oldVersionClusterTask1" \
+    --exclude-task ":alerting:alertingBwcCluster#rollingUpgradeClusterTask" \
+    --exclude-task ":alerting:alertingBwcCluster#twoThirdsUpgradedClusterTask" \
+    --exclude-task ":alerting:integTest" \
+    --exclude-task ":alerting:jacocoTestReport"
+}
+
+package() {
+  install -dm755 "${pkgdir}/usr/share/opensearch/plugins/opensearch-alerting"
+  cd "${pkgdir}/usr/share/opensearch/plugins/opensearch-alerting"
+  unzip "${srcdir}/alerting-${pkgver}/alerting/build/distributions/opensearch-alerting-${pkgver}.zip"
+
+  install -Dm644 "${srcdir}/alerting-${pkgver}/LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+}



More information about the arch-commits mailing list