diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.changelog b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.changelog new file mode 100644 index 000000000..07610dc66 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.changelog @@ -0,0 +1,6 @@ +eth-node-lodestar (1.25.0-1) bookworm; urgency=medium + + * Support for 1.25.0-1 + + -- Eniko Nagy Tue, 14 Jan 2025 18:17:42 +0100 + diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.sps b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.sps new file mode 100644 index 000000000..4f72e2606 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.sps @@ -0,0 +1,20 @@ +name = "eth-node-lodestar" +architecture = "any" +summary = "TypeScript Implementation of Ethereum Consensus " +conflicts = [] +recommends = [] +provides = ["eth-node-consensus-client (= 1)"] +suggests = ["eth-node (= 1)"] +# node-gyp, not entirely sure if needed, let's add it +depends = ["python3"] +add_files = [ + "debian/lodestar /usr/lib/eth-node-lodestar/bin", + "packages /usr/lib/eth-node-lodestar", + "node_modules /usr/lib/eth-node-lodestar" + ] +add_links = ["/usr/lib/eth-node-lodestar/bin/lodestar /usr/bin/lodestar"] +add_manpages = [] +long_doc = """ +Lodestar is a TypeScript implementation of the +Ethereum Consensus specification developed by ChainSafe Systems. +""" \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.sss b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.sss new file mode 100644 index 000000000..1a4a7df32 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/eth-node-lodestar.sss @@ -0,0 +1,22 @@ +name = "eth-node-lodestar" +maintainer = "Eniko Nagy " +section = "net" +variants = [] +build_depends = [ +#"build-essential", +"libssl-dev", +"libjpeg-dev", +"libgif-dev", +"libpixman-1-dev", +"libpango1.0-dev", +"libffi-dev", +"git", +#"docker-ce", +#"docker-ce-cli", +#"containerd.io", +#"docker-buildx-plugin", +#"docker-compose-plugin" +] +packages = ["eth-node-lodestar"] +skip_debug_symbols = true + diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/pkg-builder-verify.toml b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/pkg-builder-verify.toml new file mode 100644 index 000000000..f05d0e7d4 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/pkg-builder-verify.toml @@ -0,0 +1,7 @@ +[verify] +package_hash=[ + { hash="c563a901e2e6f1f1a736a1dd2f56256b71d4efcf", name= "eth-node-lodestar_1.25.0-1.dsc"}, + { hash="062ac4d8e551026b3144bbca2f9de7004794c497", name= "eth-node-lodestar_1.25.0.orig.tar.gz"}, + { hash="c8a6f16d3114980ee45a66295172d1a5de2961be", name= "eth-node-lodestar_1.25.0-1.debian.tar.xz"}, + { hash="53392601b6311897b70eb7e39e95a48e7a3b4c53", name= "eth-node-lodestar_1.25.0-1_amd64.deb"}, +] diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/pkg-builder.toml b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/pkg-builder.toml new file mode 100644 index 000000000..acb1e35ac --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/pkg-builder.toml @@ -0,0 +1,36 @@ +[package_fields] +spec_file = "eth-node-lodestar.sss" +package_name = "eth-node-lodestar" +version_number = "1.25.0" +revision_number = "1" +homepage="https://github.com/ChainSafe/lodestar" + +[package_type] +# virtual | git | default +package_type="default" +tarball_url = "https://github.com/ChainSafe/lodestar/archive/refs/tags/v1.25.0.tar.gz" +## Provided by debian package maintainer not by team developing the software +tarball_hash = "bcec9254768e4d941307c76160c64f57952bece3030a972bc93d3b905a6147c4" + +[package_type.language_env] +language_env = "javascript" +node_version = "20.12.2" +# https://nodejs.org/download/release/v20.12.2 +node_binary_url = "https://nodejs.org/download/release/v20.12.2/node-v20.12.2-linux-x64.tar.gz" +node_binary_checksum = "f8f9b6877778ed2d5f920a5bd853f0f8a8be1c42f6d448c763a95625cbbb4b0d" +yarn_version = "1.22.19" + +[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-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/cli/src/cli.ts b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/cli/src/cli.ts new file mode 100644 index 000000000..e8f4aeba8 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/cli/src/cli.ts @@ -0,0 +1,56 @@ +// Must not use `* as yargs`, see https://github.com/yargs/yargs/issues/1131 +import yargs from "yargs"; +import {hideBin} from "yargs/helpers"; +import {registerCommandToYargs} from "@lodestar/utils"; +import {cmds} from "./cmds/index.js"; +import {globalOptions, rcConfigOption} from "./options/index.js"; +import {getVersionData} from "./util/version.js"; + +const {version} = getVersionData(); +const topBanner = `🌟 Lodestar: TypeScript Implementation of the Ethereum Consensus Beacon Chain. + * Version: ${version} + * by ChainSafe Systems, 2018-${new Date().getFullYear()}`; +const bottomBanner = `📖 For more information, check the CLI reference: + * https://chainsafe.github.io/lodestar/reference/cli + +✍️ Give feedback and report issues on GitHub: + * https://github.com/ChainSafe/lodestar`; + +export const yarg = yargs((hideBin as (args: string[]) => string[])(process.argv)); + +/** + * Common factory for running the CLI and running integration tests + * The CLI must actually be executed in a different script + */ +export function getLodestarCli(): yargs.Argv { + const lodestar = yarg + .env("LODESTAR") + .parserConfiguration({ + // As of yargs v16.1.0 dot-notation breaks strictOptions() + // Manually processing options is typesafe tho more verbose + "dot-notation": false, + }) + .options(globalOptions) + // blank scriptName so that help text doesn't display the cli name before each command + .scriptName("") + .demandCommand(1) + // Control show help behaviour below on .fail() + .showHelpOnFail(false) + .usage(topBanner) + .epilogue(bottomBanner) + .version(topBanner) + .alias("h", "help") + .alias("v", "version") + .recommendCommands(); + + // yargs.command and all ./cmds + for (const cmd of cmds) { + registerCommandToYargs(lodestar, cmd); + } + + // throw an error if we see an unrecognized cmd + lodestar.recommendCommands().strict(); + lodestar.config(...rcConfigOption); + + return lodestar; +} diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/cli/src/util/version.ts b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/cli/src/util/version.ts new file mode 100644 index 000000000..4752856e5 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/cli/src/util/version.ts @@ -0,0 +1,75 @@ +import fs from "node:fs"; +import path from "node:path"; +import {fileURLToPath} from "node:url"; +import {findUpSync} from "find-up"; +import {readAndGetGitData} from "./gitData/index.js"; + +// Global variable __dirname no longer available in ES6 modules. +// Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules +// eslint-disable-next-line @typescript-eslint/naming-convention +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +type VersionJson = { + /** "0.28.2" */ + version: string; +}; + +const BRANCH_IGNORE = /^(HEAD|master|unstable|main)$/; + +/** + * Gathers all information on package version including Git data. + * @returns a version string, e.g. + * - Stable release: `v0.36.0/80c248bb` + * - Dev release: `v0.36.0-dev.80c248bb/80c248bb` + * - Test branch: `v0.36.0/developer-feature/80c248bb` + */ +export function getVersionData(): { + version: string; + commit: string; +} { + const parts: string[] = []; + + /** Returns local version from `lerna.json` or `package.json` as `"0.28.2"` */ + const localVersion = readCliPackageJson() || readVersionFromLernaJson(); + if (localVersion) { + parts.push(`v${localVersion}`); + } + + const {branch, commit} = readAndGetGitData(); + + // Add branch only if not present and not an ignore value + if (branch && !BRANCH_IGNORE.test(branch)) parts.push(branch); + + // Add commit only if present. 7 characters to be consistent with Github + if (commit) { + const commitShort = commit.slice(0, 7); + // Don't add commit if it's already in the version string (dev versions) + if (!localVersion || !localVersion.includes(commitShort)) { + parts.push(commitShort); + } + } + + return { + // Guard against empty parts array + version: parts.length > 0 ? parts.join("/") : "unknown", + commit, + }; +} + +/** Read version information from lerna.json */ +function readVersionFromLernaJson(): string | undefined { + const filePath = findUpSync("lerna.json", {cwd: __dirname}); + if (!filePath) return undefined; + + const lernaJson = JSON.parse(fs.readFileSync(filePath, "utf8")) as VersionJson; + return lernaJson.version; +} + +/** Read version information from package.json */ +function readCliPackageJson(): string | undefined { + const filePath = findUpSync("package.json", {cwd: __dirname}); + if (!filePath) return undefined; + + const packageJson = JSON.parse(fs.readFileSync(filePath, "utf8")) as VersionJson; + return packageJson.version; +} diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/flare/src/cli.ts b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/flare/src/cli.ts new file mode 100644 index 000000000..91c4ef83c --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/flare/src/cli.ts @@ -0,0 +1,53 @@ +// Must not use `* as yargs`, see https://github.com/yargs/yargs/issues/1131 +import yargs from "yargs"; +import {hideBin} from "yargs/helpers"; +import {registerCommandToYargs} from "@lodestar/utils"; +import {cmds} from "./cmds/index.js"; + +const topBanner = `Beacon chain multi-purpose and debugging tool. + +Flare is a sudden brief burst of bright flame or light. +In the wrong hands, can lead people astray. +Use with care. + + * by ChainSafe Systems, 2018-${new Date().getFullYear()}`; +const bottomBanner = ` +✍️ Give feedback and report issues on GitHub: + * https://github.com/ChainSafe/lodestar`; + +export const yarg = yargs((hideBin as (args: string[]) => string[])(process.argv)); + +/** + * Common factory for running the CLI and running integration tests + * The CLI must actually be executed in a different script + */ +export function getCli(): yargs.Argv { + const lodestar = yarg + .env("FLARE") + .parserConfiguration({ + // As of yargs v16.1.0 dot-notation breaks strictOptions() + // Manually processing options is typesafe tho more verbose + "dot-notation": false, + }) + // blank scriptName so that help text doesn't display the cli name before each command + .scriptName("") + .demandCommand(1) + // Control show help behaviour below on .fail() + .showHelpOnFail(false) + .usage(topBanner) + .epilogue(bottomBanner) + .version(topBanner) + .alias("h", "help") + .alias("v", "version") + .recommendCommands(); + + // yargs.command and all ./cmds + for (const cmd of cmds) { + registerCommandToYargs(lodestar, cmd); + } + + // throw an error if we see an unrecognized cmd + lodestar.recommendCommands().strict(); + + return lodestar; +} diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/prover/src/cli/cli.ts b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/prover/src/cli/cli.ts new file mode 100644 index 000000000..5e084a551 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/prover/src/cli/cli.ts @@ -0,0 +1,58 @@ +// Must not use `* as yargs`, see https://github.com/yargs/yargs/issues/1131 +import yargs from "yargs"; +import {hideBin} from "yargs/helpers"; +import {registerCommandToYargs} from "@lodestar/utils"; +import {getVersionData} from "../utils/version.js"; +import {cmds, proverProxyStartCommand} from "./cmds/index.js"; +import {globalOptions} from "./options.js"; + +const {version} = getVersionData(); +const topBanner = `🌟 Lodestar Prover Proxy: Ethereum RPC proxy for RPC responses, verified against the trusted block hashes. + * Version: ${version} + * by ChainSafe Systems, 2018-${new Date().getFullYear()}`; +const bottomBanner = `📖 For more information, check the CLI reference: + * https://chainsafe.github.io/lodestar/reference/cli + +✍️ Give feedback and report issues on GitHub: + * https://github.com/ChainSafe/lodestar`; + +export const yarg = yargs((hideBin as (args: string[]) => string[])(process.argv)); + +/** + * Common factory for running the CLI and running integration tests + * The CLI must actually be executed in a different script + */ +export function getLodestarProverCli(): yargs.Argv { + const prover = yarg + .env("LODESTAR") + .parserConfiguration({ + // As of yargs v16.1.0 dot-notation breaks strictOptions() + // Manually processing options is typesafe tho more verbose + "dot-notation": false, + }) + .options(globalOptions) + // blank scriptName so that help text doesn't display the cli name before each command + .scriptName("") + .demandCommand(1) + // Control show help behaviour below on .fail() + .showHelpOnFail(false) + .usage(topBanner) + .epilogue(bottomBanner) + .version(topBanner) + .alias("h", "help") + .alias("v", "version") + .recommendCommands(); + + // yargs.command and all ./cmds + for (const cmd of cmds) { + registerCommandToYargs(prover, cmd); + } + + // Register the proxy command as the default one + registerCommandToYargs(prover, {...proverProxyStartCommand, command: "*"}); + + // throw an error if we see an unrecognized cmd + prover.recommendCommands().strict(); + + return prover; +} diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/prover/src/utils/version.ts b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/prover/src/utils/version.ts new file mode 100644 index 000000000..4752856e5 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/.pc/001-fullyear.patch/packages/prover/src/utils/version.ts @@ -0,0 +1,75 @@ +import fs from "node:fs"; +import path from "node:path"; +import {fileURLToPath} from "node:url"; +import {findUpSync} from "find-up"; +import {readAndGetGitData} from "./gitData/index.js"; + +// Global variable __dirname no longer available in ES6 modules. +// Solutions: https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules +// eslint-disable-next-line @typescript-eslint/naming-convention +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + +type VersionJson = { + /** "0.28.2" */ + version: string; +}; + +const BRANCH_IGNORE = /^(HEAD|master|unstable|main)$/; + +/** + * Gathers all information on package version including Git data. + * @returns a version string, e.g. + * - Stable release: `v0.36.0/80c248bb` + * - Dev release: `v0.36.0-dev.80c248bb/80c248bb` + * - Test branch: `v0.36.0/developer-feature/80c248bb` + */ +export function getVersionData(): { + version: string; + commit: string; +} { + const parts: string[] = []; + + /** Returns local version from `lerna.json` or `package.json` as `"0.28.2"` */ + const localVersion = readCliPackageJson() || readVersionFromLernaJson(); + if (localVersion) { + parts.push(`v${localVersion}`); + } + + const {branch, commit} = readAndGetGitData(); + + // Add branch only if not present and not an ignore value + if (branch && !BRANCH_IGNORE.test(branch)) parts.push(branch); + + // Add commit only if present. 7 characters to be consistent with Github + if (commit) { + const commitShort = commit.slice(0, 7); + // Don't add commit if it's already in the version string (dev versions) + if (!localVersion || !localVersion.includes(commitShort)) { + parts.push(commitShort); + } + } + + return { + // Guard against empty parts array + version: parts.length > 0 ? parts.join("/") : "unknown", + commit, + }; +} + +/** Read version information from lerna.json */ +function readVersionFromLernaJson(): string | undefined { + const filePath = findUpSync("lerna.json", {cwd: __dirname}); + if (!filePath) return undefined; + + const lernaJson = JSON.parse(fs.readFileSync(filePath, "utf8")) as VersionJson; + return lernaJson.version; +} + +/** Read version information from package.json */ +function readCliPackageJson(): string | undefined { + const filePath = findUpSync("package.json", {cwd: __dirname}); + if (!filePath) return undefined; + + const packageJson = JSON.parse(fs.readFileSync(filePath, "utf8")) as VersionJson; + return packageJson.version; +} diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/copyright b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/copyright new file mode 100644 index 000000000..24f530b8b --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/copyright @@ -0,0 +1,22 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lodestar +Upstream-Contact: https://github.com/ChainSafe/lodestar +Source: +# +# Please double check copyright with the licensecheck(1) command. + +Files: * +Copyright: __NO_COPYRIGHT_NOR_LICENSE__ +License: LGPL-3.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-lodestar/1.25.0-1/src/debian/eth-node-lodestar.lintian-overrides b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/eth-node-lodestar.lintian-overrides new file mode 100644 index 000000000..fae94c7f5 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/eth-node-lodestar.lintian-overrides @@ -0,0 +1,58 @@ +eth-node-lodestar: initial-upload-closes-no-bugs [usr/share/doc/eth-node-lodestar/changelog.Debian.gz:1] +eth-node-lodestar: maintainer-script-ignores-errors [postrm] +eth-node-lodestar: no-manual-page [usr/bin/lodestar] + +# TODO delete these +eth-node-lodestar: binary-from-other-architecture * + +# not a problem +eth-node-lodestar: embedded-library * + +# TODO potentional problems +eth-node-lodestar: library-not-linked-against-libc * +eth-node-lodestar: missing-dep-for-interpreter node (does not satisfy nodejs:any) * + + +# potentional problem +eth-node-lodestar: missing-dependency-on-libc * + +# TODO delete these +eth-node-lodestar: package-contains-eslint-config-file * + +# TODO delete these +eth-node-lodestar: package-contains-npm-ignore-file * + +eth-node-lodestar: privacy-breach-uses-embedded-file You may use the libjs-jquery package. (//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js) [usr/lib/eth-node-lodestar/node_modules/jmespath/index.html] + +eth-node-lodestar: statically-linked-binary [usr/lib/eth-node-lodestar/node_modules/@esbuild/linux-x64/bin/esbuild] + +eth-node-lodestar: unstripped-binary-or-object * + +eth-node-lodestar: wrong-path-for-interpreter /usr/bin/bash != /bin/bash [usr/lib/eth-node-lodestar/node_modules/fastify/integration/test.sh] + +eth-node-lodestar: backup-file-in-package * + +eth-node-lodestar: broken-gz * + +eth-node-lodestar: copyright-without-copyright-notice + +# not sure +eth-node-lodestar: embedded-javascript-library please use libjs-async * +eth-node-lodestar: embedded-javascript-library please use libjs-chai * +eth-node-lodestar: embedded-javascript-library please use libjs-mocha * +eth-node-lodestar: embedded-javascript-library please use libjs-prototype * + +eth-node-lodestar: executable-not-elf-or-script * + + +eth-node-lodestar: package-contains-hardlink pointing to: * +eth-node-lodestar: package-contains-vcs-control-file * + +eth-node-lodestar: package-has-unnecessary-activation-of-ldconfig-trigger + +eth-node-lodestar: script-not-executable * + +eth-node-lodestar: unusual-interpreter ts-node * + +eth-node-lodestar: privacy-breach-generic * +eth-node-lodestar: shared-library-lacks-prerequisites * \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/lodestar b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/lodestar new file mode 100644 index 000000000..606522aa3 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/lodestar @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Taken from lodestar and added proper location for packages directory + +# Convenience script to run the lodestar binary from built source +# +# ./lodestar.sh beacon --network prater + +node --trace-deprecation --max-old-space-size=4096 /usr/lib/eth-node-lodestar/packages/cli/bin/lodestar.js "$@" \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/patches/001-fullyear.patch b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/patches/001-fullyear.patch new file mode 100644 index 000000000..6a5b16b0f --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/patches/001-fullyear.patch @@ -0,0 +1,83 @@ +Index: eth-node-lodestar-1.19.0/packages/cli/src/cli.ts +=================================================================== +--- eth-node-lodestar-1.19.0.orig/packages/cli/src/cli.ts ++++ eth-node-lodestar-1.19.0/packages/cli/src/cli.ts +@@ -9,7 +9,7 @@ import {getVersionData} from "./util/ver + const {version} = getVersionData(); + const topBanner = `🌟 Lodestar: TypeScript Implementation of the Ethereum Consensus Beacon Chain. + * Version: ${version} +- * by ChainSafe Systems, 2018-${new Date().getFullYear()}`; ++ * by ChainSafe Systems, 2018-2024`; + const bottomBanner = `📖 For more information, check the CLI reference: + * https://chainsafe.github.io/lodestar/reference/cli + +Index: eth-node-lodestar-1.19.0/packages/cli/src/util/version.ts +=================================================================== +--- eth-node-lodestar-1.19.0.orig/packages/cli/src/util/version.ts ++++ eth-node-lodestar-1.19.0/packages/cli/src/util/version.ts +@@ -47,6 +47,13 @@ export function getVersionData(): { + if (!localVersion || !localVersion.includes(commitShort)) { + parts.push(commitShort); + } ++ }else { ++ const commitShort = process.env.GIT_COMMIT; ++ if (commitShort){ ++ parts.push(commitShort) ++ } else { ++ parts.push("c5b4c1c") ++ } + } + + return { +Index: eth-node-lodestar-1.19.0/packages/flare/src/cli.ts +=================================================================== +--- eth-node-lodestar-1.19.0.orig/packages/flare/src/cli.ts ++++ eth-node-lodestar-1.19.0/packages/flare/src/cli.ts +@@ -10,7 +10,7 @@ Flare is a sudden brief burst of bright + In the wrong hands, can lead people astray. + Use with care. + +- * by ChainSafe Systems, 2018-${new Date().getFullYear()}`; ++ * by ChainSafe Systems, 2018-2024`; + const bottomBanner = ` + ✍️ Give feedback and report issues on GitHub: + * https://github.com/ChainSafe/lodestar`; +Index: eth-node-lodestar-1.19.0/packages/prover/src/cli/cli.ts +=================================================================== +--- eth-node-lodestar-1.19.0.orig/packages/prover/src/cli/cli.ts ++++ eth-node-lodestar-1.19.0/packages/prover/src/cli/cli.ts +@@ -9,7 +9,7 @@ import {globalOptions} from "./options.j + const {version} = getVersionData(); + const topBanner = `🌟 Lodestar Prover Proxy: Ethereum RPC proxy for RPC responses, verified against the trusted block hashes. + * Version: ${version} +- * by ChainSafe Systems, 2018-${new Date().getFullYear()}`; ++ * by ChainSafe Systems, 2018-2024`; + const bottomBanner = `📖 For more information, check the CLI reference: + * https://chainsafe.github.io/lodestar/reference/cli + +Index: eth-node-lodestar-1.19.0/packages/prover/src/utils/version.ts +=================================================================== +--- eth-node-lodestar-1.19.0.orig/packages/prover/src/utils/version.ts ++++ eth-node-lodestar-1.19.0/packages/prover/src/utils/version.ts +@@ -37,6 +37,7 @@ export function getVersionData(): { + + const {branch, commit} = readAndGetGitData(); + ++ + // Add branch only if not present and not an ignore value + if (branch && !BRANCH_IGNORE.test(branch)) parts.push(branch); + +@@ -47,6 +48,13 @@ export function getVersionData(): { + if (!localVersion || !localVersion.includes(commitShort)) { + parts.push(commitShort); + } ++ } else { ++ const commitShort = process.env.GIT_COMMIT; ++ if (commitShort){ ++ parts.push(commitShort) ++ } else { ++ parts.push("c5b4c1c") ++ } + } + + return { diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/patches/series b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/patches/series new file mode 100644 index 000000000..622254a53 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/patches/series @@ -0,0 +1 @@ +001-fullyear.patch diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/rules b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/rules new file mode 100755 index 000000000..c6e99d2e7 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/rules @@ -0,0 +1,67 @@ +#!/usr/bin/make -f +export INSTALL_DIR=/usr/lib/eth-node-lodestar +# Let's see if this affects anything +export npm_config_local_prefix=/tmp +export GIT_COMMIT=191f2f0 + +%: + dh $@ + +override_dh_auto_test: + yarn test:unit + # TODO Enable docker tests, docker does not work under chroot, yet + # yarn test:e2e + yarn test:e2e:sim + # no need for lerna cache, also tests create these waste, remove them from package + rm -rf node_modules/.cache + find node_modules -type d -name ".nyc_output" -exec rm -rf {} + + find packages -type d -name ".nyc_output" -exec rm -rf {} + + find node_modules -type d -name ".vite" -exec rm -rf {} + + find packages -type d -name ".vite" -exec rm -rf {} + + +override_dh_strip: + # do not strip, as it encounters errors with prebuilds and electron + +override_dh_shlibdeps: + # calculate shared library dependencies, fails because of unneeded prebuilds for arm64 + +override_dh_auto_build: + yarn install --frozen-lockfile + ls -al /build + yarn build + ls -al + # no need for lerna cache + rm -rf node_modules/.cache + + # Makefiles not needed, for sure, so you can safely remove it + rm node_modules/bcrypto/build/Makefile + rm node_modules/bigint-buffer/build/Makefile + rm node_modules/c-kzg/build/Makefile + rm node_modules/cpu-features/build/Makefile + rm node_modules/ssh2/lib/protocol/crypto/build/Makefile + rm node_modules/c-kzg/build/kzg.target.mk + + # not sure what python3 is doing there, in those folders + rm node_modules/bcrypto/build/node_gyp_bins/python3 + rm node_modules/bigint-buffer/build/node_gyp_bins/python3 + rm node_modules/c-kzg/build/node_gyp_bins/python3 + rm node_modules/cpu-features/build/node_gyp_bins/python3 + rm node_modules/ssh2/lib/protocol/crypto/build/node_gyp_bins/python3 + + # Not sure about pycache, let's remove it + rm -rf node_modules/node-gyp/gyp/pylib/gyp/__pycache__ + rm -rf node_modules/node-gyp/gyp/pylib/gyp/generator/__pycache__ + chmod +x debian/lodestar + +override_dh_auto_install: + # This relies on make install script + # if there is no install script, you have to define your own rules + # dh_auto_install -- prefix=/usr + +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_dwz: + # skip of optimization of DWARF debug information in ELF binaries via dwz diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/source/lintian-overrides b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/source/lintian-overrides new file mode 100644 index 000000000..f4f63b2f2 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/source/lintian-overrides @@ -0,0 +1,6 @@ +eth-node-lodestar source: debian-rules-ignores-make-clean-error [debian/rules:64] +eth-node-lodestar source: missing-field-in-dep5-copyright Copyright [debian/copyright:13] + +eth-node-lodestar source: missing-license-paragraph-in-dep5-copyright lgpl-3.0+ [debian/copyright:10] + +eth-node-lodestar source: no-newline-at-end [debian/changelog] diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/control b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/control new file mode 100644 index 000000000..bd163e1ef --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/control @@ -0,0 +1,8 @@ +# These tests are run by autopkgtests + +Tests: tests +Depends: @, shunit2, which + +Tests: tests-with-node +Depends: @, shunit2, which, curl, ca-certificates +Restrictions:needs-root \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/tests b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/tests new file mode 100644 index 000000000..6c12e16d8 --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/tests @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +exec 2>&1 + +set -e + +test_binary_in_path(){ + output="$(which lodestar)" + assertEquals "/usr/bin/lodestar" "$output" +} + + + +. shunit2 \ No newline at end of file diff --git a/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/tests-with-node b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/tests-with-node new file mode 100644 index 000000000..80645769a --- /dev/null +++ b/releases/bookworm/amd64/eth-node-lodestar/1.25.0-1/src/debian/tests/tests-with-node @@ -0,0 +1,34 @@ +#!/usr/bin/env sh + +exec 2>&1 + +set -e + +cd /tmp +curl -o node.tar.gz -L https://nodejs.org/download/release/v20.12.2/node-v20.12.2-linux-x64.tar.gz +mkdir /usr/lib/node && tar -C /usr/lib/node -xzf node.tar.gz --strip-components=1 +ls -l /usr/lib/node/bin +ln -s /usr/lib/node/bin/node /usr/bin/node +ln -s /usr/lib/node/bin/npm /usr/bin/npm +ln -s /usr/lib/node/bin/npx /usr/bin/npx +ln -s /usr/lib/node/bin/corepack /usr/bin/corepack +node --version +npm --version + +test_binary_in_path(){ + output="$(which lodestar)" + assertEquals "/usr/bin/lodestar" "$output" +} + +test_invocation(){ + output="$(lodestar --version)" + echo "$output" + # tested against + # docker pull chainsafe/lodestar:v1.18.0 + # docker run chainsafe/lodestar:v1.18.0 --version + assertEquals "$output" "🌟 Lodestar: TypeScript Implementation of the Ethereum Consensus Beacon Chain. + * Version: v1.25.0/191f2f0 + * by ChainSafe Systems, 2018-2024" +} + +. shunit2 \ No newline at end of file