Bug 1613570

Summary: Review Request: msgpack-d - A pure D implementation of MessagePack
Product: [Fedora] Fedora Reporter: MERCIER Jonathan <bioinfornatics>
Component: Package ReviewAssignee: Robert-AndrĂ© Mauchin 🐧 <zebob.m>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: package-review, zebob.m
Target Milestone: ---Flags: zebob.m: fedora-review+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-04 06:50:12 UTC Type: Bug
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: 1613574    

Description MERCIER Jonathan 2018-08-07 21:45:29 UTC
Dear,

In order to provides to fedora community DCD tools for enable autocomplete dlang  statement with your favourite IDE. It is necessary to package its dependencies.

Spec URL: https://bioinfornatics.fedorapeople.org/packages/msgpack-d.spec
SRPM URL: https://bioinfornatics.fedorapeople.org/packages/msgpack-d-1.0.0-1.20180529gitf5c0bd0.fc28.src.rpm

Comment 1 MERCIER Jonathan 2018-08-08 18:08:50 UTC
$ rpmlint -i ../SRPMS/msgpack-d-1.0.0-1.20180529gitf5c0bd0.fc28.src.rpm 
msgpack-d.src: W: invalid-url Source0: msgpack-d-20180529gitf5c0bd0.tar.xz
The value should be a valid, public HTTP, HTTPS, or FTP URL.

1 packages and 0 specfiles checked; 0 errors, 1 warnings.

Comment 2 Robert-AndrĂ© Mauchin 🐧 2018-08-28 18:42:17 UTC
Proposal to port it to Meson:
================================================================================
# debug info seem not works with D compiler
%global debug_package       %{nil}

%global major_version 1
%global minor_version 0
%global patch_version 0
%global pre           beta.7

Name:           msgpack-d
Version:        %{major_version}.%{minor_version}.%{patch_version}
Release:        0.1%{?pre:.%{pre}}%{?dist}
Summary:        MessagePack for D is a pure D implementation of MessagePack
Summary(fr):    MessagePack pour D est une implémentation en D de MessagePack

License:        Boost
URL:            https://github.com/msgpack/msgpack-d

Source0:        %url/archive/v%{version}%{?pre:-%{pre}}/%{name}-%{version}%{?pre:-%{pre}}.tar.gz

Patch0:         https://patch-diff.githubusercontent.com/raw/msgpack/msgpack-d/pull/107.patch#/0001-Add-Meson-build-definition.patch
Patch1:         https://patch-diff.githubusercontent.com/raw/msgpack/msgpack-d/pull/106.patch#/0002-Fix-line-endings.patch

ExclusiveArch:  %{ldc_arches}

BuildRequires:  ldc meson
Requires:       ldc-phobos ldc-druntime

%description
MessagePack is a binary-based JSON-like serialization library.

%description -l fr
MessagePack est une bibliothÚque de sérialisation ressemblant à un format
JSON en binaire.

%package        devel
Summary:        Development files for %{name}
Summary(fr):    Fichiers de développement pour %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
msgpack-d-devel package contains header files for developing D applications
that use msgpack-d.

%description devel -l fr
Le paquet msgpack-d-devel contient les fichiers d'entĂȘtes pour dĂ©velopper
des applications en D utilisant msgpack-d.


%package geany-tags
Summary:        Support for enable autocompletion in geany
Summary(fr):    Support pour activer l'auto-complétion dans geany
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch
BuildRequires:  geany
Requires:       geany

%description geany-tags
Enable autocompletion for msgpack-d library in geany (IDE)

%description -l fr geany-tags
Active l'autocompletion pour pour la bibliothĂšque msgpack-d dans geany (IDE)

%prep
%autosetup -p1 -n %{name}-%{version}%{?pre:-%{pre}}
# temp geany config directory for allow geany to generate tags
mkdir geany_config

%build
LDFLAGS='-Wl,-z,relro -Wl,-z,now' %meson
%meson_build

# generate doc
src_dir='src'
for f in ${sources[@]}; do
    d_path=$(dirname ${f});
    d_file=$(basename ${f});
    doc_file=html/${d_path/${src_dir}}/${d_file/.d/.html};
    ldc2 -I "${src_dir}" -o- -c $f -Df $"{doc_file}" html/candydoc/candy.ddoc html/candydoc/modules.ddoc;
done

# generate geany tags
sources=$(find "${src_dir}" -name '*.d')
geany -c geany_config -g %{name}.d.tags ${sources[@]} 

%install
%meson_install

# geany tags
mkdir -p %{buildroot}%{_datadir}/geany/tags/
install -pm0644 %{name}.d.tags %{buildroot}/%{_datadir}/geany/tags/

%check
%meson_test

%ldconfig_scriptlets

%files
%license LICENSE_1_0.txt
%doc README.markdown
%{_libdir}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.%{major_version}

%files devel
%doc html example
%{_includedir}/d/msgpack
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/lib%{name}.so

%files geany-tags
%{_datadir}/geany/tags/%{name}.d.tags

%changelog
* Wed Aug  1 2018 MERCIER Jonathan <bioinfornatics at gmail.com> - 1.0.0-0.1.beta.7
- Initial release
==============================================================================

I sent a PR upstream for it: https://github.com/msgpack/msgpack-d/pull/107

Comment 3 MERCIER Jonathan 2018-10-08 14:52:17 UTC
Thanks Robert-André,

Your PR was accepted but not yet release thus I keep your spec file using the patches

https://bioinfornatics.fedorapeople.org/packages/msgpack-d-1.0.0-1.20180529gitf5c0bd0.fc28.src.rpm

https://bioinfornatics.fedorapeople.org/packages/msgpack-d.spec

Comment 4 Robert-AndrĂ© Mauchin 🐧 2018-10-10 14:04:27 UTC
Package approved.



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

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


===== 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.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

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: "BSL (v1.0)", "*No copyright* BSL", "Unknown or generated",
     "*No copyright* Public domain". 50 files have unknown license.
     Detailed output of licensecheck in
     /home/bob/packaging/review/msgpack-d/review-msgpack-d/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[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.
[x]: 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.
[-]: 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 194560 bytes in 41 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
     msgpack-d-geany-tags
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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]: 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]: The placement of pkgconfig(.pc) files are correct.
[x]: Sources can be downloaded from URI in Source: tag
[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:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: msgpack-d-1.0.0-0.1.beta.7.fc30.x86_64.rpm
          msgpack-d-devel-1.0.0-0.1.beta.7.fc30.x86_64.rpm
          msgpack-d-geany-tags-1.0.0-0.1.beta.7.fc30.noarch.rpm
          msgpack-d-1.0.0-0.1.beta.7.fc30.src.rpm
msgpack-d.x86_64: I: enchant-dictionary-not-found fr
msgpack-d.x86_64: W: unstripped-binary-or-object /usr/lib64/libmsgpack-d.so.1.0.0
msgpack-d-geany-tags.noarch: W: spelling-error Summary(en_US) autocompletion -> auto completion, auto-completion, completion
msgpack-d-geany-tags.noarch: W: spelling-error %description -l en_US autocompletion -> auto completion, auto-completion, completion
msgpack-d-geany-tags.noarch: W: no-documentation
4 packages and 0 specfiles checked; 0 errors, 4 warnings.

Comment 5 Gwyn Ciesla 2018-10-10 20:34:31 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/msgpack-d

Comment 6 Fedora Update System 2018-10-11 08:49:48 UTC
msgpack-d-1.0.0-0.1.beta.7.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c7fe83681a

Comment 7 Fedora Update System 2018-10-11 19:00:06 UTC
msgpack-d-1.0.0-0.1.beta.7.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c7fe83681a

Comment 8 Fedora Update System 2018-11-04 06:50:12 UTC
msgpack-d-1.0.0-0.1.beta.7.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.