Bug 2042701 - Review Request: v - The v programming language
Summary: Review Request: v - The v programming language
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-NEEDSPONSOR
TreeView+ depends on / blocked
 
Reported: 2022-01-20 00:13 UTC by Ali Yousefi Sabzevar
Modified: 2024-01-05 08:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-01-03 12:06:26 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ali Yousefi Sabzevar 2022-01-20 00:13:00 UTC
Spec URL: https://raw.githubusercontent.com/aysabzevar/v-rpm/main/v.spec
SRPM URL: https://github.com/aysabzevar/v-rpm/blob/main/v-0.2.4-1.fc35.src.rpm
Description: Simple, fast, safe, compiled language for developing maintainable software.
Fedora Account System Username: aysabzevar

Comment 1 Ali Yousefi Sabzevar 2022-01-20 00:14:49 UTC
Successful Koji build link:
https://koji.fedoraproject.org/koji/taskinfo?taskID=81475044

The upstream project:
https://github.com/vlang/v

Comment 2 Ali Yousefi Sabzevar 2022-01-20 08:46:25 UTC
I selected the package name "v" to stick with the upstream package name.

But if you think, "vlang" could be a better name for this package, I got the confirmation from the upstream original developer too.

Regards,
Ali

Comment 3 Petr Pisar 2022-07-07 13:45:15 UTC
The URLs lead to HTML files. Could you please provide a Spec URL to the spec file, like <https://raw.githubusercontent.com/aysabzevar/v-rpm/main/v.spec> and do the same with SRPM URL?
I briefly looked in to the spec file and I have three remarks:

- Upstream has 0.3 version. Could you update this package use that version? I guess you are not going to update this package every week, and then it makes sense to package the releases version. Not a weekly snapshot. Then the Source address should also use that version, like <https://github.com/vlang/v/archive/refs/tags/0.3.zip>.
- The CC command in %build phase does not use distribution-wide compiler flags ($RPM_OPT_FLAGS) and linker flags ($RPM_LD_FLAGS). Even if it's an intermediary program, it would be great to use them.
- The spec file claims MIT license. But %files section nowhere packages a license file with %license macro. MIT license requires copying the license text alongside binary executables.

Comment 4 Petr Pisar 2022-07-07 13:46:38 UTC
Regarding the flags this documentation <https://docs.fedoraproject.org/en-US/packaging-guidelines/RPMMacros/#build-flags-macros-and-variables> lists corresponding macros.

Comment 5 Artur Frenszek-Iwicki 2022-07-11 00:24:47 UTC
> ExcludeArch: s390x
> ExcludeArch: armv7hl
> ExcludeArch: aarch64
> ExcludeArch: ppc64le
These should be accompanied by some comment explaining whether these architectures
are not supported upstream, or the program simply fails to build.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_support

> Source1: https://github.com/vlang/vc/archive/refs/heads/master.zip
This links points to the latest commit of the "master" branch in the repository,
so the contents of the archive will change over time. Please pick a specific commit
and refer to that.

> %description
> Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies.
Description should be wrapped to a maximum of 80 characters per line.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_summary_and_description

> %{__unzip} %{SOURCE1} -d %{_builddir}/
> %{__tar} xvfz %{SOURCE0} -C %{_builddir}/
> ...
> %{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications}
> %{__install} -p -D -m 0755 %{_builddir}/v-%{release_build}/v %{buildroot}%{_bindir}/
Using macro forms of system executables is discouraged.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_macros

> $CC -std=gnu11 -w -I %{_builddir}/v-%{release_build}/thirdparty/stdatomic/nix -o %{_builddir}/v-%{release_build}/v1 %{_builddir}/vc-master/v.c -lm -lpthread
This ignores Fedora's %{optflags}.
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags

> %files
> %{_bindir}/v
The package must include the license text.
https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text

Comment 6 Ali Yousefi Sabzevar 2022-07-15 11:00:31 UTC
@ppisar @fedora Thanks a ton for your kind reply.

I implemented all pieces of your advice.

Also updated the spec for v 0.3 and included doc, examples and tutorials too.

Could you please take a look?

Thanks in advance.

Comment 7 Ali Yousefi Sabzevar 2022-07-18 19:40:59 UTC
Please find the Koji build link for this updated SPEC below:
https://koji.fedoraproject.org/koji/taskinfo?taskID=89667418

Comment 8 Artur Frenszek-Iwicki 2022-07-31 17:23:13 UTC
> Comment: 0 → updated
Please post a comment with new links instead of editing the original bug.

> Source1: https://raw.githubusercontent.com/vlang/vc/1521ffb810f89d247113a1f3381b176817bb88ba/v.c
According to the commit messages, this "vc" commit corresponds to the "weekly.2022.30" tag
in the main "v" repo, not "0.3". You should either switch to using the commit that matches
the "0.3" tag, or add snapshot info to the Release: field.
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

> %build
> tar xvfz %{SOURCE0} -C %{_builddir}/
Why not just:
> %prep
> %autosetup -n v-%{release_build}
That will unpack the archive for you and cd into "v-%{release_build}".

> $CC -std=gnu11 %{optflags} -w -I %{_builddir}/v-%{release_build}/thirdparty/stdatomic/nix -o %{_builddir}/v-%{release_build}/v1 %{_builddir}/v.c -lm -lpthread
I believe this should include "%{build_ldflags}" as well.

> install -m 0755 -p %{_builddir}/v-%{release_build}/v %{buildroot}%{_bindir}/v
If you use %autosetup, then the scripts in %build and %install will
start with "%{_builddir}/v-%{release_build}" as their working directory,
so you won't have to specify the full path everywhere.

> %files
> %{_datadir}/%{NAME}/examples/*
> %{_datadir}/%{NAME}/tutorials/*
This will cause the package to own the files inside the directories,
but not the directories themselves. You can just use "%{_datadir}/%{name}/" here.
https://docs.fedoraproject.org/en-US/packaging-guidelines/UnownedDirectories/#_common_mistakes

Comment 10 Benson Muite 2022-08-01 05:35:19 UTC
Unofficial review comments:

a) Thanks for making this available.

b) If you are not a packager, you may need a sponsor.

c) Tried to run the fedora-review tool, it built but failed to install with the output below:

INFO: Build completed
INFO: Installing built package(s)
INFO: Install command returned error code 30
INFO: Active plugins: C/C++, Shell-api, Generic
Package basesystem-11-14.fc37.noarch contains no files
Package glibc-minimal-langpack-2.35.9000-31.fc37.x86_64 contains no files


d) Can net.http and net.websocket be built as sub packages so that openssl is not required for the main build?

Comment 11 Benson Muite 2022-12-10 06:24:57 UTC
Package Review
==============

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


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/share/doc/v/LICENSE
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files
- 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.
  Note: License file LICENSE is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text


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

C/C++:
[ ]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[ ]: 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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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: There is no build directory. Running licensecheck on vanilla
     upstream sources. Licenses found: "Unknown or generated". 1 files have
     unknown license. Detailed output of licensecheck in
     /home/fedora-packaging/2042701-v/licensecheck.txt
[ ]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/share/v, /usr/share/doc/v,
     /usr/share/v/examples, /usr/share/v/tutorials
[ ]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/share/v,
     /usr/share/doc/v, /usr/share/v/examples, /usr/share/v/tutorials
[ ]: %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 194560 bytes in 5 files.
[ ]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[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]: 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:
[!]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
     Note: Incorrect Requires : /usr/local/bin/v
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_file_and_directory_dependencies
[ ]: Avoid bundling fonts in non-fonts packages.
     Note: Package contains font files
[ ]: 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).
[ ]: Package functions as described.
[ ]: Latest version is packaged.
[ ]: 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.
[ ]: Package should compile and build into binary rpms on all supported
     architectures.
[ ]: %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]: 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]: Spec use %global instead of %define unless justified.

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

Generic:
[!]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: https://docs.fedoraproject.org/en-US/packaging-
     guidelines/#_use_rpmlint
[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)
[ ]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
     Note: Arch-ed rpms have a total of 1955840 bytes in /usr/share


Installation errors
-------------------
INFO: mock.py version 3.5 starting (python version = 3.11.0, NVR = mock-3.5-1.fc38)...
Start(bootstrap): init plugins
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Start(bootstrap): chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start(bootstrap): cleaning package manager metadata
Finish(bootstrap): cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 3.5
INFO: Mock Version: 3.5
Finish(bootstrap): chroot init
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 3.5
INFO: Mock Version: 3.5
Finish: chroot init
INFO: installing package(s): /builddir/v-0.3-1.fc38.aarch64.rpm
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 4034544450be485bbd2428d8be85b512 -D /var/lib/mock/fedora-rawhide-aarch64-bootstrap/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.kc8ki3n5:/etc/resolv.conf --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/var/lib/mock/fedora-rawhide-aarch64/root/installation-homedir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$  --setenv=LANG=C.UTF-8 --setenv=LC_MESSAGES=C.UTF-8 --resolv-conf=off /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-aarch64/root/ --releasever 38 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk --disableplugin=versionlock install /builddir/v-0.3-1.fc38.aarch64.rpm --setopt=tsflags=nocontexts



Rpmlint
-------
Checking: v-0.3-1.fc38.aarch64.rpm
          v-0.3-1.fc38.src.rpm
============================ 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
rpmlintrc: [PosixPath('/tmp/tmpye90reht')]
checks: 31, packages: 2

v.aarch64: E: zero-length /usr/share/v/examples/sokol/02_cubes_glsl/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/03_march_tracing_glsl/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/04_multi_shader_glsl/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/05_instancing_glsl/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/06_obj_viewer/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/particles/modules/particle/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/particles/modules/particle/vec2/v.mod
v.aarch64: E: zero-length /usr/share/v/examples/sokol/simple_shader_glsl/v.mod
v.aarch64: E: wrong-script-interpreter /usr/share/v/examples/v_script.vsh /usr/local/bin/v
v.aarch64: E: version-control-internal-file /usr/share/v/examples/2048/.gitignore
v.aarch64: E: version-control-internal-file /usr/share/v/examples/database/psql/.gitignore
v.aarch64: E: version-control-internal-file /usr/share/v/examples/flappylearning/.gitignore
v.aarch64: E: version-control-internal-file /usr/share/v/examples/hot_reload/.gitignore
v.aarch64: E: version-control-internal-file /usr/share/v/examples/pendulum-simulation/.gitignore
v.aarch64: E: version-control-internal-file /usr/share/v/examples/sokol/simple_shader_glsl/.gitignore
v.aarch64: E: version-control-internal-file /usr/share/v/tutorials/building_a_simple_web_blog_with_vweb/code/blog/.gitignore
v.aarch64: W: unstripped-binary-or-object /usr/bin/v
v.aarch64: W: no-manual-page-for-binary v
v.spec: W: no-%prep-section
v.aarch64: W: name-repeated-in-summary V
v.src: W: name-repeated-in-summary V
v.aarch64: E: invalid-dependency /usr/local/bin/v
v.aarch64: W: incoherent-version-in-changelog 0.3 ['0.3-1.fc38', '0.3-1']
v.aarch64: W: hidden-file-or-dir /usr/share/v/examples/process/.ignore
v.aarch64: W: files-duplicate /usr/share/v/examples/vweb/vweb_assets/assets/v-logo.svg /usr/share/v/examples/vweb/server_sent_events/assets/v-logo.svg
v.aarch64: W: files-duplicate /usr/share/v/examples/vweb/vweb_assets/favicon.ico /usr/share/v/examples/vweb/server_sent_events/favicon.ico
v.aarch64: E: devel-dependency openssl-devel
 2 packages and 0 specfiles checked; 18 errors, 9 warnings, 18 badness; has taken 2.0 s 




Source checksums
----------------
https://raw.githubusercontent.com/vlang/vc/1521ffb810f89d247113a1f3381b176817bb88ba/v.c :
  CHECKSUM(SHA256) this package     : 3d1fce37f0230f0b8b4a33acf8767061201457331a60620e9f4bec9ae6bd7686
  CHECKSUM(SHA256) upstream package : 3d1fce37f0230f0b8b4a33acf8767061201457331a60620e9f4bec9ae6bd7686
https://github.com/vlang/v/archive/refs/tags/0.3.tar.gz :
  CHECKSUM(SHA256) this package     : 49cfe3bba0408bdc2394b63db927d586239aa18c2d8b4fea90f087ba26da0bac
  CHECKSUM(SHA256) upstream package : 49cfe3bba0408bdc2394b63db927d586239aa18c2d8b4fea90f087ba26da0bac


Requires
--------
v (rpmlib, GLIBC filtered):
    /usr/local/bin/v
    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)
    openssl-devel
    rtld(GNU_HASH)



Provides
--------
v:
    v
    v(aarch-64)



Diff spec file in url and in SRPM
---------------------------------
--- /home/fedora/2042701-v/srpm/v.spec	2022-12-07 22:09:38.201213039 +0000
+++ /home/fedora/2042701-v/srpm-unpacked/v.spec	2022-07-14 15:22:43.000000000 +0000
@@ -18,5 +18,4 @@
 Source0: https://github.com/vlang/v/archive/refs/tags/%{release_build}.tar.gz
 
-# V compiler's source translated to C
 Source1: https://raw.githubusercontent.com/vlang/vc/1521ffb810f89d247113a1f3381b176817bb88ba/v.c
 


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

Comment 12 Package Review 2023-12-11 00:45:24 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.


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