#301 Add Toolbx subpackages
Merged 4 months ago by sgallagh. Opened 4 months ago by rishi.
rpms/ rishi/fedora-release wip/rishi/toolbx  into  rawhide

file modified
+57
@@ -1,3 +1,4 @@ 

+ 

  %define release_name Rawhide

  %define is_rawhide 1

  
@@ -37,6 +38,7 @@ 

  %bcond_with kinoite

  %bcond_with snappy

  %bcond_with soas

+ %bcond_with toolbx

  %bcond_with workstation

  %bcond_with xfce

  %bcond_with i3
@@ -63,6 +65,7 @@ 

  %bcond_without kinoite

  %bcond_without snappy

  %bcond_without soas

+ %bcond_without toolbx

  %bcond_without workstation

  %bcond_without xfce

  %bcond_without i3
@@ -827,6 +830,42 @@ 

  %endif

  

  

+ %if %{with toolbx}

+ %package toolbx

+ Summary:        Base package for Fedora Toolbx container specific default configurations

+ 

+ RemovePathPostfixes: .toolbx

+ Provides:       fedora-release = %{version}-%{release}

+ Provides:       fedora-release-variant = %{version}-%{release}

+ Provides:       system-release

+ Provides:       system-release(%{version})

+ Requires:       fedora-release-common = %{version}-%{release}

+ 

+ # fedora-release-common Requires: fedora-release-identity, so at least one

+ # package must provide it. This Recommends: pulls in

+ # fedora-release-identity-toolbx if nothing else is already doing so.

+ Recommends:     fedora-release-identity-toolbx

+ 

+ 

+ %description toolbx

+ Provides a base package for Fedora Toolbx container specific configuration files to

+ depend on as well as Toolbx container system defaults.

+ 

+ 

+ %package identity-toolbx

+ Summary:        Package providing the identity for Fedora Toolbx container image

+ 

+ RemovePathPostfixes: .toolbx

+ Provides:       fedora-release-identity = %{version}-%{release}

+ Conflicts:      fedora-release-identity

+ Requires(meta): fedora-release-toolbx = %{version}-%{release}

+ 

+ 

+ %description identity-toolbx

+ Provides the necessary files for a Fedora installation that is identifying

+ itself as the Fedora Toolbx container image.

+ %endif

+ 

  %if %{with workstation}

  %package workstation

  Summary:        Base package for Fedora Workstation-specific default configurations
@@ -1444,6 +1483,16 @@ 

  sed -e "s#\$version#%{bug_version}#g" -e 's/$edition/Sugar/;s/<!--.*-->//;/^$/d' %{SOURCE20} > %{buildroot}%{_swidtagdir}/org.fedoraproject.Fedora-edition.swidtag.soas

  %endif

  

+ %if %{with toolbx}

+ # Toolbx

+ cp -p os-release \

+       %{buildroot}%{_prefix}/lib/os-release.toolbx

+ echo "VARIANT=\"Toolbx Container Image\"" >> %{buildroot}%{_prefix}/lib/os-release.toolbx

+ echo "VARIANT_ID=toolbx" >> %{buildroot}%{_prefix}/lib/os-release.toolbx

+ sed -i -e "s|(%{release_name}%{?prerelease})|(Toolbx Container Image%{?prerelease})|g" %{buildroot}%{_prefix}/lib/os-release.toolbx

+ sed -e "s#\$version#%{bug_version}#g" -e 's/$edition/Toolbx/;s/<!--.*-->//;/^$/d' %{SOURCE20} > %{buildroot}%{_swidtagdir}/org.fedoraproject.Fedora-edition.swidtag.toolbx

+ %endif

+ 

  %if %{with workstation}

  # Workstation

  cp -p os-release \
@@ -1778,6 +1827,14 @@ 

  %endif

  

  

+ %if %{with toolbx}

+ %files toolbx

+ %files identity-toolbx

+ %{_prefix}/lib/os-release.toolbx

+ %attr(0644,root,root) %{_swidtagdir}/org.fedoraproject.Fedora-edition.swidtag.toolbx

+ %endif

+ 

+ 

  %if %{with workstation}

  %files workstation

  %files identity-workstation

These are meant to distinguish OCI containers and images that are
designed specifically for Toolbx from others. Toolbx containers are
long-lasting pet containers for interactive command line use, which
makes them substantially different from short-lived containers running
services.

Therefore, it can be useful to be able to identify Toolbx containers and
images when generating statistics about Fedora usage.

https://pagure.io/Fedora-Council/tickets/issue/449

rebased onto 6bb4b2c

4 months ago

I don't know if I got it right.

So far, I cargo-culted the container subpackages, did a scratch build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=113050112

... swapped the packages in a fedora-toolbox:40 container and checked if /usr/lib/os-release and /usr/lib/swidtag/fedoraproject.org/org.fedoraproject.Fedora-edition.swidtag came out sane.

I also don't know if it's too late for Fedora 40. If so, it's fine to land it only for Fedora 41 once it has been branched.

/usr/lib/os-release:

NAME="Fedora Linux"
VERSION="40 (Toolbx Container Image Prerelease)"
ID=fedora
VERSION_ID=40
VERSION_CODENAME=""
PLATFORM_ID="platform:f40"
PRETTY_NAME="Fedora Linux 40 (Toolbx Container Image Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:40"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
SUPPORT_END=2025-05-13
VARIANT="Toolbx Container Image"
VARIANT_ID=toolbx

/usr/lib/swidtag/fedoraproject.org/org.fedoraproject.Fedora-edition.swidtag:

<?xml version="1.0" encoding="utf-8"?>
<SoftwareIdentity
  xmlns="http://standards.iso.org/iso/19770/-2/2015/schema.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://standards.iso.org/iso/19770/-2/2015/schema.xsd http://standards.iso.org/iso/19770/-2/2015-current/schema.xsd"
  xml:lang="en-US"
  tagId="org.fedoraproject.Fedora-rawhide-Toolbx"
  tagVersion="1"
  name="Fedora"
  version="rawhide"
  versionScheme="unknown"
  supplemental="true">
  <Entity
    name="Fedora Project"
    regid="fedoraproject.org"
    role="tagCreator softwareCreator" />
  <Meta
    product="Fedora"
    colloquialVersion="rawhide"
    edition="Toolbx" />
  <Link
    rel="supplemental"
    href="swid:org.fedoraproject.Fedora-rawhide" />
</SoftwareIdentity>

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/3076aabda00e4243a1200898be239080

The rpm-install-test is failing because of conflicts between the various subpackages. That seems expected - is it?

Yes, the conflicts are a known failure and can be ignored.

The patch looks good to me. It's not too late for Fedora 40, so I'll get this merged and built right now.

Pull-Request has been merged by sgallagh

4 months ago

The patch looks good to me. It's not too late for Fedora 40, so I'll get this merged and built right now.

Wow, that was fast. Thanks!

Metadata