Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
primecoind-hp 0.1.1-hp4, high performance primecoind by mikaelh2
- Loading branch information
Showing
7 changed files
with
438 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AUX 0.1.0-sys_leveldb.patch 6649 SHA256 e761659725ae0b9993d5ce099a46d3430162bad907e6c35020dd3bd1288c650d SHA512 4949e83169c8800251b678bd7bf64d87178696cb24f8559befd33af7bfebb513c46e705470957ff128765683dcf1d78bea7ec3ea23d16e021aafa0b713f74787 WHIRLPOOL ab8f40dfd3f7de2dbea7d04b47ce7651a39e90d340614d016a395532ac97029a25edf1f2badc6fa4bc8f8ec3479b199d96d01e23acad1019eab9539938cdcd19 | ||
AUX primecoin.conf 82 SHA256 885ee7cffa4a36adea4e3589eb630abbbdd7ae48a0982a4f8ac067e49e2ea7e9 SHA512 40674f5afb4bbc866283a999d7cc13944875a1a5fbf82f87b2915d6498255a168d186c1b83c3b3784c640708666adbd5e97c5587c8e510b0fa5eb98f7607449b WHIRLPOOL 4e888f7ea2cfea05bf0cfa62a29f6002cb57c7afc9d9fc6f16d84ff6017f6ee322aea37e4576d7fb3582533d67c17cc199b88d670d38a92c9e1decc5a0d75a2f | ||
AUX primecoin.confd 252 SHA256 f9764de1ae20f3f8dd69b2952010bd497023c778b214e93e0ffaa76b8e4d2e99 SHA512 006f853a88183d5491235a34f62bc534639c1ad176f7637ff97f5710c19951cf72eb2a4be8e246ee913266ed0d90dac6f5903ea46f4ba13ae205ed0ca62aa451 WHIRLPOOL 64e9e26994e5aae7344b7403e70418c19696b450c6aca7cd2ccdd68002f91a6c54c98569c9ec56ec2f7cde3706ddd20719d1e6bb120a423d754a380427c4a7fb | ||
AUX primecoin.initd 2541 SHA256 39697a124ab6bbccb2688ffad3dcd3761020941fc5c10c2129685f57c00e8ce0 SHA512 41a6a7272701b95cf5f4fe9fac60ff0f126ce49f02cd27955d76fbc7bf630aa5c6b5dc16f15e3eba22a28ffef9430132cbdcec8150ffc6c087809843ffebb767 WHIRLPOOL d5f842d64cd6f333f710ed836ce7da9cacce5822dd28644eb7a3c8aaece52b5a0a63af7080280a60e3def35fe73167184afe0de8dd4e845d0231d3a461a5bd42 | ||
AUX primecoind.logrotate 116 SHA256 fb78530aad1491be7c75dede40e82809020b438f272a6a8506ba74eb9af0691b SHA512 ad6873f47e73a305e3b44fc0a6e9ef430a2e82392ff6c5230f365aaa1b1d64afc8d97094006dc2b57b8b9245288f3e144ecdccb5913d98d7171fcd6a216022e9 WHIRLPOOL 0d6c4b3fcbe60de559febe9d8029de177821c0aceec31fdae3b9b907aebc24ffc4f1b7ecc2102a8ae486f25ac00fd479a1b349ce2ed39a1e6fb85a620b30a97e | ||
DIST primecoin-0.1.1-hp4.tar.bz2 2960094 SHA256 c02c9b33bdba94526c288e976b25299e16ef6d5479fe2151290814e0a6fc4b36 SHA512 8cf0573d688df4e2abf55efea511a422f7aeb386277315a4e1a2d3502b7a162525982df2396c2dc173e17e81bc5246a49a05c22c929b68705f6e728895fa5232 WHIRLPOOL 1193fda3aba75e94c137e5759d1e11abdfd38e4175f735c6a016a133eafbbab9444df7ab7fae5d764feea002ed832894f1319b2d9a03bfc9a7896758e6b2fe05 | ||
EBUILD primecoind-hp-0.1.1.4.ebuild 2777 SHA256 f8da84c722c2314beb608f2b42e9f949d2d01e7ac83c2e5fff143d8014902cee SHA512 1ca771e1aee5a92d1ada5809b4e3594304372e5e412479bd8c146d3cf4ffe84b867c805a289f8ad1a67d892ddd84bbc6119b8e10cc1127f6ff58b99614d35e7d WHIRLPOOL bfe265ad8d63875fbf11b2240adaf9d65be540f4dc33dbd49c9735a1b0e39f841e16d94fe89442dfe3364e57ec51fc28760356300c58b6fa3673c2b8340e0437 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
diff -ur src/bitcoin-qt.pro src-teknohog/bitcoin-qt.pro | ||
--- src/bitcoin-qt.pro 2013-07-07 05:27:50.000000000 +0300 | ||
+++ src-teknohog/bitcoin-qt.pro 2013-07-08 22:32:25.060767527 +0300 | ||
@@ -4,7 +4,7 @@ | ||
VERSION = 0.8.3 | ||
INCLUDEPATH += src src/json src/qt | ||
QT += network | ||
-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE | ||
+DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV | ||
CONFIG += no_include_pwd | ||
CONFIG += thread | ||
|
||
@@ -98,25 +98,29 @@ | ||
QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets | ||
} | ||
|
||
+contains(USE_SYSTEM_LEVELDB, 1) { | ||
+ LIBS += -lleveldb | ||
+} else { | ||
INCLUDEPATH += src/leveldb/include src/leveldb/helpers | ||
-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a | ||
+LIBS += $$PWD/src/leveldb/libleveldb.a | ||
!win32 { | ||
# we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences | ||
- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a | ||
+ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a | ||
} else { | ||
# make an educated guess about what the ranlib command is called | ||
isEmpty(QMAKE_RANLIB) { | ||
QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) | ||
} | ||
LIBS += -lshlwapi | ||
- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a | ||
+ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a | ||
} | ||
genleveldb.target = $$PWD/src/leveldb/libleveldb.a | ||
genleveldb.depends = FORCE | ||
PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a | ||
QMAKE_EXTRA_TARGETS += genleveldb | ||
+} | ||
# Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. | ||
-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean | ||
+QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true | ||
|
||
# regenerate src/build.h | ||
!win32|contains(USE_BUILD_INFO, 1) { | ||
Only in src-teknohog: bitcoin-qt.pro.orig | ||
diff -ur src/src/leveldb.cpp src-teknohog/src/leveldb.cpp | ||
--- src/src/leveldb.cpp 2013-07-07 05:27:51.000000000 +0300 | ||
+++ src-teknohog/src/leveldb.cpp 2013-07-08 22:32:25.061767515 +0300 | ||
@@ -8,7 +8,9 @@ | ||
#include <leveldb/env.h> | ||
#include <leveldb/cache.h> | ||
#include <leveldb/filter_policy.h> | ||
+#ifndef LEVELDB_WITHOUT_MEMENV | ||
#include <memenv/memenv.h> | ||
+#endif | ||
|
||
#include <boost/filesystem.hpp> | ||
|
||
@@ -43,8 +45,12 @@ | ||
options = GetOptions(nCacheSize); | ||
options.create_if_missing = true; | ||
if (fMemory) { | ||
+#ifndef LEVELDB_WITHOUT_MEMENV | ||
penv = leveldb::NewMemEnv(leveldb::Env::Default()); | ||
options.env = penv; | ||
+#else | ||
+ throw std::runtime_error("CLevelDB(): compiled without memenv support"); | ||
+#endif | ||
} else { | ||
if (fWipe) { | ||
printf("Wiping LevelDB in %s\n", path.string().c_str()); | ||
Only in src-teknohog/src: leveldb.cpp.orig | ||
diff -ur src/src/makefile.unix src-teknohog/src/makefile.unix | ||
--- src/src/makefile.unix 2013-07-07 05:27:54.000000000 +0300 | ||
+++ src-teknohog/src/makefile.unix 2013-07-08 22:34:04.215527922 +0300 | ||
@@ -111,8 +111,7 @@ | ||
# adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. | ||
xLDFLAGS=$(LDHARDENING) $(LDFLAGS) | ||
|
||
-OBJS= \ | ||
- leveldb/libleveldb.a \ | ||
+BASEOBJS := \ | ||
obj/alert.o \ | ||
obj/version.o \ | ||
obj/checkpoints.o \ | ||
@@ -121,7 +120,6 @@ | ||
obj/crypter.o \ | ||
obj/key.o \ | ||
obj/db.o \ | ||
- obj/init.o \ | ||
obj/keystore.o \ | ||
obj/main.o \ | ||
obj/net.o \ | ||
@@ -141,25 +139,45 @@ | ||
obj/hash.o \ | ||
obj/bloom.o \ | ||
obj/noui.o \ | ||
- obj/leveldb.o \ | ||
obj/txdb.o \ | ||
obj/prime.o \ | ||
obj/checkpointsync.o | ||
|
||
+OBJS := \ | ||
+ obj/leveldb.o \ | ||
+ obj/init.o \ | ||
+ $(BASEOBJS) | ||
+ | ||
+TESTOBJS := \ | ||
+ obj-test/leveldb.o \ | ||
+ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \ | ||
+ $(BASEOBJS) | ||
+ | ||
all: primecoind | ||
|
||
test check: test_primecoin FORCE | ||
./test_primecoin | ||
|
||
+ifdef USE_SYSTEM_LEVELDB | ||
+ LIBS += -lleveldb | ||
+ TESTLIBS += -lmemenv | ||
+else | ||
+ | ||
# | ||
# LevelDB support | ||
# | ||
MAKEOVERRIDES = | ||
-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a | ||
+LIBS += $(CURDIR)/leveldb/libleveldb.a | ||
+TESTLIBS += $(CURDIR)/leveldb/libmemenv.a | ||
DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) | ||
DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) | ||
leveldb/libleveldb.a: | ||
- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. | ||
+ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CX | ||
+leveldb/libmemenv.a: | ||
+ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) C | ||
+OBJS += leveldb/libleveldb.a | ||
+TESTOBJS += leveldb/libmemenv.a | ||
+endif | ||
|
||
# auto-generated dependencies: | ||
-include obj/*.P | ||
@@ -170,26 +188,28 @@ | ||
version.cpp: obj/build.h | ||
DEFS += -DHAVE_BUILD_INFO | ||
|
||
-obj/%.o: %.cpp | ||
- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< | ||
+P_TO_D = \ | ||
@cp $(@:%.o=%.d) $(@:%.o=%.P); \ | ||
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ | ||
+ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ | ||
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ | ||
rm -f $(@:%.o=%.d) | ||
|
||
-primecoind: $(OBJS:obj/%=obj/%) | ||
- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) | ||
+obj/%.o: %.cpp | ||
+ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $< | ||
+ $(P_TO_D) | ||
|
||
-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) | ||
+primecoind: $(OBJS) | ||
+ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) | ||
|
||
obj-test/%.o: test/%.cpp | ||
$(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< | ||
- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ | ||
- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ | ||
- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ | ||
- rm -f $(@:%.o=%.d) | ||
+ $(P_TO_D) | ||
+ | ||
+obj-test/leveldb.o: leveldb.cpp | ||
+ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< | ||
+ $(P_TO_D) | ||
|
||
-test_primecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) | ||
+test_primecoin: $(TESTOBJS) | ||
$(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS) | ||
|
||
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# http://www.primecoin.org/smf/index.php?topic=644.0 | ||
#rpcuser= | ||
#rpcpassword= | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Config file for /etc/init.d/primecoin | ||
|
||
# owner of primecoind process (don't change, must be existing) | ||
PRIMECOIN_USER="primecoin" | ||
|
||
# See http://www.primecoin.org/smf/index.php?topic=1063 | ||
PRIMECOIN_OPTS="${PRIMECOIN_OPTS}" | ||
|
||
# nice level | ||
NICELEVEL="19" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/sbin/runscript | ||
# Distributed under the terms of the GNU General Public License, v2 or later | ||
|
||
VARDIR="/var/lib/primecoin" | ||
CONFFILE="${VARDIR}/.primecoin/primecoin.conf" | ||
|
||
depend() { | ||
need net | ||
} | ||
|
||
checkconfig() { | ||
if [[ "${PRIMECOIN_USER}" == "" ]] ; then | ||
eerror "Please edit /etc/conf.d/primecoind" | ||
eerror "A user must be specified to run primecoind as that user." | ||
eerror "Modify USER to your needs (you may also add a group after a colon)" | ||
return 1 | ||
fi | ||
if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${PRIMECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then | ||
eerror "Please edit /etc/conf.d/primecoind" | ||
eerror "Specified user must exist!" | ||
return 1 | ||
fi | ||
if `echo "${PRIMECOIN_USER}" | grep ':' -sq` ; then | ||
if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${PRIMECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then | ||
eerror "Please edit /etc/conf.d/primecoind" | ||
eerror "Specified group must exist!" | ||
return 1 | ||
fi | ||
fi | ||
if ! grep -q '^rpcpassword=' "${CONFFILE}"; then | ||
eerror "Please edit `readlink -f ${CONFFILE}`" | ||
eerror "There must be at least a line assigning rpcpassword=something-secure" | ||
return 1 | ||
fi | ||
if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then | ||
eerror "`readlink -f ${CONFFILE}` should not be readable by other users" | ||
return 1 | ||
fi | ||
return 0 | ||
} | ||
|
||
start() { | ||
checkconfig || return 1 | ||
ebegin "Starting Primecoind daemon" | ||
|
||
pkg-config openrc | ||
if [ $? = 0 ]; then | ||
start_openrc | ||
else | ||
start_baselayout | ||
fi | ||
} | ||
|
||
stop() { | ||
ebegin "Stopping Primecoin daemon" | ||
|
||
pkg-config openrc | ||
if [ $? = 0 ]; then | ||
stop_openrc | ||
else | ||
stop_baselayout | ||
fi | ||
} | ||
|
||
start_openrc() { | ||
start-stop-daemon \ | ||
--start --user "${PRIMECOIN_USER}" --name primecoind \ | ||
--pidfile /var/run/primecoind.pid --make-pidfile \ | ||
--env HOME="${VARDIR}" --exec /usr/bin/primecoind \ | ||
--nicelevel "${NICELEVEL}" \ | ||
--background \ | ||
--wait 2000 \ | ||
-- ${PRIMECOIN_OPTS} | ||
eend $? | ||
} | ||
|
||
stop_openrc() { | ||
start-stop-daemon --stop --user "${PRIMECOIN_USER}" \ | ||
--name primecoind --pidfile /var/run/primecoind.pid \ | ||
--wait 30000 \ | ||
--progress | ||
eend $? | ||
} | ||
|
||
start_baselayout() { | ||
start-stop-daemon \ | ||
--start --user "${PRIMECOIN_USER}" --name primecoind \ | ||
--pidfile /var/run/primecoind.pid --make-pidfile \ | ||
--env HOME="${VARDIR}" --exec /usr/bin/primecoind \ | ||
--chuid "${PRIMECOIN_USER}" \ | ||
--nicelevel "${NICELEVEL}" \ | ||
--background \ | ||
-- ${PRIMECOIN_OPTS} | ||
eend $? | ||
} | ||
|
||
stop_baselayout() { | ||
start-stop-daemon \ | ||
--stop \ | ||
--user "${PRIMECOIN_USER}" \ | ||
--name primecoind \ | ||
--pidfile /var/run/primecoind.pid | ||
eend $? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/var/lib/primecoin/.primecoin/debug.log { | ||
weekly | ||
sharedscripts | ||
postrotate | ||
killall -HUP primecoind | ||
endscript | ||
} |
Oops, something went wrong.