Bug 1803479

Summary: Review Request: libredwg - GNU C library and programs to read and write DWG files
Product: [Fedora] Fedora Reporter: Reini Urban <reini.urban>
Component: Package ReviewAssignee: Nobody's working on this, feel free to take it <nobody>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: eclipseo, fedora, package-review, quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: AwaitingSubmitter
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-15 00:45:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 201449    

Description Reini Urban 2020-02-16 10:43:51 UTC
Spec URL: https://github.com/LibreDWG/libredwg/releases/download/0.10.1/libredwg.spec
SRPM URL: https://github.com/LibreDWG/libredwg/releases/download/0.10.1/libredwg-0.10.1-1.fc31.src.rpm
Description: GNU C library and programs to read and write DWG files
Fedora Account System Username: rurban

1st fedora package submission, but I did hundreds for cygwin, and plenty for cpanel. A missing requirement is libps, so this is disabled for now.
This package is needed by freecad (currently optional), and later grass.
It was considered a GNU high priority project.

I'm upstream. Included are perl and python bindings. big-endian does not work, so I disabled it. No idea about s390, mingw and arm are fine.

rpmlint:

libredwg.src: W: spelling-error %description -l en_US dxf -> def
libredwg.src: W: spelling-error %description -l en_US json -> son, j son, soon
libredwg.src: W: spelling-error %description -l en_US dwggrep -> grepped
libredwg.src: W: spelling-error %description -l en_US dwglayer -> waylayer
libredwg.x86_64: W: spelling-error %description -l en_US dxf -> def
libredwg.x86_64: W: spelling-error %description -l en_US json -> son, j son, soon
libredwg.x86_64: W: spelling-error %description -l en_US dwglayer -> waylayer
libredwg.x86_64: W: shared-lib-calls-exit /usr/lib64/libredwg.so.0.0.10 exit.5
libredwg.x86_64: E: postin-without-ldconfig /usr/lib64/libredwg.so.0.0.10
libredwg-devel.x86_64: W: no-documentation
perl-LibreDWG.x86_64: W: no-documentation
perl-LibreDWG.x86_64: E: dir-or-file-in-usr-local /usr/local/lib64/perl5/5.30/LibreDWG.pm
perl-LibreDWG.x86_64: E: dir-or-file-in-usr-local /usr/local/lib64/perl5/5.30/auto/LibreDWG/LibreDWG.so
python3-LibreDWG.x86_64: W: no-documentation
9 packages and 1 specfiles checked; 3 errors, 11 warnings.


/usr/local (i.e. perl sitearch) is needed for 0.10 and will go away with perl installvendor support in 0.11.

postin-without-ldconfig looks like bogus to me, ldconfig should not be needed anymore, and I included %ldconfig_scriptlets.

The exit call in the lib is on out of memory with malicious input. apps can trap it, but it is not recommended.

Comment 1 Reini Urban 2020-02-17 10:14:18 UTC
Spec URL: https://github.com/LibreDWG/libredwg/releases/download/0.10.1/libredwg.spec
SRPM URL: https://github.com/LibreDWG/libredwg/releases/download/0.10.1/libredwg-0.10.1-2.fc31.src.rpm

Fixed all the errors and most warnings in rev 2.

libredwg.src: W: spelling-error %description -l en_US dxf -> def
libredwg.src: W: spelling-error %description -l en_US json -> son, j son, soon
libredwg.src: W: spelling-error %description -l en_US dwggrep -> grepped
libredwg.src: W: spelling-error %description -l en_US dwglayer -> waylayer
libredwg.src: W: spelling-error %description -l en_US dwgfilter -> filtered
libredwg.x86_64: W: spelling-error %description -l en_US dxf -> def
libredwg.x86_64: W: spelling-error %description -l en_US json -> son, j son, soon
libredwg.x86_64: W: spelling-error %description -l en_US dwglayer -> waylayer
libredwg.x86_64: W: spelling-error %description -l en_US dwgfilter -> filtered
libredwg.x86_64: W: shared-lib-calls-exit /usr/lib64/libredwg.so.0.0.10 exit.5
perl-LibreDWG.x86_64: W: no-documentation
python3-LibreDWG.x86_64: W: no-documentation
9 packages and 1 specfiles checked; 0 errors, 12 warnings.

Comment 2 Elliott Sales de Andrade 2020-02-21 07:54:21 UTC
This fails to build:

cd perl && \
  /usr/bin/perl Makefile.PL INSTALLDIRS=vendor
Can't locate ExtUtils/Embed.pm in @INC (you may need to install the ExtUtils::Embed module) (@INC contains: /usr/local/lib64/perl5/5.30 /usr/local/share/perl5/5.30 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
make[3]: [Makefile:776: perl/Makefile] Error 2 (ignored)
Note LibreDWG.c is huge. This will need some time...
if test -f perl/pm_to_blib; then rm perl/pm_to_blib; fi
if test -d perl/blib; then rm -rf perl/blib; fi
if grep "NOOP = rem" perl/Makefile; then false; else \
    cd perl && /usr/bin/make OPTIMIZE="-I/builddir/build/BUILD/libredwg-0.10.1/include -I/builddir/build/BUILD/libredwg-0.10.1/src" \
                       OTHERLDFLAGS="-L/builddir/build/BUILD/libredwg-0.10.1/src/.libs"; fi
grep: perl/Makefile: No such file or directory



Looks like you're missing BuildRequires: perl(ExtUtils::Embed)

Comment 3 Artur Frenszek-Iwicki 2020-02-24 11:40:54 UTC
>%install
>rm -rf $RPM_BUILD_ROOT
Don't do this.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_tags_and_sections

>%{_mandir}/man1/dwg2SVG.1.gz
>...
>%{_mandir}/man1/dxf2dwg.1.gz
Do not assume that man pages will be gzipped. Use a wildcard that can match both compressed and non-compressed files.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

>%make_build PERL=/usr/bin/perl PYTHON=/usr/bin/python
1. I'd recommend using %{_bindir} here instead of specifying /usr/bin as a raw string.
2. Fedora Packages are disallowed from using "python"; you must explicitly use "python3".
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_multiple_python_runtimes

>%package -n     python3-LibreDWG
>Requires:       %{name}%{?_isa} = %{version}-%{release}, python
1. I'd split this into two separate "Requires:" lines for readability.
2. You should require "python3", not just "python".

Comment 4 Robert-André Mauchin 🐧 2020-03-09 22:46:00 UTC
 - Not needed

%post
/sbin/ldconfig
/sbin/install-info %{_infodir}/LibreDWG.info %{_infodir}/dir || :

%preun
if [ $1 = 0 ] ; then
/sbin/install-info --delete %{_infodir}/LibreDWG.info %{_infodir}/dir || :
fi

%ldconfig_postun

 - Add python provide macro

%package -n     python3-LibreDWG
Summary:        Python bindings for %{name}
%{?python_provide:%python_provide python3-LibreDWG}
Requires:       %{name}%{?_isa} = %{version}-%{release}, python


 - Use ExclusiveArch rather than ExcludeArch

 - Add comment explaining why each patch is needed

 - #autopatch is broken

Really? What's the issue?

 - Add  anew line between your changelog entries

Comment 5 Package Review 2021-11-14 00:45:29 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 6 Package Review 2021-12-15 00:45:21 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.