Skip to content

Commit

Permalink
Update hppc to version 0.7.1 / rev 4 via SR 1111421
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/1111421
by user fstrba + anag+factory
reproducible
  • Loading branch information
fstrba authored and bmwiedemann committed Sep 15, 2023
1 parent d2c7369 commit 5b70d4a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
Binary file modified packages/h/hppc/.files
Binary file not shown.
8 changes: 8 additions & 0 deletions packages/h/hppc/.rev
Expand Up @@ -23,4 +23,12 @@
<comment>Standalone JavaEE inconditionally</comment>
<requestid>965948</requestid>
</revision>
<revision rev="4" vrev="4">
<srcmd5>9e4a4173eb85cf7999e842d55eb2f1a2</srcmd5>
<version>0.7.1</version>
<time>1694808309</time>
<user>anag+factory</user>
<comment>reproducible</comment>
<requestid>1111421</requestid>
</revision>
</revisionlist>
15 changes: 15 additions & 0 deletions packages/h/hppc/hppc-timestamp.patch
@@ -0,0 +1,15 @@
--- hppc-0.7.1/hppc-template-processor/src/main/java/com/carrotsearch/hppc/generator/TemplateOptions.java 2015-05-07 09:32:26.000000000 +0200
+++ hppc-0.7.1/hppc-template-processor/src/main/java/com/carrotsearch/hppc/generator/TemplateOptions.java 2023-09-14 16:19:35.996103476 +0200
@@ -88,7 +88,11 @@
*/
public String getTimeNow() {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.ROOT);
- return format.format(new Date());
+ Date now = new Date();
+ if (System.getenv("SOURCE_DATE_EPOCH") != null) {
+ now = new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH")));
+ }
+ return format.format(now);
}

public String getTemplateFile() {
12 changes: 12 additions & 0 deletions packages/h/hppc/hppc.changes
@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Sep 14 15:27:47 UTC 2023 - Fridrich Strba <fstrba@suse.com>

- Added patch:
* hppc-timestamp.patch
+ use SOURCE_DATE_EPOCH for timestamp in generated files

-------------------------------------------------------------------
Wed Sep 13 06:30:04 UTC 2023 - Fridrich Strba <fstrba@suse.com>

- Reproducible builds: use SOURCE_DATE_EPOCH for timestamp

-------------------------------------------------------------------
Wed Mar 30 10:24:48 UTC 2022 - Fridrich Strba <fstrba@suse.com>

Expand Down
9 changes: 7 additions & 2 deletions packages/h/hppc/hppc.spec
@@ -1,7 +1,7 @@
#
# spec file for package hppc
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -24,6 +24,7 @@ License: Apache-2.0
Group: Development/Libraries/Java
URL: https://labs.carrotsearch.com/hppc.html
Source0: https://github.com/carrotsearch/hppc/archive/%{version}.tar.gz
Patch0: hppc-timestamp.patch
BuildRequires: fdupes
BuildRequires: maven-local
BuildRequires: mvn(com.google.guava:guava)
Expand Down Expand Up @@ -63,6 +64,8 @@ This package contains javadoc for HPPC.

%prep
%setup -q
%patch0 -p1

find . -name "*.class" -print -delete
find . -name "*.jar" -print -delete

Expand All @@ -89,7 +92,9 @@ done
%{mvn_package} :%{name}-template-processor %{name}-templateprocessor

%build
%{mvn_build} -f -- -Dsource=8
%{mvn_build} -f -- \
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \
-Dsource=8

%install
%mvn_install
Expand Down

0 comments on commit 5b70d4a

Please sign in to comment.