Compare commits

..

No commits in common. "c10s" and "c8" have entirely different histories.
c10s ... c8

5 changed files with 27 additions and 99 deletions

View File

@ -10,20 +10,6 @@ debug(){
debug "cjc: bash debug is on"
isJavaConfig() {
local arg="${1}"
local relpath=`realpath -s $arg`
local realink=`readlink -f $arg`
if [[ ${relpath} = /usr/lib/jvm/java* || ${relpath} = /etc/java/java* ]] ; then
if [[ ${realink} = /usr/lib/jvm/java* || ${realink} = /etc/java/java* ]] ; then
debug "$arg / ${relpath} / ${realink} is correct jdk folder"
return 0
fi
fi
debug "$arg / ${relpath} / ${realink} is not jdk folder, file/dir should be skipped"
return 1
}
cmdvDebug() {
if [ "x$debug" == "xtrue" ] ; then
"$@" -v
@ -37,35 +23,17 @@ mvDebug() {
}
rmDebug() {
local switch=""
for x in "$@" ; do
if [[ $x == -* ]] ; then
switch="$switch $x"
elif isJavaConfig "$x" ; then
cmdvDebug rm $switch "$x"
fi
done
cmdvDebug rm "$@"
}
rmdirDebug() {
local switch=""
for x in "$@" ; do
if [[ $x == -* ]] ; then
switch="$switch $x"
elif isJavaConfig "$x" ; then
cmdvDebug rmdir $switch "$x"
fi
done
cmdvDebug rmdir "$@"
}
#we should be pretty strict about removing once used (even "used" [with fail]) config file, as it may corrupt another installation
clean(){
debug "cleanup: removing $config"
if [ "x$debug" == "xtrue" ] ; then
rm -rf $config -v
else
rm -rf $config 1>/dev/null 2>&1
fi
rmDebug -rf $config
}
if [ "x" == "x$config" ] ; then
@ -257,12 +225,9 @@ done
debug "cleaning legacy leftowers"
if [ "x$debug" == "xtrue" ] ; then
emptyCandidates=`find $sourceSearchPath -empty -type d`
find $sourceSearchPath -empty -type d -delete
else
emptyCandidates=`find $sourceSearchPath -empty -type d 2>/dev/null`
fi
if [ ! "x$emptyCandidates" == "x" ] ; then
rmdirDebug $emptyCandidates
find $sourceSearchPath -empty -type d -delete 2>/dev/null >/dev/null
fi
rmdirDebug $sourceSearchPath

View File

@ -7,8 +7,8 @@ Name: copy-jdk-configs
# hash relevant to version tag
%global htag 88d3ed89f30d8b0eb4877d860fa8d951f224f156
Version: 4.1
Release: 7%{?dist}
Version: 4.0
Release: 2%{?dist}
Summary: JDKs configuration files copier
License: BSD
@ -23,7 +23,7 @@ Source2: %{URL}/blob/%{htag}/f/%{fixFile}
BuildArch: noarch
Requires: lua
Requires: lua-posix
#Requires: lua-posix
# rh1965305 - copy-jdk-configs script uses find and xargs but RPM does not depend on them
Requires: findutils
OrderWithRequires: findutils
@ -62,6 +62,7 @@ end
%install
mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}
cp -a %{SOURCE0} $RPM_BUILD_ROOT/%{_libexecdir}/%{file}
chmod 644 $RPM_BUILD_ROOT/%{_libexecdir}/%{file}
cp -a %{SOURCE2} $RPM_BUILD_ROOT/%{_libexecdir}/%{fixFile}
%posttrans
@ -75,66 +76,27 @@ rm "%{rpm_state_dir}/%{file}" 2> /dev/null || :
%license LICENSE
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 4.1-7
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Tue Jun 08 2021 Jiri Vanek <jvanek@redhat.com> - 4.0-2
- commented out requires lua-posix, it was always commented out in el8, never in fedora. IDK
- Resolves: rhbz#1953923
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.1-6
- Bump release for June 2024 mass rebuild
* Tue Jun 08 2021 Jiri Vanek <jvanek@redhat.com> - 4.0-1
- rebased to 4.0
- Resolves: rhbz#1953923
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 09 2020 Jiri Vanek <jvanek@redhat.com> - 3.7-3
- added link to http://hydra.brq.redhat.com:8080/view/c~j~c/#projectstatus
- removed source check from test.yaml
- added gating.yaml
- Resolves: rhbz#1855374
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 09 2020 Jiri Vanek <jvanek@redhat.com> - 3.7-3
- added gatnig placeholder
- Resolves: rhbz#1855374
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Sep 29 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-1
- update to attempt to solve bug which could delete empty dirs in /etc
* Wed Sep 28 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-0
- update to attempt to solve bug which could delete empty dirs in /etc
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 08 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-1
- added requires and orderWithRequires of findutils to provide find and xargs (rh1965305)
* Thu Apr 29 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-0
- bumped to 4.0 to resolve remvoed rpm 4.17 removing arg from global table
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 30 2020 Andrew Hughes <gnu.andrew@redhat.com> - 3.7-6
- Rebuilt for lua 5.4.0.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 09 2020 Jiri Vanek <jvanek@redhat.com> - 3.7-2
- added nss.fips.cfg to cared files
- Resolves: rhbz#1855374
* Wed May 02 2018 Jiri Vanek <jvanek@redhat.com> - 3.7-1
- udpated to latst relase
@ -149,6 +111,7 @@ rm "%{rpm_state_dir}/%{file}" 2> /dev/null || :
* Mon Apr 30 2018 Jiri Vanek <jvanek@redhat.com> - 3.3-10
- added javaws.policy and blacklist
- fixed rhbz#1541838
* Tue Apr 03 2018 Jiri Vanek <jvanek@redhat.com> - 3.3-5
- fixed rhbz#1541838