Open borgmanJeremy opened 6 months ago
Interestingly, if I build the exact same sanoid release (2.2.0) on ubuntu 22.04, and scp the .deb file to the ubuntu 24.04 machine, I can install it. So the issue is something specific to the .deb built on 24.04.
I diff'ed the two debs and the main difference seems to be the deb built on 24.04 is putting sanoid.service in /usr/lib/systemd/system/ and the deb built on 22.04 is putting sanoid.timer in /lib/systemd/system
Edit: I poked around debian source code and think this might be related but I'm well outside my expertise at this point:
https://salsa.debian.org/debian/sanoid/-/commit/8284d3d0e822bfd7797c6f252bb8c80fb64ea242 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054088
A note: any Debian packaging you find here is welcome, but not properly "supported." As far as I know, whoever maintains the Debian package itself does their own private packaging; either way, I'm not a Debian packaging expert and I can't help much.
If you want to install the latest version from master, you don't necessarily need to build a package at all; you can literally just copy sanoid and syncoid into /usr/local/bin, copy sanoid.defaults.conf into /etc/sanoid, and craft yourself an /etc/sanoid/sanoid.conf file to define what you want it to do with your stuff.
There are a couple of Perl (CPAN) dependencies which can be satisfied either directly from Perl's CPAN repos, or from your distribution's repositories (which is the way I generally do it, as well as the way any distro repository packaging will be doing it).
Off the top of my head, on Debian or Ubuntu those dependencies should be satisfied with apt install pv mbuffer lzop libconfig-ini-perl libcapture-tiny-perl
; you can also find them documented directly in code comments at the head of sanoid
and syncoid
themselves.
Thanks @n0099 but you can see from my logs I had already tried to build in /temp and the issue still occurred.
I need to diff the build files here with the Debian official package but haven't found time yet.
Affects me too. I get the same error on my Ubuntu 24.04.
https://github.com/jimsalterjrs/sanoid/issues/921#issuecomment-2087793573
Interestingly, if I build the exact same sanoid release (2.2.0) on ubuntu 22.04, and scp the .deb file to the ubuntu 24.04 machine, I can install it.
# syntax=docker/dockerfile:latest
# https://github.com/jimsalterjrs/sanoid/issues/921
FROM ubuntu:22.04
WORKDIR /
RUN <<BASH
# https://mywiki.wooledge.org/BashFAQ/105
# https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425
set -euxo pipefail
sed -i 's/archive\.ubuntu\.com/azure.\0/' /etc/apt/sources.list
apt update
# https://github.com/jimsalterjrs/sanoid/blob/master/INSTALL.md
apt install -y debhelper libcapture-tiny-perl libconfig-inifiles-perl pv lzop mbuffer build-essential git
BASH
RUN <<BASH
# https://mywiki.wooledge.org/BashFAQ/105
# https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425
set -euxo pipefail
git clone https://github.com/jimsalterjrs/sanoid.git
cd sanoid
# checkout latest stable release or stay on master for bleeding edge stuff (but expect bugs!)
git checkout $(git tag | grep "^v" | tail -n 1)
git cherry-pick --no-commit 07b6d6344c2ba6d230f34a3e4216d4f8e4b73e0e # for openzfs-*.deb
ln -s packages/debian .
dpkg-buildpackage -uc -us
mkdir /artifacts
cp ../sanoid*.deb /artifacts
BASH
FROM scratch
COPY --from=0 /artifacts /
The fix from #926 works for me. Cherry-picked onto v2.2.0.
I spun up a clean 24.04 ubuntu VM and an ubuntu 22.04 VM to do back to back testing. I followed the directions to build the deb package from here: https://github.com/jimsalterjrs/sanoid/blob/master/INSTALL.md
When building on ubuntu 24.04 I get the following error when the deb is unpacked. I believe the issue is related to the "sanoid.timer.dpkg-new" line, not the warning below that. The permission denied warning is present on 22.04 and 24.04.