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

Allow for renaming of simple source files #29

Merged
merged 2 commits into from
May 28, 2022

Conversation

JacekJagosz
Copy link
Contributor

This commit allows for renaming of source files by adding #putNewNameHere.tar.gz at the end of the source URL. This is useful when multiple of your sources have the same filename, like rocm I am packaging.
There is a complimentary solbuild patch for the same functionality.

Made to go with solbuild commit
@JacekJagosz
Copy link
Contributor Author

JacekJagosz commented May 3, 2022

Edit: Turns out solbuild wasn't building with this patched ypkg
This patch works for executing ypkg by itself, but in solbuild it can't find files that were fetched and renamed in Solbuild.
So this check is failing for some reason: https://github.com/getsolus/ypkg/blob/master/ypkg2/main.py#L244

 ✚  Configuring container networking
 ✚  Exposing source to container /var/cache/solbuild/unstable-x86_64/rocm-opencl/union/home/build/YPKG/sources/test1.tar.gz
 ✚  Exposing ccache to build /var/cache/solbuild/unstable-x86_64/rocm-opencl/union/home/build/.ccache
 ✚  Exposing sccache to build /var/cache/solbuild/unstable-x86_64/rocm-opencl/union/home/build/.cache/sccache
 ✚  Copying host asset /etc/resolv.conf
 ✚  Copying host asset /etc/eopkg/eopkg.conf
 ⮞  Now starting build of package
[Info] Building rocm-opencl-5.1.0
[Source] Fetching: https://github.com/ROCm-Developer-Tools/ROCclr/archive/refs/tags/rocm-5.1.0.tar.gz#test1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: github.com
[Source] Failed to fetch https://github.com/ROCm-Developer-Tools/ROCclr/archive/refs/tags/rocm-5.1.0.tar.gz#test1.tar.gz
Error follows: Command 'curl -o "/home/build/YPKG/sources/rocm-5.1.0.tar.gz#test1.tar.gz" --url "https://github.com/ROCm-Developer-Tools/ROCclr/archive/refs/tags/rocm-5.1.0.tar.gz#test1.tar.gz" --location' returned non-zero exit status 6
[Source] Cannot continue without sources

@JacekJagosz
Copy link
Contributor Author

Verified it now works, so ready to be merged ;)

Copy link
Contributor

@joebonrichie joebonrichie left a comment

Choose a reason for hiding this comment

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

Nice work, just a couple of small nits.

ypkg2/main.py Outdated Show resolved Hide resolved
ypkg2/sources.py Outdated Show resolved Hide resolved
@joebonrichie
Copy link
Contributor

Looks okay to me, my only concern was that if '#' in uri seemed quite broad. AFAIK # is reserved for URI fragment support and otherwise gets encoded to %23 so it should be fine.

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