how to build rpm videos
-
- 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 %description Pull nightly data backups and weekly configuration files from QRadar master. Clean up is carried out weekly %prep %autosetup %install mkdir -p "$RPM_BUILD_ROOT" cp -R * "$RPM_BUILD_ROOT" %clean rm -rf "$RPM_BUILD_ROOT" %files %defattr(-,root,root,-) /usr/local/bin/backup_pull /usr/local/bin/cleanup /usr/local/etc/config %changelog * Mon Oct 22 2018 rpmbuild
-
- build rpm
cd $HOME rpmbuild -v -bb rpmbuild/SPECS/tuprepo.spec