Skip to content

Instantly share code, notes, and snippets.

@jwliechty
Created November 18, 2014 17:26
Show Gist options
  • Save jwliechty/a5d2b7224765efd7eb3f to your computer and use it in GitHub Desktop.
Save jwliechty/a5d2b7224765efd7eb3f to your computer and use it in GitHub Desktop.
Building RPMs
# install tools for working with RPMs
sudo yum groupinstall "Development Tools"
sudo yum install rpmlint rpmdevtools yum-utils
# add a Centos source repository
cat <<EOF | sudo tee /etc/yum.repos.d/srpm.repo >/dev/null
[centos-source]
name=Centos Vault $releasever - $basearch - Source
baseurl=http://vault.centos.org/6.3/os/Source
enabled=1
gpgcheck=0
EOF
# Download and extract source RPMS
sudo yumdownloader --source httpd
rpm2cpio httpd-2.2.15-15.el6.centos.1.src.rpm | cpio -idmv
# Build an RPM and check with RPM lint
rpmbuild -bb indigo-certifiers.spec
rpmlint -i indigo-certifiers.spec ../RPMS/noarch/*.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment