fix packaging with docker and its documentation

- pbr was not installed, but is now required.
- clean .eggs directory
- update packaging doc for CentOS

Sem-Ver: bugfix
Change-Id: I6a1ec486847a28f76283b8acb96c56af6a5e4e4c
This commit is contained in:
Vincent Llorens 2016-10-25 11:56:15 +02:00
parent b75d85315c
commit cc9eaff9b5
4 changed files with 12 additions and 7 deletions

View File

@ -92,20 +92,24 @@ Packaging for CentOS
- rpm-build
- python-devel
- python-setuptools
- git-core
- centos-release-openstack-liberty
2. Setup your rpmbuild environment if not already done.
2. Update your packages with `yum update` and then install `python-pbr`.
3. Setup your rpmbuild environment if not already done.
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
3. Move `synergy-service/packaging/rpm/python-synergy.spec` to
4. Move `synergy-service/packaging/rpm/python-synergy.spec` to
`~/rpmbuild/SPECS`.
4. Create a source archive (where $VERSION is the current synergy-service version):
5. Create a source archive (where $VERSION is the current synergy-service version):
cd ~/rpmbuild/SOURCES
cp -r /path/to/synergy-service python-synergy-service-$VERSION
tar cjf python-synergy-service-$VERSION.tar.bz2 python-synergy-service-$VERSION
5. Go in `~/rpmbuild/SPECS` and build with `PBR_VERSION=$VERSION rpmbuild -ba python-synergy.spec`.
6. Go in `~/rpmbuild/SPECS` and build with `PBR_VERSION=$VERSION rpmbuild -ba python-synergy.spec`.
6. The resulting RPM can be found in `~/rpmbuild/RPMS/noarch`.
7. The resulting RPM can be found in `~/rpmbuild/RPMS/noarch`.

View File

@ -6,6 +6,7 @@ RUN yum install -y centos-release-openstack-liberty \
python-setuptools \
git-core \
&& yum update -y
RUN yum install -y python-pbr # Needs centos-release-openstack-* to be installed first
RUN mkdir /tmp/synergy-service
RUN useradd -m -p pkger pkger
USER pkger

View File

@ -13,7 +13,7 @@ function setup() {
mkdir -p /home/pkger/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
cd $RPMBUILD/SOURCES/
cp -r $PKG_DIR python-synergy-service-$PKG_VERSION
rm -r python-synergy-service-$PKG_VERSION/{.tox,.testrepository,build,dist} || true
rm -r python-synergy-service-$PKG_VERSION/{.eggs,.tox,.testrepository,build,dist} || true
tar cjf python-synergy-service-${PKG_VERSION}.tar.bz2 python-synergy-service-$PKG_VERSION
cp $PKG_DIR/packaging/rpm/python-synergy.spec $RPMBUILD/SPECS/python-synergy.spec
}

View File

@ -6,7 +6,7 @@ PKG_DIR=/tmp/synergy-service
function copy_source() {
cd /home/pkger
cp -r $PKG_DIR python-synergy-service
rm -r python-synergy-service/{.tox,.testrepository,build,dist} || true
rm -r python-synergy-service/{.eggs,.tox,.testrepository,build,dist} || true
}
function get_version() {