!1 add package

Merge pull request !1 from 付安安/master
This commit is contained in:
openeuler-ci-bot 2020-08-24 17:48:22 +08:00 committed by Gitee
commit b33cbf7af8
3 changed files with 63 additions and 0 deletions

Binary file not shown.

59
nodejs-graceful-fs.spec Normal file
View File

@ -0,0 +1,59 @@
%{?nodejs_find_provides_and_requires}
%global enable_tests 0
Name: nodejs-graceful-fs
Version: 4.1.11
Release: 1
Summary: A drop-in replacement for fs, making various improvements
License: BSD
URL: https://github.com/isaacs/node-graceful-fs
Source0: https://github.com/isaacs/node-graceful-fs/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(tap) npm(rimraf)
%description
A drop-in replacement for fs, making various improvements.
The improvements are meant to normalize behavior across different
platforms and environments, and to make filesystem access more
resilient to errors.
Improvements over fs module
* Queues up open and readdir calls, and retries them once something
closes if there is an EMFILE error from too many file descriptors.
* Fixes lchmod for Node versions prior to 0.6.2.
* Implements fs.lutimes if possible. Otherwise it becomes a noop.
* Ignores EINVAL and EPERM errors in chown, fchown or lchown if the
user isn't root.
* Makes lchmod and lchown become noops, if not available.
* Retries reading a file if read results in EAGAIN error.
On Windows, it retries renaming a file for up to one second if EACCESS
or EPERM error occurs, likely because antivirus software has locked the
directory.
%prep
%autosetup -n node-graceful-fs-%{version}
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/graceful-fs
cp -p package.json graceful-fs.js fs.js polyfills.js legacy-streams.js \
%{buildroot}%{nodejs_sitelib}/graceful-fs
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/tap test/*.js
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/graceful-fs
%changelog
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 4.1.11-1
- package init

4
nodejs-graceful-fs.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: isaacs/node-graceful-fs
tag_prefix: "^v"
seperator: "."