commit: 646d1490c1f8d4e04696051ae41804ae060fc5a5 Author: Jonas Frei <freijon <AT> pm <DOT> me> AuthorDate: Sun Feb 15 13:14:20 2026 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Mon Feb 16 09:00:52 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=646d1490
app-shells/atuin: add 18.12.1 Upstream decided to have atuin-server as a separate binary. In the past, it was included in the main binary as "atuin server" subcommand. The atuin-server codebase is in the same tree as the client codebase. I therefore concluded it's better to keep it as a USE flag instead of making it a separate packe. The server-binary will be built/installed conditionally. There is an adjusted systemd service file. Also, RUST_MIN_VER=1.93. Signed-off-by: Jonas Frei <freijon <AT> pm.me> Part-of: https://github.com/gentoo/gentoo/pull/45818 Closes: https://github.com/gentoo/gentoo/pull/45818 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> app-shells/atuin/Manifest | 2 + app-shells/atuin/atuin-18.12.1.ebuild | 152 ++++++++++++++++++++++++++++++++++ app-shells/atuin/files/atuin.service | 10 +++ 3 files changed, 164 insertions(+) diff --git a/app-shells/atuin/Manifest b/app-shells/atuin/Manifest index eec0ab480942..487b840a38e0 100644 --- a/app-shells/atuin/Manifest +++ b/app-shells/atuin/Manifest @@ -2,5 +2,7 @@ DIST atuin-18.10.0-crates.tar.xz 44527716 BLAKE2B 66501cff40fe5e06588803e292e3b6 DIST atuin-18.10.0.tar.gz 685243 BLAKE2B 412fe072f9c76d1bcc7a525afae4acdf5350087fe999191bf1cd44a5d3858d72cd94947a669c87a986536f973f74d61ee2e6972f09b3dc5904142765a0a2cdc0 SHA512 354497f746d1d592e7a8880ab8a5c5e40461ed7adfb7941d81bbec80da43c9232052e201a44e66d2b4db1f69a89d478975eca68cc2917202f71b53bfd727fb47 DIST atuin-18.11.0-crates.tar.xz 48268880 BLAKE2B a4dcab9fe0e722ef03fe166ad93208518f52a67ad6b92902b1fadd9897f4798ee14d2ea8543cc842e12c9da529b4b5cd6395b7ead08acf0fadfa868faea547af SHA512 f6a908cb9781a8b589e485c0ddbf3dbe69f1833d8f566b6ffdc65724138373d9718de7c26126e78749eb7c74c5024352b337631895ae28d2b24b12d1b7f4889d DIST atuin-18.11.0.tar.gz 755825 BLAKE2B 9752ef1538382f1e540a411e39d27884372049263aa0efa713ba258a1a78c0404b94dd4e91bbff732dc030684a43afe91985083d6403ff302e292b2e7f6337b2 SHA512 f1ed97724c9da416266ed56ec65a33f76158a5d9fa256acb212f37152f3e674e447841a1628f370c8a74a0c63a49b21c828990407452108bfb47b3b8c7f8a8fc +DIST atuin-18.12.1-crates.tar.xz 47755644 BLAKE2B 8d072faf732d1e609b7d5daf18f443636047748be5137b453ad4b47dccfd409671eddae347d26ffff31703c86817f870b7f8cd755a704f78e6f23a9bb336fa30 SHA512 695aea3ff5876a175cff45c9a24a664df75c98de0432d3414a8c9e247477fdc611ea0f0f24a5637f916cec6deb41812afd0caee3a8bcc0abcf87e6033fc5c22f +DIST atuin-18.12.1.tar.gz 803329 BLAKE2B e3c511e05e67833cc37a25679543248de88dc682d9bf35964f98a0ffbb6668a9b873250bd84064e2d69a0150cdc64272c89ec951fd731cab0c5c97a46f504bd7 SHA512 a4cd826e23a9923507102c480d46bf2398f89e82c28726490fb48bfebcab4ebd62fb79c9a38976c53f36f0377f8815acb0a350ebeaedfd09d7ace5a7a7d8b92d 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.12.1.ebuild b/app-shells/atuin/atuin-18.12.1.ebuild new file mode 100644 index 000000000000..7dadec316f3f --- /dev/null +++ b/app-shells/atuin/atuin-18.12.1.ebuild @@ -0,0 +1,152 @@ +# Copyright 2023-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +RUST_MIN_VER="1.93" + +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 CDLA-Permissive-2.0 ISC MIT MPL-2.0 openssl + Unicode-3.0 ZLIB +" +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 sync) + ) + cargo_src_configure --no-default-features +} + +src_compile() { + cargo_src_compile --bin ${PN} + + if use server; then + cargo_src_compile --bin atuin-server + fi + + 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 + dobin "${ATUIN_BIN}-server" + 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 +} diff --git a/app-shells/atuin/files/atuin.service b/app-shells/atuin/files/atuin.service new file mode 100644 index 000000000000..4af0094adf63 --- /dev/null +++ b/app-shells/atuin/files/atuin.service @@ -0,0 +1,10 @@ +[Unit] +Description=Atuin (shell history manager) server +After=network.target + +[Service] +ExecStart=/usr/bin/atuin-server start +User=atuin + +[Install] +WantedBy=default.target
