%define debug_package %{nil} Name: tezos-client Version: 21.0 Release: 1 Epoch: 1 Summary: CLI client for interacting with tezos blockchain License: MIT BuildArch: x86_64 aarch64 Source0: tezos-client-21.0.tar.gz Source1: https://gitlab.com/tezos/tezos/tree/v21.0/ BuildRequires: make cmake m4 perl pkg-config wget unzip rsync cargo gcc opam git autoconf coreutils libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel protobuf-compiler protobuf-devel sqlite-devel systemd systemd-rpm-macros Requires: libev-devel gmp-devel hidapi-devel libffi-devel zlib-devel libpq-devel protobuf-compiler protobuf-devel sqlite-devel, tezos-sapling-params, udev %description CLI client for interacting with tezos blockchain Maintainer: Serokell %prep %setup -q %build %install make octez-client mkdir -p %{buildroot}/%{_bindir} install -m 0755 octez-client %{buildroot}/%{_bindir} ln -s %{_bindir}/octez-client %{buildroot}/%{_bindir}/tezos-client mkdir -p %{buildroot}/%{_unitdir} %files %license LICENSE %{_bindir}/octez-client %{_bindir}/tezos-client %post if [ -z $(getent passwd tezos) ]; then useradd -r -s /bin/false -m -d /var/lib/tezos tezos chmod 0755 /var/lib/tezos fi # SPDX-FileCopyrightText: 2018-2021 Ledger # # SPDX-License-Identifier: LicenseRef-Apache-Ledger # This snippet is based on https://github.com/LedgerHQ/udev-rules/blob/master/add_udev_rules.sh with the changes # that are fixing https://github.com/LedgerHQ/udev-rules/issues/5, so that provided rules work on the Raspberry Pi OS # Ubuntu 18.04 # Don't add udev rules in case the package is installed inside either docker or podman container. # Otherwise, post-installation script will fail due to inability to non-zero exit code of the # 'udevadm control --reload-rules' call. # Since containers orchestrated by Kubernetes don't contain any indicator files, check k8s-specific # env var. if [ ! -f /.dockerenv ] && [ ! -f /.containerenv ] && [ -z "${KUBERNETES_SERVICE_HOST++}" ] ; then cat < /etc/udev/rules.d/20-hw1.rules # HW.1 / Nano SUBSYSTEMS=="usb", ATTRS{idVendor}=="2581", ATTRS{idProduct}=="1b7c|2b7c|3b7c|4b7c", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev" # Blue SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0000|0000|0001|0002|0003|0004|0005|0006|0007|0008|0009|000a|000b|000c|000d|000e|000f|0010|0011|0012|0013|0014|0015|0016|0017|0018|0019|001a|001b|001c|001d|001e|001f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev" # Nano S SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0001|1000|1001|1002|1003|1004|1005|1006|1007|1008|1009|100a|100b|100c|100d|100e|100f|1010|1011|1012|1013|1014|1015|1016|1017|1018|1019|101a|101b|101c|101d|101e|101f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev" # Aramis SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0002|2000|2001|2002|2003|2004|2005|2006|2007|2008|2009|200a|200b|200c|200d|200e|200f|2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|201a|201b|201c|201d|201e|201f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev" # HW2 SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0003|3000|3001|3002|3003|3004|3005|3006|3007|3008|3009|300a|300b|300c|300d|300e|300f|3010|3011|3012|3013|3014|3015|3016|3017|3018|3019|301a|301b|301c|301d|301e|301f", TAG+="uaccess", TAG+="udev-acl", MODE="0660", GROUP="plugdev" # Nano X SUBSYSTEMS=="usb", ATTRS{idVendor}=="2c97", ATTRS{idProduct}=="0004|4000|4001|4002|4003|4004|4005|4006|4007|4008|4009|400a|400b|400c|400d|400e|400f|4010|4011|4012|4013|4014|4015|4016|4017|4018|4019|401a|401b|401c|401d|401e|401f", TAG+="uaccess", TAG+="udev-acl". MODE="0660", GROUP="plugdev" EOF udevadm trigger # In WSL reloading the udev rules may fail unless the service is restarted # first, see: https://github.com/dorssel/usbipd-win/wiki/WSL-support/e4a2d98725c3fea0cb139b71d290e887950c8371#udev if grep -qEi "(Microsoft|WSL)" /proc/sys/kernel/osrelease ; then # Here we try to restart using both the default 'service' command as well # as 'systemctl', since many people switch to 'systemd'. service udev restart || systemctl restart udev.service fi udevadm control --reload-rules groupadd plugdev --force usermod -aG plugdev tezos &> /dev/null || true fi %preun %postun