diff --git a/anaconda.spec b/anaconda.spec index 8ff483d34890839b56748be7ed146e857f1216b7..e475ef43d9b1072ee9123c64376444fee07e25d1 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 36.16.5 -Release: 24 +Release: 25 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -212,6 +212,16 @@ install -m 0644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/%{name}/profile.d/ install -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/%{name}/profile.d/ install -m 0644 %{SOURCE5} %{buildroot}/%{_sysconfdir}/%{name}/profile.d/ +# If the _vendor macro is defined and there is no conf file named with the _vendor macro, copy openeuler.conf and modify to custom vendor +%if 0%{?_vendor:1} != 0 +vendor_conf=$(find %{buildroot}/%{_sysconfdir}/%{name}/profile.d/ -maxdepth 1 -iname "%{_vendor}.conf" -print -quit) +if [ -z "$vendor_conf" ]; then + vendor_lowercase=$(echo %{_vendor} | tr '[:upper:]' '[:lower:]') + install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{name}/profile.d/$vendor_lowercase.conf + sed -i 's/openEuler/%{_vendor}/g' %{buildroot}/%{_sysconfdir}/%{name}/profile.d/$vendor_lowercase.conf +fi +%endif + mv %{SOURCE1}_tmp %{SOURCE1} mv %{SOURCE2}_tmp %{SOURCE2} mv %{SOURCE3}_tmp %{SOURCE3} @@ -307,6 +317,12 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Thu Dec 5 2024 xiaochn - 36.16.5-25 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: fix os installation error when downstream os using custom vendor + * Wed Aug 21 2024 sunhai - 36.16.5-24 - Type:bugfix - ID:NA