Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

mass-prebuild: An open source journey of improvement and growth

The evolution from alpha to GCC 14 and beyond

February 20, 2024
Frédéric Bérat
Related topics:
LinuxOpen sourcePython
Related products:
Red Hat Enterprise Linux

Share:

    Welcome back to our blog series about the evolution of mass-prebuild. In our first post in 2022, we introduced this powerful open source tool designed for streamlining package builds across multiple architectures and Linux distributions. This article continues that journey, exploring how mass-prebuild has been continually refined, improved, and grown in response to user feedback and technological advancements. We will dive into specific updates that have shaped the tool over time, highlight its significant role in improving the stability of essential packages like Autoconf and GCC, and showcase its impact on the open source community. Fasten your seat belts for a comprehensive look at mass-prebuild's progress and future prospects!

    Recap: What is mass-prebuild?

    Need a summary of the previous blog? OK, here is a short version. The Mass Prebuilder (MPB) is a set of tools aimed to help the user to create mass rebuilds around a limited set of packages, in order to assess the stability of a given update.

    The way it works is fairly simple. Once you have it installed through its COPR repository, you can create a simple configuration file as follows:

    $> cat > my_config << EOF
    packages:
      glibc:
        src_type: file
        src: glibc-2.40.9000-16.fc41.src.rpm
    EOF

    And then execute `mpb -c my_config`; this will automatically rebuild the corresponding component in a dedicated COPR project, calculate the list of packages that depend on this component, and rebuild them against the new build. If they fail, these failed packages are rebuilt against the version of the component that was already available in the distribution, and give a report about failures that are likely due to the new version that way. By default, this will happen for x86_64, on Fedora Rawhide, unless specified otherwise.

    A long version of this is available in the Git repository.

    Navigating the path to stability: The early days of mass-prebuild

    August–November 2022

    In this section, we delve into mass-prebuild's initial journey, from its first release as a more stable alpha version to the improvements that paved the way for further refinements. Despite lingering bugs and heavy development, the tool quickly gained essential functionalities such as enabling GitLab CI support, handling reverse dependencies, and refining error tracking. As the project progressed, developers focused on addressing user issues and improving functionality. Reverse dependency calculations were enhanced to accommodate virtual packages and runtime dependencies, while support for non-public COPR and Koji instances was introduced. The introduction of scripts aiding in user-specific repositories configurations and handling failed package lists marked significant strides toward enhancing the overall user experience during this phase.

    It is now possible to provide sub-packages in the configuration. The following configuration would rebuild packages that depend on the gcc-gnat package only, instead of all the packages that depend on GCC:

    packages:
      gcc-gnat:
        committish: '@last_build'

    The `@last_build` ensures that the package is rebuilt from a known state. The mass-prebuild tool will ask Koji what is the commit hash of the latest known buildable version of the package for a given Fedora release.

    It is also possible to provide groups. The following configuration would rebuild the packages listed in the `anaconda-tools` group:

    packages:
      '@anaconda-tools':
        committish: '@last_build'

    The end of this early period was marked by the release of GCC13 in Fedora and initial attempts from the community to release Autoconf 2.72, both of which were crucial for testing mass-prebuild's capabilities. As the tool played a vital role in assessing these components' stability, it paved the way for new features that would greatly enhance its potential.

    That led to the support for COPR specific configurations. If need be, one may specify another COPR repository where some packages may already have been built:

    packages:
      gcc:
        deps_only: True
    copr:
      additional_repos:
        - copr://fberat/gcc-14_smoketest

    With such a configuration, instead of wasting time in rebuilding GCC, the one already available in the `gcc-14_smoketest` project would be used. That is also in this period that the tool moved from a personal GitLab repository to its new location: https://gitlab.com/fedora/packager-tools/mass-prebuild

    Expanding horizons, accelerating growth: Innovations and upgrades

    December 2022–March 2023

    In this phase of development, mass-prebuild underwent significant changes with an emphasis on improving user experience. Notable additions included dynamic retry on failure, package rebuild capabilities, support for generating man-pages from AsciiDoc files, a report utility, and autocomplete in Bash/Tsh environments. The v1.0.0 release marked a milestone as most major features originally required had been implemented, solidifying mass-prebuild's place as an essential tool for streamlining package builds across multiple architectures on Fedora and RHEL distributions.

    There may be some cases where you know that the build order of some packages is important for them to succeed, but don't know what is the exact order that is needed. That's when the dynamic retry feature comes handy:

    packages:
      gcc:
    deps_only: True
    retry: dynamic

    This will build the packages that depend on GCC, and then automatically rebuild all failed packages, until there is no more successful build twice in a row. That way, if some failures were due to some package needing other packages in the list to be rebuilt, they wouldn't be marked as failed unless they really could not be built.

    Bug fixes, enhancements, and new features: The continued evolution

    July–December 2023

    In this chapter of development, the focus was on refining and strengthening mass-prebuild. From v1.1.0 to v1.3.1, updates included support for the `copr.ownername` key in configuration files, eliminating duplicates from package groups, setting checker default values, storing full paths in the `src` directory, new tests for the mock backend, and continuous integration speedups for CLI tests. Notable releases during this time included substantial additions such as updates to the mock backend, remote mock backend, and daemonize option, which enabled users to build packages more efficiently and with greater control over their build environments. Although these updates mainly consisted of bug fixes, minor improvements, and tweaks, they all contributed significantly to maintaining a high level of performance and reliability in the mass-prebuild project.

    If thousands of packages depend on your component, you may not want to rebuild all of them to have a first glance on whether an update would be stable enough. In this case, rebuilding a random sample of packages, in addition to a specific list of critical packages may be what you need. Here is an example with a sample of 500 packages:

    packages:
      gcc:
        deps_only: True
    revdeps:
      sample: 500
      append:
        rpm:
          committish: '@last_build'
        mock:
          committish: '@last_build'
        kernel:
          committish: '@last_build'
        firefox:
          committish: '@last_build'
        anaconda:
          committish: '@last_build'
    copr:
      additional_repos:
    - copr://fberat/gcc-14_smoketest

    A milestone with GCC 14: Uncovering critical issues through comprehensive rebuilds

    As a recent milestone in mass-prebuild's journey it was used with GCC 14 to assess the compiler’s performance and stability across multiple platforms. This testing process took place during the integration of GCC 14 into Fedora 40, which began in December and continued through January as the team prepared for the Fedora 40 mass rebuild.

    By rebuilding a random subset of 500 and 1,000 packages initially, developers were able to identify any critical failures that needed immediate attention. Once these initial tests proved successful, all 9,000 packages were rebuilt on all architectures, revealing issues in both GCC pre-release versions like the aarch64 critical failures, as well as problems in around 300 components. As a result of this rigorous testing process, GCC 14 was improved ahead of its integration into Fedora 40, which ultimately contributed to enhancing the stability and quality of the release.

    Future directions

    Throughout its remarkable evolution, mass-prebuild has become an indispensable tool to assess the stability of a given component update. By incorporating numerous improvements, updates, bug fixes, and new features, it has solidified its position as a vital resource within the open-source community. Yet, there will be some improvement coming for the tool. An example of this is the backends. The mass-prebuild currently supports COPR and mock for the builds, support for Koji is still not yet integrated and will be part of a future release.

    Join us on this ongoing journey of progress by using mass-prebuild for your own package build requirements or contributing to its development as part of our vibrant open source community. Together, we can continue shaping and improving this powerful tool while fostering collaboration and innovation within the wider ecosystem.

    Related Posts

    • Find errors in packages through mass builds

    • How to install multiple versions of Python on Red Hat Enterprise Linux

    • How to install Python Flask on Red Hat Enterprise Linux 7

    • An introduction to Linux bridging commands and features

    • What's inside an RPM .repo file?

    • Moving from apt to dnf package management

    Recent Posts

    • GuideLLM: Evaluate LLM deployments for real-world inference

    • Unleashing multimodal magic with RamaLama

    • Integrate Red Hat AI Inference Server & LangChain in agentic workflows

    • Streamline multi-cloud operations with Ansible and ServiceNow

    • Automate dynamic application security testing with RapiDAST

    What’s up next?

    Red Hat Insights API

    Find out how to get actionable intelligence using Red Hat Insights APIs so you can identify and address operational and vulnerability risks in your Red Hat Enterprise Linux environments before an issue results in downtime.

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue