- Update to version 28.0:
* doc: 28.0 Release Notes * doc: generate manpages * build: Bump to 28.0 * validation: Disable CheckForkWarningConditions for background chainstate * test: Use shell builtins in run_command test case * doc: Generate manpages * build: Bump to 28.0rc2 * streams: remove AutoFile::Get() entirely * streams: cache file position within AutoFile * qt: Translations update * gui: fix crash when closing wallet * test: Wait for local services to update in feature_assumeutxo * test: add coverage for assumeUTXO honest peers disconnection * assumeUTXO: fix peers disconnection during sync * test: Work around boost compilation error * depends: build libevent with -D_GNU_SOURCE * test: fixing failing system_tests/run_command under some Locales * test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py * test: fix `TestShell` initialization (late follow-up for #30463) * doc: Point release notes to wiki draft * examples: Generate example bitcoin.conf * doc: Generate manpages * build: Bump to 28.0rc1 * docs: Add 379 and 387 to bips.md * docs: Remove release 28.0 release notes fragments * seeds: Regenerate mainnet seeds * seeds: Pull nodes from Luke's seeder * seeds: Pull nodes from virtu's crawler * chainparams: Remove seed.bitcoinstats.com OBS-URL: https://build.opensuse.org/package/show/network:cryptocurrencies/bitcoin?expand=0&rev=72
This commit is contained in:
commit
d8fbd87e1e
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
10
_constraints
Normal file
10
_constraints
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<physicalmemory>
|
||||||
|
<size unit="M">4086</size>
|
||||||
|
</physicalmemory>
|
||||||
|
<disk>
|
||||||
|
<size unit="G">7</size>
|
||||||
|
</disk>
|
||||||
|
</hardware>
|
||||||
|
</constraints>
|
19
_service
Normal file
19
_service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<services>
|
||||||
|
<service name="obs_scm" mode="manual">
|
||||||
|
<param name="versionformat">@PARENT_TAG@</param>
|
||||||
|
<param name="url">https://github.com/bitcoin/bitcoin.git</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="changesgenerate">enable</param>
|
||||||
|
<param name="exclude">.*</param>
|
||||||
|
<param name="versionrewrite-pattern">v(.*)</param>
|
||||||
|
<param name="revision">refs/tags/v28.0</param>
|
||||||
|
</service>
|
||||||
|
<service name="tar" mode="buildtime"/>
|
||||||
|
<service name="recompress" mode="buildtime">
|
||||||
|
<param name="compression">gz</param>
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="manual">
|
||||||
|
<param name="file">bitcoin.spec</param>
|
||||||
|
</service>
|
||||||
|
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<servicedata>
|
||||||
|
<service name="tar_scm">
|
||||||
|
<param name="url">https://github.com/bitcoin/bitcoin.git</param>
|
||||||
|
<param name="changesrevision">110183746150428e6385880c79f8c5733b1361ba</param></service></servicedata>
|
3
bitcoin-27.1.obscpio
Normal file
3
bitcoin-27.1.obscpio
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:853d55b9ae68f2dc57001a26f48fb86ca521c4e5543396e8b7e1b4c7ad727d8f
|
||||||
|
size 46261773
|
3
bitcoin-28.0.obscpio
Normal file
3
bitcoin-28.0.obscpio
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8ff98564936e8968333668d35646ad6a76f58b55f7d8d4b781a8750ec236582e
|
||||||
|
size 45753357
|
4347
bitcoin.changes
Normal file
4347
bitcoin.changes
Normal file
File diff suppressed because it is too large
Load Diff
144
bitcoin.conf
Normal file
144
bitcoin.conf
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
##
|
||||||
|
## bitcoin.conf configuration file. Lines beginning with # are comments.
|
||||||
|
##
|
||||||
|
|
||||||
|
# Network-related settings:
|
||||||
|
|
||||||
|
# Run on the test network instead of the real bitcoin network.
|
||||||
|
#testnet=0
|
||||||
|
|
||||||
|
# Run a regression test network
|
||||||
|
#regtest=0
|
||||||
|
|
||||||
|
# Connect via a SOCKS5 proxy
|
||||||
|
#proxy=127.0.0.1:9050
|
||||||
|
|
||||||
|
# Bind to given address and always listen on it. Use [host]:port notation for IPv6
|
||||||
|
#bind=<addr>
|
||||||
|
|
||||||
|
# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
|
||||||
|
#whitebind=<addr>
|
||||||
|
|
||||||
|
##############################################################
|
||||||
|
## Quick Primer on addnode vs connect ##
|
||||||
|
## Let's say for instance you use addnode=4.2.2.4 ##
|
||||||
|
## addnode will connect you to and tell you about the ##
|
||||||
|
## nodes connected to 4.2.2.4. In addition it will tell ##
|
||||||
|
## the other nodes connected to it that you exist so ##
|
||||||
|
## they can connect to you. ##
|
||||||
|
## connect will not do the above when you 'connect' to it. ##
|
||||||
|
## It will *only* connect you to 4.2.2.4 and no one else.##
|
||||||
|
## ##
|
||||||
|
## So if you're behind a firewall, or have other problems ##
|
||||||
|
## finding nodes, add some using 'addnode'. ##
|
||||||
|
## ##
|
||||||
|
## If you want to stay private, use 'connect' to only ##
|
||||||
|
## connect to "trusted" nodes. ##
|
||||||
|
## ##
|
||||||
|
## If you run multiple nodes on a LAN, there's no need for ##
|
||||||
|
## all of them to open lots of connections. Instead ##
|
||||||
|
## 'connect' them all to one node that is port forwarded ##
|
||||||
|
## and has lots of connections. ##
|
||||||
|
## Thanks goes to [Noodle] on Freenode. ##
|
||||||
|
##############################################################
|
||||||
|
|
||||||
|
# Use as many addnode= settings as you like to connect to specific peers
|
||||||
|
#addnode=69.164.218.197
|
||||||
|
#addnode=10.0.0.2:8333
|
||||||
|
|
||||||
|
# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
|
||||||
|
#connect=69.164.218.197
|
||||||
|
#connect=10.0.0.1:8333
|
||||||
|
|
||||||
|
# Listening mode, enabled by default except when 'connect' is being used
|
||||||
|
#listen=1
|
||||||
|
|
||||||
|
# Maximum number of inbound+outbound connections.
|
||||||
|
#maxconnections=
|
||||||
|
|
||||||
|
#
|
||||||
|
# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
|
||||||
|
#
|
||||||
|
|
||||||
|
# server=1 tells Bitcoin-Qt and bitcoind to accept JSON-RPC commands
|
||||||
|
#server=0
|
||||||
|
|
||||||
|
# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6.
|
||||||
|
# This option can be specified multiple times (default: bind to all interfaces)
|
||||||
|
#rpcbind=<addr>
|
||||||
|
|
||||||
|
# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
|
||||||
|
# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
|
||||||
|
# when the server and client are run as the same user.
|
||||||
|
#
|
||||||
|
# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC API.
|
||||||
|
#
|
||||||
|
# The config option `rpcauth` can be added to server startup argument. It is set at initialization time
|
||||||
|
# using the output from the script in share/rpcauth/rpcauth.py after providing a username:
|
||||||
|
#
|
||||||
|
# ./share/rpcauth/rpcauth.py alice
|
||||||
|
# String to be appended to bitcoin.conf:
|
||||||
|
# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
|
||||||
|
# Your password:
|
||||||
|
# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
|
||||||
|
#
|
||||||
|
# On client-side, you add the normal user/password pair to send commands:
|
||||||
|
#rpcuser=alice
|
||||||
|
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
|
||||||
|
#
|
||||||
|
# You can even add multiple entries of these to the server conf file, and client can use any of them:
|
||||||
|
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
|
||||||
|
|
||||||
|
# How many seconds bitcoin will wait for a complete RPC HTTP request.
|
||||||
|
# after the HTTP connection is established.
|
||||||
|
#rpcclienttimeout=30
|
||||||
|
|
||||||
|
# By default, only RPC connections from localhost are allowed.
|
||||||
|
# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
|
||||||
|
# either as a single IPv4/IPv6 or with a subnet specification.
|
||||||
|
|
||||||
|
# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
|
||||||
|
# because the rpcpassword is transmitted over the network unencrypted.
|
||||||
|
|
||||||
|
# server=1 tells Bitcoin-Qt to accept JSON-RPC commands.
|
||||||
|
# it is also read by bitcoind to determine if RPC should be enabled
|
||||||
|
#rpcallowip=10.1.1.34/255.255.255.0
|
||||||
|
#rpcallowip=1.2.3.4/24
|
||||||
|
#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
|
||||||
|
|
||||||
|
# Listen for RPC connections on this TCP port:
|
||||||
|
#rpcport=8332
|
||||||
|
|
||||||
|
# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
|
||||||
|
# running on another host using this option:
|
||||||
|
#rpcconnect=127.0.0.1
|
||||||
|
|
||||||
|
# Wallet options
|
||||||
|
|
||||||
|
# Create transactions that have enough fees so they are likely to begin confirmation within n blocks (default: 6).
|
||||||
|
# This setting is over-ridden by the -paytxfee option.
|
||||||
|
#txconfirmtarget=n
|
||||||
|
|
||||||
|
# Pay a transaction fee every time you send bitcoins.
|
||||||
|
#paytxfee=0.000x
|
||||||
|
|
||||||
|
# Miscellaneous options
|
||||||
|
|
||||||
|
# Pre-generate this many public/private key pairs, so wallet backups will be valid for
|
||||||
|
# both prior transactions and several dozen future transactions.
|
||||||
|
#keypool=100
|
||||||
|
|
||||||
|
# Enable pruning to reduce storage requirements by deleting old blocks.
|
||||||
|
# This mode is incompatible with -txindex and -rescan.
|
||||||
|
# 0 = default (no pruning).
|
||||||
|
# 1 = allows manual pruning via RPC.
|
||||||
|
# >=550 = target to stay under in MiB.
|
||||||
|
#prune=550
|
||||||
|
|
||||||
|
# User interface options
|
||||||
|
|
||||||
|
# Start Bitcoin minimized
|
||||||
|
#min=1
|
||||||
|
|
||||||
|
# Minimize to the system tray
|
||||||
|
#minimizetotray=1
|
4
bitcoin.obsinfo
Normal file
4
bitcoin.obsinfo
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name: bitcoin
|
||||||
|
version: 28.0
|
||||||
|
mtime: 1727803802
|
||||||
|
commit: 110183746150428e6385880c79f8c5733b1361ba
|
304
bitcoin.spec
Normal file
304
bitcoin.spec
Normal file
@ -0,0 +1,304 @@
|
|||||||
|
#
|
||||||
|
# spec file for package bitcoin
|
||||||
|
#
|
||||||
|
# Copyright (c) 2025 SUSE LLC
|
||||||
|
# Copyright (c) 2011-2014 P Rusnak <prusnak@opensuse.org>
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# typical altcoin changes: name, name_pretty, consensus 0, is_base 0
|
||||||
|
%define base bitcoin
|
||||||
|
%define base_pretty Bitcoin
|
||||||
|
%define name_pretty %{base_pretty}
|
||||||
|
%define consensus 0
|
||||||
|
%define is_base 1
|
||||||
|
Name: bitcoin
|
||||||
|
Version: 28.0
|
||||||
|
Release: 0
|
||||||
|
Summary: P2P Digital Currency
|
||||||
|
License: MIT
|
||||||
|
URL: https://%{name}.org
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
Source1: %{base}d.service
|
||||||
|
Source3: %{base}d.conf
|
||||||
|
Source4: %{base}.conf
|
||||||
|
Patch0: harden_bitcoind.service.patch
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: java-devel
|
||||||
|
BuildRequires: lcov
|
||||||
|
BuildRequires: libboost_filesystem-devel >= 1.73.0
|
||||||
|
BuildRequires: libboost_program_options-devel >= 1.73.0
|
||||||
|
BuildRequires: libboost_system-devel >= 1.73.0
|
||||||
|
BuildRequires: libboost_test-devel >= 1.73.0
|
||||||
|
BuildRequires: libboost_thread-devel >= 1.73.0
|
||||||
|
BuildRequires: libdb-4_8-devel
|
||||||
|
BuildRequires: libminiupnpc-devel
|
||||||
|
BuildRequires: libqt5-qtbase-devel
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
BuildRequires: pkgconfig(Qt5Designer)
|
||||||
|
BuildRequires: pkgconfig(Qt5Help)
|
||||||
|
BuildRequires: pkgconfig(Qt5UiTools)
|
||||||
|
BuildRequires: pkgconfig(libevent)
|
||||||
|
BuildRequires: pkgconfig(libqrencode)
|
||||||
|
BuildRequires: pkgconfig(libzmq)
|
||||||
|
BuildRequires: pkgconfig(openssl)
|
||||||
|
BuildRequires: pkgconfig(protobuf)
|
||||||
|
BuildRequires: pkgconfig(python3)
|
||||||
|
BuildRequires: pkgconfig(sqlite3)
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{name_pretty} is a peer-to-peer electronic cash system
|
||||||
|
that is completely decentralized, without the need for a central server or
|
||||||
|
trusted parties. Users hold the crypto keys to their own money and
|
||||||
|
transact directly with each other, with the help of a P2P network to check
|
||||||
|
for double-spending.
|
||||||
|
|
||||||
|
Full transaction history is stored locally at each client. This requires
|
||||||
|
several GB of space, slowly growing.
|
||||||
|
|
||||||
|
%package qt5
|
||||||
|
Summary: An end-user Qt5 GUI for the %{name_pretty} crypto-currency
|
||||||
|
Requires(post): update-desktop-files
|
||||||
|
Requires(postun): update-desktop-files
|
||||||
|
|
||||||
|
%description qt5
|
||||||
|
%{name_pretty} is a peer-to-peer electronic cash system
|
||||||
|
that is completely decentralized, without the need for a central server or
|
||||||
|
trusted parties. Users hold the crypto keys to their own money and
|
||||||
|
transact directly with each other, with the help of a P2P network to check
|
||||||
|
for double-spending.
|
||||||
|
|
||||||
|
Full transaction history is stored locally at each client. This requires
|
||||||
|
several GB of space, slowly growing.
|
||||||
|
|
||||||
|
This package provides %{name_pretty}-Qt, a GUI for %{name_pretty} based on
|
||||||
|
Qt.
|
||||||
|
|
||||||
|
%package utils
|
||||||
|
Summary: An end-user CLI for the %{name_pretty} crypto-currency
|
||||||
|
|
||||||
|
%description utils
|
||||||
|
%{name_pretty} is a peer-to-peer electronic cash system
|
||||||
|
that is completely decentralized, without the need for a central server or
|
||||||
|
trusted parties. Users hold the crypto keys to their own money and
|
||||||
|
transact directly with each other, with the help of a P2P network to check
|
||||||
|
for double-spending.
|
||||||
|
|
||||||
|
Full transaction history is stored locally at each client. This requires
|
||||||
|
several GB of space, slowly growing.
|
||||||
|
|
||||||
|
This package provides %{name}-cli — a CLI tool to interact with the daemon.
|
||||||
|
|
||||||
|
%if %{consensus} == 1
|
||||||
|
%package -n lib%{name}consensus0
|
||||||
|
Summary: %{name_pretty} consensus library
|
||||||
|
|
||||||
|
%description -n lib%{name}consensus0
|
||||||
|
The purpose of this library is to make the verification functionality that
|
||||||
|
is critical to %{name_pretty}’s consensus available to other applications,
|
||||||
|
e.g. to language bindings such as python-%{name}lib or alternative node
|
||||||
|
implementations.
|
||||||
|
|
||||||
|
%package -n lib%{name}consensus-devel
|
||||||
|
Summary: Developmont files for %{name} consensus library
|
||||||
|
Requires: lib%{name}consensus0 = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n lib%{name}consensus-devel
|
||||||
|
The purpose of this library is to make the verification functionality that
|
||||||
|
is critical to %{name_pretty}’s consensus available to other applications,
|
||||||
|
e.g. to language bindings such as python-%{name}lib or alternative node
|
||||||
|
implementations.
|
||||||
|
|
||||||
|
This package contains development files.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package -n %{name}d
|
||||||
|
Summary: Headless daemon for %{name_pretty} crypto-currency
|
||||||
|
Provides: group(%{name})
|
||||||
|
Provides: user(%{name})
|
||||||
|
|
||||||
|
%description -n %{name}d
|
||||||
|
%{name_pretty} is a peer-to-peer electronic cash system
|
||||||
|
that is completely decentralized, without the need for a central server or
|
||||||
|
trusted parties. Users hold the crypto keys to their own money and
|
||||||
|
transact directly with each other, with the help of a P2P network to check
|
||||||
|
for double-spending.
|
||||||
|
|
||||||
|
Full transaction history is stored locally at each client. This requires
|
||||||
|
several GB of space, slowly growing.
|
||||||
|
|
||||||
|
This package provides %{name}d, headless %{name} daemon.
|
||||||
|
|
||||||
|
%package test
|
||||||
|
Summary: Automated tests for %{name} client
|
||||||
|
|
||||||
|
%description test
|
||||||
|
%{name_pretty} is a peer-to-peer electronic cash system
|
||||||
|
that is completely decentralized, without the need for a central server or
|
||||||
|
trusted parties. Users hold the crypto keys to their own money and
|
||||||
|
transact directly with each other, with the help of a P2P network to check
|
||||||
|
for double-spending.
|
||||||
|
|
||||||
|
Full transaction history is stored locally at each client. This requires
|
||||||
|
several GB of space, slowly growing.
|
||||||
|
|
||||||
|
This package provides automated tests for %{name}-qt5 and %{name}d.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf -fiv
|
||||||
|
%configure \
|
||||||
|
--with-asm=auto \
|
||||||
|
--with-cli=yes \
|
||||||
|
--with-daemon=yes \
|
||||||
|
--with-gui=qt5 \
|
||||||
|
--with-miniupnpc \
|
||||||
|
--with-qrencode \
|
||||||
|
--with-sqlite=yes \
|
||||||
|
--enable-lto \
|
||||||
|
%if %{consensus} == 0
|
||||||
|
--without-libs \
|
||||||
|
%endif
|
||||||
|
--disable-hardening
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%check
|
||||||
|
%make_build LC_ALL=C.UTF-8 check
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
install -Dpm 0644 doc/man/%{name}d.1 %{buildroot}%{_mandir}/man1/%{name}d.1
|
||||||
|
install -Dpm 0644 doc/man/%{name}-qt.1 %{buildroot}%{_mandir}/man1/%{name}-qt.1
|
||||||
|
|
||||||
|
install -Dpm 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
|
||||||
|
|
||||||
|
%if !%{is_base}
|
||||||
|
sed -i "s/%{base}/%{name}/g" %{SOURCE1}
|
||||||
|
sed -i "s/%{base}/%{name}/g" %{SOURCE2}
|
||||||
|
sed -i "s/%{base}/%{name}/g" %{SOURCE3}
|
||||||
|
|
||||||
|
sed -i "s/%{base_pretty}/%{name_pretty}/g" %{SOURCE1}
|
||||||
|
sed -i "s/%{base_pretty}/%{name_pretty}/g" %{SOURCE2}
|
||||||
|
sed -i "s/%{base_pretty}/%{name_pretty}/g" %{SOURCE3}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name}
|
||||||
|
|
||||||
|
mkdir %{buildroot}%{_sbindir}
|
||||||
|
ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}d
|
||||||
|
install -Dpm 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}d.service
|
||||||
|
install -Dpm 0644 %{SOURCE3} %{buildroot}/%{_tmpfilesdir}/%{name}d.conf
|
||||||
|
|
||||||
|
# install desktop file
|
||||||
|
install -Dm 0644 share/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
|
||||||
|
%suse_update_desktop_file -c %{name}-qt %{name_pretty} "%{name_pretty} Wallet" %{name}-qt %{name} Office Finance
|
||||||
|
|
||||||
|
%if %{consensus} == 1
|
||||||
|
# do not ship these
|
||||||
|
rm -f %{buildroot}%{_libdir}/lib%{name}consensus.a
|
||||||
|
rm -f %{buildroot}%{_libdir}/lib%{name}consensus.la
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post qt5
|
||||||
|
%desktop_database_post
|
||||||
|
|
||||||
|
%postun qt5
|
||||||
|
%desktop_database_postun
|
||||||
|
|
||||||
|
%if %{consensus} == 1
|
||||||
|
%post -n lib%{name}consensus0 -p /sbin/ldconfig
|
||||||
|
%postun -n lib%{name}consensus0 -p /sbin/ldconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%pre -n %{name}d
|
||||||
|
getent group %{name} >/dev/null || groupadd -r %{name}
|
||||||
|
getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/lib/%{name} -s /sbin/nologin -c "%{name_pretty} daemon" %{name}
|
||||||
|
%service_add_pre %{name}d.service
|
||||||
|
|
||||||
|
%post -n %{name}d
|
||||||
|
%service_add_post %{name}d.service
|
||||||
|
%if 0%{?suse_version} <= 1320
|
||||||
|
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}d.conf >/dev/null 2>&1 || :
|
||||||
|
%else
|
||||||
|
%tmpfiles_create %{_tmpfilesdir}/%{name}d.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%preun -n %{name}d
|
||||||
|
%service_del_preun %{name}d.service
|
||||||
|
|
||||||
|
%postun -n %{name}d
|
||||||
|
%service_del_postun %{name}d.service
|
||||||
|
|
||||||
|
%files qt5
|
||||||
|
%license COPYING
|
||||||
|
%doc doc/README.md doc/release-notes.md
|
||||||
|
%{_bindir}/%{name}-qt
|
||||||
|
%{_datadir}/applications/%{name}-qt.desktop
|
||||||
|
%{_datadir}/pixmaps/%{name}.png
|
||||||
|
%{_mandir}/man1/%{name}-qt.1%{?ext_man}
|
||||||
|
|
||||||
|
%files utils
|
||||||
|
%license COPYING
|
||||||
|
%doc doc/README.md doc/release-notes.md
|
||||||
|
%{_bindir}/%{name}-cli
|
||||||
|
%{_bindir}/%{name}-tx
|
||||||
|
%{_bindir}/%{name}-wallet
|
||||||
|
%{_bindir}/%{name}-util
|
||||||
|
%{_mandir}/man1/%{name}-cli.1%{?ext_man}
|
||||||
|
%{_mandir}/man1/%{name}-tx.1%{?ext_man}
|
||||||
|
%{_mandir}/man1/%{name}-wallet.1%{?ext_man}
|
||||||
|
%{_mandir}/man1/%{name}-util.1%{?ext_man}
|
||||||
|
|
||||||
|
%if %{consensus} == 1
|
||||||
|
%files -n lib%{name}consensus0
|
||||||
|
%license COPYING
|
||||||
|
%doc doc/README.md doc/release-notes.md
|
||||||
|
%{_libdir}/lib%{name}consensus.so.*
|
||||||
|
|
||||||
|
%files -n lib%{name}consensus-devel
|
||||||
|
%license COPYING
|
||||||
|
%doc doc/README.md
|
||||||
|
%{_libdir}/lib%{name}consensus.so
|
||||||
|
%{_includedir}/%{name}consensus.h
|
||||||
|
%{_libdir}/pkgconfig/lib%{name}consensus.pc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n %{name}d
|
||||||
|
%license COPYING
|
||||||
|
%doc doc/README.md doc/release-notes.md
|
||||||
|
%{_mandir}/man1/%{name}d.1%{?ext_man}
|
||||||
|
%{_bindir}/%{name}d
|
||||||
|
%dir %attr(700,%{name},%{name}) %{_var}/lib/%{name}
|
||||||
|
%dir %{_sysconfdir}/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
|
||||||
|
%{_unitdir}/%{name}d.service
|
||||||
|
%{_sbindir}/rc%{name}d
|
||||||
|
%{_tmpfilesdir}/%{name}d.conf
|
||||||
|
|
||||||
|
%files test
|
||||||
|
%license COPYING
|
||||||
|
%doc doc/README.md doc/release-notes.md
|
||||||
|
%{_bindir}/test_%{name}
|
||||||
|
%{_bindir}/test_%{name}-qt
|
||||||
|
%{_bindir}/bench_%{name}
|
||||||
|
|
||||||
|
%changelog
|
2
bitcoind.conf
Normal file
2
bitcoind.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# create a directory with permissions 0770 owned by user foo and group bar
|
||||||
|
d /var/run/bitcoin 0770 root bitcoin
|
27
bitcoind.service
Normal file
27
bitcoind.service
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Bitcoin Daemon
|
||||||
|
Requires=network.target
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# added automatically, for details please see
|
||||||
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=true
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectClock=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelLogs=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
# end of automatic additions
|
||||||
|
User=bitcoin
|
||||||
|
PIDFile=/run/bitcoin/bitcoind.pid
|
||||||
|
ExecStart=/usr/bin/bitcoind -conf=/etc/bitcoin/bitcoin.conf -pid=/run/bitcoin/bitcoind.pid -datadir=/var/lib/bitcoin
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
21
harden_bitcoind.service.patch
Normal file
21
harden_bitcoind.service.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Index: bitcoin-24.0.1/contrib/init/bitcoind.service
|
||||||
|
===================================================================
|
||||||
|
--- bitcoin-24.0.1.orig/contrib/init/bitcoind.service
|
||||||
|
+++ bitcoin-24.0.1/contrib/init/bitcoind.service
|
||||||
|
@@ -74,6 +74,16 @@ NoNewPrivileges=true
|
||||||
|
# Use a new /dev namespace only populated with API pseudo devices
|
||||||
|
# such as /dev/null, /dev/zero and /dev/random.
|
||||||
|
PrivateDevices=true
|
||||||
|
+# added automatically, for details please see
|
||||||
|
+# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
+ProtectHostname=true
|
||||||
|
+ProtectClock=true
|
||||||
|
+ProtectKernelTunables=true
|
||||||
|
+ProtectKernelModules=true
|
||||||
|
+ProtectKernelLogs=true
|
||||||
|
+ProtectControlGroups=true
|
||||||
|
+RestrictRealtime=true
|
||||||
|
+# end of automatic additions
|
||||||
|
|
||||||
|
# Deny the creation of writable and executable memory mappings.
|
||||||
|
MemoryDenyWriteExecute=true
|
Loading…
x
Reference in New Issue
Block a user