parent
bf86767e60
commit
0be1359e8a
@ -0,0 +1 @@ |
||||
%_topdir %(echo $HOME)/rpmbuild |
@ -0,0 +1,31 @@ |
||||
fs.file-max=2097152 |
||||
vm.swappiness=10 |
||||
vm.dirty_ratio=60 |
||||
vm.dirty_background_ratio=2 |
||||
kernel.sched_migration_cost_ns=5000000 |
||||
net.ipv4.tcp_synack_retries=2 |
||||
net.ipv4.ip_local_port_range=2000 65535 |
||||
net.ipv4.tcp_rfc1337=1 |
||||
net.ipv4.tcp_syncookies=1 |
||||
net.ipv4.tcp_fin_timeout=15 |
||||
net.ipv4.tcp_keepalive_time=300 |
||||
net.ipv4.tcp_keepalive_probes=5 |
||||
net.ipv4.tcp_keepalive_intvl=15 |
||||
net.core.rmem_default=31457280 |
||||
net.core.rmem_max=33554432 |
||||
net.core.wmem_default=31457280 |
||||
net.core.wmem_max=33554432 |
||||
net.core.somaxconn=8096 |
||||
net.core.netdev_max_backlog=65536 |
||||
net.core.optmem_max=25165824 |
||||
net.ipv4.tcp_max_syn_backlog=8192 |
||||
net.ipv4.tcp_mem=786432 1048576 26777216 |
||||
net.ipv4.udp_mem=65536 131072 262144 |
||||
net.ipv4.tcp_rmem=8192 87380 33554432 |
||||
net.ipv4.udp_rmem_min=16384 |
||||
net.ipv4.tcp_wmem=8192 65536 33554432 |
||||
net.ipv4.udp_wmem_min=16384 |
||||
net.ipv4.tcp_max_tw_buckets=1440000 |
||||
net.ipv4.tcp_tw_reuse=1 |
||||
net.ipv4.tcp_fastopen=3 |
||||
net.ipv4.tcp_window_scaling=1 |
@ -0,0 +1,19 @@ |
||||
[Unit] |
||||
Description=harmony validator node service |
||||
After=network.target |
||||
|
||||
[Service] |
||||
Type=simple |
||||
Restart=on-failure |
||||
RestartSec=1 |
||||
User=harmony |
||||
WorkingDirectory=/home/harmony |
||||
ExecStart=harmony |
||||
StandardError=syslog |
||||
SyslogIdentifier=harmony |
||||
StartLimitInterval=0 |
||||
LimitNOFILE=65536 |
||||
LimitNPROC=65536 |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
@ -0,0 +1,79 @@ |
||||
# SPEC file overview: |
||||
# https://docs.fedoraproject.org/en-US/quick-docs/creating-rpm-packages/#con_rpm-spec-file-overview |
||||
# Fedora packaging guidelines: |
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/ |
||||
|
||||
|
||||
Name: harmony |
||||
Version: 2.3.4 |
||||
Release: 0%{?dist} |
||||
Summary: harmony blockchain validator node program |
||||
|
||||
License: MIT |
||||
URL: https://harmony.one |
||||
Source0: %{name}-%{version}.tar |
||||
BuildArch: x86_64 |
||||
Packager: Leo Chen |
||||
Requires(pre): shadow-utils |
||||
Requires: bash |
||||
Requires: systemd-rpm-macros |
||||
|
||||
BuildRequires: info |
||||
Requires: info |
||||
BuildRoot: ~/rpmbuild/ |
||||
|
||||
%description |
||||
Harmony is a sharded, fast finality, low fee, PoS public blockchain. |
||||
This is the validator node program for harmony blockchain. |
||||
|
||||
%global debug_package %{nil} |
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
%build |
||||
echo make %{?_smp_mflags} |
||||
exit 0 |
||||
|
||||
|
||||
%check |
||||
./harmony --version |
||||
exit |
||||
|
||||
%pre |
||||
getent group harmony >/dev/null || groupadd -r harmony |
||||
getent passwd harmony >/dev/null || \ |
||||
useradd -r -g harmony -d /home/harmony -m -s /sbin/nologin \ |
||||
-c "Harmony validator node account" harmony |
||||
exit 0 |
||||
|
||||
|
||||
%install |
||||
install -m 0755 -d ${RPM_BUILD_ROOT}/usr/local/sbin ${RPM_BUILD_ROOT}/etc/systemd/system ${RPM_BUILD_ROOT}/etc/sysctl.d |
||||
install -m 0755 harmony ${RPM_BUILD_ROOT}/usr/local/sbin/ |
||||
install -m 0644 harmony.service ${RPM_BUILD_ROOT}/etc/systemd/system/ |
||||
install -m 0644 harmony-sysctl.conf ${RPM_BUILD_ROOT}/etc/sysctl.d/ |
||||
exit 0 |
||||
|
||||
%post |
||||
%systemd_post %{name}.service |
||||
|
||||
%preun |
||||
%systemd_preun %{name}.service |
||||
|
||||
%postun |
||||
%systemd_postun_with_restart ${name}.service |
||||
|
||||
%files |
||||
/usr/local/sbin/harmony |
||||
/etc/sysctl.d/harmony-sysctl.conf |
||||
/etc/systemd/system/harmony.service |
||||
|
||||
%doc |
||||
%license |
||||
|
||||
|
||||
|
||||
%changelog |
||||
* Tue Aug 18 2020 Leo Chen <leo at harmony dot one> 2.3.4 |
||||
- init version of the harmony node program |
Loading…
Reference in new issue