Bug 2349260

Summary: Cobbler 3.3.x scripts inside the RPM requires python3-simplejson but it's not inside the spec file
Product: [Fedora] Fedora EPEL Reporter: fabien.magagnosc <fabien.magagnosc>
Component: cobblerAssignee: Orion Poplawski <orion>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel9CC: brejoc, kwizart, matrixfueller, ngompa13, orion
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
packaging.log meanin none

Description fabien.magagnosc@tecnotree.com 2025-03-02 15:02:32 UTC
Created attachment 2078561 [details]
packaging.log meanin

Description of problem:

during cobbler 3.3.x installation on RH 9.0, 9.2 and 9.4 using kickstart, the POSTTRANS installation script of cobbler failed (some with using only dnf)

this is due to the script /usr/share/cobbler/bin/migrate-data-from-v2-v3.sh which import simplejson.
simplejson IS NOT standard library available in RH dvd/distrib, but available in the EPEL repository


Version-Release number of selected component (if applicable):

3.3.7-1.el9


How reproducible:

all the times


Steps to Reproduce:

    1. create kickstart with minimal environment, and with cobbler
    2. try to install, and you got a POSTTRANS failure
    3. add the python3-simplejson to your DVD/distribution system from EPEL (like cobbler 3.3.x), and check you ks file to install python3-simplejson and the installation works


Actual results:

when executing the POSTRANS script, the RPM execute the script /usr/share/cobbler/bin/migrate-data-v2-to-v3.sh, and inside, it's a python 3.x script, with  "import simplejson", but this is NOT a common library available inside the RH repository, but in the EPEL repository


Expected results:

in the cobbler 3.3.x spec file, add the "require python3-simplejson" to be sure that during any installation, should it be va kickstart, or on any system, using dnf, the python3-simplejson will be installed as a dependencie, and the cobbler installation works.


Additional info:

right now, as python3-simplejson is available inside EPEL, I download it, and install it manually BEFORE cobbler as part of the kiskstart process I got on my cobbler server, and I do the same installation on any upgrade cobbler from 3.2 to 3.3 and cobbler is now installed at least.

Comment 1 Orion Poplawski 2025-03-03 02:46:42 UTC
I think it's probably time to just remove running migrate-data-v2-to-v3.py in %posttrans - there shouldn't be any more cobbler 2.X installs out there.

I'm surprised that it's even running though. The script has:

# Migrate pre-3 configuration data if needed
if [ -d %{_sharedstatedir}/cobbler/kickstarts -a $(find %{_sharedstatedir}/cobbler/collections -type f | wc -l) -eq 0  ]; then
    echo warning: migrating pre cobbler 3 configuration data
    %{_datadir}/cobbler/bin/migrate-data-v2-to-v3.py
fi

which means it should only run if /usr/share/cobbler/kickstarts exists - which it shouldn't.