Skip to content

update package_build.py#261

Merged
pleia2 merged 1 commit intomasterfrom
update-package-build-distros
Apr 3, 2026
Merged

update package_build.py#261
pleia2 merged 1 commit intomasterfrom
update-package-build-distros

Conversation

@vmuralictr
Copy link
Copy Markdown
Collaborator

Issues : openmainframeproject/software-discovery-tool-data#76

Updated package_build.py

@vmuralictr vmuralictr requested a review from pleia2 April 2, 2026 15:29
Signed-off-by: vmuralictr <vmurali.ctr@gmail.com>
@vmuralictr vmuralictr force-pushed the update-package-build-distros branch from bd48557 to 3da9d5b Compare April 2, 2026 15:34
q = ['Debian_Bullseye_List.json', 'Debian_Bookworm_List.json']
urls = ['http://ftp.debian.org/debian/dists/bullseye/main/binary-s390x/Packages.gz', 'http://ftp.debian.org/debian/dists/bookworm/main/binary-s390x/Packages.gz']
q = ['Debian_Bookworm_List.json', 'Debian_Trixie_List.json']
urls = ['http://ftp.debian.org/debian/dists/bookworm/main/binary-s390x/Packages.gz', 'http://ftp.debian.org/debian/dists/trixie/main/binary-s390x/Packages.gz']
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

For reference (maybe we can turn this into an automated test at some point?) after I looked at it here's what I did to test it and validate output.

Test that the script runs successfully:
elizabeth@sdt:/opt/software-discovery-tool/bin$ ./package_build-new.py debian
Extracting debian data ...
Saved!
filename: Debian_Bookworm_List.json
Saved!
filename: Debian_Trixie_List.json
Thanks for using SDT!

Check the timestamp and file size to make sure they look correct:
elizabeth@sdt:/opt/software-discovery-tool/bin$ ls -alh ../distro_data/data_files/Debian_*
-rw-rw-r-- 1 www-data www-data 7.8M Apr 3 13:28 ../distro_data/data_files/Debian_Bookworm_List.json
-rw-rw-r-- 1 www-data www-data 8.5M Apr 3 13:28 ../distro_data/data_files/Debian_Trixie_List.json

And finally, spot check the file at the top and bottom to make sure it looks like the packages listed start with the beginning of the alphabet (or in this case, numbers come before A), and end with packages at the end if the alphabet:
elizabeth@sdt:/opt/software-discovery-tool/bin$ head ../distro_data/data_files/Debian_Bullseye_List.json
[{
"packageName": "0ad-data",
"version": "0.0.23.1-1.1",
"description": "Real-time strategy game of ancient warfare (data files)"
},
{
"packageName": "0ad-data-common",
"version": "0.0.23.1-1.1",
"description": "Real-time strategy game of ancient warfare (common data files)"
},
elizabeth@sdt:/opt/software-discovery-tool/bin$ tail ../distro_data/data_files/Debian_Bullseye_List.json
"packageName": "elpa-zzz-to-char",
"version": "0.1.3-3",
"description": "fancy version of `zap-to-char' command"
},
{
"packageName": "python3-zzzeeksphinx",
"version": "1.1.6-1",
"description": "Zzzeek's Sphinx layout and utilities"
},

json.dump(ubuntu2204_list, file, indent=2)
print(f"Saved!\nfilename: {q}")

if oskey == 'RHEL_9' or oskey == 'all':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to test these, I had to patch the file to fix #240 - maybe do that as your next PR?

Also note, unlike above, these aren't necessarily in alphabetical order so my spot check of the files was just to compare several of the items on the list to https://community.ibm.com/zsystems/oss/

@pleia2 pleia2 merged commit e7c5ef7 into master Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants