Skip to content

Latest commit

 

History

History
149 lines (117 loc) · 4.64 KB

README.md

File metadata and controls

149 lines (117 loc) · 4.64 KB

Intro

Cookiecutter template for genetate Debian Living Atlases software packages.

Features

Automatic setup of initial debian package subdirectory and installation sample files.

Requirements

To create a debian package directory structure from this template some packages are required:

To get quickly started on a new Debian system, just run this in your shell or command prompt:

sudo apt install cookiecutter python-jinja2-time

Usage and options

Clone the ala-repo you want to debianize, for instance:

git clone git@github.com:AtlasOfLivingAustralia/ala-collectory.git

without moving to ala-collectory directory generate your debian directory for your module:

cookiecutter -f gh:living-atlases/living-atlases-debianizer

or if you want to repeat with the same answers:

cookiecutter -f --replay gh:living-atlases/living-atlases-debianizer
cookiecutter -f gh:living-atlases/living-atlases-debianizer

You will be asked for these fields:

  • maintainer_name: Debian maintainer of this package. Can be set in your ~/.cookiecutterrc config file.
  • email: Contact email of the maintainer. Can be set in your ~/.cookiecutterrc config file.
  • package: The name of the upstream ALA module.
  • source: The name of the child directory where you cloned the ALA module.
  • short_description: Some useful description for this Debian packages.
  • version: Upstream version to be initially packaged.
  • upstream_name: Name of upstream author or primary contact.
  • upstream_email: Email address of upstream author or primary contact.
  • upstream_url: URL of upstream website.
  • upstream_copyright: Copyright information of upstream project.
  • license: Upstream license (select from a list of these licenses).
  • tomcat: yes/no.
  • grails: yes/no.
  • mysql: yes/no.
  • systemd: yes/no. If this module uses systemd (like CAS or image-service)
  • postgresql_version: no or version.
  • postgis_version: no or version.
  • mongodb: yes/no.
  • webserver: yes/no.
  • adduser: no or username and groupname to add (for instance cas or similar).
  • debhelper: Debhelper compatibility level.
  • standards_version: Debian Standards-Version.

During development of this templating system you can also replay without ask and overwritting the configurated files with:

cookiecutter --replay -f THIS_DIRECTORY

-f forces to overwrite the generated ala-repo/debian directory and contents.

Sample of usage

Imagine that we clone some ALA repo:

$ git clone https://github.com/AtlasOfLivingAustralia/ala-collectory.git

so we are in the parent of ala-collectory directory. Then we can run:

$ cookiecutter gh:living-atlases/living-atlases-debianizer

maintainer_name [ALA Development Team]:
maintainer_email [support@ala.org.au]:
package [ala-collectory]:
source [ala-collectory]:
short_description [ala-collectory ALA module]:
version [1.6.2]:
upstream_name [ALA Development Team]:
upstream_email [support@ala.org.au]:
upstream_url [https://github.com/AtlasOfLivingAustralia/ala-collectory]:
upstream_copyright [2019, ALA Development Team <support@ala.org.au>]:
Select license:
1 - MPL
2 - public-domain
3 - Apache-1
4 - Apache-2
(..)
Choose from 1, 2, 3, 4 [1]: 1
tomcat [yes]:
grails [yes]:
mysql [yes]:
postgresql_version [no]:
postgis_version [no]:
mongodb [no]:
webserver [yes]:
debhelper [11]:
standards_version [4.2.1]:

$ cd ala-collectory
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        debian/

nothing added to commit but untracked files present (use "git add" to track)

$ debuild -us -uc -b
(...)
$ ls -l ../ala-collectory_1.6.2-1_all.deb
-rw-r--r-- 1 vjrj vjrj 65608156 ago 23 12:30 ../ala-collectory_1.6.2-1_all.deb

TODO

  • File perms
  • tomcat properly context configuration
  • db users/db

Credits

This generator is a fork of the project cookiecutter-debian-python-module. So thanks indeed.