Remove workaround for rpm bug 447156

Resolves: RHEL-50946
This commit is contained in:
Mikolaj Izdebski 2024-07-30 10:29:34 +02:00
parent 4d82f70049
commit 2db64d622d

View File

@ -6,7 +6,7 @@
Name: xmvn Name: xmvn
Version: 4.2.0 Version: 4.2.0
Release: 8%{?dist} Release: 9%{?dist}
Summary: Local Extensions for Apache Maven Summary: Local Extensions for Apache Maven
License: Apache-2.0 License: Apache-2.0
URL: https://fedora-java.github.io/xmvn/ URL: https://fedora-java.github.io/xmvn/
@ -212,23 +212,6 @@ cp -P ${maven_home}/bin/m2.conf %{buildroot}%{_datadir}/%{name}/bin/
# Make sure javapackages config is not bundled # Make sure javapackages config is not bundled
rm -rf %{buildroot}%{_datadir}/%{name}/{configuration.xml,config.d/,conf/toolchains.xml,maven-metadata/} rm -rf %{buildroot}%{_datadir}/%{name}/{configuration.xml,config.d/,conf/toolchains.xml,maven-metadata/}
# Workaround for rpm bug 447156 - rpm fails to change directory to symlink
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
%pretrans -p <lua> minimal
path = "/usr/share/xmvn/conf/logging"
st = posix.stat(path)
if st and st.type == "directory" then
status = os.rename(path, path .. ".rpmmoved")
if not status then
suffix = 0
while not status do
suffix = suffix + 1
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
end
os.rename(path, path .. ".rpmmoved")
end
end
%files %files
%{_bindir}/mvn-local %{_bindir}/mvn-local
@ -245,7 +228,6 @@ end
%{_datadir}/%{name}/bin/mvnDebug %{_datadir}/%{name}/bin/mvnDebug
%{_datadir}/%{name}/boot %{_datadir}/%{name}/boot
%{_datadir}/%{name}/conf %{_datadir}/%{name}/conf
%ghost %{_datadir}/%{name}/conf/logging.rpmmoved
%files core -f .mfiles-core %files core -f .mfiles-core
%license LICENSE NOTICE %license LICENSE NOTICE
@ -262,6 +244,9 @@ end
%license LICENSE NOTICE %license LICENSE NOTICE
%changelog %changelog
* Tue Jul 30 2024 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.0-9
- Remove workaround for rpm bug 447156
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.2.0-8 * Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 4.2.0-8
- Bump release for June 2024 mass rebuild - Bump release for June 2024 mass rebuild