Skip to content

Add new --extract-rename option #509

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

Merged
merged 1 commit into from
Jul 31, 2025
Merged

Conversation

bluca
Copy link
Contributor

@bluca bluca commented Jan 18, 2025

Allows extracting a file and renaming it. Useful for Debian builds where the recipe file is in git, but the naming doesn't match OBS expectations: usually git stores debian/control but OBS wants debian.control. Also useful for multibuild, eg, to extract foo.spec to foo_TargetRepository.spec.

@Werkov
Copy link

Werkov commented Jan 21, 2025

Isn't this what https://github.com/openSUSE/obs-service-extract_file already does? I see you actually use it (It seems to me clearer to handle the renaming together with moving of files.)

@bluca
Copy link
Contributor Author

bluca commented Jan 21, 2025

Isn't this what https://github.com/openSUSE/obs-service-extract_file already does? I see you actually use it (It seems to me clearer to handle the renaming together with moving of files.)

That only works on tarballs, so you need to use tar_scm instead of obs_scm, and my understanding is that OBS admins want people to use obs_scm as it's easier on the backend and the storage.

It's fine for build-time operations, but this is needed as part of the service run, as you need to extract the debian/control file and call it debian.control so that the dependencies can be parsed out of it, which happens at the source service time.

@bluca
Copy link
Contributor Author

bluca commented Jul 30, 2025

@M0ses gentle ping for a review. TIA!

@M0ses
Copy link
Collaborator

M0ses commented Jul 31, 2025

@bluca Could you rebase to current master. I would like to see if the tests pass now or what breaks. Unfortunatly the old logs where no longer found.

@bluca bluca force-pushed the extract_rename branch 3 times, most recently from ef95a41 to 145746e Compare July 31, 2025 12:19
Allows extracting a file and renaming it. Useful for Debian builds where
the recipe file is in git, but the naming doesn't match OBS expectations:
usually git stores debian/control but OBS wants debian.control.
Also useful for multibuild, eg, to extract foo.spec to foo_TargetRepository.spec.
@bluca
Copy link
Contributor Author

bluca commented Jul 31, 2025

@M0ses done, it was a couple of linter warnings, fixed them, all green now

@M0ses M0ses merged commit ad98463 into openSUSE:master Jul 31, 2025
6 checks passed
@bluca bluca deleted the extract_rename branch July 31, 2025 12:36
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.

4 participants