Fabian Arrotin
ae9a7e62f9
Backported alphacc's fix for el7/cbs and bash 4.2 ( ca63b53c8b
)
...
Signed-off-by: Fabian Arrotin <arrfab@centos.org>
2022-02-17 13:25:45 +01:00
Pierre-Yves Chibon
518994fd59
Make the get_sources shell script support flat layout
...
The idea of this commit is to make get_sources.sh support both the
'traditional' git layout used on dist-git for CentOS Linux where the
spec files are stored in a SPECS folder and the patches in a SOURCES
folder with the sha of the tarball being in a '.<pkg_name>.metadata'
file as well as the 'flat' git layout that have adopted Fedora as well
as CentOS-Stream (9+) where the spec files and patches are all stored
at the top level directory of the repository and the sha of the tarball
is present in a 'sources' file.
This commit re-uses code from the fedpkg-minimal project which is
license under the GPL (so the License field of the spec file for
centpkg-minimal may need to be adjusted to MIT and GPL).
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
2022-02-01 10:59:12 +01:00
Brian Stinson
b2f5375fcf
add a grep to be sure we only check the origin remote (no forks)
2019-04-16 13:10:24 -05:00
Brian Stinson
7707c61e83
A WHICH! BURN IT
2019-04-16 13:10:19 -05:00
Brian Stinson
9857597bf6
add some quotes to make shellcheck happier
2019-04-16 13:06:51 -05:00
Brian Stinson
fd37ab5810
use command instead of which. this is more portable and doesn\'t require another dep
2019-04-16 10:03:11 -05:00
Brian Stinson
3382beadcc
Get the proper branch name from the remote instead of the local branch
...
name.
This allows you to clone a commit directly by its hash, and not be
required to set up a tracking branch (with a matching name) to its
upstream.
2019-04-16 09:59:13 -05:00
Colin Walters
1ad34919a1
get_sources: Print the URL we're fetching
...
Just for better debugging.
2016-12-14 09:46:35 -06:00
Colin Walters
552ca48e93
get_sources: Follow redirects
...
This is general best practice, and would have avoided the
need for 696c29f5c9
(I tested with that commit reverted)
2016-12-14 09:46:35 -06:00
Tuomo Soini
bd83a7926b
get_sources: download source again if file checksum has changed
...
This functionality requires use of option -c.
Signed-off-by: Tuomo Soini <tis@foobar.fi>
2016-11-15 08:47:05 -06:00
Johnny Hughes
696c29f5c9
fix for git.c.o redirect
2016-07-06 14:11:13 -05:00
Pat Riehecky
7520e4b130
Send these errors to stderr
2014-07-22 10:01:28 -05:00
Tyler Parsons
d96c00fa0f
Allow get_sources.sh hash verification to work with hashes other than sha1
2014-06-27 13:06:10 -05:00
Pat Riehecky
64562123ea
Refactor to use getopt for arg parsing
2014-06-26 14:38:49 -05:00
Mike McLean
da2660e784
don't assume specfile name matches package name in get_sources
2014-06-25 14:49:32 -05:00
Pat Riehecky
061172c484
Added optional check for sha1sum of downloaded source file
2014-06-25 12:27:07 -05:00
Pat Riehecky
4258078ef3
Added -q to get_sources for less chatty operation
2014-06-25 12:25:28 -05:00
Mike McLean
c61c1ca391
handle detached branch case handle alternate directory name case cmdline args to override branch and source url
2014-06-12 21:36:41 +01:00
Pat Riehecky
f3a920b627
Fixed so it works on kpatch golang-*
2014-06-11 18:31:34 +01:00
Pat Riehecky
1842fe9505
Added simple override file for altering top level vars.
2014-06-10 15:13:15 +01:00
Pat Riehecky
a4a7af33ae
Fixed inconsistent use of ${} notation
2014-06-10 15:13:10 +01:00
Pat Riehecky
c19d26d752
moved url to var for easier customization over time
2014-06-10 15:13:01 +01:00
Karanbir Singh
afa935ac9b
add the get_sources.sh file so people can get non-text sources
2014-06-07 01:25:31 +01:00