From fb51c197e89668e88eb2e513ee6205c8c8eed7e7 Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Thu, 17 Apr 2025 09:46:39 +0200 Subject: [PATCH 1/4] Packages/Baker: octez-baker package can use agnostic baker --- .../packaging/octez/debian/octez-baker.config | 4 +++ .../octez/debian/octez-baker.install | 1 + .../octez/debian/octez-baker.logrotate | 9 +++++++ .../octez-baker.octez-agnostic-baker.service | 26 +++++++++++++++++++ .../octez/debian/octez-baker.postinst | 8 ++++++ .../octez/debian/octez-baker.templates | 5 ++++ scripts/packaging/octez/debian/rules | 1 + .../octez/rpm/SPECS/octez-baker.spec | 4 +++ .../octez/scripts/systemd-octez-bakers.sh | 15 ++++++++--- 9 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 scripts/packaging/octez/debian/octez-baker.octez-agnostic-baker.service diff --git a/scripts/packaging/octez/debian/octez-baker.config b/scripts/packaging/octez/debian/octez-baker.config index 6b7d8a8d91b5..1cd1a6390f30 100755 --- a/scripts/packaging/octez/debian/octez-baker.config +++ b/scripts/packaging/octez/debian/octez-baker.config @@ -77,6 +77,10 @@ db_input medium octez-baker/dal-node || true # shellcheck disable=SC2119 db_go || true +db_input medium octez-baker/agnostic-baker || true +# shellcheck disable=SC2119 +db_go || true + db_get octez-baker/dal-node if [ "$RET" = "true" ]; then db_get octez-baker/dal-node-url diff --git a/scripts/packaging/octez/debian/octez-baker.install b/scripts/packaging/octez/debian/octez-baker.install index ee247f4b8105..b19e135f8e79 100644 --- a/scripts/packaging/octez/debian/octez-baker.install +++ b/scripts/packaging/octez/debian/octez-baker.install @@ -1,4 +1,5 @@ binaries/octez-baker-P* /usr/bin/ +binaries/octez-baker /usr/bin/ binaries/octez-accuser-P* /usr/bin/ scripts/wait-for-node-up.sh /usr/share/octez-baker/ scripts/systemd-octez-bakers.sh /usr/share/octez-baker/ diff --git a/scripts/packaging/octez/debian/octez-baker.logrotate b/scripts/packaging/octez/debian/octez-baker.logrotate index ff95809e7497..31ebceb52421 100644 --- a/scripts/packaging/octez/debian/octez-baker.logrotate +++ b/scripts/packaging/octez/debian/octez-baker.logrotate @@ -16,6 +16,15 @@ minsize 1M } +/var/log/tezos/baker.log{ + daily + # we use copytruncate to avoid stopping node. + copytruncate + rotate 5 + compress + minsize 1M +} + /var/log/tezos/accuser.log{ daily # we use copytruncate to avoid stopping node. diff --git a/scripts/packaging/octez/debian/octez-baker.octez-agnostic-baker.service b/scripts/packaging/octez/debian/octez-baker.octez-agnostic-baker.service new file mode 100644 index 000000000000..6e5ed6c91ee9 --- /dev/null +++ b/scripts/packaging/octez/debian/octez-baker.octez-agnostic-baker.service @@ -0,0 +1,26 @@ +[Unit] +Description=Octez agnostic baker service +Documentation=https://octez.tezos.com/docs/ +After=network.target + +[Service] +Type=simple +Restart=on-failure +TimeoutStartSec=infinity +TimeoutStopSec=300 + +EnvironmentFile=-/etc/default/octez-node +EnvironmentFile=-/etc/default/octez-baker +WorkingDirectory=~ +User=tezos + +ExecStartPre=+touch /var/log/tezos/baker.log +ExecStartPre=+chown tezos:tezos /var/log/tezos/baker.log + +ExecStart=/bin/sh -c "/usr/bin/octez-baker --base-dir $HOME/.tezos-client run with local node $DATADIR --liquidity-baking-toggle-vote $LQVOTE $RUNTIME_OPTS $BAKING_KEY" + +StandardOutput=append:/var/log/tezos/baker.log +StandardError=inherit + +[Install] +WantedBy=multi-user.target diff --git a/scripts/packaging/octez/debian/octez-baker.postinst b/scripts/packaging/octez/debian/octez-baker.postinst index 19d2317a4275..17151cb41389 100755 --- a/scripts/packaging/octez/debian/octez-baker.postinst +++ b/scripts/packaging/octez/debian/octez-baker.postinst @@ -36,6 +36,10 @@ configure) db_get octez-baker/baker-key echo "BAKER_KEY=${RET}" >> /etc/default/octez-baker + db_get octez-baker/agnostic-baker + echo "AGNOSTIC_BAKER=${RET}" >> /etc/default/octez-baker + echoerr "AGNOSTIC_BAKER=${RET}" + db_get octez-baker/dal-node DAL=${RET} case "$DAL" in @@ -72,6 +76,10 @@ configure) echo "BAKER_KEY=${RET}" >> /etc/default/octez-baker echoerr "BAKER_KEY=${RET}" + db_get octez-baker/agnostic-baker + echo "AGNOSTIC_BAKER=${RET}" >> /etc/default/octez-baker + echoerr "AGNOSTIC_BAKER=${RET}" + db_get octez-baker/dal-node DAL=${RET} case "$DAL" in diff --git a/scripts/packaging/octez/debian/octez-baker.templates b/scripts/packaging/octez/debian/octez-baker.templates index 06dbcc8e0d7b..933300adfbd1 100644 --- a/scripts/packaging/octez/debian/octez-baker.templates +++ b/scripts/packaging/octez/debian/octez-baker.templates @@ -39,3 +39,8 @@ Description: Important upgrade information the configuration of the octez-baker . Please review the release notes for more information. + +Template: octez-baker/agnostic-baker +Type: boolean +Default: false +Description: Use the octez-baker instead of protocol's baker dedicated binaries? diff --git a/scripts/packaging/octez/debian/rules b/scripts/packaging/octez/debian/rules index 0241714319ba..ee575016d004 100755 --- a/scripts/packaging/octez/debian/rules +++ b/scripts/packaging/octez/debian/rules @@ -39,6 +39,7 @@ override_dh_installsystemd: dh_installsystemd -p octez-smart-rollup-node --no-start dh_installsystemd -p octez-baker --no-start dh_installsystemd -p octez-baker --no-enable --no-start --name octez-accuser@ + dh_installsystemd -p octez-baker --no-enable --no-start --name octez-agnostic-baker dh_installsystemd -p octez-agnostic-baker --no-start dh_installsystemd -p octez-agnostic-baker --no-enable --no-start --name octez-accuser@ dh_installsystemd -p octez-agnostic-baker --no-enable --no-start --name octez-agnostic-baker-bin diff --git a/scripts/packaging/octez/rpm/SPECS/octez-baker.spec b/scripts/packaging/octez/rpm/SPECS/octez-baker.spec index 2bffdbe258af..5c2f52ce945e 100644 --- a/scripts/packaging/octez/rpm/SPECS/octez-baker.spec +++ b/scripts/packaging/octez/rpm/SPECS/octez-baker.spec @@ -20,6 +20,7 @@ Requires(pre): octez-client mkdir -p %{buildroot}/usr/bin/ mkdir -p %{buildroot}/usr/share/octez-baker install -m 0755 $HOME/rpmbuild/SPECS/binaries/octez-baker-P* %{buildroot}/usr/bin/ +install -m 0755 $HOME/rpmbuild/SPECS/binaries/octez-baker %{buildroot}/usr/bin/ install -m 0755 $HOME/rpmbuild/SPECS/binaries/octez-accuser-P* %{buildroot}/usr/bin/ install -m 0755 $HOME/rpmbuild/SPECS/scripts/wait-for-node-up.sh %{buildroot}/usr/share/octez-baker/ install -m 0755 $HOME/rpmbuild/SPECS/scripts/systemd-octez-bakers.sh %{buildroot}/usr/share/octez-baker/ @@ -30,10 +31,12 @@ gzip %{buildroot}%{_mandir}/man1/octez-accuser.1 install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker.octez-accuser@.service %{buildroot}/usr/lib/systemd/system/octez-accuser@.service install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker@.service %{buildroot}/usr/lib/systemd/system/octez-baker@.service install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker.service %{buildroot}/usr/lib/systemd/system/octez-baker.service +install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker.octez-agnostic-baker.service %{buildroot}/usr/lib/systemd/system/octez-baker.octez-agnostic-baker.service install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker.octez-accuser.default %{buildroot}/etc/default/octez-accuser install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker.default %{buildroot}/etc/default/octez-baker %files /usr/bin/octez-baker-* +/usr/bin/octez-baker /usr/bin/octez-accuser-* /usr/share/octez-baker/wait-for-node-up.sh /usr/share/octez-baker/systemd-octez-bakers.sh @@ -42,6 +45,7 @@ install -D -m 644 $HOME/rpmbuild/SPECS/octez-baker.default %{buildroot}/etc/def /usr/lib/systemd/system/octez-accuser@.service /usr/lib/systemd/system/octez-baker@.service /usr/lib/systemd/system/octez-baker.service +/usr/lib/systemd/system/octez-baker.octez-agnostic-baker.service /etc/default/octez-accuser /etc/default/octez-baker %postun diff --git a/scripts/packaging/octez/scripts/systemd-octez-bakers.sh b/scripts/packaging/octez/scripts/systemd-octez-bakers.sh index ee5e7d10b6a7..e3ac2e789497 100755 --- a/scripts/packaging/octez/scripts/systemd-octez-bakers.sh +++ b/scripts/packaging/octez/scripts/systemd-octez-bakers.sh @@ -19,13 +19,22 @@ for file in /usr/bin/octez-baker-P*; do systemctl enable octez-dal-node systemctl start octez-dal-node fi - systemctl enable "octez-baker@$proto" + if [ "$AGNOSTIC_BAKER" = "true" ]; then + systemctl enable "octez-agnostic-baker" + systemctl start "octez-agnostic-baker" + else + systemctl enable "octez-baker@$proto" + systemctl start "octez-baker@$proto" + fi systemctl enable "octez-accuser@$proto" - systemctl start "octez-baker@$proto" systemctl start "octez-accuser@$proto" elif [ "$1" = "stop" ]; then - systemctl stop "octez-baker@$proto" + if [ "$AGNOSTIC_BAKER" = "true" ]; then + systemctl stop "octez-agnostic-baker" + else + systemctl stop "octez-baker@$proto" + fi systemctl stop "octez-accuser@$proto" if grep -q "\-\-dal-node" /etc/default/octez-baker; then systemctl stop octez-dal-node -- GitLab From 3f1c95fa8abe8644a1ed69b2367fdde285a497ba Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Thu, 17 Apr 2025 11:45:53 +0200 Subject: [PATCH 2/4] Packages/Baker: remove octez-agnostic-baker --- scripts/packaging/octez/debian/control | 22 ----- .../octez/debian/octez-agnostic-baker.config | 89 ------------------ .../octez/debian/octez-agnostic-baker.default | 7 -- .../octez/debian/octez-agnostic-baker.install | 4 - .../octez-agnostic-baker.lintian-overrides | 1 - .../debian/octez-agnostic-baker.logrotate | 35 ------- .../debian/octez-agnostic-baker.manpages | 2 - ...octez-agnostic-baker.octez-accuser.default | 2 - ...ctez-agnostic-baker.octez-accuser@.service | 21 ----- ...tic-baker.octez-agnostic-baker-bin.service | 26 ----- .../debian/octez-agnostic-baker.postinst | 94 ------------------- .../octez/debian/octez-agnostic-baker.postrm | 43 --------- .../octez/debian/octez-agnostic-baker.preinst | 77 --------------- .../octez/debian/octez-agnostic-baker.prerm | 16 ---- .../octez/debian/octez-agnostic-baker.service | 22 ----- .../debian/octez-agnostic-baker.templates | 41 -------- scripts/packaging/octez/debian/rules | 9 -- .../octez/docs/README.octez-agnostic-baker | 48 ---------- .../octez/manpages/octez-agnostic-baker.1 | 29 ------ .../octez/rpm/SPECS/octez-agnostic-baker.spec | 49 ---------- .../scripts/systemd-octez-agnostic-baker.sh | 35 ------- .../packaging/tests/deb/install-bin-deb.sh | 1 - 22 files changed, 673 deletions(-) delete mode 100755 scripts/packaging/octez/debian/octez-agnostic-baker.config delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.default delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.install delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.lintian-overrides delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.logrotate delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.manpages delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser.default delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser@.service delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.octez-agnostic-baker-bin.service delete mode 100755 scripts/packaging/octez/debian/octez-agnostic-baker.postinst delete mode 100755 scripts/packaging/octez/debian/octez-agnostic-baker.postrm delete mode 100755 scripts/packaging/octez/debian/octez-agnostic-baker.preinst delete mode 100755 scripts/packaging/octez/debian/octez-agnostic-baker.prerm delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.service delete mode 100644 scripts/packaging/octez/debian/octez-agnostic-baker.templates delete mode 100644 scripts/packaging/octez/docs/README.octez-agnostic-baker delete mode 100644 scripts/packaging/octez/manpages/octez-agnostic-baker.1 delete mode 100644 scripts/packaging/octez/rpm/SPECS/octez-agnostic-baker.spec delete mode 100755 scripts/packaging/octez/scripts/systemd-octez-agnostic-baker.sh diff --git a/scripts/packaging/octez/debian/control b/scripts/packaging/octez/debian/control index b743da2a7928..87c4a37961d2 100644 --- a/scripts/packaging/octez/debian/control +++ b/scripts/packaging/octez/debian/control @@ -68,28 +68,6 @@ Description: Octez baking software for the Tezos blockchain. octez-dal-node to be installed as well. For key management it is recommended to install a remote signer on a different host. -Package: octez-agnostic-baker -Architecture: amd64 arm64 -Pre-Depends: - octez-client (= ${source:Version}), - debconf (>= 0.5) | debconf-2.0 -Depends: - ${misc:Depends}, ${shlibs:Depends}, - octez-node (= ${source:Version}), - curl, systemd -Recommends: - octez-signer (= ${source:Version}), - octez-dal-node (= ${source:Version}) -Description: Octez baking software for the Tezos blockchain. - The Octez baker includes the necessary tools and functionalities for - participating in the baking process, such as block creation, attestations, and - protocol-specific consensus mechanisms. - . - This package installs the baker, the accuser and the Octez node. By default, - installing this package causes the recommended packages octez-signer and - octez-dal-node to be installed as well. For key management it is recommended - to install a remote signer on a different host. - Package: octez-signer Architecture: amd64 arm64 Depends: ${misc:Depends}, ${shlibs:Depends}, octez-client (= ${source:Version}), diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.config b/scripts/packaging/octez/debian/octez-agnostic-baker.config deleted file mode 100755 index 87acf5ee5ccd..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.config +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh - -set -e - -echoerr() { echo "$@" 1>&2; } - -new=${2:-} - -# shellcheck disable=SC1091 -. /usr/share/debconf/confmodule -db_version 2.0 - -case "$new" in -"") - # fresh install - : nop - ;; -1:*) - echoerr "Upgrade from $new" - if [ -e /etc/default/octez-baker ]; then - #shellcheck disable=SC1091 - . /etc/default/octez-baker - db_set octez-agnostic-baker/liquidity-vote "$LQVOTE" - db_set octez-agnostic-baker/baker-key "$BAKER_KEY" - fi - ;; -*) - if [ -e /etc/octez/agnostic-baker.conf ]; then - echoerr "Legacy upgrade from $new" - echoerr "Updating baker configuration from old /etc/octez/agnostic-baker.conf" - # the values set here in debconf are going to be used in the - # postinst script to write the /etc/default/ files for this - # package - #shellcheck disable=SC1091 - . /etc/octez/agnostic-baker.conf - - if [ -n "${lq_vote:-}" ]; then - echoerr "set lq_vote=$lq_vote" - #shellcheck disable=SC2154 - db_set octez-agnostic-baker/liquidity-vote "$lq_vote" - fi - - if [ -n "${baking_key:-}" ]; then - echoerr "set baking_key=$baking_key" - #shellcheck disable=SC2154 - db_set octez-agnostic-baker/baker-key "$baking_key" - fi - - if [ -n "${dalurl:-}" ]; then - echoerr "set dalurl=$dalurl" - if [ "$dalurl" = "" ]; then - #shellcheck disable=SC2154 - db_set octez-agnostic-baker/dal-node false - else - db_set octez-agnostic-baker/dal-node true - db_set octez-agnostic-baker/dal-node-url "$dalurl" - fi - else - db_set octez-agnostic-baker/dal-node true - fi - - #shellcheck disable=SC2119 - db_go - fi - ;; -esac - -db_input high octez-agnostic-baker/liquidity-vote || true -# shellcheck disable=SC2119 -db_go || true - -db_input medium octez-agnostic-baker/baker-key || true -# shellcheck disable=SC2119 -db_go || true - -db_input medium octez-agnostic-baker/dal-node || true -# shellcheck disable=SC2119 -db_go || true - -db_get octez-agnostic-baker/dal-node -if [ "$RET" = "true" ]; then - db_get octez-agnostic-baker/dal-node-url - if [ -z "$RET" ]; then - db_set octez-agnostic-baker/dal-node-url "http://127.0.0.1:10732" - fi - db_input low octez-agnostic-baker/dal-node-url || true - # shellcheck disable=SC2119 - db_go || true -fi diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.default b/scripts/packaging/octez/debian/octez-agnostic-baker.default deleted file mode 100644 index 1d5ddc13c9c9..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.default +++ /dev/null @@ -1,7 +0,0 @@ - -# Data Directory -# we use the datadir defined in /etc/default/octez-node - -# Other options -# Keep the daemon process alive -RUNTIME_OPTS="--keep-alive --dal-node http://127.0.0.1:10732" diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.install b/scripts/packaging/octez/debian/octez-agnostic-baker.install deleted file mode 100644 index 6bd44283b290..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.install +++ /dev/null @@ -1,4 +0,0 @@ -binaries/octez-baker /usr/bin/ -binaries/octez-accuser-P* /usr/bin/ -scripts/wait-for-node-up.sh /usr/share/octez-agnostic-baker/ -scripts/systemd-octez-agnostic-baker.sh /usr/share/octez-agnostic-baker/ diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.lintian-overrides b/scripts/packaging/octez/debian/octez-agnostic-baker.lintian-overrides deleted file mode 100644 index 07cf7978d2f6..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -octez-agnostic-baker: initial-upload-closes-no-bugs diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.logrotate b/scripts/packaging/octez/debian/octez-agnostic-baker.logrotate deleted file mode 100644 index ff3f5fae73de..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.logrotate +++ /dev/null @@ -1,35 +0,0 @@ -/var/log/tezos/agnostic-baker.log{ - daily - # we use copytruncate to avoid stopping node. - copytruncate - rotate 5 - compress - minsize 1M -} - -/var/log/tezos/accuser.log{ - daily - # we use copytruncate to avoid stopping node. - copytruncate - rotate 5 - compress - minsize 1M -} - -/var/log/tezos/accuser-next.log{ - daily - # we use copytruncate to avoid stopping node. - copytruncate - rotate 5 - compress - minsize 1M -} - -/var/log/tezos/accuser-active.log{ - daily - # we use copytruncate to avoid stopping node. - copytruncate - rotate 5 - compress - minsize 1M -} diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.manpages b/scripts/packaging/octez/debian/octez-agnostic-baker.manpages deleted file mode 100644 index 24ddd9f55431..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.manpages +++ /dev/null @@ -1,2 +0,0 @@ -manpages/octez-baker.1 -manpages/octez-accuser.1 diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser.default b/scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser.default deleted file mode 100644 index ca9dff757782..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser.default +++ /dev/null @@ -1,2 +0,0 @@ -# Keep the daemon process alive: when the connection with the node is lost -RUNTIME_OPTS="--keep-alive" diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser@.service b/scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser@.service deleted file mode 100644 index 53bde9abe77a..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.octez-accuser@.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=Octez accuser for protocol %i -Documentation=https://octez.tezos.com/docs/ -After=network.target - -[Service] -EnvironmentFile=-/etc/default/octez-baker -EnvironmentFile=-/etc/default/octez-accuser -WorkingDirectory=~ -Restart=on-failure -User=tezos -ExecStart=/bin/sh -c "/usr/bin/octez-accuser-%i run $RUNTIME_OPTS" - -ExecStartPre=+touch /var/log/tezos/accuser-%i.log -ExecStartPre=+chown tezos:tezos /var/log/tezos/accuser-%i.log - -StandardOutput=append:/var/log/tezos/accuser-%i.log -StandardError=inherit - -[Install] -WantedBy=multi-user.target diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.octez-agnostic-baker-bin.service b/scripts/packaging/octez/debian/octez-agnostic-baker.octez-agnostic-baker-bin.service deleted file mode 100644 index 63ada3d127d1..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.octez-agnostic-baker-bin.service +++ /dev/null @@ -1,26 +0,0 @@ -[Unit] -Description=Octez agnostic baker service -Documentation=https://octez.tezos.com/docs/ -After=network.target - -[Service] -Type=simple -Restart=on-failure -TimeoutStartSec=infinity -TimeoutStopSec=300 - -EnvironmentFile=-/etc/default/octez-node -EnvironmentFile=-/etc/default/octez-baker -WorkingDirectory=~ -User=tezos - -ExecStartPre=+touch /var/log/tezos/agnostic-baker.log -ExecStartPre=+chown tezos:tezos /var/log/tezos/agnostic-baker.log - -ExecStart=/bin/sh -c "/usr/bin/octez-baker --base-dir $HOME/.tezos-client run with local node $DATADIR --liquidity-baking-toggle-vote $LQVOTE $RUNTIME_OPTS $BAKING_KEY" - -StandardOutput=append:/var/log/tezos/agnostic-baker.log -StandardError=inherit - -[Install] -WantedBy=multi-user.target diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.postinst b/scripts/packaging/octez/debian/octez-agnostic-baker.postinst deleted file mode 100755 index 8e5e8796ca61..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.postinst +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh - -set -e - -# shellcheck disable=SC1091 -. /usr/share/debconf/confmodule - -echoerr() { echo "$@" 1>&2; } - -db_version 2.0 - -# work directory to store temporary files associated to this package -mkdir -p /run/octez-agnostic-baker - -case "${1}" in -configure) - # if $2 is empty, then we're doing a fresh install. - # if $DPKG_RUNNING_VERSION" is empty a reconfigure - # Otherwise we're upgrading - if [ -z "${2:-}" ] || [ -z "$DPKG_RUNNING_VERSION" ]; then - echoerr "Fresh installation (or reconfigure) of the Octez agnostic baker" - - db_get octez-agnostic-baker/liquidity-vote - echo "LQVOTE=${RET}" > /etc/default/octez-baker - - db_get octez-agnostic-baker/baker-key - echo "BAKER_KEY=${RET}" >> /etc/default/octez-baker - - db_get octez-agnostic-baker/dal-node - DAL=${RET} - case "$DAL" in - true) - db_get octez-agnostic-baker/dal-node-url - DALURL=${RET} - echo "RUNTIME_OPTS=\"--keep-alive --dal-node $DALURL\"" >> /etc/default/octez-baker - ;; - false) - echo "RUNTIME_OPTS=--keep-alive --without-dal" >> /etc/default/octez-baker - ;; - esac - - mkdir -p /var/tezos/.tezos-client - chown tezos:tezos /var/tezos/.tezos-client - else - echoerr "Upgrading octez-agnostic-baker from version $2 ( postinst )" - # the configure script is called with the version of the old - # package in case of upgrade. We display a message to the user - # in this case. See octez-node.postinst for a detailed explanation. - case "$2" in - 1:*) - : noop - ;; - *) - echoerr "Setting defaults in /etc/default/octez-baker" - echoerr "Migrating values when possible" - - db_get octez-agnostic-baker/liquidity-vote - echo "LQVOTE=${RET}" >> /etc/default/octez-baker - echoerr "LQVOTE=${RET}" - - db_get octez-agnostic-baker/baker-key - echo "BAKER_KEY=${RET}" >> /etc/default/octez-baker - echoerr "BAKER_KEY=${RET}" - - db_get octez-agnostic-baker/dal-node - DAL=${RET} - case "$DAL" in - true) - db_get octez-agnostic-baker/dal-node-url - DALURL=${RET} - echo "RUNTIME_OPTS=\" --keep-alive --dal-node $DALURL\"" >> /etc/default/octez-baker - echoerr "RUNTIME_OPTS=--keep-alive --dal-node $DALURL" - ;; - false) - echo "RUNTIME_OPTS=--keep-alive --without-dal" >> /etc/default/octez-baker - echoerr "RUNTIME_OPTS=--keep-alive --without-dal" - ;; - esac - - db_input high octez-agnostic-baker/upgrade_note_current || true - #shellcheck disable=SC2119 - db_go || true - ;; - esac - fi - ;; -*) - : nop - ;; -esac - -systemctl daemon-reload || true - -#DEBHELPER# diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.postrm b/scripts/packaging/octez/debian/octez-agnostic-baker.postrm deleted file mode 100755 index 4ea82ae34e4e..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.postrm +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -set -e - -# Load debconf library -# shellcheck disable=SC1091 -. /usr/share/debconf/confmodule - -# systemctl should not be called directly. use this -# wrapper script if available -debsystemctl=$(command -v deb-systemd-invoke || echo systemctl) - -case "${1}" in -remove) - rm -Rf /run/octez-agnostic-baker - ;; -purge) - rm -Rf /run/octez-agnostic-baker - # Purge debconf data for the package in any case - # shellcheck disable=SC2119 - db_purge || true - rm -f "/var/tezos/.tezos-client/*_highwatermarks" - rm -f "/var/tezos/.tezos-client/*_stateful_nonces" - rm -Rf "/var/tezos/.tezos-client/logs" - rm -f /var/log/tezos/accuser*.log - rm -f /var/log/tezos/agnostic-baker.log - echo "Octez agnostic baker purged" - ;; -upgrade) - echo "Restarting Octez agnostic baker daemon: octez-agnostic-baker" - $debsystemctl "start octez-agnostic-baker.service" - ;; -failed-upgrade | abort-install | abort-upgrade | disappear) ;; -*) - echo "postrm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# Clean up the temporary file -rm -f /run/octez-agnostic-baker/*daemon_was_running - -#DEBHELPER# diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.preinst b/scripts/packaging/octez/debian/octez-agnostic-baker.preinst deleted file mode 100755 index 0449ad9d7b75..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.preinst +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -set -e - -# shellcheck disable=SC1091 -. /usr/share/debconf/confmodule - -db_version 2.0 - -# work directory to store temporary files associated to this package -mkdir -p /run/octez-agnostic-baker - -case "${1}" in -install | upgrade) - # if $2 is empty, then we're doing a fresh install. - # Ohtwerwise we're upgrading - if [ -n "$2" ]; then - # the configure script is called with the version of the old - # package in case of upgrade. We display a message to the user - # in this case - echo "Upgrading Octez agnostic baker from version $2 ( preinst )" - case "$2" in - 1:*) - if [ -e /etc/default/octez-baker ]; then - #shellcheck disable=SC1091 - . /etc/default/octez-baker - db_set octez-agnostic-baker/liquidity-vote "$LQVOTE" - db_set octez-agnostic-baker/baker-key "$BAKER_KEY" - fi - ;; - *) - if [ -e /etc/octez/agnostic-baker.conf ]; then - echo "Updating baker configuration from old /etc/octez/agnostic-baker.conf" - # the values set here in debconf are going to be used in the - # postinst script to write the /etc/default/ files for this - # package - #shellcheck disable=SC1091 - . /etc/octez/agnostic-baker.conf - - if [ -n "${lq_vote:-}" ]; then - echo "set lq_vote=$lq_vote" - #shellcheck disable=SC2154 - db_set octez-agnostic-baker/liquidity-vote "$lq_vote" - fi - - if [ -n "${baking_key:-}" ]; then - echo "set baking_key=$baking_key" - #shellcheck disable=SC2154 - db_set octez-agnostic-baker/baker-key "$baking_key" - fi - - if [ -n "${dalurl:-}" ]; then - echo "set dalurl=$dalurl" - if [ "$dalurl" = "" ]; then - #shellcheck disable=SC2154 - db_set octez-agnostic-baker/dal-node false - else - db_set octez-agnostic-baker/dal-node true - db_set octez-agnostic-baker/dal-node-url "$dalurl" - fi - else - db_set octez-agnostic-baker/dal-node true - fi - - #shellcheck disable=SC2119 - db_go - fi - ;; - esac - fi - ;; -*) - echo "preinst noop" - ;; -esac - -#DEBHELPER# diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.prerm b/scripts/packaging/octez/debian/octez-agnostic-baker.prerm deleted file mode 100755 index e71b77c6bde3..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.prerm +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -# shellcheck disable=SC1091 -. /usr/share/debconf/confmodule - -# systemctl should not be called directly. use this -# wrapper script if available -debsystemctl=$(command -v deb-systemd-invoke || echo systemctl) - -# Check if the old daemon is active before stopping it -if systemctl is-active --quiet "octez-agnostic-baker.service"; then - echo "Stopping old octez-agnostic-baker" - $debsystemctl stop "octez-agnostic-baker.service" -fi diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.service b/scripts/packaging/octez/debian/octez-agnostic-baker.service deleted file mode 100644 index 4e8cd41a2d64..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Octez baker service -After=network.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Restart=on-failure -TimeoutStartSec=300 -TimeoutStopSec=300 - -EnvironmentFile=-/etc/default/octez-node -EnvironmentFile=-/etc/default/octez-baker - -# The baker is started only if the node is up and running -ExecStartPre=/usr/share/octez-agnostic-baker/wait-for-node-up.sh - -ExecStart=/usr/share/octez-agnostic-baker/systemd-octez-agnostic-baker.sh start -ExecStop=/usr/share/octez-agnostic-baker/systemd-octez-agnostic-baker.sh stop - -[Install] -WantedBy=multi-user.target diff --git a/scripts/packaging/octez/debian/octez-agnostic-baker.templates b/scripts/packaging/octez/debian/octez-agnostic-baker.templates deleted file mode 100644 index b15d336fae27..000000000000 --- a/scripts/packaging/octez/debian/octez-agnostic-baker.templates +++ /dev/null @@ -1,41 +0,0 @@ -Template: octez-agnostic-baker/liquidity-vote -Description: Your choice for the liquidity vote: - Vote to continue or end the liquidity baking subsidy. The possible values for - this option are: "off" to request ending the subsidy, "on" to request - continuing or restarting the subsidy, and "pass" to abstain. - . - This option is mandatory to start the baker. -Type: select -Choices: off, on, pass - -Template: octez-agnostic-baker/baker-key -Description: The baker key to associate to this baker: - Name of the delegate to attest and bake for or the name of the consensus key - signing on the delegate's behalf. The key is required to run the baker, but it - can also be added later while configuring the baker. -Type: string - -Template: octez-agnostic-baker/dal-node -Type: boolean -Default: true -Description: Connect to the Octez DAL node? - By default, the octez-dal-node package is installed alongside the octez-agnostic-baker - package to participate to the DAL network. - . - Possible options: "--dal-node http://127.0.0.1:10732" or "--without-dal". - -Template: octez-agnostic-baker/dal-node-url -Type: string -Default: http://127.0.0.1:10732 -Description: Specify the url of the RPC server of the Octez DAL node: - By default the octez-dal-node package is installed alongside the octez-agnostic-baker. - -Template: octez-agnostic-baker/upgrade_note_current -Type: note -Description: Important upgrade information - This package has been upgraded to a new version. Please note that some changes - have been made that may affect your usage of the package. The configuration - of the package has been updated. If you did any customizations, please check - the configuration of the octez-agnostic-baker - . - Please review the release notes for more information. diff --git a/scripts/packaging/octez/debian/rules b/scripts/packaging/octez/debian/rules index ee575016d004..7476841c1f58 100755 --- a/scripts/packaging/octez/debian/rules +++ b/scripts/packaging/octez/debian/rules @@ -21,15 +21,12 @@ override_dh_installman: do \ ln -s debian/octez-baker/usr/share/man/man1/octez-accuser.1.gz \ debian/octez-baker/usr/share/man/man1/$$bin.1.gz ; \ - ln -s debian/octez-agnostic-baker/usr/share/man/man1/octez-accuser.1.gz \ - debian/octez-agnostic-baker/usr/share/man/man1/$$bin.1.gz ; \ done override_dh_installdocs: dh_installdocs dh_installdocs -p octez-node docs/README.octez-node dh_installdocs -p octez-baker docs/README.octez-baker - dh_installdocs -p octez-agnostic-baker docs/README.octez-agnostic-baker dh_installdocs -p octez-signer docs/octez-signer.service dh_installdocs -p octez-signer docs/README.octez-signer @@ -40,21 +37,15 @@ override_dh_installsystemd: dh_installsystemd -p octez-baker --no-start dh_installsystemd -p octez-baker --no-enable --no-start --name octez-accuser@ dh_installsystemd -p octez-baker --no-enable --no-start --name octez-agnostic-baker - dh_installsystemd -p octez-agnostic-baker --no-start - dh_installsystemd -p octez-agnostic-baker --no-enable --no-start --name octez-accuser@ - dh_installsystemd -p octez-agnostic-baker --no-enable --no-start --name octez-agnostic-baker-bin override_dh_installlogrotate: dh_installlogrotate --package=octez-node dh_installlogrotate --package=octez-baker - dh_installlogrotate --package=octez-agnostic-baker override_dh_install: dh_install mkdir -p debian/octez-baker/etc/default/ cp debian/octez-baker.octez-accuser.default debian/octez-baker/etc/default/octez-accuser - mkdir -p debian/octez-agnostic-baker/etc/default/ - cp debian/octez-agnostic-baker.octez-accuser.default debian/octez-agnostic-baker/etc/default/octez-accuser dh_installdebconf override_dh_fixperms: diff --git a/scripts/packaging/octez/docs/README.octez-agnostic-baker b/scripts/packaging/octez/docs/README.octez-agnostic-baker deleted file mode 100644 index 79f246a70b20..000000000000 --- a/scripts/packaging/octez/docs/README.octez-agnostic-baker +++ /dev/null @@ -1,48 +0,0 @@ -# Octez Agnostic Baker - -The octez agnostic baker should be configured to run along side a remote signer. - -This package provides systemd services for both the baker and the accuser -and for the active and next protocol. For example, you can start the -baker using - -``` -$ sudo systemctl start octez-agnostic-baker -``` - -All services are enabled but not started by default. It's up to the user -to configure them. - -## Usage with a remote signer - -The remote signer can be located either on the same machine, or better -on a separate machine and connected to a ledger. - -This package does not make any assumption on how the final user will -configure its baker. We provide as an example some steps a user should -take to configure its baker service to communicate with a remote signer. - -We assume, for the sake of brevity, that the signer is configured to -answer on a local http connection running on localhost and will use -authentication. - -For example, assuming the octez-signer is already setup: -``` -$ octez-signer show address alice -Hash: tz1V7TgBR52wAjjqsh24w8y9CymFGdegt9qs -Public Key: edpkvGAz71r8SZomcvF7LGajXT3AnhYX9CrmK3JWgA2xk8rf8CudY8 - -# Tell the baker about this signer -$ sudo su tezos -c "octez-client -R tcp://localhost:7732 config update" - -# add the remote key to the baker -$ sudo su tezos -c "octez-client -R tcp://localhost:7732 import secret key alice remote:tz1V7TgBR52wAjjqsh24w8y9CymFGdegt9qs" - -# Check that everything is ok -# you should see the the operation in the logs of the signer -# journalctl --user-unit octez-signer -$ sudo su tezos -c "octez-client sign bytes 0x03 for alice" - -# Register your baking account -$ sudo su tezos -c "octez-client register key alice as delegate" -``` diff --git a/scripts/packaging/octez/manpages/octez-agnostic-baker.1 b/scripts/packaging/octez/manpages/octez-agnostic-baker.1 deleted file mode 100644 index cd5597596f25..000000000000 --- a/scripts/packaging/octez/manpages/octez-agnostic-baker.1 +++ /dev/null @@ -1,29 +0,0 @@ -.TH OCTEZ-AGNOSTIC-BAKER 1 "January 2024" "Octez Agnostic Baker Manual" - -.SH NAME -octez-agnostic-baker \- Octez Baker Daemon - -.SH SYNOPSIS -.B octez-agnostic-baker -[\fIOPTION\fR]... \fI\fR [\fIARGS\fR]... - -.SH DESCRIPTION -.B octez-agnostic-baker -includes the necessary tools and functionalities for participating in the -baking process, such as block creation, attestations, and protocol-specific -consensus mechanisms. - -.SH OPTIONS -.TP -.B \-h, \-\-help -Display help information. - -.TP -.B \-\-version -Display version information. - -.SH SEE ALSO -Online Octez Documentation: https://tezos.gitlab.io/shell/cli-commands.html - -.SH BUGS -Report bugs to: https://gitlab.com/tezos/tezos/-/issues diff --git a/scripts/packaging/octez/rpm/SPECS/octez-agnostic-baker.spec b/scripts/packaging/octez/rpm/SPECS/octez-agnostic-baker.spec deleted file mode 100644 index 4a93ca2c36d8..000000000000 --- a/scripts/packaging/octez/rpm/SPECS/octez-agnostic-baker.spec +++ /dev/null @@ -1,49 +0,0 @@ -Name: octez-agnostic-baker -Version: %{version} -%if "%{epoch}" != "" -Epoch: %{epoch} -%endif -Release: 1%{?dist} -Summary: Octez baking software for the Tezos blockchain. -License: MIT -Requires: octez-node curl systemd -Recommends: octez-signer -Requires(pre): octez-client -%description - The Octez baker includes the necessary tools and functionalities for - participating in the baking process, such as block creation, attestations, and - protocol-specific consensus mechanisms. - - This package installs the baker, the accuser and the Octez node. For key - management it is recommended to install a remote signer of a different host. -%install -mkdir -p %{buildroot}/usr/bin/ -mkdir -p %{buildroot}/usr/share/octez-agnostic-baker -install -m 0755 $HOME/rpmbuild/SPECS/binaries/octez-baker %{buildroot}/usr/bin/ -install -m 0755 $HOME/rpmbuild/SPECS/binaries/octez-accuser-P* %{buildroot}/usr/bin/ -install -m 0755 $HOME/rpmbuild/SPECS/scripts/wait-for-node-up.sh %{buildroot}/usr/share/octez-agnostic-baker/ -install -m 0755 $HOME/rpmbuild/SPECS/scripts/systemd-octez-agnostic-baker.sh %{buildroot}/usr/share/octez-agnostic-baker/ -install -D -m 644 $HOME/rpmbuild/SPECS/manpages/octez-agnostic-baker.1 %{buildroot}%{_mandir}/man1/octez-agnostic-baker.1 -gzip %{buildroot}%{_mandir}/man1/octez-agnostic-baker.1 -install -D -m 644 $HOME/rpmbuild/SPECS/manpages/octez-accuser.1 %{buildroot}%{_mandir}/man1/octez-accuser.1 -gzip %{buildroot}%{_mandir}/man1/octez-accuser.1 -install -D -m 644 $HOME/rpmbuild/SPECS/octez-agnostic-baker.octez-accuser@.service %{buildroot}/usr/lib/systemd/system/octez-accuser@.service -install -D -m 644 $HOME/rpmbuild/SPECS/octez-agnostic-baker.service %{buildroot}/usr/lib/systemd/system/octez-agnostic-baker.service -install -D -m 644 $HOME/rpmbuild/SPECS/octez-agnostic-baker.octez-agnostic-baker-bin.service %{buildroot}/usr/lib/systemd/system/octez-agnostic-baker-bin.service -install -D -m 644 $HOME/rpmbuild/SPECS/octez-agnostic-baker.octez-accuser.default %{buildroot}/etc/default/octez-accuser -install -D -m 644 $HOME/rpmbuild/SPECS/octez-agnostic-baker.default %{buildroot}/etc/default/octez-baker -%files -/usr/bin/octez-baker -/usr/bin/octez-accuser-* -/usr/share/octez-agnostic-baker/wait-for-node-up.sh -/usr/share/octez-agnostic-baker/systemd-octez-agnostic-baker.sh -%{_mandir}/man1/octez-agnostic-baker.1.gz -%{_mandir}/man1/octez-accuser.1* -/usr/lib/systemd/system/octez-accuser@.service -/usr/lib/systemd/system/octez-agnostic-baker.service -/usr/lib/systemd/system/octez-agnostic-baker-bin.service -/etc/default/octez-accuser -/etc/default/octez-baker -%postun -%post -%preun diff --git a/scripts/packaging/octez/scripts/systemd-octez-agnostic-baker.sh b/scripts/packaging/octez/scripts/systemd-octez-agnostic-baker.sh deleted file mode 100755 index 9656c12e1ad1..000000000000 --- a/scripts/packaging/octez/scripts/systemd-octez-agnostic-baker.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# - -# Check if the argument is valid (start or stop) -if [ "$1" != "start" ] && [ "$1" != "stop" ]; then - echo "Usage: $0 {start|stop}" - exit 1 -fi - -# Loop through each file matching the pattern -# NB: we avoid selecting `-alpha` or `-next` bakers -for file in /usr/bin/octez-accuser-P*; do - file=$(basename "$file") - proto=$(echo "$file" | sed 's/^octez-accuser-//') - - # Enable or start/stop the systemd service based on the argument - if [ "$1" = "start" ]; then - if grep -q "\-\-dal-node" /etc/default/octez-baker; then - systemctl enable octez-dal-node - systemctl start octez-dal-node - fi - systemctl enable "octez-agnostic-baker-bin" - systemctl start "octez-agnostic-baker-bin" - systemctl enable "octez-accuser@$proto" - systemctl start "octez-accuser@$proto" - - elif [ "$1" = "stop" ]; then - systemctl stop "octez-accuser@$proto" - if grep -q "\-\-dal-node" /etc/default/octez-baker; then - systemctl stop octez-dal-node - fi - fi -done - -echo "systemd-octez-agnostic-baker.sh done" diff --git a/scripts/packaging/tests/deb/install-bin-deb.sh b/scripts/packaging/tests/deb/install-bin-deb.sh index 7c1438c49461..fbeb4ba3728c 100755 --- a/scripts/packaging/tests/deb/install-bin-deb.sh +++ b/scripts/packaging/tests/deb/install-bin-deb.sh @@ -56,7 +56,6 @@ octez-node octez-node/purge_warning boolean true octez-node octez-node/snapshot-import boolean true octez-node octez-node/snapshot-no-check boolean true octez-baker octez-baker/liquidity-vote select on -octez-agnostic-baker octez-baker/liquidity-vote select on debconf debconf/frontend select Noninteractive EOF # preseed the package -- GitLab From 19bf45e1f4b808b86ecba40320593683a215f339 Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Thu, 17 Apr 2025 11:55:00 +0200 Subject: [PATCH 3/4] Packages/Baker: adapt tests --- .../packaging/tests/deb/install-bin-deb.sh | 6 +----- .../tests/tests-systemd-common.inc.sh | 20 ++++++++----------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/scripts/packaging/tests/deb/install-bin-deb.sh b/scripts/packaging/tests/deb/install-bin-deb.sh index fbeb4ba3728c..f01c6447c63b 100755 --- a/scripts/packaging/tests/deb/install-bin-deb.sh +++ b/scripts/packaging/tests/deb/install-bin-deb.sh @@ -65,11 +65,7 @@ EOF sudo debconf-get-selections | grep octez fi -if [ "${AGNOSTIC_BAKER:-}" = "true" ]; then - apt-get install -y octez-agnostic-baker -else - apt-get install -y octez-baker -fi +apt-get install -y octez-baker if [ -n "$DATADIR" ]; then echo "Setup Custom data dir" diff --git a/scripts/packaging/tests/tests-systemd-common.inc.sh b/scripts/packaging/tests/tests-systemd-common.inc.sh index d70de7a0b00f..2eae8027c707 100644 --- a/scripts/packaging/tests/tests-systemd-common.inc.sh +++ b/scripts/packaging/tests/tests-systemd-common.inc.sh @@ -6,22 +6,20 @@ systemctl start octez-node.service # give some time to the node to create the identity # otherwise the octez-client call below will give an error -if [ "${AGNOSTIC_BAKER:-}" = "true" ]; then - /usr/share/octez-agnostic-baker/wait-for-node-up.sh -else - /usr/share/octez-baker/wait-for-node-up.sh -fi +/usr/share/octez-baker/wait-for-node-up.sh su tezos -c "octez-client gen keys alice" key=$(su tezos -c "octez-client show address alice" | grep Hash: | awk '{ print $2 }') echo "BAKER_KEY=$key" >> /etc/default/octez-baker if [ "${AGNOSTIC_BAKER:-}" = "true" ]; then - systemctl start octez-agnostic-baker.service + echo "AGNOSTIC_BAKER=true" >> /etc/default/octez-baker else - systemctl start octez-baker.service + echo "AGNOSTIC_BAKER=false" >> /etc/default/octez-baker fi +systemctl start octez-baker.service + su tezos -c "octez-node config show" echo "-----------------------" @@ -35,16 +33,14 @@ echo "Log: /var/log/tezos/node.log" echo "-----------------------" tail /var/log/tezos/node.log +systemctl status octez-baker.service if [ "${AGNOSTIC_BAKER:-}" = "true" ]; then systemctl status octez-agnostic-baker.service - systemctl status octez-agnostic-baker-bin.service - echo "Log: /var/log/tezos/agnostic-baker.log" + echo "Log: /var/log/tezos/baker.log" echo "-----------------------" - tail /var/log/tezos/agnostic-baker.log + tail /var/log/tezos/baker.log else - systemctl status octez-baker.service - for logfile in /var/log/tezos/baker-P*.log; do proto=$(basename "$logfile" | sed -E 's/baker-(P[^.]+).log/\1/') systemctl status "octez-baker@$proto.service" -- GitLab From feb9524719fec5656461018a5a2c91a7bedada0a Mon Sep 17 00:00:00 2001 From: Valentin Chaboche Date: Mon, 28 Apr 2025 11:05:57 +0200 Subject: [PATCH 4/4] Packages/Baker: fix runtime_ops --- scripts/packaging/octez/debian/octez-baker.postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/packaging/octez/debian/octez-baker.postinst b/scripts/packaging/octez/debian/octez-baker.postinst index 17151cb41389..76841024b0c7 100755 --- a/scripts/packaging/octez/debian/octez-baker.postinst +++ b/scripts/packaging/octez/debian/octez-baker.postinst @@ -49,7 +49,7 @@ configure) echo "RUNTIME_OPTS=\"--keep-alive --dal-node $DALURL\"" >> /etc/default/octez-baker ;; false) - echo "RUNTIME_OPTS=--keep-alive --without-dal" >> /etc/default/octez-baker + echo "RUNTIME_OPTS=\"--keep-alive --without-dal\"" >> /etc/default/octez-baker ;; esac -- GitLab