gilbertchen / duplicacy

A new generation cloud backup tool
https://duplicacy.com
Other
5.14k stars 335 forks source link

Distributing Duplicacy as rpm/deb Packages #525

Open FloThinksPi opened 5 years ago

FloThinksPi commented 5 years ago

It would be great for the Linux world to install Duplicacy as Package like it is done with all other backup tools(restic, duplicati etc.). This has many advantages for operators including a common update path and installation like "dnf install duplicacy".

I was so free to build a specfile and packages via copr for Fedora 28, 29 Centos/RHEL 7. So only RPM Packages. https://copr.fedorainfracloud.org/coprs/flothinkspi/duplicacy/

Build mechanism used is versioned here: https://github.com/FloThinksPi/duplicacy-rpm

Debian/Ubuntu world is still missing. What does @gilbertchen think about this way to distribute the binary ?

Regards Florian

gilbertchen commented 5 years ago

This can be useful, but when I tried it on Centos 6 I couldn't install DNF -- it looks like there isn't an official DNF package for Centos 6? I don't have a machine with Fedora or Centos 7.

Another question, will dnf install duplicacy always get the latest release from github?

FloThinksPi commented 5 years ago

DNF (Dandified Yum) is the sucessor of the yum package manager. Because fedora is closer to development, it already uses the new dnf comman. For Centos 6&7 you would need to add the file https://copr.fedorainfracloud.org/coprs/flothinkspi/duplicacy/repo/epel-6/flothinkspi-duplicacy-epel-6.repo manually to /etc/yum.repos.d/flothinkspi-duplicacy-epel-7.repo and use the older yum command instead. yum install duplicacy. The copr integration (which just automatically adds above file) is only available in DNF. In the end COPR itself is just a RPM Package repository where everyone can build packages without having to setup a own Server/Infrastructure for a Repository.

It was a little bit difficult to automatically build when a new version comes out as the specfile which defines the rpm package needs some lines to get changed each version. I solved it by crating a cronjob on one of my servers, that fetches new versions on the release page of this repository via the github rest api. When a new version is detected, the specfile will be automatically updated and a commit will be pushed to my git repository with the specfiles in it. Once the commit is pushed a webhook is triggered wich then starts a package build on copr with the updated specfiles. That way, the files to build duplicacy and how the updates are made are always visible by public.

So yea right now the version of duplicacy on copr will get automatically build after a new release and thus matches the version on the release page.