nodejs-qs/nodejs-qs.spec
wk333 54eaeb0fa9 Fix CVE-2022-24999
(cherry picked from commit f62d633f73752801030dd43fd282898334e44eb1)
2024-03-26 16:44:05 +08:00

54 lines
1.4 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-qs
Version: 6.5.1
Release: 2
Summary: Query string parser for Node.js
License: BSD
URL: https://github.com/ljharb/qs
Source0: https://registry.npmjs.org/qs/-/qs-%{version}.tgz
Patch0: CVE-2022-24999.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(iconv-lite)
%if 0%{?enable_tests}
BuildRequires: npm(tape)
%endif
%description
This is a query string parser for node and the browser supporting nesting,
as it was removed from 0.3.x, so this library provides the previous and
commonly desired behavior (and twice as fast). Used by express, connect
and others.
%prep
%autosetup -n package -p1
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/qs
cp -p package.json %{buildroot}%{nodejs_sitelib}/qs
mkdir -p %{buildroot}%{nodejs_sitelib}/qs/lib
install -p -m644 lib/*.js %{buildroot}%{nodejs_sitelib}/qs/lib
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%__nodejs test
%endif
%files
%doc README.md CHANGELOG.md
%license LICENSE
%{nodejs_sitelib}/qs
%changelog
* Tue Mar 26 2024 wangkai <13474090681@163.com> - 6.5.1-2
- Fix CVE-2022-24999
* Fri Aug 14 2020 wangyue <wangyue92@huawei.com> - 6.5.1-1
- Package init