Bug 1613568 - Review Request: stdx-allocator - High-level interface for allocators for D
Summary: Review Request: stdx-allocator - High-level interface for allocators for D
Keywords:
Status: CLOSED CURRENTRELEASE
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:
Depends On:
Blocks: 1613571 1613572 1613574
TreeView+ depends on / blocked
 
Reported: 2018-08-07 21:40 UTC by MERCIER Jonathan
Modified: 2018-10-08 11:51 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-10-08 11:51:18 UTC
Type: Bug
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description MERCIER Jonathan 2018-08-07 21:40:25 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: https://bioinfornatics.fedorapeople.org/packages/stdx-allocator.spec
SRPMS: https://bioinfornatics.fedorapeople.org/packages/stdx-allocator-2.77.2-1.fc28.src.rpm

Comment 1 Robert-André Mauchin 🐧 2018-08-08 14:22:38 UTC
 - Use:

Source0:        https://github.com/dlang-community/stdx-allocator/archive/v%{version}%{?pre:-%{pre}}/%{name}-%{version}%{?pre:-%{pre}}.tar.gz

 - Remove Rpath:

[!]: Rpath absent or only used for internal libs.
     Note: See rpmlint output

stdx-allocator.x86_64: E: binary-or-shlib-defines-rpath /usr/lib64/libstdx-allocator.so.2.77.2 ['/usr/lib64']



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.
[!]: Rpath absent or only used for internal libs.
     Note: See rpmlint output
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[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]: 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]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated". 28 files have unknown license. Detailed
     output of licensecheck in /home/bob/packaging/review/stdx-allocator
     /review-stdx-allocator/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.
[-]: 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 798720 bytes in 23 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]: 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 stdx-
     allocator-devel , stdx-allocator-geany-tags
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: %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: stdx-allocator-2.77.2-1.fc29.x86_64.rpm
          stdx-allocator-devel-2.77.2-1.fc29.x86_64.rpm
          stdx-allocator-geany-tags-2.77.2-1.fc29.noarch.rpm
          stdx-allocator-2.77.2-1.fc29.src.rpm
stdx-allocator.x86_64: W: spelling-error Summary(en_US) allocators -> locators, allocates, alligators
stdx-allocator.x86_64: I: enchant-dictionary-not-found fr
stdx-allocator.x86_64: W: spelling-error Summary(fr) langage -> language
stdx-allocator.x86_64: W: spelling-error %description -l en_US allocators -> locators, allocates, alligators
stdx-allocator.x86_64: W: spelling-error %description -l fr langage -> language
stdx-allocator.x86_64: W: unstripped-binary-or-object /usr/lib64/libstdx-allocator.so.2.77.2
stdx-allocator.x86_64: E: binary-or-shlib-defines-rpath /usr/lib64/libstdx-allocator.so.2.77.2 ['/usr/lib64']
stdx-allocator.x86_64: W: no-documentation
stdx-allocator-geany-tags.noarch: W: spelling-error Summary(en_US) autocompletion -> auto completion, auto-completion, completion
stdx-allocator-geany-tags.noarch: W: spelling-error %description -l en_US autocompletion -> auto completion, auto-completion, completion
stdx-allocator-geany-tags.noarch: W: spelling-error %description -l en_US msgpack -> mudpack
stdx-allocator-geany-tags.noarch: W: no-documentation
stdx-allocator.src: W: spelling-error Summary(en_US) allocators -> locators, allocates, alligators
stdx-allocator.src: W: spelling-error Summary(fr) langage -> language
stdx-allocator.src: W: spelling-error %description -l en_US allocators -> locators, allocates, alligators
stdx-allocator.src: W: spelling-error %description -l fr langage -> language
4 packages and 0 specfiles checked; 1 errors, 14 warnings.

Comment 2 Robert-André Mauchin 🐧 2018-08-08 19:17:30 UTC
Actually you should use the %meson build system:


# debug info seem not works with D compiler
%global debug_package %{nil}

%global major_version 2
%global minor_version 77
%global patch_version 2
#%%global pre beta.7

Name:           stdx-allocator
Version:        %{major_version}.%{minor_version}.%{patch_version}
Release:        1%{?pre:.%{pre}}%{?dist}
Summary:        High-level interface for allocators for D
Summary(fr):    Interface haut niveau pour les allocateurs du langage D
License:        Boost
URL:            https://github.com/dlang-community/stdx-allocator
Source0:        https://github.com/dlang-community/stdx-allocator/archive/v%{version}%{?pre:-%{pre}}/%{name}-%{version}%{?pre:-%{pre}}.tar.gz

ExclusiveArch:  %{ldc_arches}
BuildRequires:  ldc meson

%description
High-level interface for allocators for D, extracted from Phobos.

%description -l fr
Interface haut niveau pour les allocateurs du langage D. Cette interface a été
extraite de la bibliothèque standard Phobos.

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
stdx-allocator-devel package contains header files for developing D applications
that use stdx-allocator.

%description devel -l fr
Le paquet stdx-allocator contient les fichiers d'entêtes pour développer
des applications en D utilisant stdx-allocator.


%package geany-tags
Summary:        Support for enable autocompletion in 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 -n %{name}-%{version}%{?pre:-%{pre}}
# temp geany config directory for allow geany to generate tags
mkdir geany_config

# https://github.com/dlang-community/stdx-allocator/issues/2
sed -i "s|_payload.ptr + _payload.length|cast(ulong*)(_payload.ptr + _payload.length)|" source/stdx/allocator/building_blocks/bitmapped_block.d

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

# generate doc
src_dir='source'
sources=$(find "${src_dir}" -name '*.d')
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};
done

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

%install
%meson_install

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

%ldconfig_scriptlets

%files
%{_libdir}/lib%{name}.so.%{version}
%{_libdir}/lib%{name}.so.0

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

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

%changelog
* Wed Aug  1 2018 MERCIER Jonathan <bioinfornatics at gmail.com> - 2.77.2-1
- Initial release

Comment 3 MERCIER Jonathan 2018-08-08 20:59:56 UTC
Thanks a lot Robert-André

I followed your instruction.

I do not like the versioning schema of github 'vXX.YY.ZZ' because in my directory 
~/rpmbuild/SOURCES I would have plenty of archive following this schema, this involve you do not know the package name of a given archive and you could get some collision name with this schema. It is a question of taste :-) .  

SPEC: https://bioinfornatics.fedorapeople.org/packages/stdx-allocator.spec
SRPMS: https://bioinfornatics.fedorapeople.org/packages/stdx-allocator-2.77.2-2.fc28.src.rpm

Comment 4 MERCIER Jonathan 2018-08-08 21:07:28 UTC
I upload the wrong srpms I need to upload the one with meson sorry

Comment 5 MERCIER Jonathan 2018-08-08 21:47:41 UTC
SPEC: https://bioinfornatics.fedorapeople.org/packages/stdx-allocator.spec
SRPMS: https://bioinfornatics.fedorapeople.org/packages/stdx-allocator-2.77.2-2.fc28.src.rpm

$ rpmlint -i ../SRPMS/stdx-allocator-2.77.2-2.fc28.src.rpm 
stdx-allocator.src: W: spelling-error Summary(en_US) allocators -> locators, allocates, alligators
The value of this tag appears to be misspelled. Please double-check.

stdx-allocator.src: W: spelling-error %description -l en_US allocators -> locators, allocates, alligators
The value of this tag appears to be misspelled. Please double-check.

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

$ rpmlint -i stdx-allocator.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

$ scp stdx-allocator.spec fedorapeople:public_html/packages/
stdx-allocator.spec

Comment 6 Robert-André Mauchin 🐧 2018-08-09 21:39:29 UTC
Package approved.

Comment 7 Gwyn Ciesla 2018-08-27 12:40:18 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/stdx-allocator

Comment 8 MERCIER Jonathan 2018-10-08 11:51:18 UTC
package added
https://koji.fedoraproject.org/koji/packageinfo?packageID=27427


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