Bug 2349260 - Cobbler 3.3.x scripts inside the RPM requires python3-simplejson but it's not inside the spec file
Summary: Cobbler 3.3.x scripts inside the RPM requires python3-simplejson but it's not...
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: cobbler
Version: epel9
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-03-02 15:02 UTC by fabien.magagnosc@tecnotree.com
Modified: 2025-03-03 02:46 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
packaging.log meanin (363.71 KB, image/png)
2025-03-02 15:02 UTC, fabien.magagnosc@tecnotree.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github cobbler cobbler issues 0 None None None 2025-03-02 15:02:32 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.