Family extracted to globals
Related: rhbz#2008206
This commit is contained in:
parent
554f0c4bb8
commit
8f31e878a5
@ -334,7 +334,7 @@
|
||||
%global top_level_dir_name %{origin}
|
||||
%global top_level_dir_name_backup %{top_level_dir_name}-backup
|
||||
%global buildver 8
|
||||
%global rpmrelease 8
|
||||
%global rpmrelease 9
|
||||
# Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
|
||||
%if %is_system_jdk
|
||||
# Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
|
||||
@ -444,6 +444,9 @@
|
||||
%global alternatives_requires %{_sbindir}/alternatives
|
||||
%endif
|
||||
|
||||
%global family %{name}.%{_arch}
|
||||
%global family_noarch %{name}
|
||||
|
||||
%if %{with_systemtap}
|
||||
# Where to install systemtap tapset (links)
|
||||
# We would like these to be in a package specific sub-dir,
|
||||
@ -476,7 +479,7 @@ fi
|
||||
|
||||
ext=.gz
|
||||
alternatives \\
|
||||
--install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\
|
||||
--install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{family} \\
|
||||
--slave %{_jvmdir}/jre jre %{_jvmdir}/%{sdkdir -- %{?1}} \\
|
||||
--slave %{_bindir}/%{alt_java_name} %{alt_java_name} %{jrebindir -- %{?1}}/%{alt_java_name} \\
|
||||
--slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
|
||||
@ -491,10 +494,10 @@ alternatives \\
|
||||
%{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext
|
||||
|
||||
for X in %{origin} %{javaver} ; do
|
||||
alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
||||
alternatives --install %{_jvmdir}/jre-"$X" jre_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{family}
|
||||
done
|
||||
|
||||
alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
||||
alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{family}
|
||||
}
|
||||
|
||||
%define post_headless() %{expand:
|
||||
@ -546,7 +549,7 @@ fi
|
||||
|
||||
ext=.gz
|
||||
alternatives \\
|
||||
--install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\
|
||||
--install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{family} \\
|
||||
--slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
|
||||
--slave %{_bindir}/jlink jlink %{sdkbindir -- %{?1}}/jlink \\
|
||||
--slave %{_bindir}/jmod jmod %{sdkbindir -- %{?1}}/jmod \\
|
||||
@ -615,10 +618,10 @@ alternatives \\
|
||||
|
||||
for X in %{origin} %{javaver} ; do
|
||||
alternatives \\
|
||||
--install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
||||
--install %{_jvmdir}/java-"$X" java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{family}
|
||||
done
|
||||
|
||||
update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch}
|
||||
update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{family}
|
||||
}
|
||||
|
||||
%define post_devel() %{expand:
|
||||
@ -656,7 +659,7 @@ fi
|
||||
|
||||
alternatives \\
|
||||
--install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\
|
||||
$PRIORITY --family %{name}
|
||||
$PRIORITY --family %{family_noarch}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -673,7 +676,7 @@ fi
|
||||
|
||||
alternatives \\
|
||||
--install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\
|
||||
$PRIORITY --family %{name}
|
||||
$PRIORITY --family %{family_noarch}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -2458,6 +2461,10 @@ cjc.mainProgram(args)
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Feb 25 2022 Jiri Vanek <jvanek@redhat.com> - 1:17.0.2.0.8-9
|
||||
- Family extracted to globals
|
||||
- Related: rhbz#2008206
|
||||
|
||||
* Wed Feb 23 2022 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.2.0.8-8
|
||||
- Detect NSS at runtime for FIPS detection
|
||||
- Turn off build-time NSS linking and go back to an explicit Requires on NSS
|
||||
@ -2539,7 +2546,7 @@ cjc.mainProgram(args)
|
||||
|
||||
* Mon Nov 08 2021 Jiri Vanek <jvanek@redhat.com> - 1:17.0.0.0.35-7
|
||||
- alternatives creation moved to posttrans
|
||||
- Thus fixing the old reisntall issue:
|
||||
- Thus fixing the old reinstall issue:
|
||||
- https://bugzilla.redhat.com/show_bug.cgi?id=1200302
|
||||
- https://bugzilla.redhat.com/show_bug.cgi?id=1976053
|
||||
- Resolves: rhbz#2008206
|
||||
|
Loading…
Reference in New Issue
Block a user