how to build rpm videos

  • urban pengiun
    • distributing new repo file
    • create new 'build' account
    • run rpmdev-setuptree
      • creates 'rpmbuild' dir structure
    • create SOURCES dir structure
        cd ~/rpmbuild/SOURCES/
        mkdir tuprepo-1/etc/yum.repos.d

      'tuprepo-1' is name and version number

    • copy across repo file
        cp /tmp/CentOS-Tup.repo !$

      use '!$' for last arg

    • tar zip dir
        tar -cvzf tuprepo-1.tar.gz tuprepo-1/
    • create spec file
        cd ../SPECS/
        rpmdev-newspec tuprepo.spec
        vi tuprepo.spec
      • spec file details
          Name:           qradar_bak                                                                                                      
          Version:        1
          Release:        1%{?dist}
          Summary:        Pull backup data and configuration files for QRadar
          License:        GPL
          URL:            https://www.ward.ie
          Source0:        qradar_bak-1.tgz
          BuildRoot:      %{_tmppath}/%{name}-buildroot
          Pull nightly data backups and weekly configuration files from QRadar master.
          Clean up is carried out weekly
          mkdir -p "$RPM_BUILD_ROOT"
          cp -R * "$RPM_BUILD_ROOT"
          rm -rf "$RPM_BUILD_ROOT"
          * Mon Oct 22 2018 rpmbuild
    • build rpm
        cd $HOME
        rpmbuild -v -bb rpmbuild/SPECS/tuprepo.spec


  • :1: https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/index.html
  • :2: https://rpm-packaging-guide.github.io/
  • :3: https://www.youtube.com/watch?v=364Plv6zuBU