Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backend] add "--filelists_ext" parameter for createrepo #12358

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

aplanas
Copy link
Contributor

@aplanas aplanas commented Mar 25, 2022

If "filelists_ext" option is enabled for the rpmmd repository, it will
call createrepo_c with the --filelists_ext parameter.

This parameter will create a new optional variant of filelists.xml,
named filelists_ext.xml. This will contain, besides the list of files,
the hash (usually SHA256) registered in the RPM header for this file
(only for file types, not for ghost or dir types).

Additionally, a new field "checksum" will register the hash algorithm
used by librpm for those file entries.

Signed-off-by: Alberto Planas aplanas@suse.com

@github-actions github-actions bot added the Backend Things regarding the OBS backend label Mar 25, 2022
@aplanas
Copy link
Contributor Author

aplanas commented Mar 25, 2022

This is an alternative for #12296, using the new --filelists_ext parameter drafted in createrepo_c (rpm-software-management/createrepo_c#316)

I am not sure where this $options->{'filelists_ext'} can be set, as I copy it from $options{'zchunk'} and I do not see set it with a default value in the code.

@M0ses M0ses requested a review from mlschroe March 25, 2022 13:16
@aplanas aplanas changed the title bs_publish: add "--hash" parameter for createrepo bs_publish: add "--filelists_ext" parameter for createrepo Mar 29, 2022
@adrianschroeter
Copy link
Member

can you please prefix your commit with [backend] ?

@adrianschroeter
Copy link
Member

the minitest failures seem to be cause by failing createrepo runs, will need to check why later today.

@adrianschroeter
Copy link
Member

the minitest failures seem to be cause by failing createrepo runs, will need to check why later today.

The failures seem to be cause by the broken createrepo_c, independend of this cange.

@M0ses is that already on your radar?

@aplanas aplanas changed the title bs_publish: add "--filelists_ext" parameter for createrepo backend: add "--filelists_ext" parameter for createrepo Apr 4, 2022
@aplanas aplanas changed the title backend: add "--filelists_ext" parameter for createrepo [backend] add "--filelists_ext" parameter for createrepo Apr 4, 2022
@aplanas
Copy link
Contributor Author

aplanas commented Apr 4, 2022

can you please prefix your commit with [backend] ?

Sure. Done.

@adrianschroeter
Copy link
Member

adrianschroeter commented Apr 4, 2022

and please write it using defined():

if defined($options{'filelists_ext'});

it seems to be the cause for the failures.

@aplanas
Copy link
Contributor Author

aplanas commented Apr 4, 2022

and please write it using defined():

Done!

@adrianschroeter adrianschroeter force-pushed the fix_imadata_createrepo branch 2 times, most recently from b60b515 to 938aad4 Compare April 4, 2022 12:45
@adrianschroeter
Copy link
Member

revert my wrong hint and used a hash instead, testsuite is working now again.

@aplanas
Copy link
Contributor Author

aplanas commented Apr 5, 2022

Oh sorry, I see now my bug : ((

@adrianschroeter
Copy link
Member

adrianschroeter commented Apr 5, 2022 via email

Copy link
Contributor

@M0ses M0ses left a comment

Choose a reason for hiding this comment

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

LGTM

If "filelists_ext" option is enabled for the rpmmd repository, it will
call createrepo_c with the --filelists_ext parameter.

This parameter will create a new optional variant of filelists.xml,
named filelists_ext.xml.  This will contain, besides the list of files,
the hash (usually SHA256) registered in the RPM header for this file
(only for file types, not for ghost or dir types).

Additionally, a new field "checksum" will register the hash algorithm
used by librpm for those file entries.

Signed-off-by: Alberto Planas <aplanas@suse.com>
@M0ses M0ses merged commit 6e15c2c into openSUSE:master Apr 26, 2022
M0ses pushed a commit that referenced this pull request Feb 24, 2023
createrepo_c renamed the --filelists_ext to --filelists-ext before the
release, and this patch follow the rename.

See #12358 for more information.

Signed-off-by: Alberto Planas <aplanas@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants