55 lines
1.4 KiB
RPMSpec
55 lines
1.4 KiB
RPMSpec
%global npm_name hosted-git-info
|
|
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
Name: nodejs-hosted-git-info
|
|
Version: 2.1.4
|
|
Release: 2
|
|
Summary: Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab
|
|
Url: https://github.com/npm/hosted-git-info
|
|
Source0: https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
|
|
Patch0000: CVE-2021-23362-pre1.patch
|
|
Patch0001: CVE-2021-23362-pre2.patch
|
|
Patch0002: CVE-2021-23362.patch
|
|
|
|
License: ISC
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-devel nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(tap)
|
|
%endif
|
|
%description
|
|
Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
%patch0000 -p1
|
|
%patch0001 -p1
|
|
%patch0002 -p1
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
|
cp -pr package.json index.js git-host.js git-host-info.js \
|
|
%{buildroot}%{nodejs_sitelib}/%{npm_name}
|
|
%{nodejs_symlink_deps}
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%{nodejs_symlink_deps} --check
|
|
tap test/*.js
|
|
%endif
|
|
|
|
%files
|
|
%{nodejs_sitelib}/hosted-git-info
|
|
%doc README.md
|
|
%license LICENSE
|
|
|
|
%changelog
|
|
* Mon Mar 29 2021 wangyue <wangyue92@huawei.com> - 2.1.4-2
|
|
- fix CVE-2021-23362
|
|
|
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 2.1.4-1
|
|
- package init
|