Skip to content
Snippets Groups Projects
user avatar
Jan Kotanski authored
with Debian dir 7fb1d6108c8987e679a8397efcb14f1b0a50d986
8d334b99
History
=========================================
Welcome to Petra III Debian Package Tools
=========================================


Authors: Jan Kotanski

The package contains pidp* scripts to create debian packages
with use of git-buildpackage and the PIDP stash repository at DESY.


| Source code: https://stash.desy.de/projects/JMK/repos/pidptools/browse
| Web page: https://stash.desy.de/projects/JMK/repos/pidptools/browse


---------
Use cases
---------

Below there are pointed out the most common use cases


Update the debian package configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1) Clone the repository of required project, e.g.

.. code-block:: console

	  $ pidpclone python-tools-extras-p09

2) Change the package configuration in the debian/ directory
   by editing its files

3) Commit your changes, .e.g.

.. code-block:: console

	  $ git commit -a -m 'update dependences'

4) Build the new package, e.g.

.. code-block:: console

	  $ pidpbuild

5) test your new package

6) if tests are successful push it into stash repo, e.g.

.. code-block:: console

	  $ pidppush python-tools-extras-p09


Add a patch into the existing debian package
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1) Clone the repository of required project in the patch mode, e.g.

.. code-block:: console

	  $ pidpclone python-tools-extras-p09 --patch

2) Edit source files in the current and below directories

3) Commit your changes, .e.g.

.. code-block:: console

	  $ git commit -a -m 'update dependences'

4) Build the new package, e.g.

.. code-block:: console

	  $ pidpbuild

5) test your new package

6) if tests are successful push it into stash repo, e.g.

.. code-block:: console

	  $ pidppush python-tools-extras-p09


Create a package from a new tarball
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1) Clone the repository of required project in the patch mode, e.g.

.. code-block:: console

	  $ pidpclone python-tools-extras-p09 --patch

2) Edit source files in the current and below directories

3) Commit your changes, .e.g.

.. code-block:: console

	  $ git commit -a -m 'update dependences'

4) Build the new package with the tarball argument, e.g.

.. code-block:: console

	  $ pidpbuild ../nexdatas.extrasp09-1.2.4.tar.gz

5) if built fails due to conflicts between existing patches
    and the new tarball
    a) fix the conflict by editing the affected files
    b) stage the changes, e.g.

    	      $ git add nxsextrasp09/__init__.py

    c) continue building process by calling:

    	      $ pidpbuild_continue

6) test your new package

7) if tests are successful push it into stash repo, e.g.

.. code-block:: console

	  $ pidppush python-tools-extras-p09


Create a package from a new tarball with an additional patch
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1) Clone the repository of required project, e.g.

.. code-block:: console

	  $ pidpclone python-tools-extras-p09

2) Change the package configuration in the debian/ directory
   by editing its files (if it is needed)

3) Commit your changes, .e.g.

.. code-block:: console

	  $ git commit -a -m 'update dependences'

4) Build the new package with the tarball argument, e.g.

.. code-block:: console

	  $ pidpbuild ../nexdatas.extrasp09-1.2.4.tar.gz

5) if built fails due to conflicts between existing patches
    and the new tarball
    a) fix the conflict by editing the affected files
    b) stage the changes, e.g.

    	      $ git add nxsextrasp09/__init__.py

    c) continue building process by calling:

    	      $ pidpbuild_continue

6) test your new package

7) if tests are successful push it into stash repo, e.g.

.. code-block:: console

	  $ pidppush python-tools-extras-p09


------------
Installation
------------

Install the dependencies:

    git-buildpackage, python

From sources
^^^^^^^^^^^^

Download the latest version of NeXuS Configuration Server from

|     	  https://stash.desy.de/projects/JMK/repos/pidptools/browse

Extract the sources and run for both packages

.. code-block:: console

	  $ python setup.py install


Debian packages
^^^^^^^^^^^^^^^

Debian Stretch (and Jessie, Wheezy) packages can be found in the HDRI repository.

To install the debian packages, add the PGP repository key

.. code-block:: console

	  $ sudo su
	  $ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -

and then download the corresponding source list

.. code-block:: console

	  $ cd /etc/apt/sources.list.d
	  $ wget http://repos.pni-hdri.de/stretch-pni-hdri.list

for stretch or

.. code-block:: console

	  $ cd /etc/apt/sources.list.d
	  $ wget http://repos.pni-hdri.de/jessie-pni-hdri.list

for jessie.


Finally,

.. code-block:: console

	  $ apt-get update
	  $ apt-get install pidptools