From fa0a3f1a896abff0e788040aed3d59b8daff6e25 Mon Sep 17 00:00:00 2001 From: mwtsai Date: Mon, 13 Jun 2016 21:34:02 +0800 Subject: [PATCH 1/8] Update build-unix.md --- doc/build-unix.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index bd89978cc2a74..7d40733d0ece6 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -1,18 +1,17 @@ UNIX BUILD NOTES ==================== -Some notes on how to build Bitcoin Core in Unix. +這是一些關於如何在Unix上建立Bitcoin Core的筆記。 (for OpenBSD specific instructions, see [build-openbsd.md](build-openbsd.md)) Note --------------------- -Always use absolute paths to configure and compile bitcoin and the dependencies, -for example, when specifying the path of the dependency: +總是用絕對路徑來配置和編譯比特幣和相依套件, +舉例來說,當說明相依套件的路徑: ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX -Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures -the usage of the absolute path. +在這裡BDB_PREFIX必須是一個絕對路徑 - 它被定義要使用 $(pwd) 來確定他這個絕對路徑的用法。 To Build --------------------- @@ -24,28 +23,28 @@ make make install # optional ``` -This will build bitcoin-qt as well if the dependencies are met. +如果相依套件正確的話,這也會建立 bitcoin-qt。 Dependencies --------------------- -These dependencies are required: +需要的相依套件: - Library | Purpose | Description + 函式庫 | 目的 | 描述 ------------|------------------|---------------------- - libssl | Crypto | Random Number Generation, Elliptic Curve Cryptography - libboost | Utility | Library for threading, data structures, etc - libevent | Networking | OS independent asynchronous networking + libssl | Crypto | Random Number Generation, 橢圓曲線密碼學 + libboost | Utility | 函式庫包含執行續、資料結構...等 + libevent | Networking | 作業系統獨立非同步網路連結 -Optional dependencies: +可選擇的相依套件: - Library | Purpose | Description + 函式庫 | 目的 | 描述 ------------|------------------|---------------------- - miniupnpc | UPnP Support | Firewall-jumping support - libdb4.8 | Berkeley DB | Wallet storage (only needed when wallet enabled) - qt | GUI | GUI toolkit (only needed when GUI enabled) - protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled) - libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled) + miniupnpc | UPnP Support | 跳防火牆輔助 + libdb4.8 | Berkeley DB | 錢包儲存 (只有錢包啟動時需要) + qt | GUI | 圖形用戶介面工具包 (只有圖形用戶介面啟動時需要) + protobuf | Payments in GUI | Data interchange format used for payment protocol (只有圖形用戶介面啟動時需要) + libqrencode | QR codes in GUI | Optional for generating QR codes (只有圖形用戶介面啟動時需要) univalue | Utility | JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configure) libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.x) From 4b8e3617d27b06c07909cf8807d62cf3e2220c8d Mon Sep 17 00:00:00 2001 From: mwtsai Date: Mon, 13 Jun 2016 21:44:12 +0800 Subject: [PATCH 2/8] Update build-unix.md --- doc/build-unix.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index 7d40733d0ece6..5381bf3cf5911 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -43,10 +43,10 @@ Dependencies miniupnpc | UPnP Support | 跳防火牆輔助 libdb4.8 | Berkeley DB | 錢包儲存 (只有錢包啟動時需要) qt | GUI | 圖形用戶介面工具包 (只有圖形用戶介面啟動時需要) - protobuf | Payments in GUI | Data interchange format used for payment protocol (只有圖形用戶介面啟動時需要) - libqrencode | QR codes in GUI | Optional for generating QR codes (只有圖形用戶介面啟動時需要) - univalue | Utility | JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configure) - libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.x) + protobuf | Payments in GUI | 支付協定用資料交換格式 (只有圖形用戶介面啟動時需要) + libqrencode | QR codes in GUI | 可選擇的產生 QR codes (只有圖形用戶介面啟動時需要) + univalue | Utility | JSON parsing 和編碼 (除非 --with-system-univalue 完成配置,否則會使用附帶版本) + libzmq3 | ZMQ notification | 可選擇的,允許產生 ZMQ 通知 (需要 4.x 以上的 ZMQ 版本) For the versions used in the release, see [release-process.md](release-process.md) under *Fetch and build inputs*. From 4e0068a27b49e8d3ded46ae7179b86b8853cf1db Mon Sep 17 00:00:00 2001 From: mwtsai Date: Mon, 13 Jun 2016 21:56:36 +0800 Subject: [PATCH 3/8] Update build-unix.md --- doc/build-unix.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index 5381bf3cf5911..22e5094c2de26 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -6,8 +6,7 @@ UNIX BUILD NOTES Note --------------------- -總是用絕對路徑來配置和編譯比特幣和相依套件, -舉例來說,當說明相依套件的路徑: +總是用絕對路徑來配置和編譯比特幣和相依套件,舉例來說,當說明相依套件的路徑: ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX @@ -48,14 +47,12 @@ Dependencies univalue | Utility | JSON parsing 和編碼 (除非 --with-system-univalue 完成配置,否則會使用附帶版本) libzmq3 | ZMQ notification | 可選擇的,允許產生 ZMQ 通知 (需要 4.x 以上的 ZMQ 版本) -For the versions used in the release, see [release-process.md](release-process.md) under *Fetch and build inputs*. +關於發布出的使用版本,可以看 [release-process.md](release-process.md) 中的 *Fetch and build inputs*. Memory Requirements -------------------- -C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of -memory available when compiling Bitcoin Core. On systems with less, gcc can be -tuned to conserve memory with additional CXXFLAGS: +C++ 編譯器非常需要記憶體,當編譯 Bitcoin Core 時,建議至少要有 1.5 GB 的記憶體可以使用,On systems with less, gcc can be tuned to conserve memory with additional CXXFLAGS: ./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" From a707a290a06fad486be7640d9ee1f79cd7566990 Mon Sep 17 00:00:00 2001 From: mwtsai Date: Mon, 13 Jun 2016 22:47:02 +0800 Subject: [PATCH 4/8] Update build-unix.md --- doc/build-unix.md | 46 ++++++++++++++++++---------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index 22e5094c2de26..de02f76ec26fd 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -1,16 +1,16 @@ UNIX BUILD NOTES ==================== -這是一些關於如何在Unix上建立Bitcoin Core的筆記。 +這是一些關於如何在 Unix 上建立 Bitcoin Core 的筆記。 (for OpenBSD specific instructions, see [build-openbsd.md](build-openbsd.md)) Note --------------------- -總是用絕對路徑來配置和編譯比特幣和相依套件,舉例來說,當說明相依套件的路徑: +總是用絕對路徑來配置和編譯比特幣和相依套件,舉例來說,當決定相依套件的路徑: ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX -在這裡BDB_PREFIX必須是一個絕對路徑 - 它被定義要使用 $(pwd) 來確定他這個絕對路徑的用法。 +在這裡 BDB_PREFIX 必須是一個絕對路徑 - 它被定義要使用 $(pwd) 來確定這個絕對路徑的使用。 To Build --------------------- @@ -52,73 +52,63 @@ Dependencies Memory Requirements -------------------- -C++ 編譯器非常需要記憶體,當編譯 Bitcoin Core 時,建議至少要有 1.5 GB 的記憶體可以使用,On systems with less, gcc can be tuned to conserve memory with additional CXXFLAGS: +C++ 編譯器非常需要記憶體,當編譯 Bitcoin Core 時,建議至少要有 1.5 GB 的記憶體可以使用,當系統低於此現時, gcc 能夠調整至附加的 CXXFLAGS 來保存記憶體: ./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" Dependency Build Instructions: Ubuntu & Debian ---------------------------------------------- -Build requirements: +建立需求: sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils -Options when installing required Boost library files: +安裝時需要的 Boost 函式庫檔案的選項: -1. On at least Ubuntu 14.04+ and Debian 7+ there are generic names for the -individual boost development packages, so the following can be used to only -install necessary parts of boost: +1. 在至少 Ubuntu 14.04+ 和 Debian 7+ 版本,它們是個別 boost 開發包的屬名,所以下列的可以使用來只安裝 boost 中必要的部分: sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev -2. If that doesn't work, you can install all boost development packages with: +2. 如果那不能運作,可以全部安裝: sudo apt-get install libboost-all-dev -BerkeleyDB is required for the wallet. db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin). -You can add the repository and install using the following commands: +錢包需要 BerkeleyDB , db4.8 包可以使用 [here](https://launchpad.net/~bitcoin/+archive/bitcoin)。 你可以使用以下的指令來新增存放處和安裝: sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install libdb4.8-dev libdb4.8++-dev -Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install -BerkeleyDB 5.1 or later, which break binary wallet compatibility with the distributed executables which -are based on BerkeleyDB 4.8. If you do not care about wallet compatibility, -pass `--with-incompatible-bdb` to configure. +Ubuntu 和 Debian 有他們自己的 libdb-dev 和 libdb++-dev 包,但這要安裝 BerkeleyDB 5.1 或更之後的版本,那會因為基於 BerkeleyDB 4.8 上分散式執行,而破壞二元錢包的一致性,如果你不在乎錢包的一致性,輸入 `--with-incompatible-bdb` 來配置。 -See the section "Disable-wallet mode" to build Bitcoin Core without wallet. +看 "Disable-wallet mode" 的部分來建立不用錢包的 Bitcoin Core。 -Optional: +可選擇的: sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default) -ZMQ dependencies: +ZMQ 相依套件: sudo apt-get install libzmq3-dev (provides ZMQ API 4.x) Dependencies for the GUI: Ubuntu & Debian ----------------------------------------- -If you want to build Bitcoin-Qt, make sure that the required packages for Qt development -are installed. Either Qt 5 or Qt 4 are necessary to build the GUI. -If both Qt 4 and Qt 5 are installed, Qt 5 will be used. Pass `--with-gui=qt4` to configure to choose Qt4. -To build without GUI pass `--without-gui`. +如果你想要建立 Bitcoin-Qt, 確認這些 Qt 開發所需要的包是否安裝了, Qt 5 和 Qt 4 都可以用來建立圖形用戶介面。如果你兩個都裝了,它會使用 Qt 5,輸入 `--with-gui=qt4` 來配置選擇 Qt 4,建立不用圖形用戶介面的則輸入 `--without-gui`。 -To build with Qt 5 (recommended) you need the following: +用 Qt 5 (建議的) 來建立需要以下: sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler -Alternatively, to build with Qt 4 you need the following: +或者,用 Qt 4 來建立需要以下: sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler -libqrencode (optional) can be installed with: +libqrencode (可選擇的) 可以用以下來安裝: sudo apt-get install libqrencode-dev -Once these are installed, they will be found by configure and a bitcoin-qt executable will be -built by default. +安裝後,他們可以被配置找到,然後一個 bitcoin-qt 執行檔會預設建立。 Dependency Build Instructions: Fedora ------------------------------------- From 1e0dbbc381a42553b2fe3b1a46e487a961f046e0 Mon Sep 17 00:00:00 2001 From: mwtsai Date: Tue, 14 Jun 2016 01:02:16 +0800 Subject: [PATCH 5/8] Update build-unix.md --- doc/build-unix.md | 78 +++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 46 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index de02f76ec26fd..871eab32fc250 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -79,7 +79,7 @@ Dependency Build Instructions: Ubuntu & Debian sudo apt-get update sudo apt-get install libdb4.8-dev libdb4.8++-dev -Ubuntu 和 Debian 有他們自己的 libdb-dev 和 libdb++-dev 包,但這要安裝 BerkeleyDB 5.1 或更之後的版本,那會因為基於 BerkeleyDB 4.8 上分散式執行,而破壞二元錢包的一致性,如果你不在乎錢包的一致性,輸入 `--with-incompatible-bdb` 來配置。 +Ubuntu 和 Debian 有他們自己的 libdb-dev 和 libdb++-dev 包,但這要安裝 BerkeleyDB 5.1 或更之後的版本,那會因為基於 BerkeleyDB 4.8 上分散式執行,而破壞二進制錢包的一致性,如果你不在乎錢包的一致性,輸入 `--with-incompatible-bdb` 來配置。 看 "Disable-wallet mode" 的部分來建立不用錢包的 Bitcoin Core。 @@ -112,43 +112,41 @@ libqrencode (可選擇的) 可以用以下來安裝: Dependency Build Instructions: Fedora ------------------------------------- -Build requirements: +建立需求: sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel -Optional: +可選擇的: sudo dnf install miniupnpc-devel -To build with Qt 5 (recommended) you need the following: +用 Qt 5 (建議的) 來建立需要以下: sudo dnf install qt5-qttools-devel qt5-qtbase-devel protobuf-devel -libqrencode (optional) can be installed with: +libqrencode (可選擇的) 可以用以下來安裝: sudo dnf install qrencode-devel Notes ----- -The release is built with GCC and then "strip bitcoind" to strip the debug -symbols, which reduces the executable size by about 90%. +這個發布是用 GCC 來建立的,然後 "strip bitcoind" 來去除除錯符號,減少了大約 90% 的執行檔大小。 miniupnpc --------- -[miniupnpc](http://miniupnp.free.fr/) may be used for UPnP port mapping. It can be downloaded from [here]( -http://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and -turned off by default. See the configure options for upnp behavior desired: +[miniupnpc](http://miniupnp.free.fr/) 可以用來 UPnP port mapping,可以從 [here]( +http://miniupnp.tuxfamily.org/files/) 下載,UPnP support 會被編譯進去然後預設會是關閉的,對 UPnP 行為有需求的可以看這個配置選項: - --without-miniupnpc No UPnP support miniupnp not required - --disable-upnp-default (the default) UPnP support turned off by default at runtime - --enable-upnp-default UPnP support turned on by default at runtime + --without-miniupnpc 沒有 UPnP support , miniupnp 不需要 + --disable-upnp-default (預設) UPnP support 在運行時預設關閉 + --enable-upnp-default UPnP support 在運行時預設開啟 Berkeley DB ----------- -It is recommended to use Berkeley DB 4.8. If you have to build it yourself: +如果你需自行建立,建議使用 Berkeley DB 4.8 : ```bash BITCOIN_ROOT=$(pwd) @@ -175,11 +173,11 @@ cd $BITCOIN_ROOT ./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" # (other args...) ``` -**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below). +**Note**: 你只有在錢包啟動時才需要使用 Berkeley DB (看於下的 *Disable-Wallet mode* 部分). Boost ----- -If you need to build Boost yourself: +如果你需要自行建立 Boost : sudo su ./bootstrap.sh @@ -188,9 +186,8 @@ If you need to build Boost yourself: Security -------- -To help make your bitcoin installation more secure by making certain attacks impossible to -exploit even if a vulnerability is found, binaries are hardened by default. -This can be disabled with: +儘管一個弱點被發現,以將一定的攻擊化為不可能的開方方式,使編譯的過後的程式更堅固,來幫助 bitcoin 安裝能更安全。stallation more secure +這可以讓它無效: Hardening Flags: @@ -198,17 +195,12 @@ Hardening Flags: ./configure --disable-hardening -Hardening enables the following features: +Hardening 有下列特色: -* Position Independent Executable - Build position independent code to take advantage of Address Space Layout Randomization - offered by some kernels. Attackers who can cause execution of code at an arbitrary memory - location are thwarted if they don't know where anything useful is located. - The stack and heap are randomly located by default but this allows the code section to be - randomly located as well. +* 地址無關可執行文件 + 建立地址無關代碼可以讓一些 kernels 提供位址空間配置隨機載入的優點,可以攻擊任意記憶體位址的攻擊者會因為他們不知道哪裡放的資料是有用的而失敗, stack 和 heap 可以隨機配置,這也讓 code section 也能隨機配置。 - On an AMD64 processor where a library was not compiled with -fPIC, this will cause an error - such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" + 在一個沒有用 -fPIC 來編譯函式庫的 AMD64 處理器,這會導致一個錯誤像是: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" To test that you have built PIE executable, install scanelf, part of paxutils, and use: @@ -237,26 +229,24 @@ Hardening enables the following features: Disable-wallet mode -------------------- -When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in -disable-wallet mode with: +如果目的只是運行 P2P 節點而不用錢包, bitcoin 可以在無錢包模式下建立: ./configure --disable-wallet -In this case there is no dependency on Berkeley DB 4.8. +在這個案例裡,不用 Berkeley DB 4.8 的相依套件。 -Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC -call not `getwork`. +在無錢包模式下仍然可以挖礦,但只能使用 `getblocktemplate` RPC call 而非 `getwork`。 Additional Configure Flags -------------------------- -A list of additional configure flags can be displayed with: +可以顯示附加配置的 flags 的清單: ./configure --help Setup and Build Example: Arch Linux ----------------------------------- -This example lists the steps necessary to setup and build a command line only, non-wallet distribution of the latest changes on Arch Linux: +這個例子列出在上次更動的 Arch Linux 上設置和建立一個指令列且無錢包分布的必要步驟: pacman -S git base-devel boost libevent python git clone https://github.com/bitcoin/bitcoin.git @@ -266,24 +256,20 @@ This example lists the steps necessary to setup and build a command line only, n make check Note: -Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`, -or building and depending on a local version of Berkeley DB 4.8. The readily available Arch Linux packages are currently built using -`--with-incompatible-bdb` according to the [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD). -As mentioned above, when maintaining portability of the wallet between the standard Bitcoin Core distributions and independently built -node software is desired, Berkeley DB 4.8 must be used. +有錢包支援的編譯需要用 Berkeley DB 4.8 (package `db`) 之後的版本,輸入 `--with-incompatible-bdb`,或建立和相依在一個本地版的 Berkeley DB 4.8. 這個立即可用的 Arch Linux 包可以輸入`--with-incompatible-bdb` 來建立,這是根據 [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD)。 +如前所述,當需要維持錢包在 standard Bitcoin Core distributions 和 independently built +node software 的可攜愛性,必須使用 Berkeley DB 4.8 。 ARM Cross-compilation ------------------- -These steps can be performed on, for example, an Ubuntu VM. The depends system -will also work on other Linux distributions, however the commands for -installing the toolchain will be different. +這個步驟能夠幫助它在像是 Ubuntu VM 上運行,相依系統也能在其他 Linux distributions 運作,然而安裝 toolchain 會不同。 -First install the toolchain: +首先,安裝 toolchain: sudo apt-get install g++-arm-linux-gnueabihf -To build executables for ARM: +建立 ARM 執行檔: cd depends make HOST=arm-linux-gnueabihf NO_QT=1 @@ -292,4 +278,4 @@ To build executables for ARM: make -For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory. +有夠相依系統更進一步的資訊,可看相依目錄 [README.md](../depends/README.md) 。 From 930df192295f8e8188de64b3c684e0f88c31b150 Mon Sep 17 00:00:00 2001 From: mwtsai Date: Tue, 14 Jun 2016 01:22:29 +0800 Subject: [PATCH 6/8] Update build-unix.md --- doc/build-unix.md | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index 871eab32fc250..eb8bbe0c1e847 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -32,7 +32,7 @@ Dependencies 函式庫 | 目的 | 描述 ------------|------------------|---------------------- libssl | Crypto | Random Number Generation, 橢圓曲線密碼學 - libboost | Utility | 函式庫包含執行續、資料結構...等 + libboost | Utility | 函式庫包含執行緒、資料結構...等 libevent | Networking | 作業系統獨立非同步網路連結 可選擇的相依套件: @@ -108,7 +108,7 @@ libqrencode (可選擇的) 可以用以下來安裝: sudo apt-get install libqrencode-dev -安裝後,他們可以被配置找到,然後一個 bitcoin-qt 執行檔會預設建立。 +安裝後,他們可以被配置找到,然後一個 bitcoin-qt 執行文件會預設建立。 Dependency Build Instructions: Fedora ------------------------------------- @@ -130,7 +130,7 @@ libqrencode (可選擇的) 可以用以下來安裝: Notes ----- -這個發布是用 GCC 來建立的,然後 "strip bitcoind" 來去除除錯符號,減少了大約 90% 的執行檔大小。 +這個發布是用 GCC 來建立的,然後 "strip bitcoind" 來去除除錯符號,減少了大約 90% 的執行文件大小。 miniupnpc @@ -197,35 +197,31 @@ Hardening Flags: Hardening 有下列特色: -* 地址無關可執行文件 - 建立地址無關代碼可以讓一些 kernels 提供位址空間配置隨機載入的優點,可以攻擊任意記憶體位址的攻擊者會因為他們不知道哪裡放的資料是有用的而失敗, stack 和 heap 可以隨機配置,這也讓 code section 也能隨機配置。 +* Position Independent Executable 地址無關可執行文件 + 建立地址無關代碼可以讓一些 kernels 提供位址空間配置隨機載入的優點,可以攻擊任意記憶體位址的攻擊者會因為他們不知道哪裡放的資料是有用的而失敗, 堆疊和堆積 可以隨機配置,這也讓 code section 也能隨機配置。 在一個沒有用 -fPIC 來編譯函式庫的 AMD64 處理器,這會導致一個錯誤像是: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" - To test that you have built PIE executable, install scanelf, part of paxutils, and use: + 測是當已經建立 PIE 執行文件, install scanelf, part of paxutils, and use: scanelf -e ./bitcoin - The output should contain: + 輸出應該包含: TYPE ET_DYN -* Non-executable Stack - If the stack is executable then trivial stack based buffer overflow exploits are possible if - vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack - but if one of the libraries it uses asks for an executable stack or someone makes a mistake - and uses a compiler extension which requires an executable stack, it will silently build an - executable without the non-executable stack protection. +* Non-executable Stack 不可執行之堆疊區段 + 如果推疊是可執行的,弱點緩衝器被發現的話,則基於瑣細堆疊的緩衝器是有可能會 overflow , 預設中, bitcoin 應該以不可執行之堆疊區段建立,但是如果其中一個它使用的函式庫請求一個可執行的堆疊或因製造錯誤而用編譯器擴充而需要一個可執行的堆疊,它便會默默地建立一個沒受到不可執行之堆疊區段保護的可執行堆疊。 - To verify that the stack is non-executable after compiling use: + 驗證堆疊是不可執行的,輸入: `scanelf -e ./bitcoin` - the output should contain: + 輸出應包含: STK/REL/PTL RW- R-- RW- - The STK RW- means that the stack is readable and writeable but not executable. + STK RW- 代表這個堆疊是可讀和可的但不可執行。 Disable-wallet mode -------------------- @@ -269,7 +265,7 @@ ARM Cross-compilation sudo apt-get install g++-arm-linux-gnueabihf -建立 ARM 執行檔: +建立 ARM 執行文件: cd depends make HOST=arm-linux-gnueabihf NO_QT=1 From e6db5712e35fed55429197049cabcd6ada6fe9f6 Mon Sep 17 00:00:00 2001 From: mwtsai Date: Tue, 14 Jun 2016 15:08:55 +0800 Subject: [PATCH 7/8] Update release-process.md --- doc/release-process.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/release-process.md b/doc/release-process.md index 3bfcc38177bb2..d00b8fd5ed668 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -1,23 +1,23 @@ Release Process ==================== -Before every release candidate: +在每個發布候選之前: -* Update translations (ping wumpus on IRC) see [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#syncing-with-transifex) +* 更新翻譯 (ping wumpus on IRC) 見 [translation_process.md](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#syncing-with-transifex) -Before every minor and major release: +在每個次要發布和主要發布之前: -* Update [bips.md](bips.md) to account for changes since the last release. -* Update version in sources (see below) -* Write release notes (see below) +* 更新 [bips.md](bips.md) 解釋與上次更新的改變。 +* 更新原始的版本 (見下) +* 寫更新筆記 (見下) -Before every major release: +在每個主要發布之前: -* Update hardcoded [seeds](/contrib/seeds/README.md), see [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) for an example. +* 更新 hardcoded [seeds](/contrib/seeds/README.md) ,見範例 [this pull request](https://github.com/bitcoin/bitcoin/pull/7415) 。 ### First time / New builders -Check out the source code in the following directory hierarchy. +用以下目錄階層圖檢查檢查原始碼。 cd /path/to/your/toplevel/build git clone https://github.com/bitcoin-core/gitian.sigs.git @@ -27,20 +27,20 @@ Check out the source code in the following directory hierarchy. ### Bitcoin maintainers/release engineers, update version in sources -Update the following: +更新以下: - `configure.ac`: - `_CLIENT_VERSION_MAJOR` - `_CLIENT_VERSION_MINOR` - `_CLIENT_VERSION_REVISION` - - Don't forget to set `_CLIENT_VERSION_IS_RELEASE` to `true` + - 別忘了將 `_CLIENT_VERSION_IS_RELEASE` 設置為 `true` - `src/clientversion.h`: (this mirrors `configure.ac` - see issue #3539) - `CLIENT_VERSION_MAJOR` - `CLIENT_VERSION_MINOR` - `CLIENT_VERSION_REVISION` - - Don't forget to set `CLIENT_VERSION_IS_RELEASE` to `true` -- `doc/README.md` and `doc/README_windows.txt` -- `doc/Doxyfile`: `PROJECT_NUMBER` contains the full version + - 別忘了將 `CLIENT_VERSION_IS_RELEASE` 設置為 `true` +- `doc/README.md` 和 `doc/README_windows.txt` +- `doc/Doxyfile`: `PROJECT_NUMBER` 包含完全版本 - `contrib/gitian-descriptors/*.yml`: usually one'd want to do this on master after branching off the release - but be sure to at least do it before a new major release Write release notes. git shortlog helps a lot, for example: From 454534091b38b782c9fe97cf9c322509fc0f8580 Mon Sep 17 00:00:00 2001 From: mwtsai Date: Fri, 1 Jul 2016 10:27:33 +0800 Subject: [PATCH 8/8] Update build-unix.md --- doc/build-unix.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/build-unix.md b/doc/build-unix.md index eb8bbe0c1e847..9dd724c3d0029 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -6,7 +6,7 @@ UNIX BUILD NOTES Note --------------------- -總是用絕對路徑來配置和編譯比特幣和相依套件,舉例來說,當決定相依套件的路徑: +總是用絕對路徑來配置和編譯比特幣和dependencies,舉例來說,當決定相依套件的路徑: ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX @@ -22,12 +22,12 @@ make make install # optional ``` -如果相依套件正確的話,這也會建立 bitcoin-qt。 +如果dependencies正確的話,這也會建立 bitcoin-qt。 Dependencies --------------------- -需要的相依套件: +需要的dependencies: 函式庫 | 目的 | 描述 ------------|------------------|---------------------- @@ -35,15 +35,15 @@ Dependencies libboost | Utility | 函式庫包含執行緒、資料結構...等 libevent | Networking | 作業系統獨立非同步網路連結 -可選擇的相依套件: +可選擇的dependencies: 函式庫 | 目的 | 描述 ------------|------------------|---------------------- - miniupnpc | UPnP Support | 跳防火牆輔助 - libdb4.8 | Berkeley DB | 錢包儲存 (只有錢包啟動時需要) - qt | GUI | 圖形用戶介面工具包 (只有圖形用戶介面啟動時需要) - protobuf | Payments in GUI | 支付協定用資料交換格式 (只有圖形用戶介面啟動時需要) - libqrencode | QR codes in GUI | 可選擇的產生 QR codes (只有圖形用戶介面啟動時需要) + miniupnpc | UPnP Support | 翻防火牆 + libdb4.8 | Berkeley DB | 錢包儲存 (只有Wallet啟動時需要) + qt | GUI | GUI工具包 (只有GUI啟動時需要) + protobuf | Payments in GUI | 支付協定用資料交換格式 (只有GUI啟動時需要) + libqrencode | QR codes in GUI | 可選擇的產生 QR codes (只GUI啟動時需要) univalue | Utility | JSON parsing 和編碼 (除非 --with-system-univalue 完成配置,否則會使用附帶版本) libzmq3 | ZMQ notification | 可選擇的,允許產生 ZMQ 通知 (需要 4.x 以上的 ZMQ 版本) @@ -87,7 +87,7 @@ Ubuntu 和 Debian 有他們自己的 libdb-dev 和 libdb++-dev 包,但這要 sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default) -ZMQ 相依套件: +ZMQ dependencies: sudo apt-get install libzmq3-dev (provides ZMQ API 4.x)