Bug 2047560

Summary: Review Request: LibRaw-epel - Limited Architecture build of LibRaw for EPEL
Product: [Fedora] Fedora Reporter: Neal Gompa <ngompa13>
Component: Package ReviewAssignee: Michel Lind <michel>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: michel, package-review
Target Milestone: ---Flags: michel: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-11 00:26:41 UTC Type: ---
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:    
Bug Blocks: 2031268    

Description Neal Gompa 2022-01-28 04:32:39 UTC
Spec URL: https://ngompa.fedorapeople.org/for-review/LibRaw-epel.spec
SRPM URL: https://ngompa.fedorapeople.org/for-review/LibRaw-epel-0.20.2-0.el9.6.src.rpm

Description:
LibRaw is a library for reading RAW files obtained from digital photo
cameras (CRW/CR2, NEF, RAF, DNG, and others).

LibRaw is based on the source codes of the dcraw utility, where part of
drawbacks have already been eliminated and part will be fixed in future.

This is a limited architecture build of LibRaw for EPEL for non-x86 architectures.

Fedora Account System Username: ngompa

Comment 1 Michel Lind 2022-01-28 05:08:40 UTC
Taking this review. note: final approval pending per result of this discussion https://pagure.io/epel/issue/152

basically the issues are:
- is this allowed for EPEL 9 given https://docs.fedoraproject.org/en-US/epel/epel-packaging/#limited_arch_packages says this is allowed for EPEL 7 but not EPEL 8 (and the new policy in https://pagure.io/epel/issue/134 of using a different, not the same, srpm name, could potentially address the issue blocking EPEL 8 anyway)
- if so, should this be an `-epel` or an `-extras`? If the former, that means there are some `-epel` packages that are long lived, given LibRaw was excluded from aarch64 (let alone other more esoteric architectures) in RHEL 8 and is still excluded for RHEL 9.

Apart from that, the spec very closely matches that of the original CentOS Stream 9 package, as seen below:

```
michel in fedora in LibRaw on  c9s
❯ diff -u LibRaw.spec ~/src/fedora/reviews/2047560-LibRaw-epel/srpm-unpacked/LibRaw-epel.spec
--- LibRaw.spec 2022-01-27 20:59:40.573832972 -0800
+++ /home/michel/src/fedora/reviews/2047560-LibRaw-epel/srpm-unpacked/LibRaw-epel.spec  2022-01-27 20:28:49.000000000 -0800
@@ -4,10 +4,14 @@
 %global samples 1
 %endif

+%global origname LibRaw
+
+%global baserelease 6
+
 Summary: Library for reading RAW files obtained from digital photo cameras
-Name: LibRaw
+Name: %{origname}-epel
 Version: 0.20.2
-Release: 5%{?dist}
+Release: 0%{?dist}.%{baserelease}
 License: BSD and LGPLv2
 URL: http://www.libraw.org

@@ -18,9 +22,12 @@
 BuildRequires: autoconf automake libtool
 BuildRequires: make

-Source0: http://github.com/LibRaw/LibRaw/archive/%{version}.tar.gz
+Source0: http://github.com/LibRaw/LibRaw/archive/%{version}/%{origname}-%{version}.tar.gz
 Patch0: LibRaw-pkgconfig.patch
-Provides: bundled(dcraw) = 9.25
+
+# This is only for non-x86 architectures
+# Cf. https://bugzilla.redhat.com/show_bug.cgi?id=2012272
+ExcludeArch: %{ix86} x86_64

 %description
 LibRaw is a library for reading RAW files obtained from digital photo
@@ -29,32 +36,43 @@
 LibRaw is based on the source codes of the dcraw utility, where part of
 drawbacks have already been eliminated and part will be fixed in future.

-%package devel
+%package -n %{origname}
+Summary: Library for reading RAW files obtained from digital photo cameras
+Provides: bundled(dcraw) = 9.25
+
+%description -n %{origname}
+LibRaw is a library for reading RAW files obtained from digital photo
+cameras (CRW/CR2, NEF, RAF, DNG, and others).
+
+LibRaw is based on the source codes of the dcraw utility, where part of
+drawbacks have already been eliminated and part will be fixed in future.
+
+%package -n %{origname}-devel
 Summary: LibRaw development libraries
-Requires:   %{name}%{?_isa} = %{version}-%{release}
+Requires:   %{origname}%{?_isa} = %{version}-%{release}

-%description devel
+%description -n %{origname}-devel
 LibRaw development libraries.

 This package contains libraries that applications can use to build
 against LibRaw.

-%package static
+%package -n %{origname}-static
 Summary: LibRaw static development libraries
-Requires: %{name}-devel%{?_isa} = %{version}-%{release}
+Requires: %{origname}-devel%{?_isa} = %{version}-%{release}

-%description static
+%description -n %{origname}-static
 LibRaw static development libraries.

-%package samples
+%package -n %{origname}-samples
 Summary: LibRaw sample programs
-Requires: %{name} = %{version}-%{release}
+Requires: %{origname} = %{version}-%{release}

-%description samples
+%description -n %{origname}-samples
 LibRaw sample programs

 %prep
-%autosetup -p1 -n %{name}-%{version}
+%autosetup -p1 -n %{origname}-%{version}

 %build
 autoreconf -if
@@ -85,19 +103,19 @@

 rm -fv %{buildroot}%{_libdir}/lib*.la

-%ldconfig_scriptlets
+%ldconfig_scriptlets -n %{origname}

-%files
+%files -n %{origname}
 %doc Changelog.txt
 %license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
 %{_libdir}/libraw.so.20*
 %{_libdir}/libraw_r.so.20*

-%files static
+%files -n %{origname}-static
 %{_libdir}/libraw.a
 %{_libdir}/libraw_r.a

-%files devel
+%files -n %{origname}-devel
 %doc manual
 %doc samples
 %{_includedir}/libraw/
@@ -108,12 +126,15 @@
 %exclude %{_docdir}/libraw/*

 %if 0%{?samples}
-%files samples
+%files -n %{origname}-samples
 %{_bindir}/*
 %endif


 %changelog
+* Fri Jan 28 2022 Neal Gompa <ngompa> - 0.20.2-0.6
+- Build for non-x86 arches in EPEL
+
 * Mon Dec 13 2021 Debarshi Ray <rishi> - 0.20.2-5
 - CDDL is not an approved license
 Resolves: #2031918

michel in fedora in LibRaw on  c9s
❯ diff -u LibRaw-pkgconfig.patch ~/src/fedora/reviews/2047560-LibRaw-epel/srpm-unpacked/LibRaw-pkgconfig.patch

michel in fedora in LibRaw on  c9s
❯
```

Comment 2 Neal Gompa 2022-02-09 22:44:41 UTC
I've refreshed it based on the discussion from the EPEL meeting today. Same URLs for the spec and SRPM.

Comment 3 Michel Lind 2022-02-10 05:06:53 UTC
This looks good, APPROVED

I think you can relax the dependency on the original main package if you want (depending only on NV, not NV(orig)R), but this works too, it just involves a bit more rebuilds.

Comment 4 Gwyn Ciesla 2022-02-10 14:47:37 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/LibRaw-epel

Comment 5 Fedora Update System 2022-02-10 17:01:15 UTC
FEDORA-EPEL-2022-f989fe200c has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-f989fe200c

Comment 6 Fedora Update System 2022-02-11 00:26:41 UTC
FEDORA-EPEL-2022-f989fe200c has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.