Bug 1546459 - Review Request: svgo-inkscape - Extension to optimize SVG files for Inkscape
Summary: Review Request: svgo-inkscape - Extension to optimize SVG files for Inkscape
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1648629
Blocks: FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2018-02-17 19:01 UTC by Luya Tshimbalanga
Modified: 2020-08-10 00:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-10 00:57:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Comment 1 Robert-André Mauchin 🐧 2018-02-17 23:59:23 UTC
Hello.

 - Source0 is wrong, it should be:

Source0:        https://github.com/juanfran/svgo-inkscape/archive/v%{version}/%{name}-%{version}.tar.gz

 - You should ask upstream first to include a license file, not do it yourself. If upstream is unresponsive, then you might include it.

« Packagers who choose to do this [include text of the license] should ensure that they have exhausted all attempts to work with upstream to include the license text as part of the source code, or at least, to confirm the full license text explicitly with the upstream, as this minimizes the risk on the packager. Packagers should also take copies of license texts from reliable and canonical sources (such as the Fedora Software Licenses page, the FSF licenses page, or the OSI license list), whenever possible. »

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

 - This does not replace shebangs, this change line encoding of the file!

#Replace shebangs line #!/usr/bin/env python
sed -i 's/\r//' %{name}-%{version}/%{name}/svgo.inkscape.py

   Just mark the file as executable and brp-mangle-shebangs will automatically do the rest:

chmod 0755 %{name}/svgo.inkscape.py


 -  -c %{name} is not necessary in %autosetup

 - Then %install should be simplified to:

%install
install -Dpm 0644 %{name}.inx -t %{buildroot}%{_datadir}/inkscape/extensions/
cp -pr  %{name} -t %{buildroot}%{_datadir}/inkscape/extensions/


    And %doc in %changelog:

%files
%license LICENSE.txt
%doc README.md

 - There's a mix of tabs and spaces used for indentation, use one or another not both.

 - This package won't work as intended: first if you read the Python source you see that it is expecting "node" in a subdirectory:

    def effect(self):
        command = "./node/bin/node svgo.js --file=" + self.args[0]

   This should be patched to depend on the system-wide node ( and you should thus add a Requires for it).

 - Second svgo.js depends on svgo itself, which is a node module. That's why there is a package.json provided. You should thus run "npm install" in the svgo-inkscape directory to install the required modules.

Comment 2 Luya Tshimbalanga 2018-02-18 09:18:55 UTC
(In reply to Robert-André Mauchin from comment #1)
> Hello.
> 
>  - Source0 is wrong, it should be:
> 
> Source0:       
> https://github.com/juanfran/svgo-inkscape/archive/v%{version}/%{name}-
> %{version}.tar.gz

Fixed

>  - You should ask upstream first to include a license file, not do it
> yourself. If upstream is unresponsive, then you might include it.

Already filed the request:
https://github.com/juanfran/svgo-inkscape/issues/6

>  - This does not replace shebangs, this change line encoding of the file!
> 
> #Replace shebangs line #!/usr/bin/env python
> sed -i 's/\r//' %{name}-%{version}/%{name}/svgo.inkscape.py
> 
>    Just mark the file as executable and brp-mangle-shebangs will
> automatically do the rest:
> 
> chmod 0755 %{name}/svgo.inkscape.py

Fixed
> 
>  -  -c %{name} is not necessary in %autosetup
> 
>  - Then %install should be simplified to:
> 
> %install
> install -Dpm 0644 %{name}.inx -t %{buildroot}%{_datadir}/inkscape/extensions/
> cp -pr  %{name} -t %{buildroot}%{_datadir}/inkscape/extensions/
> 
>     And %doc in %changelog:
> 
> %files
> %license LICENSE.txt
> %doc README.md
> 
>  - There's a mix of tabs and spaces used for indentation, use one or another
> not both.

Fixed.

> 
>  - This package won't work as intended: first if you read the Python source
> you see that it is expecting "node" in a subdirectory:
> 
>     def effect(self):
>         command = "./node/bin/node svgo.js --file=" + self.args[0]
> 
>    This should be patched to depend on the system-wide node ( and you should
> thus add a Requires for it).

BuildRequires: nodejs-packaging seems the suggestion according to the guideline.

> 
>  - Second svgo.js depends on svgo itself, which is a node module. That's why
> there is a package.json provided. You should thus run "npm install" in the
> svgo-inkscape directory to install the required modules.

Looking at the nodejs guideline https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/Packagers#Installing_Modules, it looks like using "npm install" is discouraged. Is there a better method instead?

Comment 3 Robert-André Mauchin 🐧 2018-02-18 11:55:29 UTC
(In reply to Luya Tshimbalanga from comment #2)
> > 
> >  - Second svgo.js depends on svgo itself, which is a node module. That's why
> > there is a package.json provided. You should thus run "npm install" in the
> > svgo-inkscape directory to install the required modules.
> 
> Looking at the nodejs guideline
> https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/
> Packagers#Installing_Modules, it looks like using "npm install" is
> discouraged. Is there a better method instead?

Yes my bad, internet is not available in Koji so this wouldn't work anyway. What you need to do instead is to package the bundled modules:

 - nodejs-svgo

Use npm2rpm as a startup point. Look at other nodejs SPEC files to help you (https://src.fedoraproject.org/group/nodejs-sig). I,ve checked and all the dependencies are already packaged.

nodejs-minimist is already packaged too, just add npm(minimist) as a RR.

Comment 4 Luya Tshimbalanga 2018-11-09 19:24:07 UTC
Sorr for the delay. I realize npm-svgo is already package. What will be the right way to symlink on this package?

Comment 5 Robert-André Mauchin 🐧 2018-11-10 13:22:15 UTC
 - Patch command = "./node/bin/node svgo.js --file=" + self.args[0] to point to /usr/bin/svgo

Comment 7 Robert-André Mauchin 🐧 2018-11-10 17:57:46 UTC
File a bug against https://apps.fedoraproject.org/packages/nodejs-csso/bugs and make it block this one. Try to bother jsmith on IRC or mail him about it.

FYI you just need to relax the dep in %prep:

%nodejs_fixdep css-tree

You could send a PR.

Comment 8 Luya Tshimbalanga 2018-11-11 08:54:03 UTC
Bug filed.

Comment 9 Package Review 2020-07-10 00:56:27 UTC
This is an automatic check from review-stats script.

This review request ticket hasn't been updated for some time. We're sorry
it is taking so long. If you're still interested in packaging this software
into Fedora repositories, please respond to this comment clearing the
NEEDINFO flag.

You may want to update the specfile and the src.rpm to the latest version
available and to propose a review swap on Fedora devel mailing list to increase
chances to have your package reviewed. If this is your first package and you
need a sponsor, you may want to post some informal reviews. Read more at
https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group.

Without any reply, this request will shortly be considered abandoned
and will be closed.
Thank you for your patience.

Comment 10 Package Review 2020-08-10 00:57:40 UTC
This is an automatic action taken by review-stats script.

The ticket submitter failed to clear the NEEDINFO flag in a month.
As per https://fedoraproject.org/wiki/Policy_for_stalled_package_reviews
we consider this ticket as DEADREVIEW and proceed to close it.


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