Compare commits

...

No commits in common. 'c9' and 'c10-beta' have entirely different histories.
c9 ... c10-beta

@ -10,6 +10,20 @@ debug(){
debug "cjc: bash debug is on" 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() { cmdvDebug() {
if [ "x$debug" == "xtrue" ] ; then if [ "x$debug" == "xtrue" ] ; then
"$@" -v "$@" -v
@ -23,17 +37,35 @@ mvDebug() {
} }
rmDebug() { rmDebug() {
cmdvDebug rm "$@" local switch=""
for x in "$@" ; do
if [[ $x == -* ]] ; then
switch="$switch $x"
elif isJavaConfig "$x" ; then
cmdvDebug rm $switch "$x"
fi
done
} }
rmdirDebug() { rmdirDebug() {
cmdvDebug rmdir "$@" local switch=""
for x in "$@" ; do
if [[ $x == -* ]] ; then
switch="$switch $x"
elif isJavaConfig "$x" ; then
cmdvDebug rmdir $switch "$x"
fi
done
} }
#we should be pretty strict about removing once used (even "used" [with fail]) config file, as it may corrupt another installation #we should be pretty strict about removing once used (even "used" [with fail]) config file, as it may corrupt another installation
clean(){ clean(){
debug "cleanup: removing $config" debug "cleanup: removing $config"
rmDebug -rf $config if [ "x$debug" == "xtrue" ] ; then
rm -rf $config -v
else
rm -rf $config 1>/dev/null 2>&1
fi
} }
if [ "x" == "x$config" ] ; then if [ "x" == "x$config" ] ; then
@ -225,9 +257,12 @@ done
debug "cleaning legacy leftowers" debug "cleaning legacy leftowers"
if [ "x$debug" == "xtrue" ] ; then if [ "x$debug" == "xtrue" ] ; then
find $sourceSearchPath -empty -type d -delete emptyCandidates=`find $sourceSearchPath -empty -type d`
else else
find $sourceSearchPath -empty -type d -delete 2>/dev/null >/dev/null emptyCandidates=`find $sourceSearchPath -empty -type d 2>/dev/null`
fi
if [ ! "x$emptyCandidates" == "x" ] ; then
rmdirDebug $emptyCandidates
fi fi
rmdirDebug $sourceSearchPath rmdirDebug $sourceSearchPath

@ -7,8 +7,8 @@ Name: copy-jdk-configs
# hash relevant to version tag # hash relevant to version tag
%global htag 88d3ed89f30d8b0eb4877d860fa8d951f224f156 %global htag 88d3ed89f30d8b0eb4877d860fa8d951f224f156
Version: 4.0 Version: 4.1
Release: 3%{?dist} Release: 6%{?dist}
Summary: JDKs configuration files copier Summary: JDKs configuration files copier
License: BSD License: BSD
@ -75,9 +75,35 @@ rm "%{rpm_state_dir}/%{file}" 2> /dev/null || :
%license LICENSE %license LICENSE
%changelog %changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 4.0-3 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.1-6
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Bump release for June 2024 mass rebuild
Related: rhbz#1991688
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* 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 * 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) - added requires and orderWithRequires of findutils to provide find and xargs (rh1965305)

Loading…
Cancel
Save