Sunday, February 28, 2021

Re: [Maintainer Update] databases/leveldb: 1.22 -> 1.23

On 2021/02/28 10:08, Ashton Fagg wrote:
> Another fun leveldb update. This updates from 1.22 to 1.23.
>
> The change log is rather extensive and can be viewed here:
>
> https://github.com/google/leveldb/releases/tag/1.23
>
> There's a couple of fun things that they've done here. You might recall
> also that the last update completely flipped the table on a bunch of
> stuff as well.
>
> The first is they've switched their test harness to gtest. This means
> they now ship their own version of gtest, along with gmock and Google's
> benchmark library. The problem is, the version of gtest they rely on
> doesn't build cleanly on OpenBSD. I need to work on this a little more
> when I have some more free time to see if I can figure that out - it may
> just be a CMake configuration issue.
>
> The second thing is that they now ship their dependencies as git
> submodules (in third_party/). What's more, is that they don't actually
> distribute the submodules in their tarballs - meaning you have to check

They haven't built tarballs themselves to distribute, but are relying on
github auto-generating them. These don't include submodules (because
git-archive doesn't include them).

> them out manually in order for the directories to be populated. As such,
> if you try to build with the test suite enabled without doing the
> submodule step manually, CMake blows up loudly since it can't find CMake
> modules for the third_party dependencies. Thus completely breaking our
> port in its current form. I'm going to file a ticket with them and ask
> about why they're doing this because it's honestly kinda stupid.

I think it's not that much of a problem, they're mostly just going to
expect people running tests to get the code from a git checkout. Which
for the most part is going to be true.

> What that probably means is (assuming I get the test suite stuff figured
> out), we'll have to host our own distfile with the submodules
> populated in future versions. (Or, just live without the test suite) I
> already have a diff I'm working on that will do this instead.

To use them in the port you can fetch them separately.. If there are a
few you can use something like this:

DISTFILES = ${DISTNAME}${EXTRACT_SUFX}
.for A N C in \
account1 name2 hash2 \
account2 name2 hash2 \
...
DISTFILES += $N-{$A/$N/archive/}$C.tar.gz:0
.endfor
MASTER_SITES0= https://github.com/

then move them into the right dir e.g. in do-extract.

> For now, the simplest thing to get the 1.23 update is to just disable
> building of the test suite. I've built and tested the package here on
> amd64 and it appears to be working as expected. This is hopefully just a
> stop-gap for a while until I can negotiate what's going on with their
> dependencies and the gtest build issue.

ack, I think that's alright for now.

> diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile
> index 5646b832377..3ace36595ec 100644
> --- a/databases/leveldb/Makefile
> +++ b/databases/leveldb/Makefile
> @@ -2,7 +2,7 @@
>
> GH_ACCOUNT= google
> GH_PROJECT= leveldb
> -GH_TAGNAME= 1.22
> +GH_TAGNAME= 1.23
>
> COMMENT= fast key-value storage library
> CATEGORIES= databases devel
> @@ -23,8 +23,12 @@ MODULES= devel/cmake
>
> CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on \
> -DLEVELDB_INSTALL=on \
> + -DLEVELDB_BUILD_TESTS=off \
> -DLEVELDB_BUILD_BENCHMARKS=off
>
> +# Tests are broken right now due to googletest weirdness.
> +NO_TEST= Yes
> +
> post-install:
> ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/leveldb/
> ${INSTALL_DATA} ${WRKSRC}/{LICENSE,doc/*.md} \
> diff --git a/databases/leveldb/distinfo b/databases/leveldb/distinfo
> index ae4cf1d8f0c..ebd4a52218a 100644
> --- a/databases/leveldb/distinfo
> +++ b/databases/leveldb/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (leveldb-1.22.tar.gz) = VUI8rJ4zBvSpUCxzigAeSjOdGjj/vudXLUoH1dY5SbI=
> -SIZE (leveldb-1.22.tar.gz) = 239365
> +SHA256 (leveldb-1.23.tar.gz) = mjf4phdPCb1iK8cjtViB3FQc1QdHy9CIMcKoLWIPbXY=
> +SIZE (leveldb-1.23.tar.gz) = 242925

No comments:

Post a Comment