This is a walkthrough to manually build the install files for auter. This is not the release process, this is specifically for building the .rpm or .deb files for testing purposes.
Better way of generating the files:
- Install docker-ce on your PC
- from the auter directory execute the following:
- For rpm file:
# tests/10-rpmbuild.sh
- For deb file (This is only once PR#119 has been merged):
# 20-debuild.sh
- For rpm file:
Steps to create a .deb file:
-
Build a debian 9 cloud server
-
Update the system and reboot:
# apt-get update && apt-get upgrade # reboot
-
Install the required tools:
# apt-get update && apt install debhelper devscripts build-essential vim dh-make help2man
-
Create a build user and switch to that account notes:
- "adduser" NOT "useradd"
- Use a valid password
- Other details can be blanks
# adduser builder # su - builder
- Clone the auter repo and switch to the required tagged version:
# git clone [email protected]:rackerlabs/auter.git # cd auter # git checkout <TAG> eg: git checkout 0.11
- Make the sources files
# make deb # cd auter-<TAG>
- build the package:
7.a) To build an unsigned package:
7.b) To build a gpg signed package:
# debuild -us -uc
# debuild -S -sa -k$(gpg --list-key --with-colons | awk -F: '/^pub:/ { print $5 }')
Steps to create a .rpm file:
-
Build a CentOS cloud server (6 or 7)
-
Install the required packages:
yum -y install rpm-build elfutils-libelf rpm-libs rpm-python gcc make help2man sudo
-
Add a build user:
useradd builduser
-
Make the build directories:
mkdir -p /home/builduser/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
-
Create the .macros config:
echo '%_topdir %(echo $HOME)/rpmbuild' > /home/builduser/.rpmmacros
-
Clone the auter repo and switch to the required tagged version:
# git clone [email protected]:rackerlabs/auter.git # cd auter # git checkout <TAG> eg: git checkout 0.11
-
Make the sources files and copy them to /home/builduser:
make sources cp auter-*.tar.gz /home/builduser/ cp auter.spec /home/builduser/rpmbuild/SPECS chown -R builduser.builduser /home/builduser
-
Switch to the builduser account and extract the sources
su - builduser cd /home/builduser
-
Move the sources into the correct location with the correct sources name
mv auter*.tar.gz /home/builduser/rpmbuild/SOURCES/$(awk '/Version/ {print $2}' /home/builduser/rpmbuild/SPECS/auter.spec).tar.gz
-
Start building the rpm
cd /home/builduser/rpmbuild/SPECS rpmbuild -ba auter.spec