Skip to content

Commit a6cdc31

Browse files
authored
Merge branch 'master' into stable_alpine
2 parents 97431b9 + b408d9d commit a6cdc31

File tree

3 files changed

+20
-49
lines changed

3 files changed

+20
-49
lines changed

.github/workflows/scorecards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ jobs:
6666

6767
# Upload the results to GitHub's code scanning dashboard.
6868
- name: "Upload to code-scanning"
69-
uses: github/codeql-action/upload-sarif@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6
69+
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
7070
with:
7171
sarif_file: results.sarif

linux_new/jdk/suse/src/main/packaging/temurin/8/temurin-8-jdk.template.j2

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
%global upstream_version {{ upstream_version }}
2-
# jdk8 arm32 has different top directory name https://github.com/adoptium/temurin-build/issues/2795
32
# Only [A-Za-z0-9.] allowed in version:
43
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version
54
# also not very intuitive:
@@ -20,6 +19,15 @@
2019
%global src_num 0
2120
%global sha_src_num 1
2221

22+
%if "%{vers_arch}" == "armv7hl"
23+
%define vers_arch arm
24+
%global upstream_version {{ upstreamarm32_version }}
25+
%endif
26+
27+
%if "%{vers_arch}" == "x86_64"
28+
%define vers_arch x64
29+
%endif
30+
2331
Name: temurin-8-jdk
2432
Version: %{spec_version}
2533
Release: %{spec_release}
@@ -32,18 +40,10 @@ URL: https://projects.eclipse.org/projects/adoptium
3240
Packager: Eclipse Adoptium Package Maintainers <temurin-dev@eclipse.org>
3341

3442
AutoReqProv: no
35-
Prefix: /usr/lib/jvm/%{name}
43+
Prefix: %{_libdir}/jvm/%{name}
3644

3745
ExclusiveArch: {{ hardware_architecture }}
3846

39-
%if "%{vers_arch}" == "armv7hl"
40-
%define vers_arch arm
41-
%endif
42-
43-
%if "%{vers_arch}" == "x86_64"
44-
%define vers_arch x64
45-
%endif
46-
4747
BuildRequires: tar
4848
BuildRequires: wget
4949

@@ -95,12 +95,6 @@ Provides: jre-%{java_provides}-headless
9595
Source0: %{source_url_base}/jdk%{upstream_version}/OpenJDK8U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_dash}.tar.gz
9696
Source1: %{source_url_base}/jdk%{upstream_version}/OpenJDK8U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_dash}.tar.gz.sha256.txt
9797

98-
# Set the compression format to xz to be compatible with more Red Hat flavours. Newer versions of Fedora use zstd which
99-
# is not available on CentOS 7, for example. https://github.com/rpm-software-management/rpm/blob/master/macros.in#L353
100-
# lists the available options.
101-
%define _source_payload w7.xzdio
102-
%define _binary_payload w7.xzdio
103-
10498
# Avoid build failures on some distros due to missing build-id in binaries.
10599
%global debug_package %{nil}
106100
%global __brp_strip %{nil}
@@ -114,12 +108,6 @@ pushd "%{_sourcedir}"
114108
sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}"
115109
popd
116110

117-
# Override upstream_version if vers_arch is arm
118-
%if "%{vers_arch}" == "arm"
119-
%global upstream_version {{ upstreamarm32_version }}
120-
%endif
121-
122-
# Proceed with setup
123111
%setup -n jdk%{upstream_version} -T -b %{src_num}
124112

125113
%build
@@ -136,14 +124,11 @@ rm -f "%{buildroot}%{prefix}/lib/libfreetype.so"
136124
# Use cacerts included in OS
137125
rm -f "%{buildroot}%{prefix}/jre/lib/security/cacerts"
138126
pushd "%{buildroot}%{prefix}/jre/lib/security"
139-
ln -s /etc/pki/java/cacerts "%{buildroot}%{prefix}/jre/lib/security/cacerts"
127+
ln -s /var/lib/ca-certificates/java-cacerts "%{buildroot}%{prefix}/jre/lib/security/cacerts"
140128
popd
141129

142-
# Ensure systemd-tmpfiles-clean does not remove pid files
143-
# https://bugzilla.redhat.com/show_bug.cgi?id=1704608
144-
%{__mkdir} -p %{buildroot}/usr/lib/tmpfiles.d
145-
echo 'x /tmp/hsperfdata_*' > "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf"
146-
echo 'x /tmp/.java_pid*' >> "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf"
130+
%pretrans
131+
# noop
147132

148133
%post
149134
if [ $1 -ge 1 ] ; then
@@ -245,7 +230,6 @@ fi
245230
%files
246231
%defattr(-,root,root)
247232
%{prefix}
248-
/usr/lib/tmpfiles.d/%{name}.conf
249233

250234
%changelog
251235
* {{ current_date }} Eclipse Adoptium Package Maintainers <temurin-dev@eclipse.org> {{ package_version }}-{{ package_release_version }}

linux_new/jre/suse/src/main/packaging/temurin/8/temurin-8-jre.template.j2

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ Prefix: /usr/lib/jvm/%{name}
3535

3636
%if "%{vers_arch}" == "armv7hl"
3737
%define vers_arch arm
38+
%global upstream_version {{ upstreamarm32_version }}
3839
%endif
3940

4041
%if "%{vers_arch}" == "x86_64"
4142
%define vers_arch x64
4243
%endif
4344

45+
ExclusiveArch: {{ hardware_architecture }}
46+
4447
BuildRequires: tar
4548
BuildRequires: wget
4649

@@ -74,12 +77,6 @@ Provides: jre-%{java_provides}-headless
7477
Source0: %{source_url_base}/jdk%{upstream_version}/OpenJDK8U-jre_%{vers_arch}_linux_hotspot_%{upstream_version_no_dash}.tar.gz
7578
Source1: %{source_url_base}/jdk%{upstream_version}/OpenJDK8U-jre_%{vers_arch}_linux_hotspot_%{upstream_version_no_dash}.tar.gz.sha256.txt
7679

77-
# Set the compression format to xz to be compatible with more Red Hat flavours. Newer versions of Fedora use zstd which
78-
# is not available on CentOS 7, for example. https://github.com/rpm-software-management/rpm/blob/master/macros.in#L353
79-
# lists the available options.
80-
%define _source_payload w7.xzdio
81-
%define _binary_payload w7.xzdio
82-
8380
# Avoid build failures on some distros due to missing build-id in binaries.
8481
%global debug_package %{nil}
8582
%global __brp_strip %{nil}
@@ -93,12 +90,6 @@ pushd "%{_sourcedir}"
9390
sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}"
9491
popd
9592

96-
# Override upstream_version if vers_arch is arm
97-
%if "%{vers_arch}" == "arm"
98-
%global upstream_version {{ upstreamarm32_version }}
99-
%endif
100-
101-
# Proceed with setup
10293
%setup -n jdk%{upstream_version}-jre -T -b %{src_num}
10394

10495
%build
@@ -112,14 +103,11 @@ tar --strip-components=1 -C "%{buildroot}%{prefix}" -xf %{expand:%{SOURCE%{src_n
112103
# Use cacerts included in OS
113104
rm -f "%{buildroot}%{prefix}/lib/security/cacerts"
114105
pushd "%{buildroot}%{prefix}/lib/security"
115-
ln -s /etc/pki/java/cacerts "%{buildroot}%{prefix}/lib/security/cacerts"
106+
ln -s /var/lib/ca-certificates/java-cacerts "%{buildroot}%{prefix}/lib/security/cacerts"
116107
popd
117108

118-
# Ensure systemd-tmpfiles-clean does not remove pid files
119-
# https://bugzilla.redhat.com/show_bug.cgi?id=1704608
120-
%{__mkdir} -p %{buildroot}/usr/lib/tmpfiles.d
121-
echo 'x /tmp/hsperfdata_*' > "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf"
122-
echo 'x /tmp/.java_pid*' >> "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf"
109+
%pretrans
110+
# noop
123111

124112
%post
125113
if [ $1 -ge 1 ] ; then
@@ -156,7 +144,6 @@ fi
156144
%files
157145
%defattr(-,root,root)
158146
%{prefix}
159-
/usr/lib/tmpfiles.d/%{name}.conf
160147

161148
%changelog
162149
* {{ current_date }} Eclipse Adoptium Package Maintainers <temurin-dev@eclipse.org> {{ package_version }}-{{ package_release_version }}

0 commit comments

Comments
 (0)