Skip to content

danse-inelastic/packaging-use-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configuration:
* See journal/CMakeLists.txt for an example
* Two main blocks of code needed
  - block #1
"""
# packaging with the help of docker and packagecloud
# package repository at packagecloud
set (PKGCLOUD_USERNAME "danse")
set (PKGCLOUD_REPO "ins")
# dependencies
set (DOCKER_PKGING_DEPS_DEB "danse.ins journal")
set (DOCKER_PKGING_DEPS_RPM "danse.ins journal")
set (DOCKER_PKGING_TEST_SRPM ". /opt/danse/bin/setup-danse.sh && python -c 'import pyre; print pyre'")
set (DOCKER_PKGING_TEST_RPM ${DOCKER_PKGING_TEST_SRPM})
set (DOCKER_PKGING_TEST_DEB ${DOCKER_PKGING_TEST_SRPM})
"""
  - block #2
"""
# docker folder for build and test packaging artifacts
execute_process(
  COMMAND rm -rf docker
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  )
execute_process(
  COMMAND git clone https://github.com/danse-inelastic/packaging-use-docker docker
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  )
add_subdirectory(docker)
"""


Usage:

For debian
 $ cmake ..
or
 $ cmake -D DOCKER_PKGING_DEB_DIST_NAME=ubuntu -D DOCKER_PKGING_DEB_DIST_VERSION=14.04 ..

and then
 $ make test-deb

For rpm
 $ cmake ..
or
 $ cmake -D DOCKER_PKGING_RPM_DIST_NAME=centos -D DOCKER_PKGING_RPM_DIST_VERSION=7 ..

and then
 $ make test-rpm


test-deb:
* prepare the environment for building
* make a debian package
* upload the pkg to packagecloud repository
* try install it by using the repository and run a simple test

test-rpm
* prepare the environment for building srpm
* make a srpm package
* upload the srpm pkg to packagecloud repository
* obtain srpm from repository, and run rpmbuild to create
  binary rpms
* upload binary rpms to packagecloud repo
* try install binary rpm by using the repository and run a simple test




Problems:
* rpm and deb releases are treated differently:
  - rpm: source rpm
  - deb: binary deb




Old documentation:

To build src rpm:

 $ git clone <repo>/<pkg>
 $ mkdir build
 $ cd build
 $ cmake ../<pkg>
 $ (sudo) make build-srpm

src rpm will be in docker/srpm/build/SRPMS/

Upload it to release site.

Then test the src rpm by

 $ (sudo) make test-srpm

About

A packaging utility for DANSE INS packages. Use docker and cmake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published