Table of Contents

Create an empty rpm

Overview

This is a quick todo list on how to create an empty “dummy” rpm package using command line tools. This has been done in CentOS environment but should apply to all environments where rpmbuild is available.

If rpmbuild is not available you can check if it is available with command

yum whatprovides */rpmbuild

and install it with

yum install <package>

Create a spec file

vim my-package.spec

Add contents as follows

Name:           my-package
Version:        1.1
Release:        1%{?dist}
Summary:        My package

Group:          Networking/Daemons
License:        No Licence
URL:            http://www.mysite.com

%description
This is an empty dummy package to satisfy a dependency.

%files

%changelog
* Fri Feb  1 2019 Pekka K 
- Initial release

Build the package

rpmbuild -bb my-pacckage.spec

Locate and install if needed

Package should reside in ~/rpmbuild/RPMS/x86_64/ (if using 64 bit arch) and maybe installed simply with similar command to mine

rpm -Uvh ~/rpmbuild/RPMS/x86_64/my-package-1.1.el7.x86_64.rpm

Comments

All comments and corrections are welcome.