Bug 2038135 - Review Request: luit - Locale and ISO 2022 support for Unicode terminals
Summary: Review Request: luit - Locale and ISO 2022 support for Unicode terminals
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Vitaly
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2038136 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-07 11:55 UTC by Thomas E. Dickey
Modified: 2022-01-27 10:35 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-01-27 10:35:59 UTC
Type: ---
Embargoed:
vitaly: fedora-review+


Attachments (Terms of Use)

Description Thomas E. Dickey 2022-01-07 11:55:16 UTC
Spec URL: https://src.fedoraproject.org/fork/thomas-dickey/rpms/luit/blob/rawhide/f/luit.spec
SRPM URL: https://invisible-mirror.net/archives/temp/REVIEW/luit-2.0+20210218-1.src.rpm
Description: Luit is a filter that can be run between an arbitrary application and a
UTF-8 terminal emulator.  It will convert application output  from  the
locale's  encoding  into  UTF-8,  and convert terminal input from UTF-8
into the locale's encoding.
 
Unlike the older XFree86/Xorg version of luit, this does not rely upon
the fontenc package.
Fedora Account System Username: thomas-dickey

Comment 1 Thomas E. Dickey 2022-01-07 13:01:31 UTC
*** Bug 2038136 has been marked as a duplicate of this bug. ***

Comment 2 Thomas E. Dickey 2022-01-07 15:08:38 UTC
Since the package is easily built (unlike the Xorg fork), I'm willing to maintain this package.

Comment 3 Thomas E. Dickey 2022-01-07 15:44:51 UTC
By the way, this commit:

https://src.fedoraproject.org/rpms/xterm/c/78a7d5f141a1f8c2b5ebacdb7b75f1f09838654e?branch=rawhide

did not actually remove support for luit from xterm.

(Removing the "Requires" was correct, but the runtime support is still there).

Comment 4 Vitaly 2022-01-08 10:57:15 UTC
I will review this package and sponsor you to Fedora.

Comment 5 Vitaly 2022-01-08 11:12:22 UTC
> %define AppProgram luit
> %define UseProgram %{AppProgram}

Should be removed. Always use standard %{name} macro.

> %define AppVersion 20210218

Maybe you should replace version 2.0 with this?

> Version: 2.0+%{AppVersion}

Version tag is incorrect. You must follow Versioning guidelines for snapshots: https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_snapshots

> Requires: zlib

Must be removed. rpmbuild will automatically find out and add all runtime dependencies.

> %define debug_package %{nil}

Must be removed. All Fedora packages with ELF binaries must have automatically generated -debuginfo subpackages.

> %setup -q -n %{AppProgram}-%{AppVersion}

Can be replaced with:

%autosetup -n %{name}-%{AppVersion}

Also the following build requirements must be added:

BuildRequires: automake
BuildRequires: gcc
BuildRequires: make

> make

Should be replaced with %make_build.

> [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

Must be removed. Not allowed on Fedora.

> make install                    DESTDIR=$RPM_BUILD_ROOT

Should be replaced with %make_install.

> strip $RPM_BUILD_ROOT%{_bindir}/%{UseProgram}

Must be removed. Stripping will be performed automatically to the separate -debuginfo subpackage.

> %defattr(-,root,root)

Must be removed. Not allowed on Fedora.

> %{_prefix}/bin/%{UseProgram}

Must be replaced with:

%{_bindir}/%{name}

> %{_mandir}/man1/%{UseProgram}.*

%{_mandir}/man1/%{name}.*

> # each patch should add its ChangeLog entries here

Remove this entry.

Comment 6 Vitaly 2022-01-08 11:20:06 UTC
> Release: 1

Missing %{?dist} tag:

Release: 1%{?dist}

> INSTALL_PROGRAM='${INSTALL}' \
> %configure \
>  --target %{_target_platform} \
>  --prefix=%{_prefix} \
>  --bindir=%{_bindir} \
>  --libdir=%{_libdir} \
>  --mandir=%{_mandir}

Should be simplified by %configure. All needed flags will be added automatically.

Comment 7 Thomas E. Dickey 2022-01-08 14:02:50 UTC
I applied most of the suggestions, except for a few which won't work with this source:

* BuildRequires: automake (automake isn't used)
* changing Version (the "2.0" isn't part of the source-URL)

Comment 8 Vitaly 2022-01-08 14:08:34 UTC
> Version: 2.0+%{AppVersion}

Version is still bogus.

> Requires: zlib

Must be removed.

> * BuildRequires: automake (automake isn't used)

Your package uses %configure.

> make

%make_build

> [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

Not allowed. Must be removed.

Comment 9 Thomas E. Dickey 2022-01-08 14:13:47 UTC
The program version (as printed by "vttest -V") is

    VT100 test program, version 2.7 (20190710)

The upstream sources use the patchdate, but the version begins with "2.7".

The "%configure" directive doesn't (so far) do an autoreconf/automake/etc.
It simply runs ./configure with platform-specific options.

(will remove the "rm -rf", which is not needed in Fedora)

Comment 10 Thomas E. Dickey 2022-01-08 14:18:14 UTC
Regarding zlib:

> ldd /usr/bin/luit
        linux-vdso.so.1 (0x00007ffe9ed15000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f3892d45000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f3892b47000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3892d8f000)

so I added zlib as a dependency.

Comment 11 Vitaly 2022-01-08 14:22:15 UTC
> Version: 2.0+%{AppVersion}

Use this:

Version: 2.0.%{AppVersion}

Plus symbol is not allowed.

> so I added zlib as a dependency.

OK.

> It simply runs ./configure with platform-specific options.

OK.

Comment 12 Vitaly 2022-01-08 14:23:22 UTC
> Requires: zlib

Requires: zlib%{?_isa}

Comment 13 Thomas E. Dickey 2022-01-08 14:26:19 UTC
done (and changed the "+" in version to "." to better match the Fedora docs)

Comment 14 Vitaly 2022-01-08 14:28:18 UTC
All changelog entries must be fully versioned.

Use this one and remove all others:

* Sat Jan 08 2022 Thomas E. Dickey <dickey> - 2.0.20210218-1
- address review comments

Comment 16 Vitaly 2022-01-08 14:40:12 UTC
SPEC link is incorrect. It must points to the text/plain file as required by the fedora-review too.

Use this one: https://src.fedoraproject.org/fork/thomas-dickey/rpms/luit/raw/rawhide/f/luit.spec

Comment 18 Vitaly 2022-01-08 14:52:36 UTC
Package Review
==============

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

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

C/C++:
[x]: Provides: bundled(gnulib) in place as required.
     Note: Sources not installed
[x]: Package does not contain kernel modules.
[x]: 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]: 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: There is no build directory. Running licensecheck on vanilla
     upstream sources. No licenses found. Please check the source files for
     licenses manually.
[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.
[x]: 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.
[x]: 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.
[x]: 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.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 30720 bytes in 1 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 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 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:
[x]: 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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: 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.
[x]: %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 AppVersion 20210218
[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]: Fully versioned dependency in subpackages if applicable.
[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.

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

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: There are rpmlint messages (see attachment).
[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
-------
Cannot parse rpmlint output:


Rpmlint (debuginfo)
-------------------
Cannot parse rpmlint output:



Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://invisible-mirror.net/archives/luit/luit-20210218.tgz :
  CHECKSUM(SHA256) this package     : f3c7cfea61f4175b087fd4200e8e43d2d4b87575ed265403f9d67850ea1740e6
  CHECKSUM(SHA256) upstream package : f3c7cfea61f4175b087fd4200e8e43d2d4b87575ed265403f9d67850ea1740e6


Requires
--------
luit (rpmlib, GLIBC filtered):
    libc.so.6()(64bit)
    rtld(GNU_HASH)
    zlib(x86-64)

luit-debuginfo (rpmlib, GLIBC filtered):

luit-debugsource (rpmlib, GLIBC filtered):



Provides
--------
luit:
    luit
    luit(x86-64)

luit-debuginfo:
    debuginfo(build-id)
    luit-debuginfo
    luit-debuginfo(x86-64)

luit-debugsource:
    luit-debugsource
    luit-debugsource(x86-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 2038135
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: PHP, Haskell, Java, R, SugarActivity, Python, Ocaml, fonts, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 19 Vitaly 2022-01-08 14:54:44 UTC
> %define AppVersion 20210218

%global AppVersion 20210218

This minor issue can be fixed during importing package to the Fedora SCM.

Package approved.

I will sponsor your FAS account "thomas-dickey" and send getting started instructions shortly.

Comment 20 Thomas E. Dickey 2022-01-08 14:55:18 UTC
thanks :-)

Comment 21 Ralf Corsepius 2022-01-08 17:05:56 UTC
This is bogus: Requires: zlib%{?_isa}

Comment 22 Thomas E. Dickey 2022-01-08 17:23:08 UTC
luit uses gzopen/gzgets/gzclose, which are provided by zlib.
(it does this for compatibility with libfontenc, as I recall...)

The "%{?_isa}" was suggested in the review.

Comment 23 Vitaly 2022-01-08 18:48:32 UTC
> This is bogus: Requires: zlib%{?_isa}

luit is an arched package, that's why it should require arched dependencies. Adding %{?_isa} fixes that.

> luit uses gzopen/gzgets/gzclose, which are provided by zlib.

Ideally it should link against libz (`-lz` linker flag). It should be fixed in upstream.

Comment 24 Thomas E. Dickey 2022-01-08 19:24:16 UTC
The configure script adds the library option, but at build-time checks if it is actually needed.

Comment 25 Vitaly 2022-01-08 21:07:03 UTC
> The configure script adds the library option, but at build-time checks if it is actually needed.

Add:

BuildRequires: zlib-devel

Now you can remove Requires: zlib%{?_isa}. Linker will do everything automatically:

$ ldd ./luit
        linux-vdso.so.1 (0x00007fffd4ff1000)
        libz.so.1 => /lib64/libz.so.1 (0x00007ffaf6a02000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffaf67f8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffaf6a4f000)

libz.so.1 is a part of zlib package. No additional dependency needed.

Comment 26 Thomas E. Dickey 2022-01-08 21:16:05 UTC
I can do this (and update the SRPM, unless it has already been retrieved and hashed).

Comment 27 Thomas E. Dickey 2022-01-08 21:37:43 UTC
(done - updated)


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