-
Notifications
You must be signed in to change notification settings - Fork 1
/
cudos-network-public-testnet.spec
102 lines (86 loc) · 3.77 KB
/
cudos-network-public-testnet.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#
# Copyright 2022 Andrew Meredith <[email protected]>
# 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 <http://www.gnu.org/licenses/>.
#
# Contains the Network definition files for the Cudos Public Testnet network
#
Name: cudos-network-public-testnet
Version: %{_versiontag}
Release: %{_releasetag}%{?dist}
Summary: Cudos Public Testnet Network Definition Files
License: GPL3
URL: https://github.com/CudoVentures/cudos-node
Source0: toml-config-testnet.tar.gz
Requires: cosmovisor
Requires: cudos-p2p-scan
Requires: cudos-gex
Requires: cudos-noded
Requires: cudos-noded-v0.9.0
Requires: cudos-noded-v1.0.1
Requires: cudos-noded-v1.1.0
Requires: cudos-noded-v1.2.2
Requires: cudos-noded-v1.2.3
Requires: cudos-noded-v1.2.4
Requires: cudos-noded-v1.9.9
Requires: cudos-noded-v9.9.9
%description
Cudos Public Testnet Network Definition Files
%prep
echo -e "\n\n=== prep section ===\n\n"
tar -C ${RPM_SOURCE_DIR} -xzf ${RPM_SOURCE_DIR}/toml-config-testnet.tar.gz
%build
echo -e "\n\n=== build section ===\n\n"
%install
echo -e "\n\n=== install section ===\n\n"
# Make the fixed directory structure
mkdir -p ${RPM_BUILD_ROOT}/etc/default
mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config
mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9
mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.0
mkdir -p ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/upgrades/v1.1
# Install the cudos-data/config files
cp -v ${RPM_SOURCE_DIR}/genesis.json ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config/
cp -v ${RPM_SOURCE_DIR}/persistent-peers.config ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config/
cp -v ${RPM_SOURCE_DIR}/seeds.config ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config/
cp -v ${RPM_SOURCE_DIR}/state-sync-rpc-servers.config ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config/
cp -v ${RPM_SOURCE_DIR}/unconditional-peers.config ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config/
cp -v ${RPM_SOURCE_DIR}/private-peers.config ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/config/
# Create genesis link to the chains genesis version
ln -s /var/lib/cudos/cudos-data/cosmovisor/upgrades/v0.9 ${RPM_BUILD_ROOT}/var/lib/cudos/cudos-data/cosmovisor/genesis
# Create /etc/default link for cosmovisor
ln -s cosmovisor@cudos ${RPM_BUILD_ROOT}/etc/default/cosmovisor
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = "1" ]
then
echo "Install:"
else
echo "Upgrade:"
fi
%files
%attr(-, root, root) %config(noreplace) /etc/default/cosmovisor
%defattr(-,cudos,cudos,-)
%dir /var/lib/cudos/cudos-data
%dir /var/lib/cudos/cudos-data/config
/var/lib/cudos/cudos-data/cosmovisor
%config(noreplace) /var/lib/cudos/cudos-data/config/genesis.json
%config(noreplace) /var/lib/cudos/cudos-data/config/persistent-peers.config
%config(noreplace) /var/lib/cudos/cudos-data/config/private-peers.config
%config(noreplace) /var/lib/cudos/cudos-data/config/seeds.config
%config(noreplace) /var/lib/cudos/cudos-data/config/state-sync-rpc-servers.config
%config(noreplace) /var/lib/cudos/cudos-data/config/unconditional-peers.config
%doc