#23 Simplify naming
Closed 3 years ago by kwizart. Opened 4 years ago by kwizart.
rpms/ kwizart/chromium simplify-name  into  rawhide

file modified
+10 -19
@@ -177,11 +177,7 @@ 

  

  %global majorversion 77

  

- %if %{freeworld}

- Name:		chromium%{chromium_channel}%{?freeworld:-freeworld}

- %else

  Name:		chromium%{chromium_channel}

- %endif

  Version:	%{majorversion}.0.3865.90

  Release:	1%{?dist}

  Summary:	A WebKit (Blink) powered web browser
@@ -607,9 +603,16 @@ 

  Provides:	webrtc = 0.2

  Obsoletes:	webrtc <= 0.1

  %if 0%{?shared}

+ %if 0%{?freeworld}

+ # chromium-libs-media-freeworld case

+ Requires(post): %{_sbindir}/update-alternatives

+ Requires(preun): %{_sbindir}/update-alternatives

+ %else

+ # chromium case with shared libs

  Requires:       chromium-libs%{_isa} = %{version}-%{release}

  # This is broken out so it can be replaced.

  Requires:	chromium-libs-media%{_isa} = %{version}-%{release}

+ %endif

  # Nothing to do here. chromium-libs is real.

  %else

  Provides:	chromium-libs = %{version}-%{release}
@@ -743,21 +746,7 @@ 

  %description libs

  Shared libraries used by chromium (and chrome-remote-desktop).

  

- %if %{freeworld}

- %package -n chromium-libs-media-freeworld

- Summary: Chromium media libraries built with all possible codecs

- Provides: chromium-libs-media = %{version}-%{release}

- Provides: chromium-libs-media%{_isa} = %{version}-%{release}

- Requires: chromium-libs%{_isa} = %{version}

- Requires(post): %{_sbindir}/update-alternatives

- Requires(preun): %{_sbindir}/update-alternatives

- 

- %description -n chromium-libs-media-freeworld

- Chromium media libraries built with all possible codecs. Chromium is an

- open-source web browser, powered by WebKit (Blink). This package replaces

- the default chromium-libs-media package, which is limited in what it

- can include.

- %else

+ %if ! %{freeworld}

  %package libs-media

  Summary: Shared libraries used by the chromium media subsystem

  Requires: chromium-libs%{_isa} = %{version}
@@ -1683,6 +1672,7 @@ 

    os.remove(path)

  end

  

+ %if %{shared}

  %if %{freeworld}

  %posttrans -n chromium-libs-media-freeworld

  %{_sbindir}/update-alternatives --install \
@@ -1718,6 +1708,7 @@ 

      %{_libdir}/chromium-browser/libffmpeg.so.fedora

  fi

  %endif

+ %endif

  

  %pre -n chrome-remote-desktop

  getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-desktop

default is to build chromium in fedora

if we are building freeworld without shared
-> chromium-freeworld

If we are building freeworld with shared
as currently provided by rpmfusion:
-> chromium-libs-media-freeworld

rebased onto ec46a32dc513c5934236826ee27468e1543475e3

4 years ago

1 new commit added

  • Fix default freeworld package name
4 years ago

I don't think the failure is my fault.
Can this serie be merged?

The last simple-koji-ci is probably a random issue on aarch64 builders.

1 new commit added

  • When not building shared alternatives is not relevant
4 years ago

rebased onto ff72b93

4 years ago

This patchset looks incorrect to me. A couple of points:

1) We don't really build without %{shared}, ever. I'm not sure if it works. At a minimum, there would need to be a lot more conditionalization, because we'd have to build chrome-remote-desktop and chromium-headless differently (or not at all).
2) I do not believe that chromium-libs-media-freeworld ever gets generated with this change.

Hi spot

Thx for looking into.

1/Agreed that building non-shared is lazyly tested, I only foresee to use it for an armhfp build eventually. At least this is a step in the direction.

2/ We are building it that way currently. It's just that we already rename the spec file as a specific change in our side, so we also change the Name field as appropriate.
I don't see much value to have it handled with a condition on fedora side...

The idea behind the %freeworld conditional was to have that be the only necessary change. I understand why you're renaming the spec file, but I still think leaving the naming conditions in place makes sense.

Would you be able to merge the commits exept "Simplify naming" ?

The main issue I have with the Current way the Name directive is set is that the following doesn't work for every cases as appropriate:
Name: chromium%{chromium_channel}%{?freeworld:%{?shared:-libs-media}-freeworld}

That's because the way "macros defined to 0" are evaluated in the macron condition ("%{?").
This leaded the koshi task to submit a fedora build named: chromium-libs-media-freeworld without evaluating the freeworld condition to true in the rest of the spec file.

I've reworked the PRs to have the #24 without the simplify naming and the #25 with a new attempt to Simplify the naming by moving building the conditions earlier. So the Name directive is used only once and is constructed with appropriate variables.

ALso I found that the shared condition in the spec has two meaning:
1- build a shared sub-package
2- build chromium with shared libraries.

I think I might come with a patch that unlink the two. That would be needed to build a "monolithic" package freeworld enabled but that would still built the internal libraries as shared.
The main use I see is to maintain an armhfp build...

Pull-Request has been closed by kwizart

3 years ago