diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8bb544d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+/SRPMS/
+/BUILD/
+/buildtmp/
diff --git a/SOURCES/cosmovisor@.service b/SOURCES/cosmovisor@.service
index bc51cbf..c9466e8 100644
--- a/SOURCES/cosmovisor@.service
+++ b/SOURCES/cosmovisor@.service
@@ -3,10 +3,10 @@ Description=Cosmovisor Daemon for chain %i
After=network-online.target
[Service]
-EnvironmentFile=-/etc/default/cosmovisor
+EnvironmentFile=-/etc/default/cosmovisor@%i
User=%i
PermissionsStartOnly=true
-ExecStart=/usr/bin/cosmovisor start --home /var/lib/%i/.%id --log_level ${DAEMON_LOGLEVEL}
+ExecStart=/usr/bin/cosmovisor start --home ${DAEMON_HOME} --log_level ${DAEMON_LOGLEVEL}
Restart=always
RestartSec=3
LimitNOFILE=infinity
diff --git a/SOURCES/cudos-noded-0.8.0.tar.gz b/SOURCES/cudos-noded-0.8.0.tar.gz
new file mode 100644
index 0000000..0fc20ef
Binary files /dev/null and b/SOURCES/cudos-noded-0.8.0.tar.gz differ
diff --git a/SOURCES/etc_default_cosmovisor-gaia b/SOURCES/etc_default_cosmovisor-gaia
new file mode 100644
index 0000000..35a95dd
--- /dev/null
+++ b/SOURCES/etc_default_cosmovisor-gaia
@@ -0,0 +1,9 @@
+DAEMON_NAME=gaiad
+DAEMON_HOME=/var/lib/gaia/.gaia
+DAEMON_RESTART_AFTER_UPGRADE="true"
+DAEMON_ALLOW_DOWNLOAD_BINARIES="false"
+DAEMON_LOG_BUFFER_SIZE="512"
+UNSAFE_SKIP_BACKUP="true"
+
+DAEMON_LOGLEVEL=info
+
diff --git a/SPECS/cosmovisor.spec b/SPECS/cosmovisor.spec
index b818158..8773f84 100644
--- a/SPECS/cosmovisor.spec
+++ b/SPECS/cosmovisor.spec
@@ -54,6 +54,9 @@ cp ${RPM_SOURCE_DIR}/etc_profiled_cosmovisor.sh ${RPM_BUILD_ROOT}/etc/profile.d/
# Install systemd service files
cp ${RPM_SOURCE_DIR}/cosmovisor@.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,root,root,-)
/etc/profile.d/cosmovisor.sh
diff --git a/SPECS/cudos-network-mainnet.spec b/SPECS/cudos-network-mainnet.spec
index 0e27d9c..e370c34 100644
--- a/SPECS/cudos-network-mainnet.spec
+++ b/SPECS/cudos-network-mainnet.spec
@@ -63,7 +63,7 @@ ln -s /var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0 genesis
cd -
%clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = "1" ]
diff --git a/SPECS/cudos-network-private-testnet.spec b/SPECS/cudos-network-private-testnet.spec
index 80d38dd..6b04582 100644
--- a/SPECS/cudos-network-private-testnet.spec
+++ b/SPECS/cudos-network-private-testnet.spec
@@ -70,7 +70,7 @@ ln -s /var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.8 genesis
cd -
%clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = "1" ]
diff --git a/SPECS/cudos-network-public-testnet.spec b/SPECS/cudos-network-public-testnet.spec
index 004f395..b405f41 100644
--- a/SPECS/cudos-network-public-testnet.spec
+++ b/SPECS/cudos-network-public-testnet.spec
@@ -66,7 +66,7 @@ ln -s /var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9 genesis
cd -
%clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = "1" ]
diff --git a/SPECS/cudos-noded-v0.8.0.spec b/SPECS/cudos-noded-v0.8.0.spec
index ada07df..03d9c4f 100644
--- a/SPECS/cudos-noded-v0.8.0.spec
+++ b/SPECS/cudos-noded-v0.8.0.spec
@@ -15,61 +15,95 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
-# Runs the Cudos Node Daemon
-#
-Name: cudos-noded-v0.8.0
+%global project_title Cudos
+%global parent_url https://github.com/CudoVentures
+%global project_name cudos-node
+
+%global daemon_name cudos-noded
+%global daemon_version v0.8.0
+%global upgrade_name v0.8
+%global obsoletes cudos-noded-v0.3
+
+%global username cudos
+%global data_directory cudos-data
+
+#####################################################################
+# Do not edit below this line
+
+Name: %{daemon_name}-%{daemon_version}
Version: %{_versiontag}
Release: %{_releasetag}%{?dist}
-Summary: Cudos Node v0.8.0 Binary Pack for System version %{version}
+Summary: %{project_title} Node %{daemon_version} Binary Pack for System version %{version}
License: GPL3
-URL: https://github.com/CudoVentures/cudos-node
-Source0: cudos-noded-0.8.0.tar.gz
+URL: %{parent_url}/%{project_name}
-Requires: cudos-noded
+Requires: %{daemon_name}
Requires: cosmovisor
Provides: libwasmvm.so()(64bit)
+Obsoletes: %{obsoletes}
+
%description
-Cudos Node binary and library
-Installed into the Cosmovisor directories
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+parent_url: %{parent_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+daemon_version: %{daemon_version}
+upgrade_name: %{upgrade_name}
+obsoletes: %{obsoletes}
+
+username: %{username}
+data_directory: %{data_directory}
+
+This package contains the files common
+to all versions of the %{project_name}
+node software
+NB This package does not contain any
+ genesis or node configuration information
+
%pre
-getent group cudos >/dev/null || echo " Create Group cudos" || groupadd -r cudos || :
-getent passwd cudos >/dev/null || echo " Create User cudos" || useradd -c "Cudos User" -g cudos -s /bin/bash -r -m -d /var/lib/cudos cudos 2> /dev/null || :
+getent group %{username} >/dev/null || echo " Create Group %{username}" || groupadd -r %{username} || :
+getent passwd %{username} >/dev/null || echo " Create User %{username}" || useradd -c "%{project_title} User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username} 2> /dev/null || :
%prep
echo -e "\n\n=== prep section ===\n\n"
-# Unpack tarball
-rm -rf CudosNode CudosBuilders CudosGravityBridge
-tar xzf %{SOURCE0}
+rm -rf %{project_name}
+git clone -b %{daemon_version} %{parent_url}/%{project_name}
%build
echo -e "\n\n=== build section ===\n\n"
export GOPATH="${RPM_BUILD_DIR}/go"
-cd CudosNode
-make
+cd %{project_name}
+echo -e "\n\n***** Build %{project_title} Daemon *****\n\n"
+make install
+echo -e "\n\n***** Run %{project_title} Daemon Self Test *****\n\n"
+make test || true
%install
echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.8/bin/
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.8/lib/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
# Install the newly built binaries
-cp -v ${RPM_BUILD_DIR}/go/bin/cudos-noded ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.8/bin/
-cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.8/lib/
-chmod 644 ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.8/lib/*.so
+cp -v ${RPM_BUILD_DIR}/go/bin/%{daemon_name} ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+chmod 644 ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/*.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,cudos,cudos,-)
-/var/lib/cudos/cudos-data/cosmovisor/*
+%defattr(-,%{username},%{username},-)
+/var/lib/%{username}/%{data_directory}/cosmovisor/*
%doc
%changelog
diff --git a/SPECS/cudos-noded-v0.9.0.spec b/SPECS/cudos-noded-v0.9.0.spec
index 43d384c..7682744 100644
--- a/SPECS/cudos-noded-v0.9.0.spec
+++ b/SPECS/cudos-noded-v0.9.0.spec
@@ -15,61 +15,95 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
-# Runs the Cudos Node Daemon
-#
-Name: cudos-noded-v0.9.0
+%global project_title Cudos
+%global parent_url https://github.com/CudoVentures
+%global project_name cudos-node
+
+%global daemon_name cudos-noded
+%global daemon_version v0.9.0
+%global upgrade_name v0.9
+%global obsoletes cudos-noded-v0.0.0
+
+%global username cudos
+%global data_directory cudos-data
+
+#####################################################################
+# Do not edit below this line
+
+Name: %{daemon_name}-%{daemon_version}
Version: %{_versiontag}
Release: %{_releasetag}%{?dist}
-Summary: Cudos Node v0.9.0 Binary Pack for System version %{version}
+Summary: %{project_title} Node %{daemon_version} Binary Pack for System version %{version}
License: GPL3
-URL: https://github.com/CudoVentures/cudos-node
-Source0: cudos-noded-0.9.0.tar.gz
+URL: %{parent_url}/%{project_name}
-Requires: cudos-noded
+Requires: %{daemon_name}
Requires: cosmovisor
Provides: libwasmvm.so()(64bit)
+Obsoletes: %{obsoletes}
+
%description
-Cudos Node binary and library
-Installed into the Cosmovisor directories
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+parent_url: %{parent_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+daemon_version: %{daemon_version}
+upgrade_name: %{upgrade_name}
+obsoletes: %{obsoletes}
+
+username: %{username}
+data_directory: %{data_directory}
+
+This package contains the files common
+to all versions of the %{project_name}
+node software
+NB This package does not contain any
+ genesis or node configuration information
+
%pre
-getent group cudos >/dev/null || echo " Create Group cudos" || groupadd -r cudos || :
-getent passwd cudos >/dev/null || echo " Create User cudos" || useradd -c "Cudos User" -g cudos -s /bin/bash -r -m -d /var/lib/cudos cudos 2> /dev/null || :
+getent group %{username} >/dev/null || echo " Create Group %{username}" || groupadd -r %{username} || :
+getent passwd %{username} >/dev/null || echo " Create User %{username}" || useradd -c "%{project_title} User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username} 2> /dev/null || :
%prep
echo -e "\n\n=== prep section ===\n\n"
-# Unpack tarball
-rm -rf CudosNode CudosBuilders CudosGravityBridge
-tar xzf %{SOURCE0}
+rm -rf %{project_name}
+git clone -b %{daemon_version} %{parent_url}/%{project_name}
%build
echo -e "\n\n=== build section ===\n\n"
export GOPATH="${RPM_BUILD_DIR}/go"
-cd CudosNode
-make
+cd %{project_name}
+echo -e "\n\n***** Build %{project_title} Daemon *****\n\n"
+make install
+echo -e "\n\n***** Run %{project_title} Daemon Self Test *****\n\n"
+make test || true
%install
echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9/bin/
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9/lib/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
# Install the newly built binaries
-cp -v ${RPM_BUILD_DIR}/go/bin/cudos-noded ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9/bin/
-cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9/lib/
-chmod 644 ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9/lib/*.so
+cp -v ${RPM_BUILD_DIR}/go/bin/%{daemon_name} ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+chmod 644 ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/*.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,cudos,cudos,-)
-/var/lib/cudos/cudos-data/cosmovisor/*
+%defattr(-,%{username},%{username},-)
+/var/lib/%{username}/%{data_directory}/cosmovisor/*
%doc
%changelog
diff --git a/SPECS/cudos-noded-v1.0.0.spec b/SPECS/cudos-noded-v1.0.0.spec
deleted file mode 100644
index 46b6089..0000000
--- a/SPECS/cudos-noded-v1.0.0.spec
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Copyright 2022 Andrew Meredith
-# Copyright 2022 Cudo Ventures - All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-# Runs the Cudos Node Daemon
-#
-
-Name: cudos-noded-v1.0.0
-Version: %{_versiontag}
-Release: %{_releasetag}%{?dist}
-Summary: Cudos Node v1.0.0 Binary Pack for System version %{version}
-
-License: GPL3
-URL: https://github.com/CudoVentures/cudos-node
-Source0: cudos-noded-1.0.0.tar.gz
-
-Requires: cudos-noded
-Requires: cosmovisor
-
-Provides: libwasmvm.so()(64bit)
-
-%description
-Cudos Node binary and library
-Installed into the Cosmovisor directories
-
-%pre
-getent group cudos >/dev/null || echo " Create Group cudos" || groupadd -r cudos || :
-getent passwd cudos >/dev/null || echo " Create User cudos" || useradd -c "Cudos User" -g cudos -s /bin/bash -r -m -d /var/lib/cudos cudos 2> /dev/null || :
-
-%prep
-echo -e "\n\n=== prep section ===\n\n"
-# Unpack tarball
-rm -rf CudosNode CudosBuilders CudosGravityBridge
-tar xzf %{SOURCE0}
-
-%build
-echo -e "\n\n=== build section ===\n\n"
-export GOPATH="${RPM_BUILD_DIR}/go"
-cd CudosNode
-make
-
-%install
-echo -e "\n\n=== install section ===\n\n"
-
-# Make the fixed directory structure
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/bin/
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/lib/
-
-# Install the newly built binaries
-cp -v ${RPM_BUILD_DIR}/go/bin/cudos-noded ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/bin/
-cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/lib/
-chmod 644 ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/lib/*.so
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,cudos,cudos,-)
-/var/lib/cudos/cudos-data/cosmovisor/*
-%doc
-
-%changelog
diff --git a/SPECS/cudos-noded-v1.0.1.spec b/SPECS/cudos-noded-v1.0.1.spec
index f1ea7e8..2815511 100644
--- a/SPECS/cudos-noded-v1.0.1.spec
+++ b/SPECS/cudos-noded-v1.0.1.spec
@@ -16,60 +16,94 @@
# along with this program. If not, see .
#
-Name: cudos-noded-v1.0.1
+%global project_title Cudos
+%global parent_url https://github.com/CudoVentures
+%global project_name cudos-node
+
+%global daemon_name cudos-noded
+%global daemon_version v1.0.1
+%global upgrade_name v1.0
+%global obsoletes cudos-noded-v1.0.0
+
+%global username cudos
+%global data_directory cudos-data
+
+#####################################################################
+# Do not edit below this line
+
+Name: %{daemon_name}-%{daemon_version}
Version: %{_versiontag}
Release: %{_releasetag}%{?dist}
-Summary: Cudos Node v1.0.1 Binary Pack for System version %{version}
+Summary: %{project_title} Node %{daemon_version} Binary Pack for System version %{version}
License: GPL3
-URL: https://github.com/CudoVentures/cudos-node
-Source0: cudos-noded-1.0.1.tar.gz
+URL: %{parent_url}/%{project_name}
-Requires: cudos-noded
+Requires: %{daemon_name}
Requires: cosmovisor
Provides: libwasmvm.so()(64bit)
-Obsoletes: cudos-noded-v1.0.0
+Obsoletes: %{obsoletes}
%description
-Cudos Node binary and library
-Installed into the Cosmovisor directories
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+parent_url: %{parent_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+daemon_version: %{daemon_version}
+upgrade_name: %{upgrade_name}
+obsoletes: %{obsoletes}
+
+username: %{username}
+data_directory: %{data_directory}
+
+This package contains the files common
+to all versions of the %{project_name}
+node software
+NB This package does not contain any
+ genesis or node configuration information
+
%pre
-getent group cudos >/dev/null || echo " Create Group cudos" || groupadd -r cudos || :
-getent passwd cudos >/dev/null || echo " Create User cudos" || useradd -c "Cudos User" -g cudos -s /bin/bash -r -m -d /var/lib/cudos cudos 2> /dev/null || :
+getent group %{username} >/dev/null || echo " Create Group %{username}" || groupadd -r %{username} || :
+getent passwd %{username} >/dev/null || echo " Create User %{username}" || useradd -c "%{project_title} User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username} 2> /dev/null || :
%prep
echo -e "\n\n=== prep section ===\n\n"
-# Unpack tarball
-rm -rf CudosNode CudosBuilders CudosGravityBridge
-tar xzf %{SOURCE0}
+rm -rf %{project_name}
+git clone -b %{daemon_version} %{parent_url}/%{project_name}
%build
echo -e "\n\n=== build section ===\n\n"
export GOPATH="${RPM_BUILD_DIR}/go"
-cd CudosNode
-make
+cd %{project_name}
+echo -e "\n\n***** Build %{project_title} Daemon *****\n\n"
+make install
+echo -e "\n\n***** Run %{project_title} Daemon Self Test *****\n\n"
+make test || true
%install
echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/bin/
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/lib/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
# Install the newly built binaries
-cp -v ${RPM_BUILD_DIR}/go/bin/cudos-noded ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/bin/
-cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/lib/
-chmod 644 ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0/lib/*.so
+cp -v ${RPM_BUILD_DIR}/go/bin/%{daemon_name} ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+chmod 644 ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/*.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,cudos,cudos,-)
-/var/lib/cudos/cudos-data/cosmovisor/*
+%defattr(-,%{username},%{username},-)
+/var/lib/%{username}/%{data_directory}/cosmovisor/*
%doc
%changelog
diff --git a/SPECS/cudos-noded-v1.1.0.1.spec b/SPECS/cudos-noded-v1.1.0.1.spec
index 13f42cc..2372349 100644
--- a/SPECS/cudos-noded-v1.1.0.1.spec
+++ b/SPECS/cudos-noded-v1.1.0.1.spec
@@ -16,58 +16,94 @@
# along with this program. If not, see .
#
-Name: cudos-noded-v1.1.0.1
+%global project_title Cudos
+%global parent_url https://github.com/CudoVentures
+%global project_name cudos-node
+
+%global daemon_name cudos-noded
+%global daemon_version v1.1.0.1
+%global upgrade_name v1.1
+%global obsoletes cudos-noded-v1.1.0.0
+
+%global username cudos
+%global data_directory cudos-data
+
+#####################################################################
+# Do not edit below this line
+
+Name: %{daemon_name}-%{daemon_version}
Version: %{_versiontag}
Release: %{_releasetag}%{?dist}
-Summary: Cudos Node v1.1.0.1 Binary Pack for System version %{version}
+Summary: %{project_title} Node %{daemon_version} Binary Pack for System version %{version}
License: GPL3
-URL: https://github.com/CudoVentures/cudos-node
-Source0: cudos-noded-1.1.0.1.tar.gz
+URL: %{parent_url}/%{project_name}
-Requires: cudos-noded
+Requires: %{daemon_name}
Requires: cosmovisor
Provides: libwasmvm.so()(64bit)
+Obsoletes: %{obsoletes}
+
%description
-Cudos Node binary and library
-Installed into the Cosmovisor directories
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+parent_url: %{parent_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+daemon_version: %{daemon_version}
+upgrade_name: %{upgrade_name}
+obsoletes: %{obsoletes}
+
+username: %{username}
+data_directory: %{data_directory}
+
+This package contains the files common
+to all versions of the %{project_name}
+node software
+NB This package does not contain any
+ genesis or node configuration information
+
%pre
-getent group cudos >/dev/null || echo " Create Group cudos" || groupadd -r cudos || :
-getent passwd cudos >/dev/null || echo " Create User cudos" || useradd -c "Cudos User" -g cudos -s /bin/bash -r -m -d /var/lib/cudos cudos 2> /dev/null || :
+getent group %{username} >/dev/null || echo " Create Group %{username}" || groupadd -r %{username} || :
+getent passwd %{username} >/dev/null || echo " Create User %{username}" || useradd -c "%{project_title} User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username} 2> /dev/null || :
%prep
echo -e "\n\n=== prep section ===\n\n"
-# Unpack tarball
-rm -rf CudosNode CudosBuilders CudosGravityBridge
-tar xzf %{SOURCE0}
+rm -rf %{project_name}
+git clone -b %{daemon_version} %{parent_url}/%{project_name}
%build
echo -e "\n\n=== build section ===\n\n"
export GOPATH="${RPM_BUILD_DIR}/go"
-cd CudosNode
-make
+cd %{project_name}
+echo -e "\n\n***** Build %{project_title} Daemon *****\n\n"
+make install
+echo -e "\n\n***** Run %{project_title} Daemon Self Test *****\n\n"
+make test || true
%install
echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.1/bin/
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.1/lib/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
# Install the newly built binaries
-cp -v ${RPM_BUILD_DIR}/go/bin/cudos-noded ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.1/bin/cudos-noded
-cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.1/lib/
-chmod 644 ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.1/lib/*.so
+cp -v ${RPM_BUILD_DIR}/go/bin/%{daemon_name} ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+cp -v ${RPM_BUILD_DIR}/go/pkg/mod/github.com/'!cosm!wasm'/wasmvm*/api/libwasmvm*.so ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+chmod 644 ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/*.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,cudos,cudos,-)
-/var/lib/cudos/cudos-data/cosmovisor/*
+%defattr(-,%{username},%{username},-)
+/var/lib/%{username}/%{data_directory}/cosmovisor/*
%doc
%changelog
diff --git a/SPECS/cudos-noded.spec b/SPECS/cudos-noded.spec
index a54a764..f221752 100644
--- a/SPECS/cudos-noded.spec
+++ b/SPECS/cudos-noded.spec
@@ -49,6 +49,7 @@ Source51: env.sh-tmpl
Source52: config.yml-tmpl
Source53: chronocollector-init.sh
Source54: chronocollector-linux-amd64.gz
+Source55: cudos-chronocollector.service
Requires: cosmovisor
@@ -151,7 +152,7 @@ chmod 755 ${RPM_BUILD_ROOT}/usr/lib
# NB The name change to a cosmovisor is deliberate
# It ensures only one of the client packages can be installed at any one time
#
-cp ${RPM_SOURCE_DIR}/etc_default_cosmovisor-cudos ${RPM_BUILD_ROOT}/etc/default/cosmovisor
+cp ${RPM_SOURCE_DIR}/etc_default_cosmovisor-cudos ${RPM_BUILD_ROOT}/etc/default/cosmovisor@cudos
cp ${RPM_SOURCE_DIR}/etc_default_cudos-noded ${RPM_BUILD_ROOT}/etc/default/cudos-noded
cp ${RPM_SOURCE_DIR}/etc_profiled_cudos-noded.sh ${RPM_BUILD_ROOT}/etc/profile.d/cudos-noded.sh
@@ -188,7 +189,7 @@ chmod 755 ${RPM_BUILD_ROOT}/usr/lib
chmod 444 ${RPM_BUILD_ROOT}/usr/lib/check_mk_agent/local/check_cudos_consensus.sh
%clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = "1" ]
diff --git a/SPECS/cudos-release.spec b/SPECS/cudos-release.spec
index e5a50f2..a3c0173 100644
--- a/SPECS/cudos-release.spec
+++ b/SPECS/cudos-release.spec
@@ -51,6 +51,9 @@ cp ${RPM_SOURCE_DIR}/RPM-GPG-KEY-prtn-cudos ${RPM_BUILD_ROOT}/etc/pki/rpm-gpg
# Install Yum repo file
cp ${RPM_SOURCE_DIR}/cudos.repo ${RPM_BUILD_ROOT}/etc/yum.repos.d
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,root,root,-)
/etc/pki/rpm-gpg/*
diff --git a/SPECS/gaiad-v1.0.0.spec b/SPECS/gaiad-v1.0.0.spec
new file mode 100644
index 0000000..de1e2d1
--- /dev/null
+++ b/SPECS/gaiad-v1.0.0.spec
@@ -0,0 +1,108 @@
+#
+# Copyright 2022 Andrew Meredith
+# Copyright 2022 Cudo Ventures - All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+%global project_title CosmosHub
+%global parent_url https://github.com/cosmos
+%global project_name gaia
+
+%global daemon_name gaiad
+%global daemon_version v1.0.0
+%global upgrade_name v1.0
+%global obsoletes v0.0.0
+
+%global username gaia
+%global data_directory .gaia
+
+#####################################################################
+# Do not edit below this line
+
+Version: %{_versiontag}
+Name: %{daemon_name}-%{daemon_version}
+Release: %{_releasetag}%{?dist}
+Summary: %{project_title} Node Daemon - Version %{daemon_version}
+
+License: GPL3
+URL: %{parent_url}/%{project_name}
+
+Requires: %{daemon_name}
+
+Obsoletes: %{obsoletes}
+
+%description
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+parent_url: %{parent_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+daemon_version: %{daemon_version}
+upgrade_name: %{upgrade_name}
+obsoletes: %{obsoletes}
+
+username: %{username}
+data_directory: %{data_directory}
+
+This package contains the files common
+to all versions of the %{project_name}
+node software
+
+NB This package does not contain any
+ genesis or node configuration information
+
+%pre
+getent group %{username} >/dev/null || echo " Create Group %{username}" || groupadd -r %{username} || :
+getent passwd %{username} >/dev/null || echo " Create User %{username}" useradd -c "%{project_title} Daemon User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username} 2> /dev/null || :
+
+%prep
+echo -e "\n\n=== prep section ===\n\n"
+
+%build
+echo -e "\n\n=== build section ===\n\n"
+export GOPATH="${RPM_BUILD_DIR}/go"
+
+rm -rf %{project_name}
+git clone -b %{daemon_version} %{parent_url}/%{project_name}
+cd %{project_name}
+echo -e "\n\n***** Build %{project_title} Daemon *****\n\n"
+make install
+echo -e "\n\n***** Run %{project_title} Daemon Self Test *****\n\n"
+make test || true
+
+%install
+echo -e "\n\n=== install section ===\n\n"
+
+# Make the fixed directory structure
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin
+#mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+
+# Install the newly built binaries
+cp -v ${RPM_BUILD_DIR}/go/bin/%{daemon_name} ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+
+#cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@'v*.*.*/internal/api/libwasmvm.x86_64.so ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+#chmod 644 ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,%{username},%{username},-)
+/var/lib/%{username}/%{data_directory}/cosmovisor/*
+%doc
+
+%changelog
diff --git a/SPECS/gaiad-v7.1.0.spec b/SPECS/gaiad-v7.1.0.spec
new file mode 100644
index 0000000..cda8ec0
--- /dev/null
+++ b/SPECS/gaiad-v7.1.0.spec
@@ -0,0 +1,108 @@
+#
+# Copyright 2022 Andrew Meredith
+# Copyright 2022 Cudo Ventures - All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+%global project_title CosmosHub
+%global parent_url https://github.com/cosmos
+%global project_name gaia
+
+%global daemon_name gaiad
+%global daemon_version v7.1.0
+%global upgrade_name v7.1.0
+%global obsoletes gaiad-v7.0.0
+
+%global username gaia
+%global data_directory .gaia
+
+#####################################################################
+# Do not edit below this line
+
+Version: %{_versiontag}
+Name: %{daemon_name}-%{daemon_version}
+Release: %{_releasetag}%{?dist}
+Summary: %{project_title} Node Daemon - Version %{daemon_version}
+
+License: GPL3
+URL: %{parent_url}/%{project_name}
+
+Requires: %{daemon_name}
+
+Obsoletes: %{obsoletes}
+
+%description
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+parent_url: %{parent_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+daemon_version: %{daemon_version}
+upgrade_name: %{upgrade_name}
+obsoletes: %{obsoletes}
+
+username: %{username}
+data_directory: %{data_directory}
+
+This package contains the files common
+to all versions of the %{project_name}
+node software
+
+NB This package does not contain any
+ genesis or node configuration information
+
+%pre
+getent group %{username} >/dev/null || echo " Create Group %{username}" || groupadd -r %{username} || :
+getent passwd %{username} >/dev/null || echo " Create User %{username}" useradd -c "%{project_title} Daemon User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username} 2> /dev/null || :
+
+%prep
+echo -e "\n\n=== prep section ===\n\n"
+
+%build
+echo -e "\n\n=== build section ===\n\n"
+export GOPATH="${RPM_BUILD_DIR}/go"
+
+rm -rf %{project_name}
+git clone -b %{daemon_version} %{parent_url}/%{project_name}
+cd %{project_name}
+echo -e "\n\n***** Build %{project_title} Daemon *****\n\n"
+make install
+echo -e "\n\n***** Run %{project_title} Daemon Self Test *****\n\n"
+make test || true
+
+%install
+echo -e "\n\n=== install section ===\n\n"
+
+# Make the fixed directory structure
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin
+#mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+
+# Install the newly built binaries
+cp -v ${RPM_BUILD_DIR}/go/bin/%{daemon_name} ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/bin/
+
+#cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@'v*.*.*/internal/api/libwasmvm.x86_64.so ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/
+#chmod 644 ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor/upgrades/%{upgrade_name}/lib/*
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,%{username},%{username},-)
+/var/lib/%{username}/%{data_directory}/cosmovisor/*
+%doc
+
+%changelog
diff --git a/SPECS/gaiad.spec b/SPECS/gaiad.spec
new file mode 100644
index 0000000..46b7e43
--- /dev/null
+++ b/SPECS/gaiad.spec
@@ -0,0 +1,139 @@
+#
+# Copyright 2022 Andrew Meredith
+# Copyright 2022 Cudo Ventures - All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+%global project_title CosmosHub
+%global project_url https://github.com/cosmos/gaia
+%global project_name gaia
+
+%global daemon_name gaiad
+
+%global username gaia
+%global data_directory .gaia
+
+#####################################################################
+# Do not edit below this line
+
+Name: %{daemon_name}
+Version: %{_versiontag}
+Release: %{_releasetag}%{?dist}
+Summary: %{project_title} Node Common Files
+
+License: GPL3
+URL: %{project_url}
+
+Requires: cosmovisor
+
+%description
+%{project_title} Node Common Files
+System Version: %{_versiontag}
+
+project_title: %{project_title}
+project_url: %{project_url}
+project_name: %{project_name}
+
+daemon_name: %{daemon_name}
+
+username: %{username}
+data_directory: %{data_directory}
+
+%pre
+if getent group %{username}>/dev/null
+then
+ echo " Group %{username} OK"
+else
+ echo " Create Group %{username}"
+ groupadd -r %{username}
+fi
+if getent passwd %{username}>/dev/null
+then
+ echo " User %{username} OK"
+else
+ echo " Create User %{username}"
+ useradd -c "Cosmos User" -g %{username} -s /bin/bash -r -m -d /var/lib/%{username} %{username}
+fi
+
+%prep
+echo -e "\n\n=== prep section ===\n\n"
+
+%build
+echo -e "\n\n=== build section ===\n\n"
+
+export GOPATH="${RPM_BUILD_DIR}/go"
+
+%install
+echo -e "\n\n=== install section ===\n\n"
+
+# Make the fixed directory structure
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/config
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{username}/%{data_directory}/cosmovisor
+mkdir -p ${RPM_BUILD_ROOT}/usr/bin
+mkdir -p ${RPM_BUILD_ROOT}/etc/default/
+mkdir -p ${RPM_BUILD_ROOT}/etc/profile.d/
+mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system
+
+# Create a daemon environment file from the macro settings
+cat <${RPM_BUILD_ROOT}/etc/default/cosmovisor@%{username}
+DAEMON_NAME=%{daemon_name}
+DAEMON_HOME=/var/lib/%{username}/%{data_directory}
+DAEMON_RESTART_AFTER_UPGRADE="true"
+DAEMON_ALLOW_DOWNLOAD_BINARIES="false"
+DAEMON_LOG_BUFFER_SIZE="512"
+UNSAFE_SKIP_BACKUP="true"
+
+DAEMON_LOGLEVEL=info
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+if [ $1 = "1" ]
+then
+ echo " Install: Setting up links"
+else
+ echo " Upgrade: Setting up links"
+fi
+echo " Refreshing /usr/bin, /lib and /lib64 links"
+rm -f /usr/bin/%{daemon_name} /usr/lib/libwasmvm.x86_64.so /lib/libwasmvm.x86_64.so || true
+
+ln -s /var/lib/%{username}/%{data_directory}/cosmovisor/current/bin/%{daemon_name} /usr/bin/%{daemon_name}
+ln -s /var/lib/%{username}/%{data_directory}/cosmovisor/current/lib/libwasmvm.x86_64.so /usr/lib/libwasmvm.x86_64.so
+ln -s /var/lib/%{username}/%{data_directory}/cosmovisor/current/lib/libwasmvm.x86_64.so /lib/libwasmvm.x86_64.so
+
+if [ -d /var/lib/%{username}/%{data_directory}/cosmovisor/current ]
+then
+ echo " Cosmovisor 'current' link in place already"
+else
+ echo " Setting Cosmovisor 'current' link to genesis"
+ mkdir -p /var/lib/%{username}/%{data_directory}/cosmovisor
+ ln -s /var/lib/%{username}/%{data_directory}/cosmovisor/genesis /var/lib/%{username}/%{data_directory}/cosmovisor/current
+fi
+echo " Chowning the home dir"
+chown -R %{username}:%{username} /var/lib/%{username}
+echo " Reloading systemd config"
+systemctl daemon-reload
+echo " Done"
+
+%files
+%defattr(-,root,root,-)
+/etc/default/*
+%defattr(-,%{username},%{username},-)
+%dir /var/lib/%{username}/%{data_directory}/cosmovisor
+%doc
+
+%changelog
diff --git a/SPECS/hermes.spec b/SPECS/hermes.spec
index a084dfc..ca681d0 100644
--- a/SPECS/hermes.spec
+++ b/SPECS/hermes.spec
@@ -41,6 +41,9 @@ cd ibc-rs
git checkout v%{version}
cargo build --release --bin hermes
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%install
echo -e "\n\n=== install section ===\n\n"
diff --git a/SPECS/osmosis-network-mainnet.spec b/SPECS/osmosis-network-mainnet.spec
index 5bc02c5..6f4d8d1 100644
--- a/SPECS/osmosis-network-mainnet.spec
+++ b/SPECS/osmosis-network-mainnet.spec
@@ -49,22 +49,22 @@ echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
mkdir -p ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11.0.0
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11
# Install the .osmosisd/config files
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-mainnet_config/genesis.json ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-mainnet_config/persistent-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-mainnet_config/seeds.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-mainnet_config/state-sync-rpc-servers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-mainnet_config/unconditional-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-mainnet_config/private-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/genesis.json ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/persistent-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/seeds.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/state-sync-rpc-servers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/unconditional-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/private-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
cd ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor
-ln -s upgrades/v11.0.0 genesis
+ln -s /var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11 genesis
cd -
%clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%pre
getent group osmosis >/dev/null || groupadd -r osmosis || :
diff --git a/SPECS/osmosis-network-testnet.spec b/SPECS/osmosis-network-testnet.spec
index 8fe8c6c..88d1e31 100644
--- a/SPECS/osmosis-network-testnet.spec
+++ b/SPECS/osmosis-network-testnet.spec
@@ -50,22 +50,22 @@ echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
mkdir -p ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config
-mkdir -p ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11.0.0
+mkdir -p ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11
# Install the .osmosisd/config files
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-testnet_config/genesis.json ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-testnet_config/persistent-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-testnet_config/seeds.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-testnet_config/state-sync-rpc-servers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-testnet_config/unconditional-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
-cp -v ${RPM_SOURCE_DIR}/osmosis-network-testnet_config/private-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/genesis.json ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/persistent-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/seeds.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/state-sync-rpc-servers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/unconditional-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
+cp -v ${RPM_SOURCE_DIR}/private-peers.config ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/config/
cd ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor
-ln -s upgrades/v11.0.0 genesis
+ln -s /var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11 genesis
cd -
%clean
-# rm -rf $RPM_BUILD_ROOT
+rm -rf $RPM_BUILD_ROOT
%pre
getent group osmosis >/dev/null || groupadd -r osmosis || :
diff --git a/SPECS/osmosisd-v11.0.0.spec b/SPECS/osmosisd-v11.0.0.spec
index fb7abc5..b23ab0a 100644
--- a/SPECS/osmosisd-v11.0.0.spec
+++ b/SPECS/osmosisd-v11.0.0.spec
@@ -62,6 +62,9 @@ cp -v ${RPM_BUILD_DIR}/osmosis/build/osmosisd
cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.0.0/api/libwasmvm.x86_64.so' ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11/lib/
chmod 644 ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v11/lib/*
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,osmosis,osmosis,-)
/var/lib/osmosis/.osmosisd/cosmovisor/*
diff --git a/SPECS/osmosisd-v12.0.0.spec b/SPECS/osmosisd-v12.0.0.spec
index e282f09..8daeef4 100644
--- a/SPECS/osmosisd-v12.0.0.spec
+++ b/SPECS/osmosisd-v12.0.0.spec
@@ -63,6 +63,9 @@ cp -v ${RPM_BUILD_DIR}/osmosis/build/osmosisd
cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.0.0/api/libwasmvm.x86_64.so' ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v12/lib/
chmod 644 ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v12/lib/*
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,osmosis,osmosis,-)
/var/lib/osmosis/.osmosisd/cosmovisor/*
diff --git a/SPECS/osmosisd-v12.1.0.spec b/SPECS/osmosisd-v12.1.0.spec
index 3603158..29022bd 100644
--- a/SPECS/osmosisd-v12.1.0.spec
+++ b/SPECS/osmosisd-v12.1.0.spec
@@ -64,6 +64,9 @@ cp -v ${RPM_BUILD_DIR}/osmosis/build/osmosisd
cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.0.0/api/libwasmvm.x86_64.so' ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v12/lib/
chmod 644 ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v12/lib/*
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,osmosis,osmosis,-)
/var/lib/osmosis/.osmosisd/cosmovisor/*
diff --git a/SPECS/osmosisd-v12.3.0.spec b/SPECS/osmosisd-v12.3.0.spec
index 857aabc..dcb57ad 100644
--- a/SPECS/osmosisd-v12.3.0.spec
+++ b/SPECS/osmosisd-v12.3.0.spec
@@ -26,6 +26,7 @@ Summary: Osmosis Node Binary Pack for v12.3.0
License: GPL3
URL: https://github.com/osmosis-labs/osmosis
+Provides: libwasmvm.x86_64.so()(64bit)
Requires: osmosisd
Obsoletes: osmosisd-v12.0.0
Obsoletes: osmosisd-v12.1.0
@@ -65,6 +66,9 @@ cp -v ${RPM_BUILD_DIR}/osmosis/build/osmosisd
cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.0.0/api/libwasmvm.x86_64.so' ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v12/lib/
chmod 644 ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v12/lib/*
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,osmosis,osmosis,-)
/var/lib/osmosis/.osmosisd/cosmovisor/*
diff --git a/SPECS/osmosisd-v13.0.0-rc3.spec b/SPECS/osmosisd-v13.0.0-rc3.spec
index 16beb28..8d7f3ac 100644
--- a/SPECS/osmosisd-v13.0.0-rc3.spec
+++ b/SPECS/osmosisd-v13.0.0-rc3.spec
@@ -65,6 +65,9 @@ cp -v ${RPM_BUILD_DIR}/osmosis/build/osmosisd
cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.0.0/api/libwasmvm.x86_64.so' ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v13/lib/
chmod 644 ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v13/lib/*
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,osmosis,osmosis,-)
/var/lib/osmosis/.osmosisd/cosmovisor/*
diff --git a/SPECS/osmosisd-v13.0.0-rc4.spec b/SPECS/osmosisd-v13.0.0-rc4.spec
index 80d2269..5a7efe5 100644
--- a/SPECS/osmosisd-v13.0.0-rc4.spec
+++ b/SPECS/osmosisd-v13.0.0-rc4.spec
@@ -26,8 +26,8 @@ Summary: Osmosis Node Binary Pack for v13.0.0-rc4
License: GPL3
URL: https://github.com/osmosis-labs/osmosis
+Provides: libwasmvm.x86_64.so()(64bit)
Requires: osmosisd
-
Obsoletes: osmosisd-v13.0.0-rc3
%description
@@ -67,6 +67,9 @@ cp -v ${RPM_BUILD_DIR}/osmosis/build/osmosisd
cp -v ${RPM_BUILD_DIR}'/go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.1.1/internal/api/libwasmvm.x86_64.so' ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v13/lib/
chmod 644 ${RPM_BUILD_ROOT}/var/lib/osmosis/.osmosisd/cosmovisor/upgrades/v13/lib/*
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,osmosis,osmosis,-)
/var/lib/osmosis/.osmosisd/cosmovisor/*
diff --git a/SPECS/osmosisd.spec b/SPECS/osmosisd.spec
index f3ead3a..7522370 100644
--- a/SPECS/osmosisd.spec
+++ b/SPECS/osmosisd.spec
@@ -91,7 +91,7 @@ cp ${RPM_SOURCE_DIR}/osmosis-is-node-ready.sh ${RPM_BUILD_ROOT}/usr/bin/
chmod 755 ${RPM_BUILD_ROOT}/usr/bin/*
# Install environment setup files
-cp ${RPM_SOURCE_DIR}/etc_default_cosmovisor-osmosis ${RPM_BUILD_ROOT}/etc/default/cosmovisor
+cp ${RPM_SOURCE_DIR}/etc_default_cosmovisor-osmosis ${RPM_BUILD_ROOT}/etc/default/cosmovisor@osmosis
# Install /usr/bin scripts
cp ${RPM_SOURCE_DIR}/osmosisd-ctl.sh ${RPM_BUILD_ROOT}/usr/bin/osmosisd-ctl
@@ -107,9 +107,6 @@ chmod 755 ${RPM_BUILD_ROOT}/usr/l
# This script is only needed when there's a chain halt .. so make it 444 until needed
chmod 444 ${RPM_BUILD_ROOT}/usr/lib/check_mk_agent/local/check_osmosis_consensus.sh
-%clean
-# rm -rf $RPM_BUILD_ROOT
-
%post
if [ $1 = "1" ]
then
@@ -139,6 +136,9 @@ echo " Reloading systemd config"
systemctl daemon-reload
echo " Done"
+%clean
+rm -rf $RPM_BUILD_ROOT
+
%files
%defattr(-,root,root,-)
/etc/default/*
diff --git a/build.sh b/build.sh
index 6d992ae..ce67556 100755
--- a/build.sh
+++ b/build.sh
@@ -17,22 +17,6 @@
# along with this program. If not, see .
#
-#
-# The cudos_version variable needs to be set in the environment
-#
-# It is used to
-# - select the github tags to set when cloning the software
-# - tag the tarball
-# - set in the rpmbuild that creates the binaries
-# - Set as the "version" response in "cudos-noded"
-#
-
-if [ "$cudos_version" = "" ]
-then
- echo "Error: 'cudos_version' variable unset"
- exit 1
-fi
-
#
# As the correlation between the overall version tag and the tags within the repository
# has varied over time, and to include the development branches in the build mechanism
@@ -101,6 +85,28 @@ create_cudos_tarball()
rm -rf Cudos*
}
+# Define toml config tarball function
+create_toml_tarball()
+{
+ FILETAG="$1"
+ NTWK="$2"
+
+ echo -e "\n\nCreating TOML tarball '$FILETAG'\n\n"
+
+ mkdir -p toml-tmp
+ cd toml-tmp
+ wget -4 -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/genesis.${FILETAG}.json?raw=true" -O genesis.json
+ wget -4 -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/persistent-peers.${FILETAG}.config?raw=true" -O persistent-peers.config
+ wget -4 -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/seeds.${FILETAG}.config?raw=true" -O seeds.config
+ wget -4 -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/state-sync-rpc-servers.${FILETAG}.config?raw=true" -O state-sync-rpc-servers.config
+ touch unconditional-peers.config
+ touch private-peers.config
+ tar czvf ../SOURCES/toml-config-${NTWK}.tar.gz *
+ cd ..
+ rm -rf toml-tmp
+}
+
+
# Define a utility function for rpmbuild
run_rpmbuild()
{
@@ -110,39 +116,111 @@ run_rpmbuild()
echo -ne "\n\n======= Building Package $SPEC_NAME =======\n\n"
+ # Take the spec file and ONLY package it into a source
+ # rpm, do not actually build anything.
rpmbuild \
--define "_topdir $( pwd )" \
--define "_versiontag ${VER}" \
--define "_releasetag ${RLS}" \
-bs $( pwd )/SPECS/${SPEC_NAME}.spec
+ # Building these applications pulls in git repositories, some
+ # of which have set file and directory permissions as read only
+ # so when you go to delete them, the build job fails.
+ if [[ -d buildtmp ]]
+ then
+ chmod -R +rwx buildtmp
+ fi
+
+ # Clean out the build area just in case, for some
+ # reason, it didn't get cleaned last time
+ rm -rf buildtmp
+
+ # Set the _topdir to the freshly cleaned out build area
+ # pull the source rpm that has just been built into
+ # the clean build area, unpack it, and build the contents.
+ #
+ # NB This might seem a "round the houses" way of doing it,
+ # but it firmly ensures that the payload of the src.rpm is complete
+ # ensuring that and end user can build the package with just
+ # the src.rpm
+ #
+ # The removal of __brp_check_rpaths is needed as there are some
+ # .. "non standard" uses of this feature in the packages
+ #
rpmbuild \
- --define "_topdir $( pwd )" \
+ --define "_topdir $( pwd )/buildtmp" \
--define "_versiontag ${VER}" \
--define "_releasetag ${RLS}" \
--define "__brp_check_rpaths %{nil}" \
--rebuild $( pwd )/SRPMS/${SPEC_NAME}-${VER}-${RLS}.*src.rpm
+
+ # Synchronise the RPMS directory in the clean build area back to
+ # the master RPMS directory structure.
+ rsync -var buildtmp/RPMS/. RPMS/.
+
+ # Clean up
+ chmod -R +rwx buildtmp
+ rm -rf buildtmp
}
-# Define toml config tarball function
-create_toml_tarball()
+# define utility to loop through the rpm builds
+#
+# NB The chain data files sometimes use "v1.2.3" and sometime just "1.2.3"
+# so this function needs to remove and then if needed re-add the v to make sure it is
+# consistent
+#
+# NB rpm packaging cannot have a "-" in the version so "-rc" versions cannot be done this way
+# although it is acceptable in a package name of course so the binary package names can be like
+# cudos-noded-v1.2.3-rc4
+# but not
+# cudos-noded-v1.2.3-rc4 version 1.2.3-rc4
+#
+build_project_from_chain_data()
{
- FILETAG="$1"
- NTWK="$2"
+ CHAIN_NAME="$1"
+ TMPFILE=/tmp/build.sh.$$
- echo -e "\n\nCreating TOML tarball '$FILETAG'\n\n"
+ # Grab the chain data
+ curl -4 -s https://raw.githubusercontent.com/cosmos/chain-registry/master/${CHAIN_NAME}/chain.json -o "${TMPFILE}"
- mkdir -p toml-tmp
- cd toml-tmp
- wget -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/genesis.${FILETAG}.json?raw=true" -O genesis.json
- wget -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/persistent-peers.${FILETAG}.config?raw=true" -O persistent-peers.config
- wget -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/seeds.${FILETAG}.config?raw=true" -O seeds.config
- wget -q "https://github.com/CudoVentures/cudos-builders/blob/cudos-master/docker/config/state-sync-rpc-servers.${FILETAG}.config?raw=true" -O state-sync-rpc-servers.config
- touch unconditional-peers.config
- touch private-peers.config
- tar czvf ../SOURCES/toml-config-${NTWK}.tar.gz *
- cd ..
- rm -rf toml-tmp
+ # Use the local copy to divine specific values for that chain
+ CHAIN_NAME="$( cat $TMPFILE | jq .chain_name | tr -d '"' )"
+ DAEMON_NAME="$( cat $TMPFILE | jq .daemon_name | tr -d '"' )"
+ PRETTY_NAME="$( cat $TMPFILE | jq .pretty_name | tr -d '"' )"
+ SYSTEM_VER="$( cat $TMPFILE | jq .codebase.recommended_version | tr -d '"v' )"
+ COMPATIBLE_VERSIONS="$( cat $TMPFILE | jq .codebase.compatible_versions | tr -d '"v' | grep '[0-9]' )"
+
+ # Chain Data Workaround Kludges :-)
+ #
+ # Ideally the chain data would be absolutely accurate, complete and up to date.
+ # In case that is for some reason not the case .. or an update is to be tested in dev
+ # here's where the variances go
+ #
+ case "$CHAIN_NAME" in
+ cudos)
+ DAEMON_NAME="cudos-noded"
+ SYSTEM_VER="1.0.1"
+ COMPATIBLE_VERSIONS="0.8.0 0.9.0 1.0.1 1.1.0.1"
+ ;;
+ osmosis)
+ SYSTEM_VER="12.3.0"
+ COMPATIBLE_VERSIONS="11.0.0 12.3.0 13.0.0-rc4"
+ ;;
+ esac
+
+ # Clean up
+ rm -f "${TMPFILE}"
+
+ # Build the daemon framework package, named for the daemon_name at the recommended_version
+ run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" ${DAEMON_NAME}
+
+ # For every "compatible_version", build a binary package named for that version
+ # and the package version of "recommended_version"
+ for BUILD_VERSION in ${COMPATIBLE_VERSIONS}
+ do
+ run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" ${DAEMON_NAME}-v${BUILD_VERSION}
+ done
}
#
@@ -159,7 +237,7 @@ cd ..
#
# Clear out the old RPM binary files and the old BUILDROOT
#
-rm -rf RPMS BUILDROOT || true
+sudo rm -rf debian RPMS BUILDROOT || true
#
# BUILD_NUMBER can be inherited from the CI/CD environment and
@@ -183,13 +261,13 @@ cp -v README.md SOURCES
cp -v cudos.repo SOURCES
#
-# Create the source tarballs
+# Create the cudos-noded source tarballs
#
-create_cudos_tarball "0.8.0"
-create_cudos_tarball "0.9.0"
-create_cudos_tarball "1.0.0"
-create_cudos_tarball "1.0.1"
-create_cudos_tarball "1.1.0.1"
+#create_cudos_tarball "0.8.0"
+#create_cudos_tarball "0.9.0"
+#create_cudos_tarball "1.0.0"
+#create_cudos_tarball "1.0.1"
+#create_cudos_tarball "1.1.0.1"
#
# Create the toml config tarballs
@@ -199,29 +277,37 @@ create_toml_tarball "testnet.public" "testnet"
create_toml_tarball "mainnet" "mainnet"
#
-# Build the spec files
+# Build cosmovisor Project
#
+export DAEMON_NAME="cosmovisor"
+export SYSTEM_VER="1.0.0"
+
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" "${DAEMON_NAME}"
-COSMOVISOR_VER="1.0.0"
-run_rpmbuild "${COSMOVISOR_VER}" "${BUILD_NUMBER}" cosmovisor
+#
+# Build Cudos Project
+#
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-release
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-network-private-testnet
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-network-public-testnet
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-network-mainnet
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-noded
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-noded-v0.8.0
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-noded-v0.9.0
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-noded-v1.0.1
-run_rpmbuild "${cudos_version}" "${BUILD_NUMBER}" cudos-noded-v1.1.0.1
+build_project_from_chain_data cudos
-OSMOSIS_VER="12.3.0"
-run_rpmbuild "${OSMOSIS_VER}" "${BUILD_NUMBER}" osmosis-network-mainnet
-run_rpmbuild "${OSMOSIS_VER}" "${BUILD_NUMBER}" osmosis-network-testnet
-run_rpmbuild "${OSMOSIS_VER}" "${BUILD_NUMBER}" osmosisd
-run_rpmbuild "${OSMOSIS_VER}" "${BUILD_NUMBER}" osmosisd-v11.0.0
-run_rpmbuild "${OSMOSIS_VER}" "${BUILD_NUMBER}" osmosisd-v12.3.0
-run_rpmbuild "${OSMOSIS_VER}" "${BUILD_NUMBER}" osmosisd-v13.0.0-rc4
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" cudos-release
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" cudos-network-private-testnet
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" cudos-network-public-testnet
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" cudos-network-mainnet
+
+#
+# Build Osmosis Project
+#
+build_project_from_chain_data osmosis
+
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" osmosis-network-mainnet
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" osmosis-network-testnet
+run_rpmbuild "${SYSTEM_VER}" "${BUILD_NUMBER}" osmosisd
+
+#
+# Build Gaia/Cosmos Hub Project
+#
+build_project_from_chain_data cosmoshub
#
# Feed the rpm binaries into "Alien" to be converted
diff --git a/update-repo.sh b/update-repo.sh
index 5da31c3..98d21b4 100755
--- a/update-repo.sh
+++ b/update-repo.sh
@@ -69,7 +69,7 @@ EOF
fi
# Update the rpm repo files
-/usr/bin/createrepo --verbose --deltas .
+/usr/bin/createrepo --update --verbose --deltas .
#
# DEBS