From ea6e5f8b437882ff82b4d4d8280934c8cf928282ac76a4f87e9ba2d0881b0e53 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 15 Nov 2014 10:41:14 +0000 Subject: [PATCH] Accepting request 260292 from network It would be good to have this package in factory OBS-URL: https://build.opensuse.org/request/show/260292 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bitcoin?expand=0&rev=1 --- .gitattributes | 23 ++++ .gitignore | 1 + _constraints | 7 + bitcoin-fix-desktop-icon-name.patch | 11 ++ bitcoin.changes | 148 +++++++++++++++++++++ bitcoin.spec | 191 ++++++++++++++++++++++++++++ bitcoind.conf | 2 + bitcoind.firewall | 17 +++ bitcoind.service | 14 ++ v0.9.3.tar.gz | 3 + 10 files changed, 417 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _constraints create mode 100644 bitcoin-fix-desktop-icon-name.patch create mode 100644 bitcoin.changes create mode 100644 bitcoin.spec create mode 100644 bitcoind.conf create mode 100644 bitcoind.firewall create mode 100644 bitcoind.service create mode 100644 v0.9.3.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..c2f0bae --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 4086 + + + diff --git a/bitcoin-fix-desktop-icon-name.patch b/bitcoin-fix-desktop-icon-name.patch new file mode 100644 index 0000000..c99524d --- /dev/null +++ b/bitcoin-fix-desktop-icon-name.patch @@ -0,0 +1,11 @@ +diff -Naur a/contrib/debian/bitcoin-qt.desktop b/contrib/debian/bitcoin-qt.desktop +--- a/contrib/debian/bitcoin-qt.desktop 2014-04-08 05:04:06.000000000 -0500 ++++ b/contrib/debian/bitcoin-qt.desktop 2014-04-12 10:24:16.159294167 -0500 +@@ -7,6 +7,6 @@ + Exec=bitcoin-qt %u + Terminal=false + Type=Application +-Icon=bitcoin128 ++Icon=bitcoin + MimeType=x-scheme-handler/bitcoin; + Categories=Office;Finance; diff --git a/bitcoin.changes b/bitcoin.changes new file mode 100644 index 0000000..1dbebac --- /dev/null +++ b/bitcoin.changes @@ -0,0 +1,148 @@ +------------------------------------------------------------------- +Tue Oct 28 14:16:43 UTC 2014 - mpluskal@suse.com + +- Add _constraint due to memory consumption of build +- Decrease verbosity of bitcoind + +------------------------------------------------------------------- +Thu Oct 23 07:54:03 UTC 2014 - mpluskal@suse.com + +- Enable tests +- Split to multiple packages (bitcoind, bitcoin-qt, bitcoin-cli and bitcoin-test) +- Cleanup spec file +- Add unit file and sude .firewall for bitcoind +- Update to 0.9.3: + + RPC: + + * Avoid a segfault on getblock if it can?t read a block from disk + * Add paranoid return value checks in base58 + * Protocol and network code: + + * Don?t poll showmyip.com, it doesn?t exist anymore + * Add a way to limit deserialized string lengths and use it + * Add a new checkpoint at block 295,000 + * Increase IsStandard() scriptSig length + * Avoid querying DNS seeds, if we have open connections + * Remove a useless millisleep in socket handler + * Stricter memory limits on CNode + * Better orphan transaction handling + * Add -maxorphantx= and -maxorphanblocks= options for control over the maximum orphan transactions and blocks + + Wallet: + + * Check redeemScript size does not exceed 520 byte limit + * Ignore (and warn about) too-long redeemScripts while loading wallet + + GUI: + + * fix ?opens in testnet mode when presented with a BIP-72 link with no fallback? + * AvailableCoins: acquire cs_main mutex + * Fix unicode character display on MacOSX + + Miscellaneous: + + * key.cpp: fail with a friendlier message on missing ssl EC support + * Remove bignum dependency for scripts + * Upgrade OpenSSL to 1.0.1i (see https://www.openssl.org/news/secadv_20140806.txt - just to be sure, no critical issues for Bitcoin Core) + * Upgrade miniupnpc to 1.9.20140701 + * Fix boost detection in build system on some platforms + +Fri Jun 20 20:30:24 UTC 2014 - prusnak@opensuse.org + +- updated to 0.9.2.1 + +------------------------------------------------------------------- +Sat Apr 12 17:31:30 UTC 2014 - malcolmlewis@opensuse.org + +- Updated to version 0.9.1: + + Dependency-only update to build against fixed openssl security + vulnerability (CVE-2014-0160). +- Create new patch bitcoin-fix-desktop-icon-name.patch: Rename + icon in desktop file to remove size reference. +- Allow to build for QT5. +- Add man pages. +- General spec file clean up. +- Drop bitcoin-desktop.patch. + +------------------------------------------------------------------- +Fri Mar 21 16:15:29 UTC 2014 - prusnak@opensuse.org + +- updated to 0.9.0 + +------------------------------------------------------------------- +Mon Dec 9 15:36:33 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.6 + +------------------------------------------------------------------- +Sat Sep 14 10:06:37 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.5 + +------------------------------------------------------------------- +Sun Sep 1 10:06:17 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.4 + +------------------------------------------------------------------- +Tue Jun 25 23:17:54 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.3 + +------------------------------------------------------------------- +Thu May 30 23:37:13 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.2 + +------------------------------------------------------------------- +Mon Mar 18 18:21:03 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.1 + +------------------------------------------------------------------- +Wed Feb 20 01:02:58 UTC 2013 - prusnak@opensuse.org + +- updated to 0.8.0 + +------------------------------------------------------------------- +Fri Dec 14 19:00:14 UTC 2012 - prusnak@opensuse.org + +- updated to 0.7.2 + +------------------------------------------------------------------- +Mon Oct 29 12:44:09 UTC 2012 - prusnak@opensuse.org + +- updated to 0.7.1 + +------------------------------------------------------------------- +Tue Sep 11 14:53:01 UTC 2012 - prusnak@opensuse.org + +- updated to 0.6.3 + +------------------------------------------------------------------- +Sat May 5 14:51:32 UTC 2012 - fisiu@opensuse.org + +- updated to 0.6.1 + +------------------------------------------------------------------- +Mon Apr 2 18:27:01 UTC 2012 - prusnak@opensuse.org + +- updated to 0.6.0 + +------------------------------------------------------------------- +Sat Mar 17 01:03:30 UTC 2012 - prusnak@opensuse.org + +- updated to 0.5.3 + +------------------------------------------------------------------- +Thu Jan 19 14:25:30 UTC 2012 - prusnak@opensuse.org + +- updated to 0.5.2 + +------------------------------------------------------------------- +Thu Dec 22 01:22:02 UTC 2011 - prusnak@opensuse.org + +- updated to 0.5.1 + +------------------------------------------------------------------- +Thu Nov 24 09:55:05 UTC 2011 - prusnak@opensuse.org + +- created package (version 0.5.0) + diff --git a/bitcoin.spec b/bitcoin.spec new file mode 100644 index 0000000..c152658 --- /dev/null +++ b/bitcoin.spec @@ -0,0 +1,191 @@ +# +# spec file for package bitcoin +# +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011-2014 P Rusnak +# +# 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 http://bugs.opensuse.org/ +# + + +Name: bitcoin +Version: 0.9.3 +Release: 0 +Summary: P2P Digital Currency +License: MIT +Group: Productivity/Networking/Other +Url: http://www.bitcoin.org +Source: https://github.com/bitcoin/bitcoin/archive/v%{version}.tar.gz +Source1: bitcoind.service +Source2: bitcoind.firewall +Source3: bitcoind.conf +# PATCH-FIX-OPENSUSE bitcoin-fix-desktop-icon-name.patch prusnak@opensuse.org -- Rename icon in desktop file to remove size reference. +Patch0: bitcoin-fix-desktop-icon-name.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: boost-devel +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: libdb-4_8-devel +BuildRequires: libminiupnpc-devel +BuildRequires: libopenssl-devel +BuildRequires: libqt5-qtbase-devel +BuildRequires: libqt5-qttools-devel +BuildRequires: protobuf-devel +BuildRequires: qrencode-devel +BuildRequires: systemd +BuildRequires: update-desktop-files +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%{?systemd_requires} + +%description +Bitcoin is a free open source 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 Bitcoin crypto-currency +License: MIT +Group: Development/Libraries/Other +Provides: bitcoin = %{version} +Obsoletes: bitcoin < %{version} + +%description qt5 +Bitcoin is a free open source 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 Bitcoin-Qt, a GUI for Bitcoin based on Qt. + +%package cli +Summary: An end-user cli for the Bitcoin crypto-currency +License: MIT + +%description cli +Bitcoin is a free open source 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 bitcoin-cli - CLI tool to interact with the daemon. + +%package -n bitcoind +Summary: Headless daemon for Bitcoin crypto-currency +License: MIT +Group: Development/Libraries/Other + +%description -n bitcoind +Bitcoin is a free open source 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 bitcoind, headless bitcoin daemon. + +%package test +Summary: Automated tests for bitcoin client +License: MIT +Group: Development/Libraries/Other + +%description test +Bitcoin is a free open source 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 bitcoin-qt5 and bitcoind. + +%prep +%setup -q +%patch0 -p1 + +%build +autoreconf -fvi +%configure \ + --with-cli=yes \ + --with-daemon=yes \ + --with-gui=qt5 \ + --with-miniupnpc \ + --disable-silent-rules +make %{?_smp_mflags} + +%install +%make_install + +install -D -m 0644 share/pixmaps/bitcoin256.png %{buildroot}%{_datadir}/pixmaps/%{name}.png +install -D -m 0644 contrib/debian/bitcoin-qt.desktop %{buildroot}%{_datadir}/applications/%{name}-qt.desktop +%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}-qt.desktop +install -D -m 0644 contrib/debian/manpages/bitcoind.1 %{buildroot}%{_mandir}/man1/bitcoind.1 +install -D -m 0644 contrib/debian/manpages/bitcoin-qt.1 %{buildroot}%{_mandir}/man1/bitcoin-qt.1 +install -D -m 0644 contrib/debian/manpages/bitcoin.conf.5 %{buildroot}%{_mandir}/man5/bitcoin.conf.5 +install -D -m 0644 contrib/debian/examples/bitcoin.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf +mkdir -p %{buildroot}/%{_localstatedir}/lib/%{name} +install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/ +install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bitcoind +mkdir %{buildroot}%{_sbindir} +ln -sv %{_sbindir}/service %{buildroot}%{_sbindir}/rcbitcoind +install -D -m 0644 $RPM_SOURCE_DIR/bitcoind.service %{buildroot}/%{_unitdir}/bitcoind.service +install -d -m 0755 %{buildroot}/%{_tmpfilesdir}/ +install -m 0644 %{SOURCE3} %{buildroot}/%{_tmpfilesdir}/bitcoind.conf + +%post qt5 +%desktop_database_post + +%postun qt5 +%desktop_database_post + +%pre -n bitcoind +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 "Bitcoin daemon" %{name} +%service_add_pre bitcoind.service + +%post -n bitcoind +%service_add_post bitcoind.service +systemd-tmpfiles --create %{_tmpfilesdir}/bitcoind.conf + +%preun -n bitcoind +%service_del_preun bitcoind.service + +%postun -n bitcoind +%service_del_postun bitcoind.service + +%files qt5 +%defattr(-,root,root) +%doc COPYING README.md +%{_bindir}/bitcoin-qt +%{_datadir}/applications/%{name}-qt.desktop +%{_mandir}/man1/bitcoin-qt.1%{?ext_man} +%{_datadir}/pixmaps/%{name}.png + +%files cli +%defattr(-,root,root) +%doc COPYING README.md +%{_bindir}/bitcoin-cli + +%files -n bitcoind +%defattr(-,root,root) +%doc COPYING README.md +%{_mandir}/man1/bitcoind.1%{?ext_man} +%{_mandir}/man5/%{name}.conf.5%{?ext_man} +%{_bindir}/bitcoind +%dir %attr(700,%{name},%{name}) %{_var}/lib/%{name} +%dir %{_sysconfdir}/%{name} +%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bitcoind +%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf +%{_unitdir}/bitcoind.service +%{_sbindir}/rcbitcoind +%{_tmpfilesdir}/bitcoind.conf + +%files test +%defattr(-,root,root) +%doc COPYING README.md +%{_bindir}/test_bitcoin +%{_bindir}/test_bitcoin-qt + +%changelog diff --git a/bitcoind.conf b/bitcoind.conf new file mode 100644 index 0000000..d8d4966 --- /dev/null +++ b/bitcoind.conf @@ -0,0 +1,2 @@ +# create a directory with permissions 0770 owned by user foo and group bar +d /var/run/bitcoin 0770 root bitcoin diff --git a/bitcoind.firewall b/bitcoind.firewall new file mode 100644 index 0000000..2cedd4f --- /dev/null +++ b/bitcoind.firewall @@ -0,0 +1,17 @@ +## Name: bitcoin daemon +## Description: Opens ports for vsftpd Server. + +# space separated list of allowed TCP ports +TCP="bitcoind 8332:8333" + +# space separated list of allowed UDP ports +UDP="" + +# space separated list of allowed RPC services +RPC="" + +# space separated list of allowed IP protocols +IP="" + +# space separated list of allowed UDP broadcast ports +BROADCAST="" diff --git a/bitcoind.service b/bitcoind.service new file mode 100644 index 0000000..cdf9fdc --- /dev/null +++ b/bitcoind.service @@ -0,0 +1,14 @@ +[Unit] +Description=Bitcoin Daemon +Requires=network.target +After=network.target + +[Service] +User=bitcoin +Type=forking +PIDFile=/run/bitcoin/bitcoind.pid +ExecStart=/usr/bin/bitcoind -daemon -conf=/etc/bitcoin/bitcoin.conf -pid=/run/bitcoin/bitcoind.pid -datadir=/var/lib/bitcoin +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/v0.9.3.tar.gz b/v0.9.3.tar.gz new file mode 100644 index 0000000..6688160 --- /dev/null +++ b/v0.9.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ed92e8323cb4187cae015457c7c5920a5c658438f01c6c45f0ce3aabf9bd428 +size 4788997