From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A31EB15808A for ; Fri, 08 Aug 2025 09:18:30 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 87D7334201E for ; Fri, 08 Aug 2025 09:18:30 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 63DCC1104A0; Fri, 08 Aug 2025 09:18:29 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 552B61104A0 for ; Fri, 08 Aug 2025 09:18:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 042D9342021 for ; Fri, 08 Aug 2025 09:18:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5D45F29B0 for ; Fri, 08 Aug 2025 09:18:27 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1754644693.166f48e2dec0d0729a70329eef005878b1fd33c0.flow@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-shells/atuin/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-shells/atuin/Manifest app-shells/atuin/atuin-18.8.0.ebuild X-VCS-Directories: app-shells/atuin/ X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: 166f48e2dec0d0729a70329eef005878b1fd33c0 X-VCS-Branch: master Date: Fri, 08 Aug 2025 09:18:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4f5f9557-b478-499d-b2a4-d3eff37efb57 X-Archives-Hash: 821f56f529999a727323588c9f3559dc commit: 166f48e2dec0d0729a70329eef005878b1fd33c0 Author: Jonas Frei pm me> AuthorDate: Fri Aug 8 03:21:42 2025 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Fri Aug 8 09:18:13 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166f48e2 app-shells/atuin: add 18.8.0 Increase of RUST_MIN_VER to 1.88 to align with upstream Signed-off-by: Jonas Frei pm.me> Part-of: https://github.com/gentoo/gentoo/pull/43380 Closes: https://github.com/gentoo/gentoo/pull/43380 Signed-off-by: Florian Schmaus gentoo.org> app-shells/atuin/Manifest | 2 + app-shells/atuin/atuin-18.8.0.ebuild | 145 +++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+) diff --git a/app-shells/atuin/Manifest b/app-shells/atuin/Manifest index 10e5c6199f7a..2db7c3b379c3 100644 --- a/app-shells/atuin/Manifest +++ b/app-shells/atuin/Manifest @@ -2,3 +2,5 @@ DIST atuin-18.6.1-crates.tar.xz 43525080 BLAKE2B 2b8eac104e61d506191d1027e1b73e0 DIST atuin-18.6.1.tar.gz 666475 BLAKE2B 64a072ce2cd683184f12886ffac94a580cddd09c5beb5f936cdecb3fe7afe7db2380529b9dc74cf7c967fa50a8d23491d571b3af8befad326ffef338a00096b1 SHA512 c1a75935ea4a5335315841e767c89cb2da5374449943497bbad8744e12fe2e64c49bb442f3987fd5cf4707dccfa2a066df3d7abcbf7a7ddadde29a6c9fcf5c56 DIST atuin-18.7.1-crates.tar.xz 43525080 BLAKE2B 2b8eac104e61d506191d1027e1b73e09bdd177fb8d88fd50affdd57c146a7e57e1dcebc8ed524d4f052b4c9eb3df384324eb753ccf2535d0272c44166ad44b8b SHA512 2c4d54b83db7101ae81ea3c0965249dab0143e4175ca7632d36fd9d3f9e1f8d29284c18742b8d16f8b1c8b430e2f76cdc905778da2fda11c13bb9ceface60144 DIST atuin-18.7.1.tar.gz 671392 BLAKE2B 552c69f9774d556b68bf7e46069a611d90f7976bd90d9f1cb15c7dbc2849ec66983b77f34bfcce5f4294ef7c29337f2c6c2eadc3082c1d660d79c75e6cde5e15 SHA512 a60384dffd49a1455455324bb5b3e74073ee1594e74bd39bff8a22cd6c6502f76b8d1d86d3f130e66fc3aacc8dbaddb1a67ddf273d9037f623ce2e36809889d7 +DIST atuin-18.8.0-crates.tar.xz 43766044 BLAKE2B 1bcd92baee29be549f1aab0c58f05d2f557e631f00bff09ebd4776a561909aa471e004ce8bb70204d61e95e2741b15d7e7b72d60ced8314b34d7dd5ebd72bac2 SHA512 6504943dae2ebe775efce6c22e226a9c836ece4daafed823b27e778688c271798a193c916cce87112f84cb3e0e1f6bc9e277f77783af9bd9a5ec97605cbb7f55 +DIST atuin-18.8.0.tar.gz 672900 BLAKE2B b041970e54c4d99522893c1a847facbebb8ee05e7e644353778533d55f61026c72b423c03d9393649e0877ac42d41472d3c0aa2f83fcd8b60e9652089b042585 SHA512 2a0078484eb6a89c5da3d5dc4409d77183b59e5f1277e58229d9f2686eea6353d22b77626663283f1635c5476ab91f35f0862ac2aca9bc81cc0fc008ce44ef72 diff --git a/app-shells/atuin/atuin-18.8.0.ebuild b/app-shells/atuin/atuin-18.8.0.ebuild new file mode 100644 index 000000000000..32ce63d26907 --- /dev/null +++ b/app-shells/atuin/atuin-18.8.0.ebuild @@ -0,0 +1,145 @@ +# Copyright 2023-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +RUST_MIN_VER="1.88" + +inherit cargo greadme shell-completion systemd + +DESCRIPTION="Shell history manager supporting encrypted synchronisation" +HOMEPAGE="https://atuin.sh https://github.com/atuinsh/atuin" +SRC_URI="https://github.com/atuinsh/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI+=" https://github.com/gentoo-crate-dist/atuin/releases/download/v${PV}/${P}-crates.tar.xz" + +LICENSE="MIT" +# Dependent crate licenses +# - openssl for ring crate +LICENSE+=" Apache-2.0 BSD Boost-1.0 ISC MIT MPL-2.0 Unicode-DFS-2016 openssl" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv" +IUSE="+client +daemon server system-sqlite test +sync" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + || ( client server ) + sync? ( client ) + test? ( client server sync ) +" +DEPEND="system-sqlite? ( dev-db/sqlite:3 )" +RDEPEND="${DEPEND} + server? ( acct-user/atuin ) +" +BDEPEND="test? ( dev-db/postgresql )" + +QA_FLAGS_IGNORED="usr/bin/${PN}" + +GREADME_DISABLE_AUTOFORMAT=1 + +DOCS=( CONTRIBUTING.md CONTRIBUTORS README.md ) + +src_configure() { + # Using system-sqlite has a negative performance impact + # see https://bugs.gentoo.org/959120 + use system-sqlite && export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 + local myfeatures=( + $(usev client) + $(usev daemon) + $(usev server) + $(usev sync) + ) + cargo_src_configure --no-default-features +} + +src_compile() { + cargo_src_compile + + ATUIN_BIN="$(cargo_target_dir)/${PN}" + + # Prepare shell completion generation + mkdir completions || die + local shell + for shell in bash fish zsh; do + "${ATUIN_BIN}" gen-completions \ + -s ${shell} \ + -o completions \ + || die + done + + if ! use client; then + return 0 + fi + + mkdir shell-init || die + for shell in bash fish zsh; do + "${ATUIN_BIN}" init ${shell} > shell-init/${shell} || die + done +} + +src_test() { + local postgres_dir="${T}"/postgres + initdb "${postgres_dir}" || die + + local port=11123 + # -h '' --> only socket connections allowed. + postgres -D "${postgres_dir}" \ + -k "${postgres_dir}" \ + -p "${port}" & + local postgres_pid=${!} + + local timeout_secs=30 + timeout "${timeout_secs}" bash -c \ + 'until printf "" >/dev/tcp/${0}/${1} 2>> "${T}/portlog"; do sleep 1; done' \ + localhost "${port}" || die "Timeout waiting for postgres port ${port} to become available" + + psql -h localhost -p "${port}" -d postgres <<-EOF || die "Failed to configure postgres" + create database atuin; + create user atuin with encrypted password 'pass'; + grant all privileges on database atuin to atuin; + \connect atuin + grant all on schema public to atuin; + EOF + + # Subshell so that postgres_pid is in scope when the trap is executed. + ( + cleanup() { + kill "${postgres_pid}" || die "failed to send SIGTERM to postgres" + } + trap cleanup EXIT + + ATUIN_DB_URI="postgres://atuin:pass@localhost:${port}/atuin" cargo_src_test + ) +} + +src_install() { + dobin "${ATUIN_BIN}" + + if use server; then + systemd_dounit "${FILESDIR}/atuin.service" + fi + + dodoc -r "${DOCS[@]}" + + newbashcomp "completions/${PN}.bash" "${PN}" + dozshcomp "completions/_${PN}" + dofishcomp "completions/${PN}.fish" + + if use daemon; then + systemd_douserunit "${FILESDIR}"/atuin-daemon.{service,socket} + fi + + if ! use client; then + return 0 + fi + + insinto "/usr/share/${PN}" + doins -r shell-init + + # The following readme text is only relevant if USE=client. + greadme_stdin <<-EOF + Gentoo installs atuin's shell-init code under + /usr/share/atuin/shell-init/ + Therefore, instead of using, e.g., 'eval \"\$(atuin init zsh)\"' in + your .zshrc you can simply put \"source /usr/share/atuin/shell-init/zsh\" + there, which avoids the cost of forking a process. +EOF +}