Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation from .deb is not possible #20

Open
shawly opened this issue Jan 25, 2023 · 1 comment
Open

Installation from .deb is not possible #20

shawly opened this issue Jan 25, 2023 · 1 comment

Comments

@shawly
Copy link

shawly commented Jan 25, 2023

Because you have a Depends entry in your control file that requires znapzend but there is no package on the Ubuntu mirrors and the znapzend README instructs users to install it from source, this dependency can never be fulfilled.

Maybe you should remove that dependency or provide a fork that has a .deb file so users can install it as a package?
I created a small Docker image to build a .deb file for it:

FROM ubuntu:jammy

ARG ZNAPVER
ARG DEBIAN_FRONTEND=noninteractive

WORKDIR /usr/local/src

RUN apt-get update && \
    apt-get install -y build-essential \
      bash \
      perl \
      unzip \
      autoconf \
      carton \
      curl \
      tar \
      wget && \
    wget https://github.com/oetiker/znapzend/releases/download/v${ZNAPVER}/znapzend-${ZNAPVER}.tar.gz && \
    tar zxvf znapzend-${ZNAPVER}.tar.gz

WORKDIR /usr/local/src/znapzend-${ZNAPVER}

RUN autoreconf --force --install --verbose --make && \
    ./configure --prefix=/usr/local && \
    make && \
    make DESTDIR=/build/znapzend_${ZNAPVER}-1_amd64 install

COPY control /build/znapzend_${ZNAPVER}-1_amd64/DEBIAN/control

WORKDIR /build

RUN sed -i "s/ZNAPVER/${ZNAPVER}/" /build/znapzend_${ZNAPVER}-1_amd64/DEBIAN/control && \
    dpkg-deb --build --root-owner-group "znapzend_${ZNAPVER}-1_amd64"

It needs a control file in the context directory:

Package: znapzend
Version: ZNAPVER
Maintainer: oetiker
Architecture: amd64
Description: ZnapZend is a ZFS centric backup tool to create snapshots and send them to backup locations. It relies on the ZFS tools snapshot, send and receive to do its work. It has the built-in ability to manage both local snapshots as well as remote copies by thinning them out as time progresses.
Depends: perl, zfsutils-linux

Building it with can be done with docker build -t znapzend-builder --build-args=ZNAPVER=0.21.1 . and then the .deb file can be copied by creating a container docker create --name znapzend znapzend-builder and copying the .deb package from there docker cp znapzend:/build/znapzend_0.21.1-1_amd64.deb .. Which can then be installed via apt install znapzend_0.21.1-1_amd64.deb.

This is just an example on how it can be done, but I use this in my Ansible scripts.

@wommy
Copy link

wommy commented Jul 13, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants