Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

How to add a new package to RHSCL perl516 for RHEL

April 11, 2014
Jitka Plesnikova
Related topics:
Linux
Related products:
Red Hat Enterprise Linux

    The Red Hat Software Collection (RHSCL) perl516 contains only a part of the packages which are packaged in RHEL or Fedora. It is not hard to add a new package to RHSCL. The following steps show how to convert a conventional spec file into a Software Collection spec file. The SCL spec file can then be used in both the conventional package and the Software Collection. We will use perl-Pod-Perldoc is used for an example.

    Before you start, spec2scl rpm has to be installed.

    Run the following command to convert rpm specfile to be SCL ready:

    spec2scl perl-Pod-Perldoc.spec < perl-Pod-Perldoc.spec.scl

    Then the list of dependencies have to be checked:

      • Remove %{scl_prefix} from all non-perl BuildRequires/Requires.
    @@ -20,3 +20,3 @@
    # Pod::Perldoc::ToMan executes roff
    -BuildRequires: %{?scl_prefix}groff-base
    +BuildRequires: groff-base
    BuildRequires: %{?scl_prefix}perl(Carp)
    @@ -56,3 +56,3 @@
    # Pod::Perldoc::ToMan executes roff
    -Requires: %{?scl_prefix}groff-base
    +Requires: groff-base
    Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
      • Use conditions if required is provided by different packages on RHEL 6 or 7 Beta.
    @@ -20,3 +20,7 @@
    # Pod::Perldoc::ToMan executes roff
    +%if 0%{?rhel} && 0%{?rhel} < 7
    +BuildRequires: groff
    +%else
    BuildRequires: groff-base
    +%endif
    BuildRequires: %{?scl_prefix}perl(Carp)
    @@ -56,3 +60,7 @@
    # Pod::Perldoc::ToMan executes roff
    +%if 0%{?rhel} && 0%{?rhel} < 7
    +Requires: groff
    +%else
    Requires: groff-base
    +%endif
    Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
      • Update getting of value for Requirement: perl(MODULE_COMPAT_<version>).
    @@ -65,3 +65,3 @@
    %endif
    -Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
    +Requires: %{?scl_prefix}perl(:MODULE_COMPAT_%(%{?scl:scl enable %{scl} '}eval "`perl -V:version`"; echo $version%{?scl:'}))
    Requires: %{?scl_prefix}perl(Encode)
      • If there are any filters of Provides or Requires valid for rpm >= 4.9, then also add a filter which works for rpm < 4.9 to be able to build properly for rpm on RHEL 6.
    @@ -82,6 +82,11 @@
    # Remove underspecified dependencies
    %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\(Pod::Man|Pod::Simple::XMLOutStream|Pod::Simple::RTF\)\s*$
    
    +%if ( 0%{?rhel} && 0%{?rhel} < 7 )
    +%filter_from_requires /perl((Pod::Man|Pod::Simple::XMLOutStream|Pod::Simple::RTF))s*$/d
    +%filter_setup
    +%endif
    +
    %description
    perldoc looks up a piece of documentation in .pod format that is embedded
    in the perl installation tree or in a perl script, and displays it via

    NOTE:

      • The macro

    %{perl_default_filter}

      • works for both RHEL6 and 7 Beta.

         

      • Increase Release and update the Changelog.
    @@ -6,5 +6,5 @@
    # let's overwrite the module from perl.srpm
    Version: %(echo '%{cpan_version}' | sed 's/_/./')
    -Release: 1%{?dist}
    +Release: 2%{?dist}
    Summary: Look up Perl documentation in Pod format
    License: GPL+ or Artistic
    @@ -125,4 +125,7 @@
    
    %changelog
    +* Thu Mar 27 2014 Jitka Plesnikova &lt;jplesnik@redhat.com&gt; - 3.21-2
    +- Initial import to SCL
    +
    * Mon Jan 06 2014 Petr Pisar &lt;ppisar@redhat.com&gt; - 3.21-1
    - 3.21 bump

    All spec files used in this post are placed here.

    Now, if you find RHSCL is missing your build-requires and run-requires, you should be able to build a new rpm.

    More information about RHSCL can be found at Software Collections Guide.

    Last updated: November 2, 2023

    Recent Posts

    • MPI-powered gradient synchronization in PyTorch distributed training

    • llama.cpp vs. vLLM: Choosing the right local LLM inference engine

    • How speculative decoding delivers faster LLM inference

    • What's New in Red Hat Developer Hub 1.10?

    • Model-as-a-Service: How to run your own private AI API

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.