diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.changelog b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.changelog new file mode 100644 index 000000000..144d8beaa --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.changelog @@ -0,0 +1,6 @@ +eth-node-nimbus-eth2 (25.2.0-1) bookworm; urgency=medium + + * Support for 25.2.0-1 + + -- Eniko Nagy Thu, 13 Feb 2025 15:55:24 +0100 + diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.sps b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.sps new file mode 100644 index 000000000..45ef0923d --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.sps @@ -0,0 +1,26 @@ +name = "eth-node-nimbus-eth2" +architecture = "any" +summary = "Nimbus Eth2 (Beacon Chain)" +conflicts = [] +recommends = [] +provides = ["eth-node-consensus-client (= 1)"] +suggests = ["eth-node (= 1)"] +add_files = [ + "build/nimbus_beacon_node /usr/lib/eth-node-nimbus-eth2/bin", + "build/nimbus_validator_client /usr/lib/eth-node-nimbus-eth2/bin", + "build/deposit_contract /usr/lib/eth-node-nimbus-eth2/bin", + "build/nimbus_signing_node /usr/lib/eth-node-nimbus-eth2/bin", + "build/nimbus_light_client /usr/lib/eth-node-nimbus-eth2/bin", + "docker/dist/README.md.tpl /usr/lib/eth-node-nimbus-eth2/README" +] +add_links = [ + "/usr/lib/eth-node-nimbus-eth2/bin/nimbus_beacon_node /usr/bin/nimbus_beacon_node", +] + +add_manpages = [] +long_doc = """ +Nimbus-eth2 is an extremely efficient consensus layer (eth2) client implementation. + While it's optimised for embedded systems and resource-restricted devices + -- including Raspberry Pis, its low resource usage also makes it an excellent choice + for any server or desktop (where it simply takes up fewer resources). +""" diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.sss b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.sss new file mode 100644 index 000000000..a33342df9 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/eth-node-nimbus-eth2.sss @@ -0,0 +1,8 @@ +name = "eth-node-nimbus-eth2" +maintainer = "Eniko Nagy " +section = "net" +variants = [] +build_depends = ["cmake", "clang", "llvm", "binutils"] +packages = ["eth-node-nimbus-eth2"] +skip_debug_symbols = true + diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/pkg-builder-verify.toml b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/pkg-builder-verify.toml new file mode 100644 index 000000000..791d52328 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/pkg-builder-verify.toml @@ -0,0 +1,8 @@ +[verify] +package_hash=[ + # { hash="8acafcede1991021c60b6bda87134f17e22024ba", name= "eth-node-nimbus-eth2_24.6.0-1.dsc"}, + # disable as it fails day by day, we don't care about this, until the other hashes are the same + # { hash="f0773b315ea03acaaca3d3959877e4d02758a5fd", name= "eth-node-nimbus-eth2_24.3.0.orig.tar.gz"}, + { hash="1417e0bd8acafd8546328f5770e2b2a62a87480d", name= "eth-node-nimbus-eth2_25.2.0-1.debian.tar.xz"}, + { hash="429c6237c495764c73d8663d0de2423efa784f9a", name= "eth-node-nimbus-eth2_25.2.0-1_amd64.deb"}, +] diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/pkg-builder.toml b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/pkg-builder.toml new file mode 100644 index 000000000..c6df4d847 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/pkg-builder.toml @@ -0,0 +1,37 @@ +[package_fields] +spec_file = "eth-node-nimbus-eth2.sss" +package_name = "eth-node-nimbus-eth2" +version_number = "25.2.0" +revision_number = "1" +homepage = "https://github.com/status-im/nimbus-eth2" + +[package_type] +# virtual | git | default +package_type = "git" +git_url = "https://github.com/status-im/nimbus-eth2.git" +git_tag = "v25.2.0" +submodules = [ + ] + + +[package_type.language_env] +language_env = "nim" +nim_version = "2.0.6" # according to docs, downgrade nim version to this version +nim_binary_url = "https://nim-lang.org/download/nim-2.0.6-linux_x64.tar.xz" +nim_version_checksum = "4613c18f6c70d14f7fcbcb0c644425699862902ec64d7b785ededaf161815cdc nim-2.0.6-linux_x64.tar.xz" + + +[build_env] +codename = "bookworm" +arch = "amd64" +pkg_builder_version = "0.2.9" +debcrafter_version = "2711b53" +run_lintian = true +run_piuparts = true +run_autopkgtest = true +lintian_version = "2.116.3" +piuparts_version = "1.1.7" +autopkgtest_version = "5.28" +sbuild_version = "0.85.6" +# package directory +workdir = "~/.pkg-builder/packages/bookworm" diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/001-makefile.patch/.timestamp b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/001-makefile.patch/.timestamp new file mode 100644 index 000000000..e69de29bb diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/001-makefile.patch/vendor/nimbus-build-system/makefiles/targets.mk b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/001-makefile.patch/vendor/nimbus-build-system/makefiles/targets.mk new file mode 100644 index 000000000..ab9fdaed6 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/001-makefile.patch/vendor/nimbus-build-system/makefiles/targets.mk @@ -0,0 +1,257 @@ +# Copyright (c) 2018-2021 Status Research & Development GmbH. Licensed under +# either of: +# - Apache License, version 2.0 +# - MIT license +# at your option. This file may not be copied, modified, or distributed except +# according to those terms. + +.PHONY: \ + sanity-checks \ + warn-update \ + warn-jobs \ + deps-common \ + build-nim \ + update-test \ + update-common \ + $(NIM_BINARY) \ + update-remote \ + nat-libs \ + libminiupnpc.a \ + libnatpmp.a \ + clean-cross \ + clean-common \ + mrproper \ + github-ssh \ + status \ + ntags \ + ctags \ + show-deps \ + fetch-dlls + +#- when the special ".SILENT" target is present, all recipes are silenced as if they all had a "@" prefix +#- by setting SILENT_TARGET_PREFIX to a non-empty value, the name of this target becomes meaningless to `make` +#- idea stolen from http://make.mad-scientist.net/managing-recipe-echoing/ +$(SILENT_TARGET_PREFIX).SILENT: + +# dir +build: + mkdir -p $@ + +sanity-checks: + which $(CC) &>/dev/null || { echo "C compiler ($(CC)) not installed. Aborting."; exit 1; } + +#- check if "make update" was executed +warn-update: + if [[ -e $(UPDATE_TIMESTAMP) ]]; then \ + if [[ $$(cat $(UPDATE_TIMESTAMP)) -ne $$($(GET_CURRENT_COMMIT_TIMESTAMP)) ]]; then \ + echo -e "\nWarning: to ensure you are building in a supported repo state, please always run \"$$(basename "$(MAKE)") update\" after \"git pull\"\n(it looks like you've forgotten to do this).\nThis also applies whenever you switch to a new branch or commit, e.g.: whenever you run \"git checkout ...\".\n"; \ + fi; \ + fi + +#- check if we're enabling multiple jobs - https://stackoverflow.com/a/48865939 +warn-jobs: + + if [[ ! "${MAKEFLAGS}" =~ --jobserver[^=]+= ]]; then \ + NPROC=$$($(NPROC_CMD)); \ + if [[ $${NPROC} -gt 1 ]]; then \ + echo -e "\nTip of the day: this will probably build faster if you use \"$$(basename "$(MAKE)") -j$${NPROC} ...\".\n"; \ + fi; \ + fi + +nimbus-build-system-paths: + echo "Creating nimbus-build-system.paths"; \ + TOP_LEVEL_DIR="$(CURDIR)" "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nbs_paths.sh" + +deps-common: | sanity-checks warn-update warn-jobs $(NIMBLE_DIR) +# - don't build our Nim target if it's not going to be used +ifeq ($(USE_SYSTEM_NIM), 0) +deps-common: $(NIM_BINARY) +endif + +#- conditionally re-builds the Nim compiler (not usually needed, because `make update` calls this rule; delete $(NIM_BINARY) to force it) +#- allows parallel building with the '+' prefix +#- handles the case where NIM_COMMIT was previously used to build a non-default compiler +#- forces a rebuild of csources, Nimble and a complete compiler rebuild, in case we're called after pulling a new Nim version +#- uses our Git submodules for csources and Nimble (Git doesn't let us place them in another submodule) +#- build_all.sh looks at the parent dir to decide whether to copy the resulting csources binary there, +# but this is broken when using symlinks, so build csources separately (we get parallel compiling as a bonus) +#- Windows is a special case, as usual +#- macOS is also a special case, with its "ln" not supporting "-r" +#- the AppVeyor 32-bit build is done on a 64-bit image, so we need to override the architecture detection with ARCH_OVERRIDE +build-nim: | sanity-checks + + if [[ -z "$(NIM_COMMIT)" ]]; then git submodule update --init --recursive "$(BUILD_SYSTEM_DIR)"; fi; \ + NIM_BUILD_MSG="$(BUILD_MSG) Nim compiler" \ + V=$(V) \ + CC=$(CC) \ + MAKE="$(MAKE)" \ + ARCH_OVERRIDE=$(ARCH_OVERRIDE) \ + QUICK_AND_DIRTY_COMPILER=$(QUICK_AND_DIRTY_COMPILER) \ + "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/build_nim.sh" "$(NIM_DIR)" ../Nim-csources ../nimble "$(CI_CACHE)" + +# Check if the update might cause loss of work. Abort, if so, while allowing an override mechanism. +update-test: + TEE_TO_TTY="cat"; if bash -c ": >/dev/tty" &>/dev/null; then TEE_TO_TTY="tee /dev/tty"; fi; \ + COMMAND="git status --short --untracked-files=no --ignore-submodules=untracked"; \ + LINES=$$({ $${COMMAND} | grep 'vendor' && echo ^---top level || true; git submodule foreach --recursive --quiet "$${COMMAND} | grep . && echo ^---\$$name || true"; } | $${TEE_TO_TTY} | wc -l); \ + if [[ "$${LINES}" -ne "0" && "$(OVERRIDE)" != "1" ]]; then echo -e "\nYou have uncommitted local changes which might be overwritten by the update. Aborting.\nIf you know better, you can use the 'update' target instead of 'update-dev'.\n"; exit 1; fi + +#- for each submodule, delete checked out files (that might prevent a fresh checkout); skip dotfiles +#- in case of submodule URL changes, propagates that change in the parent repo's .git directory +#- initialises and updates the Git submodules +#- hard-resets the working copies of submodules +#- deletes "nimcache" directories +#- updates ".update.timestamp" +#- deletes the ".nimble" dir and executes the "deps" target +#- allows parallel building with the '+' prefix +#- rebuilds the Nim compiler if the corresponding submodule is updated +update-common: | sanity-checks update-test + git submodule foreach --quiet 'git ls-files --exclude-standard --recurse-submodules -z -- ":!:.*" | xargs -0 rm -rf' + git $(GIT_SUBMODULE_CONFIG) submodule update --init --recursive || true + # changing URLs in a submodule's submodule means we have to sync and update twice + git submodule sync --quiet --recursive + git $(GIT_SUBMODULE_CONFIG) submodule update --init --recursive + git submodule foreach --quiet --recursive 'git $(GIT_SUBMODULE_CONFIG) reset --quiet --hard' + find . -type d -name nimcache -print0 | xargs -0 rm -rf + $(GET_CURRENT_COMMIT_TIMESTAMP) > $(UPDATE_TIMESTAMP) + rm -rf $(NIMBLE_DIR) + + "$(MAKE)" --no-print-directory deps-common + +# supposed to be used by developers, instead of "update", to avoid losing submodule work +update-dev: + + "$(MAKE)" OVERRIDE=0 update + +#- rebuilds the Nim compiler if the corresponding submodule is updated +$(NIM_BINARY): | sanity-checks + + "$(MAKE)" --no-print-directory build-nim + +# don't use this target, or you risk updating dependency repos that are not ready to be used in Nimbus +update-remote: + git submodule update --remote + +nat-libs: | libminiupnpc.a libnatpmp.a + +libminiupnpc.a: | sanity-checks +ifeq ($(OS), Windows_NT) + + [ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/$@ ] || \ + PATH=".;$${PATH}" "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -f Makefile.mingw CC=$(CC) CFLAGS="-Os -fPIC" $@ $(HANDLE_OUTPUT) +else + + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc CC=$(CC) CFLAGS="-Os -fPIC" build/$@ $(HANDLE_OUTPUT) +endif + +libnatpmp.a: | sanity-checks +ifeq ($(OS), Windows_NT) + + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream OS=mingw CC=$(CC) CFLAGS="-Wall -Wno-cpp -Os -fPIC -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" $@ $(HANDLE_OUTPUT) +else + + "$(MAKE)" CFLAGS="-Wall -Wno-cpp -Os -fPIC -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream CC=$(CC) $@ $(HANDLE_OUTPUT) +endif + +#- depends on Git submodules being initialised +#- fakes a Nimble package repository with the minimum info needed by the Nim compiler +# for runtime path (i.e.: the second line in $(NIMBLE_DIR)/pkgs/*/*.nimble-link) +$(NIMBLE_DIR): + mkdir -p $(NIMBLE_DIR)/pkgs + NIMBLE_DIR="$(CURDIR)/$(NIMBLE_DIR)" PWD_CMD="$(PWD)" EXCLUDED_NIM_PACKAGES="$(EXCLUDED_NIM_PACKAGES)" \ + git submodule foreach --recursive --quiet '"$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nimble_link.sh" "$$sm_path"' + +clean-cross: + + [[ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc ]] && "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc CC=$(CC) clean $(HANDLE_OUTPUT) || true + + [[ -e vendor/nim-nat-traversal/vendor/libnatpmp-upstream ]] && "$(MAKE)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream CC=$(CC) clean $(HANDLE_OUTPUT) || true + +clean-common: clean-cross + rm -rf build/{*.exe,*.so,*.so.0} $(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/bin/{timestamp,last_built_commit,nim_commit_*} $(NIM_DIR)/nimcache nimcache + +# dangerous cleaning, because you may have not-yet-pushed branches and commits in those vendor repos you're about to delete +mrproper: clean + rm -rf vendor + +# for when you want to use SSH keys with GitHub +github-ssh: + git config url."git@github.com:".insteadOf "https://github.com/" + git submodule foreach --recursive 'git config url."git@github.com:".insteadOf "https://github.com/"' + +# runs `git status` in all Git repos +status: | $(REPOS) + $(eval CMD := $(GIT_STATUS)) + $(RUN_CMD_IN_ALL_REPOS) + +# https://bitbucket.org/nimcontrib/ntags/ - currently fails with "out of memory" +ntags: + ntags -R . + +#- a few files need to be excluded because they trigger an infinite loop in https://github.com/universal-ctags/ctags +#- limiting it to Nim files, because there are a lot of C files we don't care about +ctags: + ctags -R --verbose=yes \ + --langdef=nim \ + --langmap=nim:.nim \ + --regex-nim='/(\w+)\*?\s*=\s*object/\1/c,class/' \ + --regex-nim='/(\w+)\*?\s*=\s*enum/\1/e,enum/' \ + --regex-nim='/(\w+)\*?\s*=\s*tuple/\1/t,tuple/' \ + --regex-nim='/(\w+)\*?\s*=\s*range/\1/s,subrange/' \ + --regex-nim='/(\w+)\*?\s*=\s*proc/\1/p,proctype/' \ + --regex-nim='/proc\s+(\w+)/\1/f,procedure/' \ + --regex-nim='/func\s+(\w+)/\1/f,procedure/' \ + --regex-nim='/method\s+(\w+)/\1/m,method/' \ + --regex-nim='/proc\s+`([^`]+)`/\1/o,operator/' \ + --regex-nim='/template\s+(\w+)/\1/u,template/' \ + --regex-nim='/macro\s+(\w+)/\1/v,macro/' \ + --languages=nim \ + --exclude=nimcache \ + --exclude='*/Nim/tinyc' \ + --exclude='*/Nim/tests' \ + --exclude='*/Nim/csources' \ + --exclude=nimbus/genesis_alloc.nim \ + --exclude=$(REPOS_DIR)/nim-bncurve/tests/tvectors.nim \ + . + +# list all Git submodule URLs and commit hashes, including the nested ones +show-deps: + { "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/git_show_deps.sh" ;\ + git submodule foreach --quiet --recursive "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/git_show_deps.sh"; } \ + | sort -u + +############################ +# Windows-specific section # +############################ + +ifeq ($(OS), Windows_NT) + # no tabs allowed for indentation here + + # the AppVeyor 32-bit build is done on a 64-bit image, so we need to override the architecture detection + ifeq ($(ARCH_OVERRIDE), x86) + ARCH := x86 + else + ifeq ($(PROCESSOR_ARCHITEW6432), AMD64) + ARCH := x64 + else + ifeq ($(PROCESSOR_ARCHITECTURE), AMD64) + ARCH := x64 + endif + ifeq ($(PROCESSOR_ARCHITECTURE), x86) + ARCH := x86 + endif + endif + endif + + ifeq ($(ARCH), x86) + ROCKSDB_DIR := x86 + endif + ifeq ($(ARCH), x64) + ROCKSDB_DIR := x64 + endif + + ROCKSDB_ARCHIVE := nimbus-deps.zip + ROCKSDB_URL := https://github.com/status-im/nimbus-deps/releases/download/rocksdb-9.1.0/$(ROCKSDB_ARCHIVE) + CURL := curl -O -L + UNZIP := unzip -o + +#- back to tabs +#- copied from .appveyor.yml +#- this is why we can't delete the whole "build" dir in the "clean" target +fetch-dlls: | build + cd build && \ + $(CURL) $(ROCKSDB_URL) && \ + $(CURL) https://nim-lang.org/download/dlls.zip && \ + $(UNZIP) $(ROCKSDB_ARCHIVE) && \ + cp -a $(ROCKSDB_DIR)/*.dll . && \ + $(UNZIP) dlls.zip +endif diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/002-targets.mk.patch/.timestamp b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/002-targets.mk.patch/.timestamp new file mode 100644 index 000000000..e69de29bb diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/002-targets.mk.patch/vendor/nimbus-build-system/makefiles/targets.mk b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/002-targets.mk.patch/vendor/nimbus-build-system/makefiles/targets.mk new file mode 100644 index 000000000..ca2b1bd36 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/002-targets.mk.patch/vendor/nimbus-build-system/makefiles/targets.mk @@ -0,0 +1,239 @@ +# Copyright (c) 2018-2021 Status Research & Development GmbH. Licensed under +# either of: +# - Apache License, version 2.0 +# - MIT license +# at your option. This file may not be copied, modified, or distributed except +# according to those terms. + +.PHONY: \ + sanity-checks \ + warn-update \ + warn-jobs \ + deps-common \ + build-nim \ + update-test \ + update-common \ + $(NIM_BINARY) \ + update-remote \ + nat-libs \ + libminiupnpc.a \ + libnatpmp.a \ + clean-cross \ + clean-common \ + mrproper \ + github-ssh \ + status \ + ntags \ + ctags \ + show-deps \ + fetch-dlls + +#- when the special ".SILENT" target is present, all recipes are silenced as if they all had a "@" prefix +#- by setting SILENT_TARGET_PREFIX to a non-empty value, the name of this target becomes meaningless to `make` +#- idea stolen from http://make.mad-scientist.net/managing-recipe-echoing/ +$(SILENT_TARGET_PREFIX).SILENT: + +# dir +build: + mkdir -p $@ + +sanity-checks: + which $(CC) &>/dev/null || { echo "C compiler ($(CC)) not installed. Aborting."; exit 1; } + +#- check if "make update" was executed +warn-update: + if [[ -e $(UPDATE_TIMESTAMP) ]]; then \ + if [[ $$(cat $(UPDATE_TIMESTAMP)) -ne $$($(GET_CURRENT_COMMIT_TIMESTAMP)) ]]; then \ + echo -e "\nWarning: to ensure you are building in a supported repo state, please always run \"$$(basename "$(MAKE)") update\" after \"git pull\"\n(it looks like you've forgotten to do this).\nThis also applies whenever you switch to a new branch or commit, e.g.: whenever you run \"git checkout ...\".\n"; \ + fi; \ + fi + +#- check if we're enabling multiple jobs - https://stackoverflow.com/a/48865939 +warn-jobs: + + if [[ ! "${MAKEFLAGS}" =~ --jobserver[^=]+= ]]; then \ + NPROC=$$($(NPROC_CMD)); \ + if [[ $${NPROC} -gt 1 ]]; then \ + echo -e "\nTip of the day: this will probably build faster if you use \"$$(basename "$(MAKE)") -j$${NPROC} ...\".\n"; \ + fi; \ + fi + +nimbus-build-system-paths: + echo "Creating nimbus-build-system.paths"; \ + TOP_LEVEL_DIR="$(CURDIR)" "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nbs_paths.sh" + +deps-common: | sanity-checks warn-update warn-jobs $(NIMBLE_DIR) +# - don't build our Nim target if it's not going to be used +ifeq ($(USE_SYSTEM_NIM), 0) +deps-common: $(NIM_BINARY) +endif + +#- conditionally re-builds the Nim compiler (not usually needed, because `make update` calls this rule; delete $(NIM_BINARY) to force it) +#- allows parallel building with the '+' prefix +#- handles the case where NIM_COMMIT was previously used to build a non-default compiler +#- forces a rebuild of csources, Nimble and a complete compiler rebuild, in case we're called after pulling a new Nim version +#- uses our Git submodules for csources and Nimble (Git doesn't let us place them in another submodule) +#- build_all.sh looks at the parent dir to decide whether to copy the resulting csources binary there, +# but this is broken when using symlinks, so build csources separately (we get parallel compiling as a bonus) +#- Windows is a special case, as usual +#- macOS is also a special case, with its "ln" not supporting "-r" +#- the AppVeyor 32-bit build is done on a 64-bit image, so we need to override the architecture detection with ARCH_OVERRIDE +build-nim: | sanity-checks + +# Check if the update might cause loss of work. Abort, if so, while allowing an override mechanism. +update-test: + TEE_TO_TTY="cat"; if bash -c ": >/dev/tty" &>/dev/null; then TEE_TO_TTY="tee /dev/tty"; fi; \ + COMMAND="git status --short --untracked-files=no --ignore-submodules=untracked"; \ + LINES=$$({ $${COMMAND} | grep 'vendor' && echo ^---top level || true; git submodule foreach --recursive --quiet "$${COMMAND} | grep . && echo ^---\$$name || true"; } | $${TEE_TO_TTY} | wc -l); \ + if [[ "$${LINES}" -ne "0" && "$(OVERRIDE)" != "1" ]]; then echo -e "\nYou have uncommitted local changes which might be overwritten by the update. Aborting.\nIf you know better, you can use the 'update' target instead of 'update-dev'.\n"; exit 1; fi + +#- for each submodule, delete checked out files (that might prevent a fresh checkout); skip dotfiles +#- in case of submodule URL changes, propagates that change in the parent repo's .git directory +#- initialises and updates the Git submodules +#- hard-resets the working copies of submodules +#- deletes "nimcache" directories +#- updates ".update.timestamp" +#- deletes the ".nimble" dir and executes the "deps" target +#- allows parallel building with the '+' prefix +#- rebuilds the Nim compiler if the corresponding submodule is updated +update-common: | sanity-checks update-test + +# supposed to be used by developers, instead of "update", to avoid losing submodule work +update-dev: + + "$(MAKE)" OVERRIDE=0 update + +#- rebuilds the Nim compiler if the corresponding submodule is updated +$(NIM_BINARY): | sanity-checks + + "$(MAKE)" --no-print-directory build-nim + +# don't use this target, or you risk updating dependency repos that are not ready to be used in Nimbus +update-remote: + git submodule update --remote + +nat-libs: | libminiupnpc.a libnatpmp.a + +libminiupnpc.a: | sanity-checks +ifeq ($(OS), Windows_NT) + + [ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/$@ ] || \ + PATH=".;$${PATH}" "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -f Makefile.mingw CC=$(CC) CFLAGS="-Os -fPIC" $@ $(HANDLE_OUTPUT) +else + + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc CC=$(CC) CFLAGS="-Os -fPIC" build/$@ $(HANDLE_OUTPUT) +endif + +libnatpmp.a: | sanity-checks +ifeq ($(OS), Windows_NT) + + "$(MAKE)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream OS=mingw CC=$(CC) CFLAGS="-Wall -Wno-cpp -Os -fPIC -DWIN32 -DNATPMP_STATICLIB -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" $@ $(HANDLE_OUTPUT) +else + + "$(MAKE)" CFLAGS="-Wall -Wno-cpp -Os -fPIC -DENABLE_STRNATPMPERR -DNATPMP_MAX_RETRIES=4 $(CFLAGS)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream CC=$(CC) $@ $(HANDLE_OUTPUT) +endif + +#- depends on Git submodules being initialised +#- fakes a Nimble package repository with the minimum info needed by the Nim compiler +# for runtime path (i.e.: the second line in $(NIMBLE_DIR)/pkgs/*/*.nimble-link) +$(NIMBLE_DIR): + mkdir -p $(NIMBLE_DIR)/pkgs + NIMBLE_DIR="$(CURDIR)/$(NIMBLE_DIR)" PWD_CMD="$(PWD)" EXCLUDED_NIM_PACKAGES="$(EXCLUDED_NIM_PACKAGES)" \ + git submodule foreach --recursive --quiet '"$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nimble_link.sh" "$$sm_path"' + +clean-cross: + + [[ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc ]] && "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc CC=$(CC) clean $(HANDLE_OUTPUT) || true + + [[ -e vendor/nim-nat-traversal/vendor/libnatpmp-upstream ]] && "$(MAKE)" -C vendor/nim-nat-traversal/vendor/libnatpmp-upstream CC=$(CC) clean $(HANDLE_OUTPUT) || true + +clean-common: clean-cross + rm -rf build/{*.exe,*.so,*.so.0} $(NIMBLE_DIR) $(NIM_BINARY) $(NIM_DIR)/bin/{timestamp,last_built_commit,nim_commit_*} $(NIM_DIR)/nimcache nimcache + +# dangerous cleaning, because you may have not-yet-pushed branches and commits in those vendor repos you're about to delete +mrproper: clean + rm -rf vendor + +# for when you want to use SSH keys with GitHub +github-ssh: + git config url."git@github.com:".insteadOf "https://github.com/" + git submodule foreach --recursive 'git config url."git@github.com:".insteadOf "https://github.com/"' + +# runs `git status` in all Git repos +status: | $(REPOS) + $(eval CMD := $(GIT_STATUS)) + $(RUN_CMD_IN_ALL_REPOS) + +# https://bitbucket.org/nimcontrib/ntags/ - currently fails with "out of memory" +ntags: + ntags -R . + +#- a few files need to be excluded because they trigger an infinite loop in https://github.com/universal-ctags/ctags +#- limiting it to Nim files, because there are a lot of C files we don't care about +ctags: + ctags -R --verbose=yes \ + --langdef=nim \ + --langmap=nim:.nim \ + --regex-nim='/(\w+)\*?\s*=\s*object/\1/c,class/' \ + --regex-nim='/(\w+)\*?\s*=\s*enum/\1/e,enum/' \ + --regex-nim='/(\w+)\*?\s*=\s*tuple/\1/t,tuple/' \ + --regex-nim='/(\w+)\*?\s*=\s*range/\1/s,subrange/' \ + --regex-nim='/(\w+)\*?\s*=\s*proc/\1/p,proctype/' \ + --regex-nim='/proc\s+(\w+)/\1/f,procedure/' \ + --regex-nim='/func\s+(\w+)/\1/f,procedure/' \ + --regex-nim='/method\s+(\w+)/\1/m,method/' \ + --regex-nim='/proc\s+`([^`]+)`/\1/o,operator/' \ + --regex-nim='/template\s+(\w+)/\1/u,template/' \ + --regex-nim='/macro\s+(\w+)/\1/v,macro/' \ + --languages=nim \ + --exclude=nimcache \ + --exclude='*/Nim/tinyc' \ + --exclude='*/Nim/tests' \ + --exclude='*/Nim/csources' \ + --exclude=nimbus/genesis_alloc.nim \ + --exclude=$(REPOS_DIR)/nim-bncurve/tests/tvectors.nim \ + . + +# list all Git submodule URLs and commit hashes, including the nested ones +show-deps: + { "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/git_show_deps.sh" ;\ + git submodule foreach --quiet --recursive "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/git_show_deps.sh"; } \ + | sort -u + +############################ +# Windows-specific section # +############################ + +ifeq ($(OS), Windows_NT) + # no tabs allowed for indentation here + + # the AppVeyor 32-bit build is done on a 64-bit image, so we need to override the architecture detection + ifeq ($(ARCH_OVERRIDE), x86) + ARCH := x86 + else + ifeq ($(PROCESSOR_ARCHITEW6432), AMD64) + ARCH := x64 + else + ifeq ($(PROCESSOR_ARCHITECTURE), AMD64) + ARCH := x64 + endif + ifeq ($(PROCESSOR_ARCHITECTURE), x86) + ARCH := x86 + endif + endif + endif + + ifeq ($(ARCH), x86) + ROCKSDB_DIR := x86 + endif + ifeq ($(ARCH), x64) + ROCKSDB_DIR := x64 + endif + + ROCKSDB_ARCHIVE := nimbus-deps.zip + ROCKSDB_URL := https://github.com/status-im/nimbus-deps/releases/download/rocksdb-9.1.0/$(ROCKSDB_ARCHIVE) + CURL := curl -O -L + UNZIP := unzip -o + +#- back to tabs +#- copied from .appveyor.yml +#- this is why we can't delete the whole "build" dir in the "clean" target +fetch-dlls: | build + cd build && \ + $(CURL) $(ROCKSDB_URL) && \ + $(CURL) https://nim-lang.org/download/dlls.zip && \ + $(UNZIP) $(ROCKSDB_ARCHIVE) && \ + cp -a $(ROCKSDB_DIR)/*.dll . && \ + $(UNZIP) dlls.zip +endif diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/003-version.patch/.timestamp b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/003-version.patch/.timestamp new file mode 100644 index 000000000..e69de29bb diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/003-version.patch/beacon_chain/version.nim b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/003-version.patch/beacon_chain/version.nim new file mode 100644 index 000000000..a37d87012 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/.pc/003-version.patch/beacon_chain/version.nim @@ -0,0 +1,71 @@ +# beacon_chain +# Copyright (c) 2018-2025 Status Research & Development GmbH +# Licensed and distributed under either of +# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). +# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). +# at your option. This file may not be copied, modified, or distributed except according to those terms. + +{.push raises: [].} + +## This module implements the version tagging details of all binaries included +## in the Nimbus release process (i.e. beacon_node, validator_client, etc) + +import std/[strutils, compilesettings] + +const + compileYear = CompileDate[0 ..< 4] # YYYY-MM-DD (UTC) + copyrights* = + "Copyright (c) 2019-" & compileYear & " Status Research & Development GmbH" + + versionMajor* = 25 + versionMinor* = 2 + versionBuild* = 0 + + versionBlob* = "stateofus" # Single word - ends up in the default graffiti + + ## You can override this if you are building the + ## sources outside the git tree of Nimbus: + git_revision_override* {.strdefine.} = + when querySetting(SingleValueSetting.command) == "check": + # The staticExec call below returns an empty string + # when `nim check` is used and this leads to a faux + # compile-time error. + # We work-around the problem with this override and + # save some time in executing the external command. + "123456" + else: + "" + + gitRevisionLong* = when git_revision_override.len == 0: + staticExec "git rev-parse --short HEAD" + else: + git_revision_override + + gitRevision* = strip(gitRevisionLong)[0..5] + + nimFullBanner* = staticExec("nim --version") + nimBanner* = staticExec("nim --version | grep Version") + + versionAsStr* = + $versionMajor & "." & $versionMinor & "." & $versionBuild + + fullVersionStr* = "v" & versionAsStr & "-" & gitRevision & "-" & versionBlob + + nimbusAgentStr* = "Nimbus/" & fullVersionStr + +func getNimGitHash*(): string = + const gitPrefix = "git hash: " + let tmp = splitLines(nimFullBanner) + if tmp.len == 0: + return + for line in tmp: + if line.startsWith(gitPrefix) and line.len > 8 + gitPrefix.len: + result = line[gitPrefix.len.. 0: + tmp[0] & " (" & gitHash & ")" + else: + tmp[0] diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/copyright b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/copyright new file mode 100644 index 000000000..cf7a3ffb2 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/copyright @@ -0,0 +1,23 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: nimbus-eth2 +Upstream-Contact: https://github.com/status-im/nimbus-eth2 +Source: +# +# Please double check copyright with the licensecheck(1) command. +## THERE ARE more than 20.000 file to check for licenses, including c files +# not going to check manually, need to write a tool for this :( + +Files: * +License: Apache-2.0 + + +Files: debian/* +License: GPL-3+ + +License: Apache-2.0 + The full text of the Apache License, Version 2.0 is distributed in + /usr/share/common-licenses/Apache-2.0 on Debian systems. + +License: GPL-3+ + The full text of the GPL version 3 is distributed in + /usr/share/common-licenses/GPL-3 on Debian systems. \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/eth-node-nimbus-eth2.lintian-overrides b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/eth-node-nimbus-eth2.lintian-overrides new file mode 100644 index 000000000..7ea527aa3 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/eth-node-nimbus-eth2.lintian-overrides @@ -0,0 +1,12 @@ +# not a bug + +eth-node-nimbus-eth2: initial-upload-closes-no-bugs [usr/share/doc/eth-node-nimbus-eth2/changelog.Debian.gz:1] +eth-node-nimbus-eth2: maintainer-script-ignores-errors [postrm] + +eth-node-nimbus-eth2: copyright-without-copyright-notice +eth-node-nimbus-eth2: extended-description-line-too-long line 1 +eth-node-nimbus-eth2: extended-description-line-too-long line 3 +eth-node-nimbus-eth2: no-manual-page [usr/bin/nimbus_beacon_node] + +eth-node-nimbus-eth2: embedded-library libminiupnpc [usr/lib/eth-node-nimbus-eth2/bin/nimbus_beacon_node] +eth-node-nimbus-eth2: embedded-library libminiupnpc [usr/lib/eth-node-nimbus-eth2/bin/nimbus_light_client] \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/001-makefile.patch b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/001-makefile.patch new file mode 100644 index 000000000..c02344171 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/001-makefile.patch @@ -0,0 +1,36 @@ +Index: eth-node-nimbus-eth2-24.5.1/vendor/nimbus-build-system/makefiles/targets.mk +=================================================================== +--- eth-node-nimbus-eth2-24.5.1.orig/vendor/nimbus-build-system/makefiles/targets.mk ++++ eth-node-nimbus-eth2-24.5.1/vendor/nimbus-build-system/makefiles/targets.mk +@@ -78,14 +78,6 @@ endif + #- macOS is also a special case, with its "ln" not supporting "-r" + #- the AppVeyor 32-bit build is done on a 64-bit image, so we need to override the architecture detection with ARCH_OVERRIDE + build-nim: | sanity-checks +- + if [[ -z "$(NIM_COMMIT)" ]]; then git submodule update --init --recursive "$(BUILD_SYSTEM_DIR)"; fi; \ +- NIM_BUILD_MSG="$(BUILD_MSG) Nim compiler" \ +- V=$(V) \ +- CC=$(CC) \ +- MAKE="$(MAKE)" \ +- ARCH_OVERRIDE=$(ARCH_OVERRIDE) \ +- QUICK_AND_DIRTY_COMPILER=$(QUICK_AND_DIRTY_COMPILER) \ +- "$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/build_nim.sh" "$(NIM_DIR)" ../Nim-csources ../nimble "$(CI_CACHE)" + + # Check if the update might cause loss of work. Abort, if so, while allowing an override mechanism. + update-test: +@@ -104,16 +96,6 @@ update-test: + #- allows parallel building with the '+' prefix + #- rebuilds the Nim compiler if the corresponding submodule is updated + update-common: | sanity-checks update-test +- git submodule foreach --quiet 'git ls-files --exclude-standard --recurse-submodules -z -- ":!:.*" | xargs -0 rm -rf' +- git $(GIT_SUBMODULE_CONFIG) submodule update --init --recursive || true +- # changing URLs in a submodule's submodule means we have to sync and update twice +- git submodule sync --quiet --recursive +- git $(GIT_SUBMODULE_CONFIG) submodule update --init --recursive +- git submodule foreach --quiet --recursive 'git $(GIT_SUBMODULE_CONFIG) reset --quiet --hard' +- find . -type d -name nimcache -print0 | xargs -0 rm -rf +- $(GET_CURRENT_COMMIT_TIMESTAMP) > $(UPDATE_TIMESTAMP) +- rm -rf $(NIMBLE_DIR) +- + "$(MAKE)" --no-print-directory deps-common + + # supposed to be used by developers, instead of "update", to avoid losing submodule work + update-dev: diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/002-targets.mk.patch b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/002-targets.mk.patch new file mode 100644 index 000000000..fc6a87ef4 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/002-targets.mk.patch @@ -0,0 +1,22 @@ +Index: eth-node-nimbus-eth2-24.7.0/vendor/nimbus-build-system/makefiles/targets.mk +=================================================================== +--- eth-node-nimbus-eth2-24.7.0.orig/vendor/nimbus-build-system/makefiles/targets.mk ++++ eth-node-nimbus-eth2-24.7.0/vendor/nimbus-build-system/makefiles/targets.mk +@@ -107,7 +107,6 @@ $(NIM_BINARY): | sanity-checks + + # don't use this target, or you risk updating dependency repos that are not ready to be used in Nimbus + update-remote: +- git submodule update --remote + + nat-libs: | libminiupnpc.a libnatpmp.a + +@@ -130,9 +129,6 @@ endif + #- fakes a Nimble package repository with the minimum info needed by the Nim compiler + # for runtime path (i.e.: the second line in $(NIMBLE_DIR)/pkgs/*/*.nimble-link) + $(NIMBLE_DIR): +- mkdir -p $(NIMBLE_DIR)/pkgs +- NIMBLE_DIR="$(CURDIR)/$(NIMBLE_DIR)" PWD_CMD="$(PWD)" EXCLUDED_NIM_PACKAGES="$(EXCLUDED_NIM_PACKAGES)" \ +- git submodule foreach --recursive --quiet '"$(CURDIR)/$(BUILD_SYSTEM_DIR)/scripts/create_nimble_link.sh" "$$sm_path"' + + clean-cross: + + [[ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc ]] && "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc CC=$(CC) clean $(HANDLE_OUTPUT) || true diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/003-version.patch b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/003-version.patch new file mode 100644 index 000000000..9754bcc6b --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/003-version.patch @@ -0,0 +1,48 @@ +Index: eth-node-nimbus-eth2-25.2.0/beacon_chain/version.nim +=================================================================== +--- eth-node-nimbus-eth2-25.2.0.orig/beacon_chain/version.nim ++++ eth-node-nimbus-eth2-25.2.0/beacon_chain/version.nim +@@ -10,12 +10,14 @@ + ## This module implements the version tagging details of all binaries included + ## in the Nimbus release process (i.e. beacon_node, validator_client, etc) + +-import std/[strutils, compilesettings] ++import std/[strutils] ++import os + + const + compileYear = CompileDate[0 ..< 4] # YYYY-MM-DD (UTC) ++ reproducibleYear = getEnv("BUILD_YEAR", "2024") + copyrights* = +- "Copyright (c) 2019-" & compileYear & " Status Research & Development GmbH" ++ "Copyright (c) 2019-" & reproducibleYear & " Status Research & Development GmbH" + + versionMajor* = 25 + versionMinor* = 2 +@@ -23,25 +25,7 @@ const + + versionBlob* = "stateofus" # Single word - ends up in the default graffiti + +- ## You can override this if you are building the +- ## sources outside the git tree of Nimbus: +- git_revision_override* {.strdefine.} = +- when querySetting(SingleValueSetting.command) == "check": +- # The staticExec call below returns an empty string +- # when `nim check` is used and this leads to a faux +- # compile-time error. +- # We work-around the problem with this override and +- # save some time in executing the external command. +- "123456" +- else: +- "" +- +- gitRevisionLong* = when git_revision_override.len == 0: +- staticExec "git rev-parse --short HEAD" +- else: +- git_revision_override +- +- gitRevision* = strip(gitRevisionLong)[0..5] ++ gitRevision* = getEnv("GIT_REVISION", "12345") + + nimFullBanner* = staticExec("nim --version") + nimBanner* = staticExec("nim --version | grep Version") diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/series b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/series new file mode 100644 index 000000000..f1e185fbd --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/patches/series @@ -0,0 +1,3 @@ +001-makefile.patch +002-targets.mk.patch +003-version.patch diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/rules b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/rules new file mode 100644 index 000000000..43019d7db --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/rules @@ -0,0 +1,57 @@ +#!/usr/bin/make -f +export NIM_DIR=/opt/lib/nim/nim-2.0.2 +export USE_SYSTEM_NIM=1 +export BINARIES=nimbus_beacon_node nimbus_validator_client deposit_contract nimbus_signing_node nimbus_light_client +export ADDITIONAL_BINARIES=generate_makefile +export NIMFLAGS=-d:disableMarchNative --gcc.options.debug:'-g1' --clang.options.debug:'-gline-tables-only' +export NIMFLAGS+=-d:marchOptimized +#export NIMFLAGS+="--mm:refc -d:limitStackUsage" +export GIT_REVISION=c668800 +export VERSION_MAJOR=25 +export VERSION_MINOR=2 +export VERSION_BUILD=0 +export PARTIAL_STATIC_LINKING=1 +export QUICK_AND_DIRTY_COMPILER=1 +export LOG_LEVEL="TRACE" +export CFLAGS += -fPIC +export CFLAGS += -Wl,--build-id=none +export LDFLAGS += -Wl,--build-id=none + + +%: + dh $@ + + +override_dh_dwz: + # skip of optimization of DWARF as it makes no sense, the optimized size is bigger than the original + +override_dh_auto_build: + make ntu + for bin in $(BINARIES) ; do \ + NIMFLAGS="$(NIMFLAGS)" make "$${bin}"; \ + llvm-objcopy --remove-section .note.gnu.property "build/$${bin}" "build/$${bin}"; \ + llvm-objcopy --remove-section .note.gnu.build-id "build/$${bin}" "build/$${bin}"; \ + llvm-objcopy --remove-section .note.ABI-tag "build/$${bin}" "build/$${bin}"; \ + readelf -n "build/$${bin}"; \ + done + for bin in $(ADDITIONAL_BINARIES) ; do \ + llvm-objcopy --remove-section .note.gnu.property "build/$${bin}" "build/$${bin}"; \ + llvm-objcopy --remove-section .note.gnu.build-id "build/$${bin}" "build/$${bin}"; \ + llvm-objcopy --remove-section .note.ABI-tag "build/$${bin}" "build/$${bin}"; \ + readelf -n "build/$${bin}"; \ + done + chmod +x scripts/run-beacon-node.sh + +override_dh_auto_clean: + # on ubuntu clean fails, before dependency installation + # on bookworm clean succeeds, even if dependency is not installed + -make -j1 clean + +override_dh_auto_test: + ## -make update + # make -j1 all_tests + ## remove all_tests, no need to ship it + # rm build/all_tests + +override_dh_strip: + dh_strip --no-automatic-dbgsym diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/source/lintian-overrides b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/source/lintian-overrides new file mode 100644 index 000000000..e6ffdb362 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/source/lintian-overrides @@ -0,0 +1,54 @@ +# TODO check if this is a bug or not +eth-node-nimbus-eth2 source: source-contains-prebuilt-ms-help-file [vendor/nim-zlib/zlib/csources/contrib/dotzlib/DotZLib.chm] +# Not bugs +eth-node-nimbus-eth2 source: source-is-missing [vendor/EIPs/_layouts/eip.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/EIPs/index.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-normalize/docs/normalize.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/index.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/casing.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/compositions.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/decompositions.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/names.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/properties.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/scripts.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/segmentation.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/types.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-unicodedb/docs/unicodedb/widths.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-zlib/tests/data/html.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nim-zlib/tests/data/html_x_4.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/rst2html/expected/rst_examples.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/test_out_index_dot_html/expected/index.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/test_out_index_dot_html/expected/theindex.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/testproject/expected/subdir/subdir_b/utils.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/testproject/expected/testproject.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/testproject/expected/theindex.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/tests/testdata/xmltest.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/index.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/bcmode.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/blake2.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/blowfish.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/hash.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/hmac.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/keccak.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/rijndael.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/ripemd.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/sha2.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/sysrand.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/twofish.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimcrypto/docs/nimcrypto/utils.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/extlinks/project/expected/_._/util.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/extlinks/project/expected/doc/manual.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/extlinks/project/expected/main.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/extlinks/project/expected/sub/submodule.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/extlinks/project/expected/theindex.html] +eth-node-nimbus-eth2 source: source-is-missing [vendor/nimbus-build-system/vendor/Nim/nimdoc/test_doctype/expected/test_doctype.html] +eth-node-nimbus-eth2 source: missing-field-in-dep5-copyright Copyright [debian/copyright:10] + +#TODO remove this +eth-node-nimbus-eth2 source: source-contains-prebuilt-windows-binary [vendor/nim-bearssl/bearssl/csources/T0Comp.exe] + +eth-node-nimbus-eth2 source: missing-field-in-dep5-copyright Copyright [debian/copyright:14] +eth-node-nimbus-eth2 source: no-newline-at-end [debian/changelog] +eth-node-nimbus-eth2 source: debian-rules-ignores-make-clean-error [debian/rules:48] + diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/tests/control b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/tests/control new file mode 100644 index 000000000..3864555d8 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/tests/control @@ -0,0 +1,4 @@ +# These tests are run by autopkgtests + +Tests: tests +Depends: @, shunit2, which \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/tests/tests b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/tests/tests new file mode 100644 index 000000000..4f12eb1a6 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-nimbus-eth2/25.2.0-1/src/debian/tests/tests @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +exec 2>&1 + +set -e + +test_binary_in_path(){ + output="$(which nimbus_beacon_node)" + assertEquals "/usr/bin/nimbus_beacon_node" "$output" +} + +test_invocation_run_beacon_node(){ + output="$(nimbus_beacon_node --version)" + echo "$output" + # checked against https://github.com/status-im/nimbus-eth2/releases/download/v24.3.0/nimbus-eth2_Linux_amd64_24.3.0_dc19b082.tar.gz + assertContains "$output" "Nimbus beacon node v25.2.0-c668800-stateofus +Copyright (c) 2019-2024 Status Research & Development GmbH + +eth2 specification v1.4.0 + +Nim Compiler Version 1.2.12 [Linux: amd64]" +} + +. shunit2 \ No newline at end of file diff --git a/templates/bookworm/amd64/eth-node-nimbus-eth2/src/debian/rules b/templates/bookworm/amd64/eth-node-nimbus-eth2/src/debian/rules index 21944d542..da2cfc02a 100644 --- a/templates/bookworm/amd64/eth-node-nimbus-eth2/src/debian/rules +++ b/templates/bookworm/amd64/eth-node-nimbus-eth2/src/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f export NIM_DIR=/opt/lib/nim/nim-2.0.2 export USE_SYSTEM_NIM=1 -export BINARIES=nimbus_beacon_node nimbus_validator_client deposit_contract nimbus_signing_node nimbus_light_client logtrace +export BINARIES=nimbus_beacon_node nimbus_validator_client deposit_contract nimbus_signing_node nimbus_light_client export ADDITIONAL_BINARIES=generate_makefile export NIMFLAGS=-d:disableMarchNative --gcc.options.debug:'-g1' --clang.options.debug:'-gline-tables-only' export NIMFLAGS+=-d:marchOptimized