Bug 2143005 - Review Request: xbyak_aarch64 - A C++ JIT assembler for AArch64
Summary: Review Request: xbyak_aarch64 - A C++ JIT assembler for AArch64
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Rix
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-15 19:05 UTC by Benson Muite
Modified: 2023-01-08 19:58 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-01-08 19:58:04 UTC
Type: Bug
Embargoed:
trix: fedora-review+
trix: needinfo+


Attachments (Terms of Use)

Description Benson Muite 2022-11-15 19:05:27 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/fed500/xbyak_aarch64/fedora-rawhide-aarch64/05041382-xbyak_aarch64/xbyak_aarch64.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/fed500/xbyak_aarch64/fedora-rawhide-aarch64/05041382-xbyak_aarch64/xbyak_aarch64-1.0.0-1.fc38.src.rpm
Description:
Xbyak_aarch64 is a C++ library which enables run-time assemble coding with the 
AArch64 instruction set of Arm(R)v8-A architecture. Xbyak_aarch64 is based on 
Xbyak developed for x86_64 CPUs by MITSUNARI Shigeo.
                                                                                                                        

Fedora Account System Username: fed500

Comment 1 Tom Rix 2022-11-16 13:13:49 UTC
what is the justification of a static only library ?
How would someone with a built application handle a security update without having to rebuild ?

I looked at the upstream testing, it is broken beyond being v8 specific.
It would be good if that could be fixed since looking at pseudo arm assembly is beyond most people.

There is a cmake build option, why not use that ?

Comment 2 Benson Muite 2022-11-17 17:21:19 UTC
Thanks for your feedback.  Will get a shared library built.  The tests do work on Ampere, but not on Graviton 2.  
QEMU is likely of less interest for typical users.

Comment 3 Tom Rix 2022-11-18 15:12:32 UTC
For testing, let's keep what you have.  but i would still like to see the full testsuite get exercised could you add a %with option and some instructions like run this on qemu with --machine blabla so someone like myself could do manual testing ?

Comment 4 Benson Muite 2022-11-21 13:30:07 UTC
Thanks for your feedback. Updated. 
Have used Makefile as that is what is in the release, can update to CMake on the next release.
Have added basic instructions for using QEMU from Fedora repositories in the spec file. 
This will not run the entire test suite, sve instructions are missing but should run the examples.

If Building QEMU from source see:
https://github.com/fujitsu/xbyak_aarch64/blob/main/.github/actions/test_action/entrypoint.sh
https://github.com/fujitsu/xbyak_aarch64/blob/main/.github/automation/env/setenv

spec: https://download.copr.fedorainfracloud.org/results/fed500/xbyak_aarch64/fedora-rawhide-aarch64/05057318-xbyak_aarch64/xbyak_aarch64.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/xbyak_aarch64/fedora-rawhide-aarch64/05057318-xbyak_aarch64/xbyak_aarch64-1.0.0-2.fc38.src.rpm

Comment 5 Tom Rix 2022-11-21 14:05:52 UTC
I asked about cmake because it has a shared library, please see if you can get this to work.
If it doesn't, patch the Makefile instead of sed-ing it

The testing i was asking for was something like
rpmbuild --with extra_tests 
There should be logic to run the unit testsuite and instructions on what type of machine to run it on.
Think of someone other than yourself having to update the sources before making a new release.  How would they verify that the library built correctly ?

Comment 6 Benson Muite 2022-11-21 17:40:35 UTC
Thanks for your feedback.
Will use Makefile for now and use a patch.  Needed to use sed for the soname,
but all other changes are in the patch. 

The CMakeLists file will need more modification to generate a dynamically
linked library with a soname.  Want to check with upstream on this before 
doing further modifications.

The variety of Arm architectures is very big. See:
https://github.com/hrw/arm-socs-table
Would need to check availability of instructions, at present only
a few chips support SVE, so an rpmbuild --with extra_tests
would need to do a lot of checking, and these checks would fail
on most Arm chips.

Added instructions as comments on how to build QEMU from source,
and then do a full check. Is this reasonable?

spec: https://download.copr.fedorainfracloud.org/results/fed500/xbyak_aarch64/fedora-rawhide-aarch64/05057787-xbyak_aarch64/xbyak_aarch64.spec
srpm: https://download.copr.fedorainfracloud.org/results/fed500/xbyak_aarch64/fedora-rawhide-aarch64/05057787-xbyak_aarch64/xbyak_aarch64-1.0.0-3.fc38.src.rpm

Comment 7 Tom Rix 2022-11-21 18:06:50 UTC
See .. 
https://src.fedoraproject.org/rpms/xbyak/blob/rawhide/f/xbyak.spec

%if %{with check}
%check
make test
%endif

I am looking for something like this so I can check if it really works.

The aarch64 has the same 'test' target in its makefile.
If this can be done with a qemu user mode, then it could be done automatically in the build which would be great.

Comment 10 Tom Rix 2022-11-21 21:14:58 UTC
manual building and testing --with check looks good

CCLA.txt - Software Grant and Corporate Contributor License Agreement
and similar ICLA.txt look like they are useful when committing to the project's github, are they really doc's ?

rpmlint

ampere-mtsnow-altramax-19 > rpmlint /var/lib/mock/fedora-37-aarch64/result/xbyak_aarch64-1.0.0-4.fc37.src.rpm 
================================================= rpmlint session starts ================================================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

xbyak_aarch64.spec:26: W: mixed-use-of-spaces-and-tabs (spaces: line 7, tab: line 26)
================== 1 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.1 s =================
ampere-mtsnow-altramax-19 > rpmlint /var/lib/mock/fedora-37-aarch64/result/xbyak_aarch64-1.0.0-4.fc37.
xbyak_aarch64-1.0.0-4.fc37.aarch64.rpm  xbyak_aarch64-1.0.0-4.fc37.src.rpm      
ampere-mtsnow-altramax-19 > rpmlint /var/lib/mock/fedora-37-aarch64/result/xbyak_aarch64-1.0.0-4.fc37.aarch64.rpm 
================================================= rpmlint session starts ================================================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

xbyak_aarch64.aarch64: W: only-non-binary-in-usr-lib
xbyak_aarch64.aarch64: E: no-binary
xbyak_aarch64.aarch64: W: dangling-relative-symlink /usr/lib64/libxbyak_aarch64.so.0.1.0.0 libxbyak_aarch64.so
================== 1 packages and 0 specfiles checked; 1 errors, 2 warnings, 1 badness; has taken 0.0 s =================
ampere-mtsnow-altramax-19 > rpmlint /var/lib/mock/fedora-37-aarch64/result/xbyak_aarch64-devel-1.0.0-4.fc37.aarch64.rpm
================================================= rpmlint session starts ================================================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

xbyak_aarch64-devel.aarch64: W: unstripped-binary-or-object /usr/lib64/libxbyak_aarch64.so
xbyak_aarch64-devel.aarch64: E: no-ldconfig-symlink /usr/lib64/libxbyak_aarch64.so
xbyak_aarch64-devel.aarch64: W: no-documentation
================== 1 packages and 0 specfiles checked; 1 errors, 2 warnings, 1 badness; has taken 0.4 s =================
ampere-mtsnow-altramax-19 >

Comment 11 Tom Rix 2022-11-21 21:29:41 UTC
ampere-mtsnow-altramax-19 > cat 2143005-xbyak_aarch64/review.txt 

This is a review *template*. Besides handling the [ ]-marked tests you are
also supposed to fix the template before pasting into bugzilla:
- Add issues you find to the list of issues on top. If there isn't such
  a list, create one.
- Add your own remarks to the template checks.
- Add new lines marked [!] or [?] when you discover new things not
  listed by fedora-review.
- Change or remove any text in the template which is plain wrong. In this
  case you could also file a bug against fedora-review
- Remove the "[ ] Manual check required", you will not have any such lines
  in what you paste.
- Remove attachments which you deem not really useful (the rpmlint
  ones are mandatory, though)
- Remove this text



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

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



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

C/C++:
[ ]: Package does not contain kernel modules.
[ ]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[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:
[ ]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[ ]: 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* Apache License 2.0",
     "Apache License 2.0". 381 files have unknown license. Detailed output
     of licensecheck in
     /root/rpmbuild/SPECS/2143005-xbyak_aarch64/licensecheck.txt
[ ]: License file installed when any subpackage combination is installed.
[ ]: %build honors applicable compiler flags or justifies otherwise.
[ ]: Package contains no bundled libraries without FPC exception.
[ ]: Changelog in prescribed format.
[ ]: 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
[ ]: Package uses nothing in %doc for runtime.
[ ]: Package consistently uses macros (instead of hard-coded directory
     names).
[ ]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[ ]: Package obeys FHS, except libexecdir and /usr/target.
[ ]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[ ]: Requires correct, justified where necessary.
[ ]: Spec file is legible and written in American English.
[ ]: Package contains systemd file(s) if in need.
[ ]: Useful -debuginfo package or justification otherwise.
[ ]: 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 51200 bytes in 3 files.
[ ]: 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 must own all directories that it creates.
[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 must not depend on deprecated() packages.
[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.
[ ]: Final provides and requires are sane (see attachments).
[ ]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     xbyak_aarch64-devel
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: Package does not include license text files separate from upstream.
[ ]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[ ]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[ ]: %check is present and all tests pass.
[ ]: 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]: 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:
[ ]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 5652480 bytes in /usr/share
[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
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.4.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 31, packages: 2

xbyak_aarch64-devel.aarch64: W: unstripped-binary-or-object /usr/lib64/libxbyak_aarch64.so
xbyak_aarch64-devel.aarch64: E: shared-library-not-executable /usr/lib64/libxbyak_aarch64.so
xbyak_aarch64.aarch64: W: only-non-binary-in-usr-lib
xbyak_aarch64-devel.aarch64: E: no-ldconfig-symlink /usr/lib64/libxbyak_aarch64.so
xbyak_aarch64-devel.aarch64: W: no-documentation
xbyak_aarch64.aarch64: E: no-binary
xbyak_aarch64.aarch64: W: dangling-relative-symlink /usr/lib64/libxbyak_aarch64.so.0.1.0.0 libxbyak_aarch64.so
 2 packages and 0 specfiles checked; 3 errors, 4 warnings, 3 badness; has taken 0.3 s 



Source checksums
----------------
https://github.com/fujitsu/xbyak_aarch64/archive/v1.0.0/xbyak_aarch64-1.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 23042d5ddc855c0228b384a1865ce66b8161cbaa821b53851255dafcdb27ac89
  CHECKSUM(SHA256) upstream package : 23042d5ddc855c0228b384a1865ce66b8161cbaa821b53851255dafcdb27ac89


Requires
--------
xbyak_aarch64 (rpmlib, GLIBC filtered):

xbyak_aarch64-devel (rpmlib, GLIBC filtered):
    ld-linux-aarch64.so.1()(64bit)
    libc.so.6()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3.1)(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    rtld(GNU_HASH)



Provides
--------
xbyak_aarch64:
    xbyak_aarch64
    xbyak_aarch64(aarch-64)

xbyak_aarch64-devel:
    libxbyak_aarch64.so.0.1.0.0()(64bit)
    xbyak_aarch64-devel
    xbyak_aarch64-devel(aarch-64)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2143005
Buildroot used: fedora-rawhide-aarch64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: Haskell, Python, Ocaml, PHP, Java, R, SugarActivity, Perl, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 12 Tom Rix 2022-11-23 13:18:31 UTC
a few small things to fix with rpmlint
handling of *.so links and some whitespace in the spec file.

Comment 13 Benson Muite 2022-11-23 14:55:09 UTC
Thanks for your feedback. Working on the symlinks and shared library creation.

Comment 15 Tom Rix 2022-11-26 18:28:43 UTC
LGTM
Thanks

Comment 16 Benson Muite 2022-11-26 18:39:56 UTC
Thanks. Can you also set flags to +

Comment 18 Benson Muite 2022-12-29 18:18:06 UTC
Tom - please set the flag to + for a repository to be created. The assignee needs to do this.

Comment 19 Benson Muite 2022-12-30 05:00:20 UTC
Thanks.

Comment 21 Kevin Fenzi 2023-01-01 17:57:01 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/xbyak_aarch64


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