%global enable_tests 1 %global srcname tough-cookie Name: nodejs-%{srcname} Version: 2.3.2 Release: 3 Summary: RFC6265 Cookies and Cookie Jar for Node.js License: MIT URL: https://github.com/salesforce/tough-cookie Source0: https://github.com/salesforce/tough-cookie/archive/v%{version}/tough-cookie-%{version}.tar.gz Patch0: nodejs-tough-cookie-expiry.patch Patch1: nodejs-tough-cookie-assert.patch # https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e Patch2: CVE-2023-26136.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(async) npm(string.prototype.repeat) npm(vows) %endif %description %{summary}. %prep %autosetup -p 1 -n %{srcname}-%{version} %nodejs_fixdep punycode "^2.0.0" rm -rf node_modules rm -rf test/ietf_test.js %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check vows --spec test/*_test.js %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Tue Dec 12 2023 yaoxin - 2.3.2-3 - Fix CVE-2023-26136 * Wed Sep 16 2020 leiju - 2.3.2-2 - Fix build failure * Tue Aug 11 2020 wutao - 2.3.2-1 - package init