1
1
%global upstream_version {{ upstream_version }}
2
- # jdk8 arm32 has different top directory name https://github.com/adoptium/temurin-build/issues/2795
3
2
# Only [A-Za-z0-9.] allowed in version:
4
3
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version
5
4
# also not very intuitive:
20
19
%global src_num 0
21
20
%global sha_src_num 1
22
21
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
+
23
31
Name: temurin-8-jdk
24
32
Version: %{spec_version}
25
33
Release: %{spec_release}
@@ -32,18 +40,10 @@ URL: https://projects.eclipse.org/projects/adoptium
32
40
Packager: Eclipse Adoptium Package Maintainers <temurin-dev @eclipse.org >
33
41
34
42
AutoReqProv: no
35
- Prefix: /usr/lib /jvm/%{name}
43
+ Prefix: %{_libdir} /jvm/%{name}
36
44
37
45
ExclusiveArch: {{ hardware_architecture }}
38
46
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
-
47
47
BuildRequires: tar
48
48
BuildRequires: wget
49
49
@@ -95,12 +95,6 @@ Provides: jre-%{java_provides}-headless
95
95
Source0: %{source_url_base}/jdk%{upstream_version}/OpenJDK8U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_dash}.tar.gz
96
96
Source1: %{source_url_base}/jdk%{upstream_version}/OpenJDK8U-jdk_%{vers_arch}_linux_hotspot_%{upstream_version_no_dash}.tar.gz.sha256.txt
97
97
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
-
104
98
# Avoid build failures on some distros due to missing build-id in binaries.
105
99
%global debug_package %{nil}
106
100
%global __brp_strip %{nil}
@@ -114,12 +108,6 @@ pushd "%{_sourcedir}"
114
108
sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}"
115
109
popd
116
110
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
123
111
%setup -n jdk%{upstream_version} -T -b %{src_num}
124
112
125
113
%build
@@ -136,14 +124,11 @@ rm -f "%{buildroot}%{prefix}/lib/libfreetype.so"
136
124
# Use cacerts included in OS
137
125
rm -f "%{buildroot}%{prefix}/jre/lib/security/cacerts"
138
126
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"
140
128
popd
141
129
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
147
132
148
133
%post
149
134
if [ $1 -ge 1 ] ; then
245
230
%files
246
231
%defattr(-,root,root)
247
232
%{prefix}
248
- /usr/lib/tmpfiles.d/%{name}.conf
249
233
250
234
%changelog
251
235
* {{ current_date }} Eclipse Adoptium Package Maintainers <temurin-dev @eclipse.org > {{ package_version }}-{{ package_release_version }}
0 commit comments