Bug 2174384

Summary: Review Request: contour-terminal - Modern C++ Terminal Emulator
Product: [Fedora] Fedora Reporter: Felix Wang <topazus>
Component: Package ReviewAssignee: Benson Muite <benson_muite>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: benson_muite, package-review
Target Milestone: ---Flags: benson_muite: fedora-review+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/contour-terminal/contour
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-08 00:52:43 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: 2174383    
Bug Blocks:    
Attachments:
Description Flags
The .spec file difference from Copr build 5597218 to 5598507
none
The .spec file difference from Copr build 5598507 to 5602929 none

Comment 2 Felix Wang 2023-03-06 00:40:20 UTC
As the dependent bugzilla review request was approved, we may start to move on this.

Comment 3 Benson Muite 2023-03-06 05:44:51 UTC
Desktop files should be validated and have a recommended installation procedure:

https://docs.fedoraproject.org/en-US/packaging-guidelines/#_desktop_files
https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/

Please give the spec file the same name as the package, contour-terminal.spec

Comment 5 Jakub Kadlčík 2023-03-06 06:50:36 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5597218
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2174384-contour-terminal/fedora-rawhide-x86_64/05597218-contour-terminal/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 6 Felix Wang 2023-03-06 07:12:56 UTC
The failure is because of the missing BuildRequires, I can successfully built on my copr.
ref: https://copr.fedorainfracloud.org/coprs/topazus/raku/build/5597199/

Comment 7 Benson Muite 2023-03-06 08:15:25 UTC
Problems pointed out by fedora-review:
a) Check installation procedure for these desktop file icons in another GUI application:
     Note: Directories without known owners:
     /usr/share/kservices5/ServiceMenus,
     /usr/share/icons/hicolor/512x512/apps, /usr/share/terminfo,
     /usr/share/icons/hicolor/32x32, /usr/share/icons/hicolor/128x128/apps,
     /usr/share/icons/hicolor/128x128, /usr/share/icons/hicolor,
     /usr/share/kservices5, /usr/share/icons/hicolor/32x32/apps,
     /usr/share/icons/hicolor/256x256, /usr/share/icons/hicolor/64x64,
     /usr/share/terminfo/c, /usr/share/icons/hicolor/512x512,
     /usr/share/icons/hicolor/256x256/apps,
     /usr/share/icons/hicolor/64x64/apps
Perhaps see if upstream can modify:
https://github.com/contour-terminal/contour/blob/master/src/contour/CMakeLists.txt#L323
Maybe
https://cmake.org/cmake/help/latest/cpack_gen/rpm.html#cpack_gen:CPack%20RPM%20Generator
might also be helpful

b) Remove one of these and use a soft link
W: files-duplicate /usr/share/terminfo/c/contour-latest /usr/share/terminfo/c/contour

c) Check/modify linking:
E: explicit-lib-dependency libunicode
Maybe ninja build will not do this?

d) You can run fedora-review in Copr:
https://frostyx.cz/posts/running-fedora-review-after-copr-build

e) Consider using Ninja as upstream tests with this:
https://github.com/contour-terminal/contour/blob/master/.github/fedora/contour.spec

Comment 9 Jakub Kadlčík 2023-03-06 16:42:03 UTC
Created attachment 1948442 [details]
The .spec file difference from Copr build 5597218 to 5598507

Comment 10 Jakub Kadlčík 2023-03-06 16:42:05 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5598507
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2174384-contour-terminal/fedora-rawhide-x86_64/05598507-contour-terminal/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 11 Felix Wang 2023-03-07 02:51:34 UTC
(In reply to Felix Wang from comment #8)
> problem a, b an d have been fixed by adding Requires of hicolor-icon-theme,
> kf5-kservice, kf5-filesystem, ncurses-base. problem c may not be fixed,
> releated ref: https://bugzilla.redhat.com/show_bug.cgi?id=790869
> Thanks for your good advice.
> 
> SPEC URL:
> https://download.copr.fedorainfracloud.org/results/topazus/test-review/
> fedora-rawhide-x86_64/05598415-contour-terminal/contour-terminal.spec
> SRPM URL:
> https://download.copr.fedorainfracloud.org/results/topazus/test-review/
> fedora-rawhide-x86_64/05598415-contour-terminal/contour-terminal-0.3.11.258-
> 1.fc39.src.rpm
> 
> review:
> https://download.copr.fedorainfracloud.org/results/topazus/test-review/
> fedora-rawhide-x86_64/05598415-contour-terminal/fedora-review/review.txt

Forgive my last comment and Here are detailed corrections with my last comment:
a): use rpm -qf to query what package owns the directories. ref: https://stackoverflow.com/questions/30067649/rpmbuild-common-ownership-of-directories

solution: adding Requires of hicolor-icon-theme, kf5-kservice, kf5-filesystem, ncurses-base

b): I have done this. Thanks for your advice.

c): It may not be fixed because there is a package named libunicode in my BuildRequires, maybe the releated ref: https://bugzilla.redhat.com/show_bug.cgi?id=790869

d): I enabled in my Copr. Thanks.

e): I see the upstream tests and modified my .spec file.

Comment 12 Benson Muite 2023-03-07 09:44:28 UTC
Modified the specfile to remove:

Requires:       fontconfig
Requires:       freetype
Requires:       harfbuzz
Requires:       yaml-cpp
Requires:       libunicode
Requires:       qt6-qtbase
Requires:       qt6-qtmultimedia
Requires:       qt5-qtbase
Requires:       qt5-qtmultimedia

this fixes problem c. If a library is used in BuildRequires, and it is linked to in the package,
it will correctly be included as a dependency, so there is no need to add "Requires: " for it.
Can the spec file be updated similarly?

libunicode does not build on s390x or ppc64:
https://copr.fedorainfracloud.org/coprs/fed500/contour-terminal/build/5601893/
get "error: 'intrinsics' has not been declared" 
Perhaps check with upstream if it can be built without using instrinsics or with intrinsics that
are supported on these architectures?

It does build on x86_64 and aarch64:
https://copr.fedorainfracloud.org/coprs/fed500/contour-terminal/build/5601952/
which are most used, but if able to support s390x and ppc64,
that would be great as well.

Comment 14 Jakub Kadlčík 2023-03-07 13:42:41 UTC
Created attachment 1948670 [details]
The .spec file difference from Copr build 5598507 to 5602929

Comment 15 Jakub Kadlčík 2023-03-07 13:42:43 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/5602929
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2174384-contour-terminal/fedora-rawhide-x86_64/05602929-contour-terminal/fedora-review/review.txt

Please take a look if any issues were found.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 16 Benson Muite 2023-03-07 15:34:54 UTC
Thanks. Can you exclude other architectures:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_architecture_build_failures
Probably also want to do this in the spec file for libunicode as well

Comment 17 Felix Wang 2023-03-07 16:05:02 UTC
Oh, appreciated for pointing out for the missing line to deal with architecture failures for contour terminal, though I have already done it in libunicode package.
SPEC URL: https://raw.githubusercontent.com/topazus/fedora-src/main/contour-terminal.spec

Comment 19 Benson Muite 2023-03-07 16:34:47 UTC
Rather than:
ExclusiveArch:  x86_64 aarch64
It is better to use
ExcludeArch: s390x i386 ppc4ie

Please update when importing. Thanks for adding the package.

Approved.

Comment 20 Fedora Admin user for bugzilla script actions 2023-03-08 00:07:10 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/contour-terminal

Comment 21 Felix Wang 2023-03-08 00:39:03 UTC
Thank you for the review work.

Comment 22 Fedora Update System 2023-03-08 00:51:29 UTC
FEDORA-2023-37b379541b has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-37b379541b

Comment 23 Fedora Update System 2023-03-08 00:52:43 UTC
FEDORA-2023-37b379541b has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.