Friday, December 02, 2022

Re: borgbackup: sparc64: Unknown integrity data version 0 in integrity.1

If it doesn't work with just that diff, try the same with
COMPILER=base-clang ports-gcc / COMPILER_LANGS=c (borg 1.1 is already built
with gcc on sparc64 but 1.2 isn't).

--
Sent from a phone, apologies for poor formatting.

On 2 December 2022 06:04:28 Bjorn Ketelaars <bket@openbsd.org> wrote:

> On Thu 01/12/2022 21:40, Klemens Nanni wrote:
>> The following works just fine with borgbackup-1.2.2p1 on amd64 snapshots
>> but sparc64 7.2-release borgbackup-1.2.2p0 and sparc64 snapshots
>> borgbackup-1.2.2p1 fail like this:
>>
>> $ borg init --encryption repokey testrepo
>> Enter new passphrase:
>> Enter same passphrase again:
>> Do you want your passphrase to be displayed for verification? [yN]:
>> Unknown integrity data version 0 in integrity.1
>>
>> By default repositories initialized with this version will produce security
>> errors if written to with an older version (up to and including Borg 1.0.8).
>>
>> If you want to use these older versions, you can disable the check by running:
>> borg upgrade --disable-tam tmprepo
>>
>> See
>> https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability
>> for details about the security implications.
>>
>> IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!
>> If you used a repokey mode, the key is stored in the repo, but you should
>> back it up separately.
>> Use "borg key export" to export the key, optionally in printable format.
>> Write down the passphrase. Store both at safe place(s).
>>
>> $ borg list testrepo
>> Unknown integrity data version 0 in integrity.1
>> Error: encrypted key version 0 is not supported by this borg version.
>>
>> Same happens with borgbackup-1.1.18p1 on sparc64 snapshots.
>>
>> I have no idea what to do here.
>> Searching for that error didn't yield any results for me.
>>
>> I know that borg *did* work on sparc64 some time ago, but what release
>> and/or ports version that was is lost to me.
>>
>> Bjorn, does that ring a bell?
>> I can look into this soon.
>
> This does not ring a bell.
>
> I'm gambling here, and most likely breaking building, but it is probably
> wise to exclude that our local patch is somehow related to this issue.
> Unfortunately I have no access to a sparc64 machine, maybe you could
> test the diff below?
>
>
> Index: 1.1/Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/borgbackup/1.1/Makefile,v
> retrieving revision 1.6
> diff -u -p -r1.6 Makefile
> --- 1.1/Makefile 13 Nov 2022 15:29:45 -0000 1.6
> +++ 1.1/Makefile 2 Dec 2022 05:49:02 -0000
> @@ -1,7 +1,7 @@
> PORTROACH = limit:^1\.1\.
>
> MODPY_EGG_VERSION = 1.1.18
> -REVISION = 1
> +REVISION = 2
>
> WANTLIB = ${COMPILER_LIBCXX} b2 m
>
> Index: 1.1/patches/patch-src_borg__endian_h
> ===================================================================
> RCS file: 1.1/patches/patch-src_borg__endian_h
> diff -N 1.1/patches/patch-src_borg__endian_h
> --- 1.1/patches/patch-src_borg__endian_h 8 Mar 2022 08:53:52 -0000 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,24 +0,0 @@
> -__builtin_bswap32 unavailable at least on sparc64
> -
> -Index: src/borg/_endian.h
> ---- src/borg/_endian.h.orig
> -+++ src/borg/_endian.h
> -@@ -1,6 +1,7 @@
> - #include <unistd.h>
> - #include <stdlib.h>
> - #include <stdint.h>
> -+#include <endian.h>
> -
> - #if defined (__SVR4) && defined (__sun)
> - #include <sys/isa_defs.h>
> -@@ -19,8 +20,8 @@
> -

No comments:

Post a Comment