nodejs-hawk/nodejs-hawk.spec

57 lines
1.6 KiB
RPMSpec
Raw Normal View History

2020-08-20 19:47:50 +08:00
%global enable_tests 0
Name: nodejs-hawk
Version: 4.1.2
2022-05-17 10:47:58 +08:00
Release: 3
2020-08-20 19:47:50 +08:00
Summary: HTTP Hawk authentication scheme
2022-05-09 18:17:53 +08:00
License: BSD-3-Clause
2020-08-20 19:47:50 +08:00
URL: https://github.com/hueniverse/hawk
Source0: https://registry.npmjs.org/hawk/-/hawk-%{version}.tgz
2022-05-17 10:47:58 +08:00
Patch0: CVE-2022-29167.patch
2020-08-20 19:47:50 +08:00
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging npm(boom) npm(cryptiles) npm(hoek) npm(sntp)
%if 0%{?enable_tests}
BuildRequires: npm(lab) npm(code)
%endif
%description
Hawk is an HTTP authentication scheme using a message authentication code (MAC)
algorithm to provide partial HTTP request cryptographic verification.
%prep
2022-05-17 10:47:58 +08:00
%autosetup -n package -p1
2020-08-20 19:47:50 +08:00
%nodejs_fixdep cryptiles "^2.0.5"
%nodejs_fixdep boom "^2.10.1"
%nodejs_fixdep hoek "^0.9.1"
chmod a-x README.md LICENSE package.json client.js example/* images/* lib/*
sed -i 's/\r$//' README.md
sed -i 's/\r$//' example/usage.js
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/hawk
cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/hawk
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%__nodejs -e "require('./')"
%if 0%{?enable_tests}
%{nodejs_sitelib}/lab/bin/lab -a code -t 100 -L
%endif
%files
%doc README.md example images
%license LICENSE
%{nodejs_sitelib}/hawk
%changelog
2022-05-17 10:47:58 +08:00
* Tue May 17 2022 houyingchao <houyingchao@h-partners.com> - 4.1.2-3
- Fix CVE-2022-29167
2022-05-09 18:17:53 +08:00
* Mon May 9 2022 liyanan <liyanan32@h-partners.com> - 4.1.2-2
- License compliance rectification
2020-08-20 19:47:50 +08:00
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 4.1.2-1
- Package init