Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1823419 - Review Request: gnucobol - COBOL compiler
Summary: Review Request: gnucobol - COBOL compiler
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1823134 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-13 16:11 UTC by Gwyn Ciesla
Modified: 2020-07-19 01:53 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-03 01:18:55 UTC
Type: Bug
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Gwyn Ciesla 2020-04-13 16:11:09 UTC
Description:
COBOL compiler, which translates COBOL
programs to C code and compiles them using GCC.

SRPM: https://fedorapeople.org/~limb/review/gnucobol/gnucobol-3.0-0.rc1.fc31.src.rpm
SPEC: https://fedorapeople.org/~limb/review/gnucobol/gnucobol.spec

Comment 1 Gwyn Ciesla 2020-04-13 16:11:32 UTC
%configure unusable, -devel not needed.

Comment 2 Gwyn Ciesla 2020-04-13 16:11:45 UTC
*** Bug 1823134 has been marked as a duplicate of this bug. ***

Comment 3 Artur Frenszek-Iwicki 2020-04-16 07:48:33 UTC
>Release:        0.rc1%{?dist}
Shouldn't this be something like 0.1.rc1 or 0.rc1.1? It must start with a 0. since this is a pre-release, but you'll still want a number you can increment if you change something in the spec while staying at 3.0.0-rc1.

>Group:          Development/Languages
>Group:          Development/Libraries
Not used in Fedora.

>%build
>#export CFLAGS="$RPM_OPT_FLAGS -fPIC -O"
>export CPPFLAGS="$CFLAGS"
Setting the CFLAGS is commented-out. CPPFLAGS is thus set to an empty var. The build ends up not using Fedora's %{optflags}.

Comment 4 Gwyn Ciesla 2020-04-16 13:22:00 UTC
I'll fix the release and group.

Regarding flags, if we build with optflags, the -strong flag breaks the build.

Comment 5 Artur Frenszek-Iwicki 2020-04-16 13:37:38 UTC
I know, I remember that from Anton's review request. But I think if anything, that's a reason to try and patch the configure script, rather than not use the optflags.

Which reminds me, it might be a good idea to contact upstream and let them know that their "remove unwanted CFLAGS code" is broken.

Comment 6 Gwyn Ciesla 2020-04-16 13:38:51 UTC
I've applied the patch from the prior review to fix this issue.

SRPM: https://fedorapeople.org/~limb/review/gnucobol/gnucobol-3.0-0.rc1.1.fc31.src.rpm
SPEC: https://fedorapeople.org/~limb/review/gnucobol/gnucobol.spec

Comment 7 Gwyn Ciesla 2020-04-16 13:39:19 UTC
And I'll contact upstream.

Comment 8 Gwyn Ciesla 2020-04-16 13:41:33 UTC
Toshio beat me to it. :)  https://sourceforge.net/p/open-cobol/patches/49/

Comment 9 Toshio Ernie Kuratomi 2020-04-17 06:53:04 UTC
I've been outside of Fedora for quite a while so I might not know what I'm doing here but I think these would be good changes:

--- gnucobol.spec.vanilla       2020-04-16 23:44:30.448960249 -0700
+++ gnucobol.spec       2020-04-16 23:45:48.743879632 -0700
@@ -2,7 +2,7 @@
 
 Name:           gnucobol
 Version:        3.0
-Release:        0.rc1%{?dist}.1
+Release:        0.1.rc1%{?dist}
 Summary:        COBOL compiler
 
 License:        GPLv2+ and LGPLv2+
@@ -63,6 +63,7 @@
 
 %files -f %{name}.lang
 %license COPYING
+%license COPYING.DOC
 %doc AUTHORS ChangeLog
 %doc NEWS README THANKS
 %{_bindir}/cobc
@@ -77,15 +78,16 @@
 
 
 %files -n libcob
+%license COPYING.LESSER
 %{_libdir}/libcob.so.*
 %{_libdir}/gnucobol/CBL_OC_DUMP.so
 
 %post 
-/sbin/install-info %{_infodir}/open-cobol.info %{_infodir}/dir 2>/dev/null || :
+/sbin/install-info %{_infodir}/gnucobol.info %{_infodir}/dir 2>/dev/null || :
 
 %postun 
 if [ $1 = 0 ]; then
-  /sbin/install-info --delete %{_infodir}/open-cobol.info %{_infodir}/dir 2>/dev/null || :
+  /sbin/install-info --delete %{_infodir}/gnucobol.info %{_infodir}/dir 2>/dev/null || :
 fi
 
 %post -n libcob -p /sbin/ldconfig



* Changing Release will let you keep the initial .0 to designate the pre-release and increment the second number no matter how upstream's version or the disttag changes.  ie: 0.1.rc1.fc31 0.2.r2.fc31 0.3.r2.fc32
* The %license additions just add the other license files that upstream seems to have added for completeness (with different licenses for different parts of the code)
* The install-info changes are because the info filenames have changed.

Thanks for packaging this :-)

Comment 10 Gwyn Ciesla 2020-04-17 13:10:36 UTC
Thank you! I'll integrate these.

Comment 11 dan.cermak 2020-05-10 19:34:05 UTC
Calling ldconfig and install-info in %post and %postun is no longer required, both is handled by rpm file triggers in Fedora.

Comment 12 Gwyn Ciesla 2020-05-11 13:51:02 UTC
Updated.

Comment 14 ruben.lledo.calatayud 2020-05-12 14:26:38 UTC
Hello.

It would be nice to have GnuCOBOL esqlOC packaged, as well.

https://sourceforge.net/p/open-cobol/contrib/HEAD/tree/trunk/esql/

Regards.

Comment 15 Gwyn Ciesla 2020-05-12 15:14:17 UTC
This isn't part of the current distributions, but I'll keep an eye on it.

Comment 16 ruben.lledo.calatayud 2020-05-12 16:01:39 UTC
(In reply to Gwyn Ciesla from comment #15)
> This isn't part of the current distributions, but I'll keep an eye on it.

Thanks! ;)

Comment 17 dan.cermak 2020-05-12 22:42:09 UTC
A few additional notes:
- Requires(post): /sbin/install-info is not required, the same is the case for Requires(post/postun): /sbin/ldconfig.
- %setup -q -> %autosetup
- make %{?_smp_mflags} -> %make_build
- make install DESTDIR=$RPM_BUILD_ROOT -> %make_install
- $RPM_BUILD_ROOT -> %{buildroot}
- $RPM_OPT_FLAGS -> %optflags or %build_cflags
- there are headers and a shared library in the main package, these usually belong into -devel subpackages
- libcob.so is included in the libcob subpackage via a wildcard, this is strongly discouraged as that hides the SONAME
- You appear to be packaging the nightly release, why? Since there is no stable URL to that, this makes reproducability complicated.
- The Requires: glibc-devel and gmp-devel should not be required, rpm finds out by itself that libcob requires libc, libgmp and libm
- Your package does not own %{_libdir}/%{name}, but creates it.
- cob-config is a static executable, which is afaik not permitted in Fedora

Comment 18 Gwyn Ciesla 2020-05-13 13:34:21 UTC
SRPM: https://fedorapeople.org/~limb/review/gnucobol/gnucobol-3.1-2.fc32.src.rpm
SPEC: https://fedorapeople.org/~limb/review/gnucobol/gnucobol.spec

Updated. The requires and lack of devel package are because this is a compiler, and those pieces are always needed. The nightly release is because 3.1 isn't out yet, and contains build fixes needed that are missing in 3.0.

cob-config is a shell script.

Comment 19 Robert-André Mauchin 🐧 2020-06-24 12:01:36 UTC
 - Not needed

Requires(post):         /sbin/ldconfig
Requires(postun):       /sbin/ldconfig

 - You need a libcob-devel subpackage to contains include and unversioned .so file. This subpackage must depend on the libcob subpackage.


%package -n libcob-devel
Summary:        GnuCOBOL development library
Requires:       libcob%{?_isa} = %{version}-%{release}

%description -n libcob-devel
%{summary}.
Development libraries for GnuCOBOL

[…]

%files -n libcob-devel
%{_libdir}/libcob.so
%{_includedir}/*

 - make install DESTDIR=%{buildroot} → %make_install

 - You should use a URL for Source0 or explain how you generated the archive. For example there is https://ci.appveyor.com/api/projects/GitMensch/gnucobol-3-x/artifacts/gnucobol-3.1-dev.tar.gz?job=Image:%20Ubuntu1804 for the latest dev. See https://sourceforge.net/projects/open-cobol/files/gnucobol/nightly_snapshots/

Comment 20 Gwyn Ciesla 2020-06-24 13:36:14 UTC
I've removed the ldconfig requires in my local spec.

A devel package doesn't make sense in this instance, as this is a compiler. The main package would need to require the -devel package to function, and the -devel package wouldn't be relevant without the main package.

I'm not using the make install macro currently because of a build issue that I'm troubleshooting with upstream, hence the tarball. It's currently a SVN snapshot but will revert to a traditional Source0 URL once resolved and released.

Comment 21 Robert-André Mauchin 🐧 2020-06-24 15:04:09 UTC
 - Add an explicit BR for gcc

 - [!]: Package should not use obsolete m4 macros
     Note: Some obsoleted macros found, see the attachment.
     See: https://fedorahosted.org/FedoraReview/wiki/AutoTools

AutoTools: Obsoleted m4s found
------------------------------
  AC_PROG_LIBTOOL found in: gnucobol-3.1-dev/configure.ac:378

Patch this with LT_INIT instead and suggest patch upstream.kk



Package Review
==============

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


Issues:
=======
- If your application is a C or C++ application you must list a
  BuildRequires against gcc, gcc-c++ or clang.
  Note: No gcc, gcc-c++ or clang found in BuildRequires
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/
- Header files in -devel subpackage, if present.
  Note: gnucobol : /usr/include/libcob.h gnucobol :
  /usr/include/libcob/cobgetopt.h gnucobol : /usr/include/libcob/common.h
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_devel_packages
- Development (unversioned) .so files in -devel subpackage, if present.
  Note: Unversioned so-files directly in %_libdir.
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_devel_packages


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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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: "Unknown or generated", "*No copyright* GNU Lesser General
     Public License", "FSF All Permissive License", "GPL (v3 or later)",
     "GNU General Public License GNU Lesser General Public License", "GNU
     Lesser General Public License (v3 or later)", "FSF Unlimited License
     (with Retention)", "Expat License", "GPL (v7)", "GNU Free
     Documentation License (v1.3 or later)", "*No copyright* GPL (v3 or
     later)", "GNU Lesser General Public License (v2.1 or later)", "FSF
     Unlimited License (with Retention) GNU General Public License GNU
     Lesser General Public License", "FSF Unlimited License (with
     Retention) GNU General Public License (v2)". 124 files have unknown
     license. Detailed output of licensecheck in
     /home/bob/packaging/review/gnucobol/review-gnucobol/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: %build honors applicable compiler flags or justifies otherwise.
[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]: The spec file handles locales properly.
[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]: Useful -debuginfo package or justification otherwise.
[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 92160 bytes in 5 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]: Package installs properly.
[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 does not own files or directories owned by other packages.
[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:
[-]: 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).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in libcob
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[ ]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define cobvers 3.1
[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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: SourceX is a working URL.

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

Generic:
[!]: Package should not use obsolete m4 macros
     Note: Some obsoleted macros found, see the attachment.
     See: https://fedorahosted.org/FedoraReview/wiki/AutoTools
[-]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 1085440 bytes in /usr/share
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: gnucobol-3.1-2.fc33.x86_64.rpm
          libcob-3.1-2.fc33.x86_64.rpm
          gnucobol-debuginfo-3.1-2.fc33.x86_64.rpm
          gnucobol-debugsource-3.1-2.fc33.x86_64.rpm
          gnucobol-3.1-2.fc33.src.rpm
gnucobol.x86_64: E: devel-dependency glibc-devel
gnucobol.x86_64: E: library-not-linked-against-libc /usr/lib64/gnucobol/CBL_OC_DUMP.so
gnucobol.x86_64: W: devel-file-in-non-devel-package /usr/bin/cob-config
gnucobol.x86_64: W: devel-file-in-non-devel-package /usr/include/libcob.h
gnucobol.x86_64: W: devel-file-in-non-devel-package /usr/include/libcob/cobgetopt.h
gnucobol.x86_64: W: devel-file-in-non-devel-package /usr/include/libcob/common.h
gnucobol.x86_64: W: devel-file-in-non-devel-package /usr/lib64/libcob.so
libcob.x86_64: E: library-not-linked-against-libc /usr/lib64/gnucobol/CBL_OC_DUMP.so
libcob.x86_64: W: no-documentation
gnucobol.src:11: W: macro-in-comment %{name}
gnucobol.src:11: W: macro-in-comment %{name}
gnucobol.src:11: W: macro-in-comment %{cobvers}
gnucobol.src: E: specfile-error warning: Macro expanded in comment on line 11: %{name}/%{name}-%{cobvers}.tar.gz
5 packages and 0 specfiles checked; 4 errors, 9 warnings.

Comment 22 Gwyn Ciesla 2020-06-24 21:01:23 UTC
Thank you!

Addressed all issues but -devel package for previously stated reasons.

SRPM: https://fedorapeople.org/~limb/review/gnucobol/gnucobol-3.1-3.fc32.src.rpm
SPEC: https://fedorapeople.org/~limb/review/gnucobol/gnucobol.spec

Comment 23 Robert-André Mauchin 🐧 2020-06-24 21:36:22 UTC
Package approved.

Comment 24 Gwyn Ciesla 2020-06-24 21:38:02 UTC
Thank you!

Comment 25 Gwyn Ciesla 2020-06-24 21:39:16 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/gnucobol

Comment 26 Fedora Update System 2020-06-24 22:08:54 UTC
FEDORA-2020-63ec62898d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-63ec62898d

Comment 27 Ron Olson 2020-06-24 22:12:47 UTC
Gwyn, will you also add this to the EPEL 8 repo for CentOS/RHEL users?

Comment 28 Fedora Update System 2020-06-25 01:04:09 UTC
FEDORA-2020-63ec62898d has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2020-63ec62898d \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-63ec62898d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 29 Gwyn Ciesla 2020-06-25 13:39:50 UTC
Yes. :)

Comment 30 Fedora Update System 2020-06-25 13:55:43 UTC
FEDORA-EPEL-2020-9ee16640e9 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9ee16640e9

Comment 31 Fedora Update System 2020-06-26 01:23:28 UTC
FEDORA-EPEL-2020-9ee16640e9 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-9ee16640e9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 32 Fedora Update System 2020-07-03 01:18:55 UTC
FEDORA-2020-63ec62898d has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 33 Fedora Update System 2020-07-03 02:02:42 UTC
FEDORA-EPEL-2020-def71cae41 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-def71cae41

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 34 Fedora Update System 2020-07-04 01:30:52 UTC
FEDORA-EPEL-2020-6e4abc955e has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-6e4abc955e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 35 Fedora Update System 2020-07-19 01:53:11 UTC
FEDORA-EPEL-2020-6e4abc955e has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.


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