Bug 1274742 - Review Request: nodejs-string-width - Get the visual width of a string
Review Request: nodejs-string-width - Get the visual width of a string
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Hughes
Fedora Extras Quality Assurance
:
Depends On: 1312604 1312654
Blocks: nodejs-reviews 1312567
  Show dependency treegraph
 
Reported: 2015-10-23 09:27 EDT by Jared Smith
Modified: 2016-08-04 06:42 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-04 06:42:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
tom: fedora‑review+


Attachments (Terms of Use)

  None (edit)
Description Jared Smith 2015-10-23 09:27:49 EDT
Spec URL: https://jsmith.fedorapeople.org/Packaging/nodejs-string-width/nodejs-string-width.spec
SRPM URL: https://jsmith.fedorapeople.org/Packaging/nodejs-string-width/nodejs-string-width-1.0.1-1.fc23.src.rpm
Description: Get the visual width of a string - the number of columns required to display it
Fedora Account System Username: jsmith
Comment 1 Piotr Popieluch 2015-11-13 04:09:37 EST
This package depends on nodejs-code-point-at. Could you create a review request for that? (I see it is in your home dir on people).
Comment 2 Tom Hughes 2016-03-01 19:13:31 EST
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "MIT/X11 (BSD like)", "Unknown or generated". 3 files have
     unknown license. Detailed output of licensecheck in /home/tom/1274742
     -nodejs-string-width/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)


Installation errors
-------------------
INFO: mock.py version 1.2.15 starting (python version = 3.4.3)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
Mock Version: 1.2.15
INFO: Mock Version: 1.2.15
Finish: chroot init
INFO: installing package(s): /home/tom/1274742-nodejs-string-width/results/nodejs-string-width-1.0.1-1.fc25.noarch.rpm
ERROR: Command failed. See logs for output.
 # /usr/bin/dnf --installroot /var/lib/mock/compton-rawhide-x86_64/root/ --releasever 24 --disableplugin=local --setopt=deltarpm=false install /home/tom/1274742-nodejs-string-width/results/nodejs-string-width-1.0.1-1.fc25.noarch.rpm


Rpmlint
-------
Checking: nodejs-string-width-1.0.1-1.fc25.noarch.rpm
          nodejs-string-width-1.0.1-1.fc25.src.rpm
nodejs-string-width.noarch: W: only-non-binary-in-usr-lib
nodejs-string-width.noarch: W: dangling-symlink /usr/lib/node_modules/string-width/node_modules/code-point-at /usr/lib/node_modules/code-point-at
nodejs-string-width.noarch: W: dangling-symlink /usr/lib/node_modules/string-width/node_modules/is-fullwidth-code-point /usr/lib/node_modules/is-fullwidth-code-point
nodejs-string-width.noarch: W: dangling-symlink /usr/lib/node_modules/string-width/node_modules/strip-ansi /usr/lib/node_modules/strip-ansi
2 packages and 0 specfiles checked; 0 errors, 4 warnings.




Diff spec file in url and in SRPM
---------------------------------
--- /home/tom/1274742-nodejs-string-width/srpm/nodejs-string-width.spec	2016-03-01 23:09:12.617439210 +0000
+++ /home/tom/1274742-nodejs-string-width/srpm-unpacked/nodejs-string-width.spec	2015-10-23 05:02:25.000000000 +0100
@@ -22,7 +22,10 @@
 BuildRequires:	nodejs-packaging
 %if 0%{?enable_tests}
+BuildRequires:	mocha
 BuildRequires:	npm(ava)
 %endif
 
+Requires:	nodejs
+
 %description
 Get the visual width of a string - the number of columns required to display it
@@ -41,16 +44,13 @@
 %install
 mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
-cp -pr package.json index.js \
+cp -pr package.json *.js \
 	%{buildroot}%{nodejs_sitelib}/%{packagename}
 
 %nodejs_symlink_deps
 
+%if 0%{?enable_tests}
 %check
 %nodejs_symlink_deps --check
-%{__nodejs} -e 'require("./")'
-%if 0%{?enable_tests}
-%{__nodejs} test.js
-%else
-%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+/usr/bin/node test.js
 %endif
 


Requires
--------
nodejs-string-width (rpmlib, GLIBC filtered):
    nodejs
    nodejs(engine)
    npm(code-point-at)
    npm(is-fullwidth-code-point)
    npm(strip-ansi)



Provides
--------
nodejs-string-width:
    nodejs-string-width
    npm(string-width)



Source checksums
----------------
https://registry.npmjs.org/string-width/-/string-width-1.0.1.tgz :
  CHECKSUM(SHA256) this package     : 22bcc551d775585ea3ea85c8777a601d49914cccb3cfc16c7d1c8618eb9b305b
  CHECKSUM(SHA256) upstream package : 22bcc551d775585ea3ea85c8777a601d49914cccb3cfc16c7d1c8618eb9b305b
https://raw.githubusercontent.com/sindresorhus/string-width/f279cfd14835f0a3c8df69ba18e9a3960156e135/test.js :
  CHECKSUM(SHA256) this package     : 054d2e53138ac4d1911ff8969ae2f1de0d2d648af95f63af256a3b8815ccee88
  CHECKSUM(SHA256) upstream package : 054d2e53138ac4d1911ff8969ae2f1de0d2d648af95f63af256a3b8815ccee88


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -m compton-rawhide-x86_64 -b 1274742
Buildroot used: compton-rawhide-x86_64
Active plugins: Generic, Shell-api
Disabled plugins: Java, C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6
Comment 3 Tom Hughes 2016-03-01 19:15:23 EST
Spec file does not match the one in the srpm.

The BR on mocha seems to be unnecessary, but it does need BRs on:

npm(code-point-at)
npm(is-fullwidth-code-point)
npm(strip-ansi)
Comment 5 Tom Hughes 2016-03-02 07:12:19 EST
That looks better.
Comment 6 Gwyn Ciesla 2016-03-02 09:03:12 EST
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/nodejs-string-width

Note You need to log in before you can comment on or make changes to this bug.