Fix having a submodule as a primary source#133
Conversation
Do not try to interpret Source0 tag to build automatic tarball name, if it isn't going to be created. This is especially relevant when Source0 points at a submodule archive (created via "modules" entry in .qubesbuilder). Fixes QubesOS/qubes-issues#9088
|
@fepitre see if you are okay with this approach as a solution for QubesOS/qubes-issues#9088. If so, I'll fill missing items from the TODO above. |
|
Do you have an example for this case or this is for some radical change on providing sources? |
|
Ok I see, so we need to improve the phase below create archive or what ever is needed to trigger archive creation if we provide necessary information from |
|
Here I used already existing functionality of Alternative would be yet another type for |
I like the idea, if entry is |
No functional change.
Right now it's trivial, but it will get extended in further commits.
Branch name starting with a number is a valid thing, and it's used by some projects for stable release branches. Additionally, some projects tag versions with any prefix before the actual version, and the script otherwise work with tag name as a branch name.
Add a bunch new options: --git-commits - fetch explicit, pre-verified, commit id --shallow-clone - skip fetching git history to speed up fetching --trust-all-keys - import and trust all keys from the keys-dir; useful with dedicated keys dir Add also tests for the new functionality.
f2abbca to
2dede4c
Compare
This allows fetching upstream sources from a git repository directly. Not all projects produce release tarballs, some use only github-generated tarballs (which aren't always reproducible). Additionally, as xz-utils story shows, manual release tarballs is additional attack vector in the supply chain. Right now support two modes: 1. Specific commit id, for example: ``` files: - git-url: https://github.com/some/repository commit-id: (full sha of the commit) git-basename: something-@Version@ ``` 2. Signed tag, for example: ``` files: - git-url: https://github.com/some/repository tag: v@VERSION@ pubkeys: - pubkey.asc ``` Fixes QubesOS/qubes-issues#9088
2dede4c to
c4ab9f6
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #133 +/- ##
==========================================
+ Coverage 75.94% 77.58% +1.64%
==========================================
Files 46 46
Lines 5059 5144 +85
==========================================
+ Hits 3842 3991 +149
+ Misses 1217 1153 -64 ☔ View full report in Codecov by Sentry. |
| / "distfiles/linux-gbulb/gbulb-0.6.3.tar.gz" | ||
| ).exists() | ||
| # verify files layout inside | ||
| subprocess.run( |
There was a problem hiding this comment.
What do you verify? Is this looking at logs only?
There was a problem hiding this comment.
ok I missed the line that you look for README.rst
There was a problem hiding this comment.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Approve HEAD being at commit c4ab9f6
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEn6ZLkvlecGvyjiymSEAQtc3FduIFAmaZMBQACgkQSEAQtc3F
duKjyw//UQ2Vu5kqKqRTQXu5yzzw47eUbwMQUpQLqLQW8iH7J1aBwYqasESnz32K
WjVFfk3n42dAfoRjV3LBaWSZEoZ2LF+htxWkE7hSUsugLhtHcDW7aFv4qnwWakcg
F3iGVvoRtIdt6+QLIr6sAhNc6eDJda4odSM6Zh0Smt5+pXqE94OYI36jxxiIbJZl
AFzCirjhagyWWed9borPLVruJgBAnaE1S8OdcKbzTD3BHCeZs2NM2EqVG4A9/Myk
qd87HiZFg4scKr5xEfGok2SsUF0jeNyHXthiRDmtaorvB8UOPyLTkDInuxGXu00D
wyy6Z1gIWqBQGYCuNFSLli/UP+CIAgmANjqDIl9Zn1jlmBNDfKDXZ+R5N0dRXDCk
SDHwohnmbAKrAIzPWzu/YO6SMr1Xr45/1ZB7PWVDd0y7C13jmRxniOjRKC3yw8PA
2wz2zX3N9NDSXOg1qW1DnDd0pHt36PIlOAS//korlacgjz4ARoENM4Y/sYUsXLYz
hMOcLk4EATGkdmOcR8nrDHZ1t5utOwedr5GEYGSM7xSq82V/8ygEKfP3aBG0ISQ9
IuKzsJS6Uw1p9Oog/tOQuLf7mTKjYq+nBhXLLcHX2LSLthwM8FbD19NXRzDPvBBE
yp9ifO8r5i2qd03sj40i8+ND4GM8oPFVUooLQwaYpHlyx1kCI0M=
=XBtf
-----END PGP SIGNATURE-----
Do not try to interpret Source0 tag to build automatic tarball name, if
it isn't going to be created. This is especially relevant when Source0
points at a submodule archive (created via "modules" entry in
.qubesbuilder).
TODO:
Source0: @something@)Fixes QubesOS/qubes-issues#9088