Skip to content

Conversation

bssrikanth
Copy link

The get_protocol function incorrectly identified URLs containing ".git" anywhere in the string as Git repositories, causing errors when downloading raw files. This commit updates the regex to match ".git$" (end of string).

@bssrikanth
Copy link
Author

Before fix:

==> Making package: leaking-addresses 4f19048-1 (Fri Jul  4 04:26:33 PM UTC 2025)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Source is https://raw.githubusercontent.com/torvalds/linux/master/scripts/leaking_addresses.pl
  -> Cloning leaking_addresses.pl git repo...
Cloning into bare repository '/home/VT_BUILD/lkp-tests/programs/leaking-addresses/pkg/leaking_addresses.pl'...
remote: 404: Not Found
fatal: repository 'https://raw.githubusercontent.com/torvalds/linux/master/scripts/leaking_addresses.pl/' not found
==> ERROR: Failure while downloading leaking_addresses.pl git repo
    Aborting...
Install leaking-addresses failed

After fix:

==> Retrieving sources...
  -> Source is https://raw.githubusercontent.com/torvalds/linux/master/scripts/leaking_addresses.pl
  -> Downloading leaking_addresses.pl...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14937  100 14937    0     0  38565      0 --:--:-- --:--:-- --:--:-- 38596
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with md5sums...
    leaking_addresses.pl ... Skipped
==> Extracting sources...
  -> Source is https://raw.githubusercontent.com/torvalds/linux/master/scripts/leaking_addresses.pl
==> Updated version: leaking-addresses 67bbd2f-1
==> Starting patch_source()...
PWD=/home/VT_BUILD/lkp-tests/tmp-pkg/leaking-addresses/src, startdir=/home/VT_BUILD/lkp-tests/programs/leaking-addresses/pkg, pkgname=leaking-addresses, srcdir=/home/VT_BUILD/lkp-tests/tmp-pkg/leaking-addresses/src
==> Entering fakeroot environment...
x86_64
==> Starting package()...
==> Tidying install...
  -> Purging unwanted files...
  -> Removing libtool files...
  -> Removing static library files...
  -> Compressing man and info pages...
  -> Stripping unneeded symbols from binaries and libraries...
==> Creating package "leaking-addresses"...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: leaking-addresses 67bbd2f-1 (Fri Jul  4 04:39:24 PM UTC 2025)
==> Installing package leaking-addresses with /home/VT_BUILD/lkp-tests/sbin/pacman-LKP -U...
dpkg-deb: building package 'leaking-addresses-lkp' in 'leaking-addresses-lkp.deb'.
Selecting previously unselected package leaking-addresses-lkp.
(Reading database ... 346740 files and directories currently installed.)
Preparing to unpack leaking-addresses-lkp.deb ...
Unpacking leaking-addresses-lkp (2025-07-04) ...
Setting up leaking-addresses-lkp (2025-07-04) ...
install succeed

@rli9
Copy link

rli9 commented Jul 4, 2025

thanks for the patch

The get_protocol function incorrectly identified URLs containing ".git"
anywhere in the string as Git repositories, causing errors when downloading
raw files. This commit updates the regex to match ".git$" (end of string).

Signed-off-by: Srikanth Aithal <srikanth.aithal@amd.com>
rli9 added a commit that referenced this pull request Jul 9, 2025
Due to the change in 5abefe3, the protocol is not judged as git
anymore, which results in

	==> Retrieving sources...
	  -> Source is https://github.com/axboe/fio.git#tag=fio-3.40
	  -> Downloading fio.git#tag=fio-3.40...

	==> /tmp/stderr <==
	  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
	                                 Dload  Upload   Total   Spent    Left  Speed
	100   162  100   162    0     0    152      0  0:00:01  0:00:01 --:--:--   152
	100  507k    0  507k    0     0   181k      0 --:--:--  0:00:02 --:--:--  658k

The expected behavior is

	==> Retrieving sources...
	  -> Source is https://github.com/axboe/fio.git#tag=fio-3.38
	  -> Cloning fio git repo...

Fixes: 5abefe3 ("Fix Git URL parsing in get_protocol (#520)")
Signed-off-by: Philip Li <philip.li@intel.com>
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