Skip to content

Commit 8b2125c

Browse files
committed
#122 - Update link references of ownership from nexB to aboutcode-org
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent b06c4b4 commit 8b2125c

21 files changed

+410
-318
lines changed

Diff for: NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
5+
# Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
66
# ScanCode is a trademark of nexB Inc.
77
#
88
# Licensed under the Apache License, Version 2.0 (the "License");

Diff for: README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ systems. It can work using plain HTTP and FTP URLs, as well as
77
as used in Python pip and as specified in `SPDX Package Download Location
88
<https://spdx.github.io/spdx-spec/3-package-information/#37-package-download-location>`_
99

10-
Homepage and support: https://github.com/nexB/fetchcode
10+
Homepage and support: https://github.com/aboutcode-org/fetchcode
1111

1212

1313
Why FetchCode?
@@ -24,7 +24,7 @@ Development installation
2424

2525
Clone the repo::
2626

27-
git clone https://github.com/nexB/fetchcode
27+
git clone https://github.com/aboutcode-org/fetchcode
2828

2929
Then install all the requirements using this command (on POSIX)::
3030

@@ -45,13 +45,13 @@ Usage
4545
Fetch a code archive and get a ``fetchcode.fetch.Response`` object back::
4646

4747
>>> from fetchcode import fetch
48-
>>> f = fetch('https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
48+
>>> f = fetch('https://github.com/aboutcode-org/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
4949
>>> f.location
5050
'/tmp/tmp_cm02xsg'
5151
>>> f.content_type
5252
'application/zip'
5353
>>> f.url
54-
'https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'
54+
'https://github.com/aboutcode-org/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'
5555

5656
Fetch some package metadata and get a ``fetchcode.packagedcode_models.Package`` object back::
5757

Diff for: configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) nexB Inc. and others. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/ for support or download.
6+
# See https://github.com/aboutcode-org/ for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

Diff for: configure.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@rem Copyright (c) nexB Inc. and others. All rights reserved.
55
@rem SPDX-License-Identifier: Apache-2.0
66
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
@rem See https://github.com/nexB/ for support or download.
7+
@rem See https://github.com/aboutcode-org/ for support or download.
88
@rem See https://aboutcode.org for more information about nexB OSS projects.
99

1010

Diff for: setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = Apache-2.0
66
description = fetchcode is a library to reliably fetch code via HTTP, FTP and version control systems.
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/nexB/fetchcode
9+
url = https://github.com/aboutcode-org/fetchcode
1010

1111
author = nexB. Inc. and others
1212
author_email = [email protected]

Diff for: src/fetchcode/__init__.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fetchcode is a free software tool from nexB Inc. and others.
2-
# Visit https://github.com/nexB/fetchcode for support and download.
2+
# Visit https://github.com/aboutcode-org/fetchcode for support and download.
33
#
44
# Copyright (c) nexB Inc. and others. All rights reserved.
55
# http://nexb.com and http://aboutcode.org
@@ -41,7 +41,7 @@ def __init__(self, location, content_type, size, url):
4141
def fetch_http(url, location):
4242
"""
4343
Return a `Response` object built from fetching the content at a HTTP/HTTPS based `url` URL string
44-
saving the content in a file at `location`
44+
saving the content in a file at `location`
4545
"""
4646
r = requests.get(url)
4747
with open(location, 'wb') as f:
@@ -51,15 +51,16 @@ def fetch_http(url, location):
5151
size = r.headers.get('content-length')
5252
size = int(size) if size else None
5353

54-
resp = Response(location=location, content_type=content_type, size=size, url=url)
54+
resp = Response(location=location,
55+
content_type=content_type, size=size, url=url)
5556

5657
return resp
5758

5859

5960
def fetch_ftp(url, location):
6061
"""
6162
Return a `Response` object built from fetching the content at a FTP based `url` URL string
62-
saving the content in a file at `location`
63+
saving the content in a file at `location`
6364
"""
6465
url_parts = urlparse(url)
6566

@@ -84,7 +85,8 @@ def fetch_ftp(url, location):
8485
ftp.retrbinary(file, f.write)
8586
ftp.close()
8687

87-
resp = Response(location=location, content_type=content_type, size=size, url=url)
88+
resp = Response(location=location,
89+
content_type=content_type, size=size, url=url)
8890
return resp
8991

9092

Diff for: src/fetchcode/package.py

+41-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fetchcode is a free software tool from nexB Inc. and others.
2-
# Visit https://github.com/nexB/fetchcode for support and download.
2+
# Visit https://github.com/aboutcode-org/fetchcode for support and download.
33
#
44
# Copyright (c) nexB Inc. and others. All rights reserved.
55
# http://nexb.com and http://aboutcode.org
@@ -92,7 +92,8 @@ def get_cargo_data_from_purl(purl):
9292
)
9393
versions = response.get("versions", [])
9494
for version in versions:
95-
version_purl = PackageURL(type=purl.type, name=name, version=version.get("num"))
95+
version_purl = PackageURL(
96+
type=purl.type, name=name, version=version.get("num"))
9697
dl_path = version.get("dl_path")
9798
if dl_path:
9899
download_url = f"{base_url}/{dl_path}"
@@ -355,7 +356,8 @@ def get_gnu_data_from_purl(purl):
355356
purl = PackageURL.from_string(purl)
356357
source_archive_url = f"https://ftp.gnu.org/pub/gnu/{purl.name}/"
357358
version_regex_template = r"^({}-)(?P<version>[\w.-]*)(.tar.gz)$"
358-
version_regex = re.compile(version_regex_template.format(re.escape(purl.name)))
359+
version_regex = re.compile(
360+
version_regex_template.format(re.escape(purl.name)))
359361

360362
yield from extract_packages_from_listing(
361363
purl, source_archive_url, version_regex, []
@@ -427,7 +429,8 @@ def get_package_info(cls, package_url):
427429

428430
else:
429431
for version, data in UDHCP_RELEASES.items():
430-
purl = PackageURL(type="generic", name="udhcp", version=version)
432+
purl = PackageURL(
433+
type="generic", name="udhcp", version=version)
431434
yield Package(
432435
homepage_url=cls.source_url,
433436
download_url=data["url"],
@@ -481,39 +484,44 @@ class UtilLinuxDirectoryListedSource(DirectoryListedSource):
481484
class BusyBoxDirectoryListedSource(DirectoryListedSource):
482485
source_url = "https://www.busybox.net/downloads/"
483486
# Source archive ex: busybox-1.2.3.tar.bz2
484-
source_archive_regex = re.compile(r"^(busybox-)(?P<version>[\w.-]*)(.tar.bz2)$")
487+
source_archive_regex = re.compile(
488+
r"^(busybox-)(?P<version>[\w.-]*)(.tar.bz2)$")
485489
is_nested = False
486490
ignored_files_and_dir = []
487491

488492

489493
class UclibcDirectoryListedSource(DirectoryListedSource):
490494
source_url = "https://www.uclibc.org/downloads/"
491495
# Source archive ex: uClibc-1.2.3.tar.gz
492-
source_archive_regex = re.compile(r"^(uClibc-)(?P<version>[\w.-]*)(.tar.gz)$")
496+
source_archive_regex = re.compile(
497+
r"^(uClibc-)(?P<version>[\w.-]*)(.tar.gz)$")
493498
is_nested = False
494499
ignored_files_and_dir = []
495500

496501

497502
class UclibcNGDirectoryListedSource(DirectoryListedSource):
498503
source_url = "https://downloads.uclibc-ng.org/releases/"
499504
# Source archive ex: uClibc-ng-1.2.3.tar.gz
500-
source_archive_regex = re.compile(r"^(uClibc-ng-)(?P<version>[\w.-]*)(.tar.gz)$")
505+
source_archive_regex = re.compile(
506+
r"^(uClibc-ng-)(?P<version>[\w.-]*)(.tar.gz)$")
501507
is_nested = True
502508
ignored_files_and_dir = []
503509

504510

505511
class Bzip2DirectoryListedSource(DirectoryListedSource):
506512
source_url = "https://sourceware.org/pub/bzip2/"
507513
# Source archive ex: bzip2-1.2.3.tar.gz
508-
source_archive_regex = re.compile(r"^(bzip2-)(?P<version>[\w.-]*)(.tar.gz)$")
514+
source_archive_regex = re.compile(
515+
r"^(bzip2-)(?P<version>[\w.-]*)(.tar.gz)$")
509516
is_nested = False
510517
ignored_files_and_dir = []
511518

512519

513520
class OpenSSHDirectoryListedSource(DirectoryListedSource):
514521
source_url = "https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/"
515522
# Source archive ex: openssh-1.2.3.tar.gz
516-
source_archive_regex = re.compile(r"^(openssh-)(?P<version>[\w.-]*)(.tgz|.tar.gz)$")
523+
source_archive_regex = re.compile(
524+
r"^(openssh-)(?P<version>[\w.-]*)(.tgz|.tar.gz)$")
517525
is_nested = False
518526
ignored_files_and_dir = []
519527

@@ -531,15 +539,17 @@ class DnsmasqDirectoryListedSource(DirectoryListedSource):
531539
class EbtablesDirectoryListedSource(DirectoryListedSource):
532540
source_url = "https://www.netfilter.org/pub/ebtables/"
533541
# Source archive ex: ebtables-1.2.3.tar.gz
534-
source_archive_regex = re.compile(r"^(ebtables-)(?P<version>[\w.-]*)(.tar.gz)$")
542+
source_archive_regex = re.compile(
543+
r"^(ebtables-)(?P<version>[\w.-]*)(.tar.gz)$")
535544
is_nested = False
536545
ignored_files_and_dir = []
537546

538547

539548
class HostapdDirectoryListedSource(DirectoryListedSource):
540549
source_url = "https://w1.fi/releases/"
541550
# Source archive ex: hostapd-1.2.3.tar.gz
542-
source_archive_regex = re.compile(r"^(hostapd-)(?P<version>[\w.-]*)(.tar.gz)$")
551+
source_archive_regex = re.compile(
552+
r"^(hostapd-)(?P<version>[\w.-]*)(.tar.gz)$")
543553
is_nested = False
544554
ignored_files_and_dir = []
545555

@@ -557,23 +567,26 @@ class Iproute2DirectoryListedSource(DirectoryListedSource):
557567
class IptablesDirectoryListedSource(DirectoryListedSource):
558568
source_url = "https://www.netfilter.org/pub/iptables/"
559569
# Source archive ex: iptables-1.2.3.tar.bz2
560-
source_archive_regex = re.compile(r"^(iptables-)(?P<version>[\w.-]*)(.tar.bz2)$")
570+
source_archive_regex = re.compile(
571+
r"^(iptables-)(?P<version>[\w.-]*)(.tar.bz2)$")
561572
is_nested = False
562573
ignored_files_and_dir = []
563574

564575

565576
class LibnlDirectoryListedSource(DirectoryListedSource):
566577
source_url = "https://www.infradead.org/~tgr/libnl/files/"
567578
# Source archive ex: libnl-1.2.3.tar.gz
568-
source_archive_regex = re.compile(r"^(libnl-)(?P<version>[\w.-]*)(.tar.gz)$")
579+
source_archive_regex = re.compile(
580+
r"^(libnl-)(?P<version>[\w.-]*)(.tar.gz)$")
569581
is_nested = False
570582
ignored_files_and_dir = []
571583

572584

573585
class LighttpdDirectoryListedSource(DirectoryListedSource):
574586
source_url = "https://download.lighttpd.net/lighttpd/releases-1.4.x/"
575587
# Source archive ex: lighttpd-1.2.3.tar.gz
576-
source_archive_regex = re.compile(r"^(lighttpd-)(?P<version>[\w.-]*)(.tar.gz)$")
588+
source_archive_regex = re.compile(
589+
r"^(lighttpd-)(?P<version>[\w.-]*)(.tar.gz)$")
577590
is_nested = False
578591
ignored_files_and_dir = []
579592

@@ -601,15 +614,17 @@ class WpaSupplicantDirectoryListedSource(DirectoryListedSource):
601614
class SyslinuxDirectoryListedSource(DirectoryListedSource):
602615
source_url = "https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/"
603616
# Source archive ex: syslinux-1.2.3.tar.gz
604-
source_archive_regex = re.compile(r"^(syslinux-)(?P<version>[\w.-]*)(.tar.gz)$")
617+
source_archive_regex = re.compile(
618+
r"^(syslinux-)(?P<version>[\w.-]*)(.tar.gz)$")
605619
is_nested = False
606620
ignored_files_and_dir = []
607621

608622

609623
class SyslinuxDirectoryListedSource(DirectoryListedSource):
610624
source_url = "https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/"
611625
# Source archive ex: syslinux-1.2.3.tar.gz
612-
source_archive_regex = re.compile(r"^(syslinux-)(?P<version>[\w.-]*)(.tar.gz)$")
626+
source_archive_regex = re.compile(
627+
r"^(syslinux-)(?P<version>[\w.-]*)(.tar.gz)$")
613628
is_nested = False
614629
ignored_files_and_dir = []
615630

@@ -646,31 +661,35 @@ class DropbearDirectoryListedSource(DirectoryListedSource):
646661
class SambaDirectoryListedSource(DirectoryListedSource):
647662
source_url = "https://download.samba.org/pub/samba/stable/"
648663
# Source archive ex: samba-1.2.3.tar.gz
649-
source_archive_regex = re.compile(r"^(samba-)(?P<version>[\w.-]*)(.tar.gz)$")
664+
source_archive_regex = re.compile(
665+
r"^(samba-)(?P<version>[\w.-]*)(.tar.gz)$")
650666
is_nested = False
651667
ignored_files_and_dir = []
652668

653669

654670
class MtdUtilsDirectoryListedSource(DirectoryListedSource):
655671
source_url = "https://infraroot.at/pub/mtd/"
656672
# Source archive ex: mtd-utils-1.2.3.tar.bz2
657-
source_archive_regex = re.compile(r"^(mtd-utils-)(?P<version>[\w.-]*)(.tar.bz2)$")
673+
source_archive_regex = re.compile(
674+
r"^(mtd-utils-)(?P<version>[\w.-]*)(.tar.bz2)$")
658675
is_nested = False
659676
ignored_files_and_dir = []
660677

661678

662679
class BareboxDirectoryListedSource(DirectoryListedSource):
663680
source_url = "https://www.barebox.org/download/"
664681
# Source archive ex: barebox-1.2.3.tar.bz2
665-
source_archive_regex = re.compile(r"^(barebox-)(?P<version>[\w.-]*)(.tar.bz2)$")
682+
source_archive_regex = re.compile(
683+
r"^(barebox-)(?P<version>[\w.-]*)(.tar.bz2)$")
666684
is_nested = False
667685
ignored_files_and_dir = []
668686

669687

670688
class LinuxDirectoryListedSource(DirectoryListedSource):
671689
source_url = "https://mirrors.edge.kernel.org/pub/linux/kernel/"
672690
# Source archive ex: linux-1.2.3.tar.gz
673-
source_archive_regex = re.compile(r"^(linux-)(?P<version>[\w.-]*)(.tar.gz)$")
691+
source_archive_regex = re.compile(
692+
r"^(linux-)(?P<version>[\w.-]*)(.tar.gz)$")
674693
is_nested = True
675694
ignored_files_and_dir = [
676695
"Historic/",
@@ -692,7 +711,8 @@ class E2fsprogsDirectoryListedSource(DirectoryListedSource):
692711
"https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/"
693712
)
694713
# Source archive ex: e2fsprogs-1.2.3.tar.gz
695-
source_archive_regex = re.compile(r"^(e2fsprogs-)(?P<version>[\w.-]*)(.tar.gz)$")
714+
source_archive_regex = re.compile(
715+
r"^(e2fsprogs-)(?P<version>[\w.-]*)(.tar.gz)$")
696716
is_nested = True
697717
ignored_files_and_dir = ["testing/"]
698718

Diff for: src/fetchcode/package_util.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fetchcode is a free software tool from nexB Inc. and others.
2-
# Visit https://github.com/nexB/fetchcode for support and download.
2+
# Visit https://github.com/aboutcode-org/fetchcode for support and download.
33
#
44
# Copyright (c) nexB Inc. and others. All rights reserved.
55
# http://nexb.com and http://aboutcode.org
@@ -165,7 +165,8 @@ class SquashfsToolsGitHubSource(GitHubSource):
165165

166166

167167
class PupnpGitHubSource(GitHubSource):
168-
version_regex = re.compile(r"\brelease-?(?P<version>(?:\d+(\.\d+){1,2}))\b")
168+
version_regex = re.compile(
169+
r"\brelease-?(?P<version>(?:\d+(\.\d+){1,2}))\b")
169170
ignored_tag_regex = None
170171

171172

@@ -180,7 +181,8 @@ class BpftoolGitHubSource(GitHubSource):
180181

181182

182183
class SqliteGitHubSource(GitHubSource):
183-
version_regex = re.compile(r"\bversion-?(?P<version>(?:\d+(\.\d+){1,2}))\b")
184+
version_regex = re.compile(
185+
r"\bversion-?(?P<version>(?:\d+(\.\d+){1,2}))\b")
184186
ignored_tag_regex = None
185187

186188

@@ -190,7 +192,8 @@ class LlvmGitHubSource(GitHubSource):
190192

191193

192194
class RpmGitHubSource(GitHubSource):
193-
version_regex = re.compile(r"rpm-(?P<version>[^-]+(?:-(?!release).*)?|-release)")
195+
version_regex = re.compile(
196+
r"rpm-(?P<version>[^-]+(?:-(?!release).*)?|-release)")
194197
ignored_tag_regex = None
195198

196199

Diff for: src/fetchcode/package_versions.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fetchcode is a free software tool from nexB Inc. and others.
2-
# Visit https://github.com/nexB/fetchcode for support and download.
2+
# Visit https://github.com/aboutcode-org/fetchcode for support and download.
33
#
44
# Copyright (c) nexB Inc. and others. All rights reserved.
55
# http://nexb.com and http://aboutcode.org
@@ -317,7 +317,8 @@ def get_golang_versions_from_purl(purl):
317317
break
318318

319319
if response is None or escaped_pkg is None or trimmed_pkg is None:
320-
logger.error(f"Error while fetching versions for {package_slug!r} from goproxy")
320+
logger.error(
321+
f"Error while fetching versions for {package_slug!r} from goproxy")
321322
return
322323

323324
for version_info in response.split("\n"):
@@ -347,7 +348,7 @@ def trim_go_url_path(url_path: str) -> Optional[str]:
347348
# some advisories contains this prefix in package name, e.g. https://github.com/advisories/GHSA-7h6j-2268-fhcm
348349
go_url_prefix = "https://pkg.go.dev/"
349350
if url_path.startswith(go_url_prefix):
350-
url_path = url_path[len(go_url_prefix) :]
351+
url_path = url_path[len(go_url_prefix):]
351352

352353
parsed_url_path = urlparse(url_path)
353354
path = parsed_url_path.path
@@ -408,7 +409,8 @@ def fetch_version_info(version_info: str, escaped_pkg: str) -> Optional[PackageV
408409
f"Error while fetching version info for {escaped_pkg}/{escaped_ver} "
409410
f"from goproxy:\n{traceback.format_exc()}"
410411
)
411-
release_date = dateparser.parse(response.get("Time", "")) if response else None
412+
release_date = dateparser.parse(
413+
response.get("Time", "")) if response else None
412414

413415
return PackageVersion(value=version, release_date=release_date)
414416

0 commit comments

Comments
 (0)