Skip to content

Commit

Permalink
Added debian packaging
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Engel <mengel@redhat.com>
  • Loading branch information
engelmi committed Jul 29, 2024
1 parent 4884806 commit 41767df
Show file tree
Hide file tree
Showing 16 changed files with 225 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.developer.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Eclipse BlueChi&trade;

- [Development](#development)
Expand Down Expand Up @@ -334,9 +333,9 @@ The newly built `bluechictl` can be used via:
Files for documentation of this project are located in the [doc](./doc/) directory comprising:

- [api examples](./doc/api-examples/): directory containing source files for different programming languages that use
the D-Bus API of BlueChi, e.g. for starting a systemd unit
the D-Bus API of BlueChi, e.g. for starting a systemd unit
- [man](./doc/man/): directory containing the markdown files for generating the man pages
(see [Building MAN pages](#building-man-pages) for more information)
(see [Building MAN pages](#building-man-pages) for more information)
- readthedocs files for building the documentation website of BlueChi (see [the README](./doc/README.md) for further information)
- [diagrams.drawio](./doc/diagrams.drawio) file containing all diagrams used for BlueChi

Expand All @@ -353,7 +352,9 @@ After executing a `meson install` the MAN pages are located in the `man/man*` di

## Packaging

BlueChi is packaged as an RPM. To build RPM packages following additional dependencies are required:
### RPM

In order to package BlueChi as an RPM the following dependencies are required:

```bash
sudo dnf install \
Expand Down Expand Up @@ -387,3 +388,7 @@ subdirectory:
```bash
SKIP_BUILDDEP=yes ARTIFACTS_DIR=${PWD}/output ./build-scripts/build-rpm.sh
```

### Debian

Creating the BlueChi Debian package is described in the [debian/README.md](./debian/README.md).
33 changes: 33 additions & 0 deletions debian/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Debian Packing of BlueChi

In order to create a Debian package for BlueChi, first checkout the branch or tag for which the package should be
built and update the [changelog](./changelog).

Next, build the following container image from the BlueChi directory:

```bash
podman build -t bluechi-debian-build -f debian/bluechi-debian-build .
```

Subsequently, run that container and mount the BlueChi directory into it:

```bash
podman run -it -v <path-to-bluechi>:/var/bluechi-build/bluechi bluechi-debian-build /bin/bash
```

Inside the container create the tarball, move it to the parent directory and rename it in the same go to the latest
entry in [changelog](./changelog):

```bash
./build-scripts/create-archive.sh
mv bluechi-<version>.tar.gz ../bluechi_<version>.orig.tar.gz
```

In the BlueChi directory run:

```bash
dpkg-buildpackage -uc -us -rfakeroot
```

This will produce the desired `.deb` packages in the parent directory `/var/bluechi-build`. Be sure to move them to
the mounted `/var/bluechi-build/bluechi`.
12 changes: 12 additions & 0 deletions debian/bluechi-agent.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
etc/bluechi/agent.conf.d/README.md
usr/lib/systemd/system/bluechi-agent.service
usr/lib/systemd/system/bluechi-dep@.service
usr/lib/systemd/system/bluechi-proxy@.service
usr/lib/systemd/user/bluechi-agent.service
usr/lib/systemd/user/bluechi-dep@.service
usr/lib/systemd/user/bluechi-proxy@.service
usr/libexec/bluechi-agent
usr/libexec/bluechi-proxy
usr/share/bluechi-agent/config/agent.conf
usr/share/dbus-1/interfaces/org.eclipse.bluechi.Agent.xml
usr/share/dbus-1/system.d/org.eclipse.bluechi.Agent.conf
3 changes: 3 additions & 0 deletions debian/bluechi-agent.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/share/man/man1/bluechi-agent.1
usr/share/man/man5/bluechi-agent.conf.5
usr/share/man/man1/bluechi-proxy.1
10 changes: 10 additions & 0 deletions debian/bluechi-controller.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
etc/bluechi/controller.conf.d/README.md
usr/lib/systemd/system/bluechi-controller.service
usr/lib/systemd/system/bluechi-controller.socket
usr/libexec/bluechi-controller
usr/share/bluechi/config/controller.conf
usr/share/dbus-1/interfaces/org.eclipse.bluechi.Controller.xml
usr/share/dbus-1/interfaces/org.eclipse.bluechi.Job.xml
usr/share/dbus-1/interfaces/org.eclipse.bluechi.Monitor.xml
usr/share/dbus-1/interfaces/org.eclipse.bluechi.Node.xml
usr/share/dbus-1/system.d/org.eclipse.bluechi.conf
2 changes: 2 additions & 0 deletions debian/bluechi-controller.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/share/man/man1/bluechi-controller.1
usr/share/man/man5/bluechi-controller.conf.5
15 changes: 15 additions & 0 deletions debian/bluechi-debian-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:22.04

RUN apt update && \
apt upgrade -y && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install \
cmake \
debhelper-compat \
dpkg-dev \
gcovr \
go-md2man \
libsystemd-dev \
meson \
pkgconf \
wget \
-y
1 change: 1 addition & 0 deletions debian/bluechictl.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin/bluechictl
1 change: 1 addition & 0 deletions debian/bluechictl.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/man/man1/bluechictl.1
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bluechi (0.8.0-1) stable; urgency=low

* Initial packaging.

-- Michael Engel <mengel@redhat.com> Di, 30 Jul 2024 14:05:29 +0200
55 changes: 55 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Source: bluechi
Section: admin
Priority: optional
Maintainer: Milan Zamazal <pdm@debian.org>
Standards-Version: 4.6.2
Build-Depends: debhelper-compat (= 13), meson, cmake, libsystemd-dev, pkgconf, go-md2man, gcovr
Homepage: https://github.com/eclipse-bluechi/bluechi

Package: bluechi-controller
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, systemd
Suggests: bluechictl
Description: systemd service controller for multi-node environments
Eclipse BlueChi is a systemd service controller intended for multi-node
environments with a predefined number of nodes and with a focus on
highly regulated ecosystems such as those requiring functional
safety (for example in cars).
.
BlueChi can also be used to control systemd services for containerized
applications using Podman and its ability to generate systemd service
configuration to run a container via quadlet.
.
This package contains the BlueChi controller, which controls the
services across BlueChi agents.

Package: bluechi-agent
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, systemd
Description: systemd service controller for multi-node environments
Eclipse BlueChi is a systemd service controller intended for multi-node
environments with a predefined number of nodes and with a focus on
highly regulated ecosystems such as those requiring functional
safety (for example in cars).
.
BlueChi can also be used to control systemd services for containerized
applications using Podman and its ability to generate systemd service
configuration to run a container via quadlet.
.
This package contains the BlueChi agent, which manages services on the
local machine.

Package: bluechictl
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, systemd, bluechi-controller
Description: systemd service controller for multi-node environments
Eclipse BlueChi is a systemd service controller intended for multi-node
environments with a predefined number of nodes and with a focus on
highly regulated ecosystems such as those requiring functional
safety (for example in cars).
.
BlueChi can also be used to control systemd services for containerized
applications using Podman and its ability to generate systemd service
configuration to run a container via quadlet.
.
This package contains bluechictl, the BlueChi command line utility.
59 changes: 59 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/eclipse-bluechi/bluechi
Upstream-Name: BlueChi

Files:

- Copyright: Contributors to the Eclipse BlueChi project
License: LGPL-2.1+

Files:
doc/api-examples/_
doc/bluechi-examples/_
Copyright: Contributors to the Eclipse BlueChi project
License: MIT-0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Files:
selinux/meson.build
Copyright:
2022 Collabora Ltd.
License: LGPL-2.1+

Files:
selinux/build-selinux.sh
Copyright:
2019 Red Hat Inc.
2022 Collabora Ltd.
License: LGPL-2.1+

License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Comment:
On Debian systems, the full text of the GNU Lesser General Public License
version 2.' can be found in the file '/usr/share/common-licenses/LGPL-2.1'.
2 changes: 2 additions & 0 deletions debian/not-installed
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/share/man/man8/bluechi-agent-selinux.8
usr/share/man/man8/bluechi-controller-selinux.8
Empty file added debian/patches/series
Empty file.
17 changes: 17 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/make -f
%:
dh $@

execute_after_dh_clean:
rm -f build-scripts/RELEASE

override_dh_auto_configure:
echo pdm-start
meson setup -Dprefix=/usr -Dwith_selinux=false builddir
echo pdm-end

override_dh_install:
meson install -C builddir --dest=debian/bluechi-controller
meson install -C builddir --dest=debian/bluechi-agent
meson install -C builddir --dest=debian/bluechictl
dh_install
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 41767df

Please sign in to comment.