From a14fabc5d4d171cec40fd4fb72a72ad07fb4c4b1 Mon Sep 17 00:00:00 2001 From: Arne Petersen Date: Fri, 21 Feb 2020 07:36:55 +0100 Subject: [PATCH] Convert addons to non-legacy (#36) --- .maintenance/package.json | 5 +- .maintenance/src/commands/build.ts | 47 ++++ .maintenance/src/commands/run.ts | 89 ++++++++ .maintenance/src/commands/update.ts | 155 +++++++++++++ .maintenance/src/index.ts | 206 +++--------------- .maintenance/src/manager.ts | 75 +++++++ .maintenance/yarn.lock | 40 ++++ emby/CHANGELOG.md | 5 + emby/Dockerfile | 24 +- emby/build.json | 10 +- emby/config.json | 4 +- emby/root/etc/cont-init.d/00-ha-env | 5 + hydra2/CHANGELOG.md | 4 + hydra2/Dockerfile | 14 ++ hydra2/config.json | 4 +- hydra2/root/etc/cont-init.d/00-ha-env | 5 + jackett/CHANGELOG.md | 5 + jackett/Dockerfile | 11 + jackett/build.json | 8 +- jackett/config.json | 4 +- jackett/root/etc/cont-init.d/00-ha-env | 5 + jellyfin/CHANGELOG.md | 7 +- jellyfin/Dockerfile | 22 ++ jellyfin/build.json | 10 +- jellyfin/config.json | 4 +- jellyfin/root/etc/cont-init.d/00-ha-env | 5 + nzbget/CHANGELOG.md | 3 + nzbget/Dockerfile | 15 ++ nzbget/build.json | 8 +- nzbget/config.json | 4 +- nzbget/root/etc/cont-init.d/00-ha-env | 5 + radarr/CHANGELOG.md | 6 +- radarr/Dockerfile | 11 + radarr/config.json | 4 +- radarr/root/etc/cont-init.d/00-ha-env | 5 + sonarr/CHANGELOG.md | 5 + sonarr/Dockerfile | 11 + sonarr/build.json | 10 +- sonarr/config.json | 4 +- sonarr/root/etc/cont-init.d/00-ha-env | 5 + transmission-magnet-redirect/CHANGELOG.md | 4 + transmission-magnet-redirect/Dockerfile | 40 +++- transmission-magnet-redirect/config.json | 4 +- .../root/etc/cont-init.d/00-ha-env | 5 + .../transmission-magnet-redirect/finish | 6 + .../transmission-magnet-redirect/run | 6 + transmission-openvpn/CHANGELOG.md | 4 + transmission-openvpn/Dockerfile | 11 + transmission-openvpn/config.json | 4 +- transmission-openvpn/root/customstart.sh | 6 +- znc/CHANGELOG.md | 4 + znc/Dockerfile | 16 ++ znc/build.json | 8 +- znc/config.json | 4 +- znc/root/etc/cont-init.d/00-ha-env | 5 + 55 files changed, 767 insertions(+), 229 deletions(-) create mode 100644 .maintenance/src/commands/build.ts create mode 100644 .maintenance/src/commands/run.ts create mode 100644 .maintenance/src/commands/update.ts create mode 100644 .maintenance/src/manager.ts create mode 100644 emby/root/etc/cont-init.d/00-ha-env create mode 100644 hydra2/root/etc/cont-init.d/00-ha-env create mode 100644 jackett/root/etc/cont-init.d/00-ha-env create mode 100644 jellyfin/root/etc/cont-init.d/00-ha-env create mode 100644 nzbget/CHANGELOG.md create mode 100644 nzbget/root/etc/cont-init.d/00-ha-env create mode 100644 radarr/root/etc/cont-init.d/00-ha-env create mode 100644 sonarr/root/etc/cont-init.d/00-ha-env create mode 100644 transmission-magnet-redirect/root/etc/cont-init.d/00-ha-env create mode 100644 transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/finish create mode 100644 transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/run create mode 100644 znc/root/etc/cont-init.d/00-ha-env diff --git a/.maintenance/package.json b/.maintenance/package.json index 77cad7d1d..a8010c8db 100644 --- a/.maintenance/package.json +++ b/.maintenance/package.json @@ -4,20 +4,23 @@ "main": "src/index.ts", "license": "MIT", "scripts": { - "start": "ts-node src/index.ts" + "start": "cross-env-shell ts-node src/index.ts" }, "devDependencies": { + "@types/cross-spawn": "^6.0.1", "@types/fs-extra-promise": "^1.0.8", "@types/node": "^12.0.4", "@types/request-promise": "^4.1.44", "@types/semver": "^6.0.0", "@types/yargs": "^13.0.0", + "cross-env": "^7.0.0", "ts-node": "^8.2.0", "typescript": "^3.5.1" }, "dependencies": { "@types/chalk": "^2.2.0", "chalk": "^2.4.2", + "cross-spawn": "^7.0.1", "fs-extra-promise": "^1.0.1", "request": "^2.88.0", "request-promise": "^4.2.4", diff --git a/.maintenance/src/commands/build.ts b/.maintenance/src/commands/build.ts new file mode 100644 index 000000000..c5b6a4f9c --- /dev/null +++ b/.maintenance/src/commands/build.ts @@ -0,0 +1,47 @@ +import * as path from "path"; +import * as spawn from "cross-spawn"; +import { Manager } from "../manager"; + +export async function build(manager: Manager, opts: any) +{ + const addon = opts.addon; + const config = await manager.getAddonConfig(addon); + + if (!opts.arch) + { + opts.arch = config.arch.map(x => `--${x}`); + } + else if(!Array.isArray(opts.arch)) + { + opts.arch = [opts.arch]; + } + + let args = [ + "run", + "--rm", + "--privileged", + "-v", + "//var/run/docker.sock:/var/run/docker.sock:rw", + "-v", + `${path.resolve(manager.rootDir)}:/data:ro`, + "--name", + "ha-builder", + "homeassistant/amd64-builder:latest", + "--addon", + ...opts.arch, + "--test", + "-t", + `/data/${addon}` + ]; + + if (!opts.nocheck) + { + args = args.concat([ + "--docker-hub", + "petersendev", + "--docker-hub-check" + ]); + } + + const result = spawn.sync("docker", args, { stdio: 'inherit' }); +} \ No newline at end of file diff --git a/.maintenance/src/commands/run.ts b/.maintenance/src/commands/run.ts new file mode 100644 index 000000000..8cf7f3c71 --- /dev/null +++ b/.maintenance/src/commands/run.ts @@ -0,0 +1,89 @@ +import * as fs from "fs-extra-promise"; +import * as path from "path"; +import { Manager } from "../manager"; +import { build } from "./build"; +import * as spawn from "cross-spawn"; +import { ChildProcess } from "child_process"; + +export async function run(manager: Manager, opts: any) +{ + const addon = opts.addon; + + const addonPath = manager.getAddonPath(addon); + const addonTmpPath = manager.getAddonTmpPath(addon); + + if (!await fs.existsAsync(addonPath)) + { + console.error(`addon ${addon} not found`); + process.exit(1); + } + + const config = await manager.getAddonConfig(addon); + + const shareTmpPath = path.join(addonTmpPath, "share"); + const configTmpPath = path.join(addonTmpPath, "config"); + const dataTmpPath = path.join(addonTmpPath, "data"); + const optionsFilePath = path.join(dataTmpPath, "options.json"); + + if (opts.clean) + { + await fs.removeAsync(addonTmpPath); + } + + await fs.ensureDirAsync(shareTmpPath); + await fs.ensureDirAsync(configTmpPath); + await fs.ensureDirAsync(dataTmpPath); + + if (!await fs.existsAsync(optionsFilePath)) + { + await fs.writeJSONAsync(optionsFilePath, config.options); + } + + const ports = []; + for (let p in config.ports) + { + ports.push(config.ports[p]); + } + + if (!opts.nobuild) + { + console.log("building image(s)"); + await build(manager, { addon, nocheck: true, arch: "--amd64" }); + } + + let args = + [ + "run", + "--rm", + "-v", + `${path.resolve(shareTmpPath)}:/share`, + "-v", + `${path.resolve(configTmpPath)}:/config`, + "-v", + `${path.resolve(dataTmpPath)}:/data`, + ...[].concat(...ports.map(x => ["-p", `${x}:${x}`])), + "--name", + addon, + `petersendev/hassio-${addon}-amd64:latest` + ]; + + let child: ChildProcess; + + function exit(signal: string) + { + if (child) + { + console.log(`killing process (${signal})`); + child.kill(signal); + } + + console.log("stopping container for reuse"); + spawn.sync("docker", ["stop", addon], { stdio: 'inherit' }); + console.log("exiting"); + process.exit(0); + } + + process.on('SIGINT', exit); + + child = spawn("docker", args, { stdio: 'inherit' }); +} \ No newline at end of file diff --git a/.maintenance/src/commands/update.ts b/.maintenance/src/commands/update.ts new file mode 100644 index 000000000..7bb28534d --- /dev/null +++ b/.maintenance/src/commands/update.ts @@ -0,0 +1,155 @@ +import * as fs from "fs-extra-promise"; +import * as path from "path"; +import * as request from "request-promise"; +import chalk from "chalk"; +import * as semver from "semver"; +import { Manager } from "../manager"; + +export async function update(manager: Manager, opts: { patch: boolean }) +{ + let first = true; + let updated = false; + for (const addon of await manager.getAddonDirs()) + { + if (!first) + { + console.log(chalk.gray("=============================================================")); + } + else + { + first = false; + } + + const configPath = manager.getConfigPath(addon); + const buildJsonPath = manager.getBuildJsonPath(addon); + + const config = await fs.readJSONAsync(configPath); + let version = semver.valid(config.version); + if (!version) + { + console.log(chalk.redBright(`version format for addon ${chalk.blue(addon)} not supported: ${config.version}`)); + continue; + } + + console.log(`loaded ${chalk.blue(addon)} ${chalk.cyanBright(version)}`); + + if (!config.maintenance || !config.maintenance.github_release) + { + console.log(chalk.yellow("no valid maintenance section found, skipping")); + continue; + } + + const versionRegex = config.maintenance.version_regex ? new RegExp(config.maintenance.version_regex) : null; + const releaseRegex = config.maintenance.release_regex ? new RegExp(config.maintenance.release_regex) : null; + + const addonPath = manager.getAddonPath(addon); + const dockerFilePath = path.join(addonPath, "Dockerfile"); + + let image: string; + let tag: string; + let dockerFile: string; + + const build_json = (await fs.existsAsync(buildJsonPath)) ? await fs.readJSONAsync(buildJsonPath) : null; + + if (!build_json) + { + dockerFile = (await fs.readFileAsync(dockerFilePath)).toString(); + const dockerBaseImageLine = dockerFile.split("\n")[0]; + const parts = dockerBaseImageLine.split(":"); + image = parts[0].replace("FROM ", ""); + tag = parts[1]; + } + else + { + image = build_json.build_from_template.image; + tag = build_json.build_from_template.version; + } + + const releaseInfo = await request({ + uri: `${config.maintenance.github_release}/releases/latest`, + json: true + }); + + let coloredTag = tag; + let appVersion = ""; + if (versionRegex) + { + const r = versionRegex.exec(tag); + if (r && r.length > 1) + { + appVersion = r[1]; + coloredTag = tag.replace(appVersion, chalk.yellowBright(appVersion)); + } + } + + if (releaseRegex) + { + const r = releaseRegex.exec(releaseInfo.tag_name); + if (r && r.length > 1) + { + releaseInfo.tag_name = r[1]; + } + } + + if (tag == releaseInfo.tag_name) + { + //TODO: different output for build.json usage + console.log(chalk.greenBright(`base image ${image}:${chalk.magenta(coloredTag)} is up-to-date`)) + } + else + { + let newAppVersion = ""; + let newColoredTag = releaseInfo.tag_name; + if (versionRegex) + { + const nr = versionRegex.exec(releaseInfo.tag_name); + if (nr && nr.length > 1) + { + newAppVersion = nr[1]; + newColoredTag = newColoredTag.replace(newAppVersion, chalk.yellowBright(newAppVersion)); + } + } + + let minorUpgrade = appVersion && newAppVersion && appVersion != newAppVersion; + + if (!opts.patch && !minorUpgrade) + { + console.log(chalk.gray(`ignoring patch for ${image}:${chalk.magenta(coloredTag)} to ${image}:${chalk.magenta(newColoredTag)}`)) + } + else + { + if (!build_json) + { + console.log(chalk.yellowBright(`updating base image from ${image}:${chalk.magenta(coloredTag)} to ${image}:${chalk.magenta(newColoredTag)}`)); + await fs.writeFileAsync(dockerFilePath, dockerFile.replace(`${image}:${tag}`, `${image}:${releaseInfo.tag_name}`)); + } + else + { + console.log(chalk.yellowBright(`updating base images in build.json from ${image}:{arch}-${chalk.magenta(coloredTag)} to ${image}:{arch}-${chalk.magenta(newColoredTag)}`)); + build_json.build_from_template.version = releaseInfo.tag_name; + for (let arch in build_json.build_from) + { + build_json.build_from[arch] = build_json.build_from[arch].replace(tag, releaseInfo.tag_name); + } + await fs.writeJSONAsync(buildJsonPath, build_json, { spaces: 4 }); + } + + const newVersion = semver.inc(version, minorUpgrade ? "minor" : "patch"); + console.log(chalk.yellow(`bumping version from ${chalk.cyanBright(version)} to ${chalk.cyanBright(newVersion)}`)); + config.version = newVersion; + await fs.writeJSONAsync(configPath, config); + + // await manager.appendChangelog(addon, `## ${newVersion}\n\n - ${minorUpgrade ? + // `Update ${config.name} to ${newAppVersion} (${image}:${releaseInfo.tag_name})` : + // `Update base image to ${image}:${releaseInfo.tag_name}`}`); + + await manager.appendChangelog(addon, newVersion, minorUpgrade ? + `Update ${config.name} to ${newAppVersion} (${image}:${releaseInfo.tag_name})` : + `Update base image to ${image}:${releaseInfo.tag_name}`); + + + updated = true; + } + } + } +}; \ No newline at end of file diff --git a/.maintenance/src/index.ts b/.maintenance/src/index.ts index fa54fa19d..1554931c3 100644 --- a/.maintenance/src/index.ts +++ b/.maintenance/src/index.ts @@ -1,183 +1,39 @@ -import * as fs from "fs-extra-promise"; -import * as path from "path"; -import * as request from "request-promise"; -import chalk from "chalk"; -import * as semver from "semver"; import * as yargs from "yargs"; +import { Manager } from "./manager"; +import { update } from "./commands/update"; +import { run } from "./commands/run"; +import { build } from "./commands/build"; +const manager = new Manager(); const argv = yargs - .option("patch", { - alias: "p", - default: false + .command(["update", "$0"], "performs addon updates", (args) => + { + return args + .option("patch", { + alias: "p", + default: false, + boolean: true + }); + }, (opts) => + { + update(manager, opts); }) + .command("run ", "runs an addon", (argv) => + argv + .option("clean", { alias: "c", default: false, boolean: true }) + .option("nobuild", { alias: "n", default: false, boolean: true }), + (opts) => + { + run(manager, opts); + }) + .command("build ", "builds an addon", (argv) => + argv + .option("nocheck", { alias: "n", default: false, boolean: true }), + (opts) => + { + build(manager, opts); + }) .argv; -async function run(opts: { patch: boolean }) -{ - const root = ".."; - let dirs = await fs.readdirAsync(root); - dirs = dirs.filter((source) => !source.startsWith(".") && (fs.lstatSync(path.join(root, source))).isDirectory()); - - let first = true; - let updated = false; - for (const addon of dirs) - { - if (addon === "tmp") - { - continue; - } - - if (!first) - { - console.log(chalk.gray("=============================================================")); - } - else - { - first = false; - } - - const configPath = path.join(root, addon, "config.json"); - const buildJsonPath = path.join(root, addon, "build.json"); - const config = await fs.readJSONAsync(configPath); - let version = semver.valid(config.version); - if (!version) - { - console.log(chalk.redBright(`version format for addon ${chalk.blue(addon)} not supported: ${config.version}`)); - continue; - } - - console.log(`loaded ${chalk.blue(addon)} ${chalk.cyanBright(version)}`); - - if (!config.maintenance || !config.maintenance.github_release) - { - console.log(chalk.yellow("no valid maintenance section found, skipping")); - continue; - } - - const versionRegex = config.maintenance.version_regex ? new RegExp(config.maintenance.version_regex) : null; - const releaseRegex = config.maintenance.release_regex ? new RegExp(config.maintenance.release_regex) : null; - - const addonPath = path.join(root, addon); - const changelogPath = path.join(addonPath, "CHANGELOG.md"); - const dockerFilePath = path.join(addonPath, "Dockerfile"); - - let image: string; - let tag: string; - let dockerFile: string; - - const build_json = (await fs.existsAsync(buildJsonPath)) ? await fs.readJSONAsync(buildJsonPath) : null; - - if (!build_json) - { - dockerFile = (await fs.readFileAsync(dockerFilePath)).toString(); - const dockerBaseImageLine = dockerFile.split("\n")[0]; - const parts = dockerBaseImageLine.split(":"); - image = parts[0].replace("FROM ", ""); - tag = parts[1]; - } - else - { - image = build_json.build_from_template.image; - tag = build_json.build_from_template.version; - } - - const releaseInfo = await request({ - uri: `${config.maintenance.github_release}/releases/latest`, - json: true - }); - - let coloredTag = tag; - let appVersion = ""; - if (versionRegex) - { - const r = versionRegex.exec(tag); - if (r && r.length > 1) - { - appVersion = r[1]; - coloredTag = tag.replace(appVersion, chalk.yellowBright(appVersion)); - } - } - - if (releaseRegex) - { - const r = releaseRegex.exec(releaseInfo.tag_name); - if (r && r.length > 1) - { - releaseInfo.tag_name = r[1]; - } - } - - if (tag == releaseInfo.tag_name) - { - //TODO: different output for build.json usage - console.log(chalk.greenBright(`base image ${image}:${chalk.magenta(coloredTag)} is up-to-date`)) - } - else - { - let newAppVersion = ""; - let newColoredTag = releaseInfo.tag_name; - if (versionRegex) - { - const nr = versionRegex.exec(releaseInfo.tag_name); - if (nr && nr.length > 1) - { - newAppVersion = nr[1]; - newColoredTag = newColoredTag.replace(newAppVersion, chalk.yellowBright(newAppVersion)); - } - } - - let minorUpgrade = appVersion && newAppVersion && appVersion != newAppVersion; - - if (!opts.patch && !minorUpgrade) - { - console.log(chalk.gray(`ignoring patch for ${image}:${chalk.magenta(coloredTag)} to ${image}:${chalk.magenta(newColoredTag)}`)) - } - else - { - if (!build_json) - { - console.log(chalk.yellowBright(`updating base image from ${image}:${chalk.magenta(coloredTag)} to ${image}:${chalk.magenta(newColoredTag)}`)); - await fs.writeFileAsync(dockerFilePath, dockerFile.replace(`${image}:${tag}`, `${image}:${releaseInfo.tag_name}`)); - } - else - { - console.log(chalk.yellowBright(`updating base images in build.json from ${image}:{arch}-${chalk.magenta(coloredTag)} to ${image}:{arch}-${chalk.magenta(newColoredTag)}`)); - build_json.build_from_template.version = releaseInfo.tag_name; - for (let arch in build_json.build_from) - { - build_json.build_from[arch] = build_json.build_from[arch].replace(tag, releaseInfo.tag_name); - } - await fs.writeJSONAsync(buildJsonPath, build_json, { spaces: 4 }); - } - - const newVersion = semver.inc(version, minorUpgrade ? "minor" : "patch"); - console.log(chalk.yellow(`bumping version from ${chalk.cyanBright(version)} to ${chalk.cyanBright(newVersion)}`)); - config.version = newVersion; - await fs.writeJSONAsync(configPath, config); - - let oldChangelog = ""; - if (await fs.existsAsync(changelogPath)) - { - oldChangelog = (await fs.readFileAsync(changelogPath)).toString(); - } - - let changelog = `## ${newVersion}\n\n - ${minorUpgrade ? - `Update ${config.name} to ${newAppVersion} (${image}:${releaseInfo.tag_name})` : - `Update base image to ${image}:${releaseInfo.tag_name}`}`; - - if (oldChangelog) - { - changelog += `\n\n${oldChangelog}`; - } - - await fs.writeFileAsync(changelogPath, changelog); - - updated = true; - } - } - } -}; - -run(argv); \ No newline at end of file diff --git a/.maintenance/src/manager.ts b/.maintenance/src/manager.ts new file mode 100644 index 000000000..87832643e --- /dev/null +++ b/.maintenance/src/manager.ts @@ -0,0 +1,75 @@ +import * as fs from "fs-extra-promise"; +import * as path from "path"; + +export class Manager +{ + public rootDir = ".."; + public tmpDir = "tmp"; + + async getAddonDirs() + { + let dirs = await fs.readdirAsync(this.rootDir); + + return dirs.filter((source) => !source.startsWith(".") && source != this.tmpDir && (fs.lstatSync(path.join(this.rootDir, source))).isDirectory()); + } + + getAddonPath(addon: string) + { + return path.join(this.rootDir, addon); + } + + async getAddonConfig(addon:string) + { + return await fs.readJSONAsync(this.getConfigPath(addon)); + } + + getAddonTmpPath(addon: string) + { + return path.join(this.rootDir, this.tmpDir, addon); + } + + getConfigPath(addon: string) + { + return path.join(this.getAddonPath(addon), "config.json"); + } + + getBuildJsonPath(addon: string) + { + return path.join(this.getAddonPath(addon), "build.json"); + } + + getChangelogPath(addon: string) + { + return path.join(this.getAddonPath(addon), "CHANGELOG.md"); + } + + async appendChangelog(addon: string, version: string, content: string | string[]) + { + if (!Array.isArray(content)) + { + content = [content]; + } + + const changelogPath = this.getChangelogPath(addon); + + let oldChangelog = ""; + + if (await fs.existsAsync(changelogPath)) + { + oldChangelog = (await fs.readFileAsync(changelogPath)).toString(); + } + + let changelog = `## ${version}\n\n`; + content.forEach(line => + { + changelog += ` - ${line}\n`; + }); + + if (oldChangelog) + { + changelog += `\n${oldChangelog}`; + } + + await fs.writeFileAsync(changelogPath, changelog); + } +} \ No newline at end of file diff --git a/.maintenance/yarn.lock b/.maintenance/yarn.lock index 893364249..c8f554020 100644 --- a/.maintenance/yarn.lock +++ b/.maintenance/yarn.lock @@ -16,6 +16,12 @@ dependencies: chalk "*" +"@types/cross-spawn@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@types/cross-spawn/-/cross-spawn-6.0.1.tgz#60fa0c87046347c17d9735e5289e72b804ca9b63" + dependencies: + "@types/node" "*" + "@types/form-data@*": version "2.2.1" resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" @@ -177,6 +183,12 @@ core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cross-env@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.0.tgz#5a3b2ddce51ec713ea58f2fb79ce22e65b4f5479" + dependencies: + cross-spawn "^7.0.1" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -187,6 +199,14 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -501,6 +521,10 @@ path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -602,10 +626,20 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -729,6 +763,12 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + dependencies: + isexe "^2.0.0" + wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" diff --git a/emby/CHANGELOG.md b/emby/CHANGELOG.md index b76b66596..64876cba7 100644 --- a/emby/CHANGELOG.md +++ b/emby/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.0 + + - not a legacy addon anymore + - Update base image to linuxserver/emby:4.3.1.0-ls31 + ## 0.1.0 - emby to 4.3.1.0 (linuxserver/emby:4.3.1.0-ls26) \ No newline at end of file diff --git a/emby/Dockerfile b/emby/Dockerfile index 8d59622d2..aec4f8ce3 100644 --- a/emby/Dockerfile +++ b/emby/Dockerfile @@ -2,11 +2,31 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN apt-get update \ + \ + && apt-get install -y --no-install-recommends \ + jq=1.5+dfsg-2 \ + \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr \ + /tmp/* \ + /var/{cache,log}/* \ + /var/lib/apt/lists/* + RUN sed -i "s|/config|/emby|g" /etc/services.d/emby/run \ && sed -i "s|/config|/emby|g" /etc/cont-init.d/30-config -RUN cat /etc/services.d/emby/run - # copy local files COPY root/ / diff --git a/emby/build.json b/emby/build.json index ff651c0dd..59bbeba4a 100644 --- a/emby/build.json +++ b/emby/build.json @@ -1,13 +1,13 @@ { "build_from_template": { "image": "linuxserver/emby", - "version": "4.3.1.0-ls26" + "version": "4.3.1.0-ls31" }, "build_from": { - "armhf": "linuxserver/emby:arm32v7-4.3.1.0-ls26", - "aarch64": "linuxserver/emby:arm64v8-4.3.1.0-ls26", - "amd64": "linuxserver/emby:amd64-4.3.1.0-ls26" + "armhf": "linuxserver/emby:arm32v7-4.3.1.0-ls31", + "aarch64": "linuxserver/emby:arm64v8-4.3.1.0-ls31", + "amd64": "linuxserver/emby:amd64-4.3.1.0-ls31" }, "squash": false, "args": {} -} \ No newline at end of file +} diff --git a/emby/config.json b/emby/config.json index d9ff8cf3e..1595a9b37 100644 --- a/emby/config.json +++ b/emby/config.json @@ -1,8 +1,8 @@ { "name": "emby", - "version": "0.1.0", + "version": "0.2.0", "slug": "emby", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-emby", "version_regex": "(\\d+\\.\\d+\\.\\d+.\\d+)-(ls\\d+)" diff --git a/emby/root/etc/cont-init.d/00-ha-env b/emby/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/emby/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/hydra2/CHANGELOG.md b/hydra2/CHANGELOG.md index f431c0e01..de4edcb8c 100644 --- a/hydra2/CHANGELOG.md +++ b/hydra2/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.12.0 + + - not a legacy addon anymore + ## 0.11.0 - Update hydra2 to 2.13.14 (linuxserver/hydra2:v2.13.14-ls59) diff --git a/hydra2/Dockerfile b/hydra2/Dockerfile index 7f959ac64..2a89f0858 100644 --- a/hydra2/Dockerfile +++ b/hydra2/Dockerfile @@ -2,6 +2,20 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr /tmp/* + # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/hydra2|g" /etc/services.d/nzbhydra2/run \ && sed -i "s|/config|/config/hydra2|g" /etc/cont-init.d/30-config + +# copy local files +COPY root/ / \ No newline at end of file diff --git a/hydra2/config.json b/hydra2/config.json index 211dad984..4d4dcef0c 100644 --- a/hydra2/config.json +++ b/hydra2/config.json @@ -1,8 +1,8 @@ { "name": "hydra2", - "version": "0.11.1", + "version": "0.12.0", "slug": "hydra2", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-hydra2", "version_regex": "v(\\d+\\.\\d+\\.\\d+)-(ls\\d+)" diff --git a/hydra2/root/etc/cont-init.d/00-ha-env b/hydra2/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/hydra2/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/jackett/CHANGELOG.md b/jackett/CHANGELOG.md index 3e7fe8de2..408714a81 100644 --- a/jackett/CHANGELOG.md +++ b/jackett/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.0 + + - not a legacy addon anymore + - Update jackett to 0.13.144 (linuxserver/jackett:v0.13.144-ls55) + ## 0.3.0 - Update jackett to 0.13.127 (linuxserver/jackett:v0.13.127-ls54) diff --git a/jackett/Dockerfile b/jackett/Dockerfile index 757dbfcbd..7d5d99310 100644 --- a/jackett/Dockerfile +++ b/jackett/Dockerfile @@ -2,6 +2,17 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr /tmp/* + # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/jackett|g" /etc/cont-init.d/30-config diff --git a/jackett/build.json b/jackett/build.json index 36123748e..1f724550c 100644 --- a/jackett/build.json +++ b/jackett/build.json @@ -1,12 +1,12 @@ { "build_from_template": { "image": "linuxserver/jackett", - "version": "v0.13.127-ls54" + "version": "v0.13.144-ls55" }, "build_from": { - "armhf": "linuxserver/jackett:arm32v7-v0.13.127-ls54", - "aarch64": "linuxserver/jackett:arm64v8-v0.13.127-ls54", - "amd64": "linuxserver/jackett:amd64-v0.13.127-ls54" + "armhf": "linuxserver/jackett:arm32v7-v0.13.144-ls55", + "aarch64": "linuxserver/jackett:arm64v8-v0.13.144-ls55", + "amd64": "linuxserver/jackett:amd64-v0.13.144-ls55" }, "squash": false, "args": {} diff --git a/jackett/config.json b/jackett/config.json index 15255a294..fe11cdb64 100644 --- a/jackett/config.json +++ b/jackett/config.json @@ -1,8 +1,8 @@ { "name": "jackett", - "version": "0.3.1", + "version": "0.4.0", "slug": "jackett", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-jackett", "version_regex": "v(\\d+\\.\\d+\\.\\d+)-(ls\\d+)" diff --git a/jackett/root/etc/cont-init.d/00-ha-env b/jackett/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/jackett/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/jellyfin/CHANGELOG.md b/jellyfin/CHANGELOG.md index 56f6fd76a..9c0d88396 100644 --- a/jellyfin/CHANGELOG.md +++ b/jellyfin/CHANGELOG.md @@ -1,4 +1,9 @@ -## 0.2.0 +## 0.3.0 + + - not a legacy addon anymore + - Update base image to linuxserver/jellyfin:v10.4.3-ls36 + + ## 0.2.0 - Update jellyfin to 10.4.3 (linuxserver/jellyfin:v10.4.3-ls29) diff --git a/jellyfin/Dockerfile b/jellyfin/Dockerfile index b034f5782..df15b6431 100644 --- a/jellyfin/Dockerfile +++ b/jellyfin/Dockerfile @@ -2,6 +2,28 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN apt-get update \ + \ + && apt-get install -y --no-install-recommends \ + jq=1.5+dfsg-2 \ + \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr \ + /tmp/* \ + /var/{cache,log}/* \ + /var/lib/apt/lists/* + RUN sed -i "s|/config/data|/share/jellyfin/data|g" /etc/services.d/jellyfin/run \ && sed -i "s|/config/log|/share/jellyfin/log|g" /etc/services.d/jellyfin/run \ && sed -i "s|/config/cache|/share/jellyfin/cache|g" /etc/services.d/jellyfin/run \ diff --git a/jellyfin/build.json b/jellyfin/build.json index 6d7f5dcbb..bdfc8a136 100644 --- a/jellyfin/build.json +++ b/jellyfin/build.json @@ -1,13 +1,13 @@ { "build_from_template": { "image": "linuxserver/jellyfin", - "version": "v10.4.3-ls29" + "version": "v10.4.3-ls36" }, "build_from": { - "armhf": "linuxserver/jellyfin:arm32v7-v10.4.3-ls29", - "aarch64": "linuxserver/jellyfin:arm64v8-v10.4.3-ls29", - "amd64": "linuxserver/jellyfin:amd64-v10.4.3-ls29" + "armhf": "linuxserver/jellyfin:arm32v7-v10.4.3-ls36", + "aarch64": "linuxserver/jellyfin:arm64v8-v10.4.3-ls36", + "amd64": "linuxserver/jellyfin:amd64-v10.4.3-ls36" }, "squash": false, "args": {} -} \ No newline at end of file +} diff --git a/jellyfin/config.json b/jellyfin/config.json index 2fabcaafc..65b41a201 100644 --- a/jellyfin/config.json +++ b/jellyfin/config.json @@ -1,8 +1,8 @@ { "name": "jellyfin", - "version": "0.2.0", + "version": "0.3.0", "slug": "jellyfin", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-jellyfin", "version_regex": "v(\\d+\\.\\d+\\.\\d+)-(ls\\d+)" diff --git a/jellyfin/root/etc/cont-init.d/00-ha-env b/jellyfin/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/jellyfin/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/nzbget/CHANGELOG.md b/nzbget/CHANGELOG.md new file mode 100644 index 000000000..48b98026a --- /dev/null +++ b/nzbget/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.2.0 + + - not a legacy addon anymore \ No newline at end of file diff --git a/nzbget/Dockerfile b/nzbget/Dockerfile index af6b27053..5adf73722 100644 --- a/nzbget/Dockerfile +++ b/nzbget/Dockerfile @@ -2,6 +2,21 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN apk add --no-cache \ + jq=1.6-r0 \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.8.0.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + \ + && rm -f -r \ + /tmp/* + # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/nzbget|g" /etc/services.d/nzbget/run \ && sed -i "s|/config|/config/nzbget|g" /etc/cont-init.d/30-config \ diff --git a/nzbget/build.json b/nzbget/build.json index ad716460f..178f25104 100644 --- a/nzbget/build.json +++ b/nzbget/build.json @@ -1,12 +1,12 @@ { "build_from_template": { "image": "linuxserver/nzbget", - "version": "v21.0-ls16" + "version": "v21.0-ls41" }, "build_from": { - "armhf": "linuxserver/nzbget:arm32v7-v21.0-ls16", - "aarch64": "linuxserver/nzbget:arm64v8-v21.0-ls16", - "amd64": "linuxserver/nzbget:amd64-v21.0-ls16" + "armhf": "linuxserver/nzbget:arm32v7-v21.0-ls41", + "aarch64": "linuxserver/nzbget:arm64v8-v21.0-ls41", + "amd64": "linuxserver/nzbget:amd64-v21.0-ls41" }, "squash": false, "args": {} diff --git a/nzbget/config.json b/nzbget/config.json index 2c42eeac3..6bc0a091e 100644 --- a/nzbget/config.json +++ b/nzbget/config.json @@ -1,8 +1,8 @@ { "name": "nzbget", - "version": "0.1.2", + "version": "0.2.0", "slug": "nzbget", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-nzbget", "version_regex": "v(\\d+\\.\\d+\\.?\\d*)-(ls\\d+)" diff --git a/nzbget/root/etc/cont-init.d/00-ha-env b/nzbget/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/nzbget/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/radarr/CHANGELOG.md b/radarr/CHANGELOG.md index 8c959adb6..1fca2007e 100644 --- a/radarr/CHANGELOG.md +++ b/radarr/CHANGELOG.md @@ -1,4 +1,8 @@ -## 0.4.0 +## 0.5.0 + + - not a legacy addon anymore + + ## 0.4.0 - Update radarr to 0.2.0.1480 (linuxserver/radarr:v0.2.0.1480-ls51) diff --git a/radarr/Dockerfile b/radarr/Dockerfile index 365af0bf9..f7425a738 100644 --- a/radarr/Dockerfile +++ b/radarr/Dockerfile @@ -2,6 +2,17 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr /tmp/* + # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/radarr|g" /etc/services.d/radarr/run \ && sed -i "s|/config|/config/radarr|g" /etc/cont-init.d/30-config diff --git a/radarr/config.json b/radarr/config.json index ac35c09dc..43baf9bc8 100644 --- a/radarr/config.json +++ b/radarr/config.json @@ -1,8 +1,8 @@ { "name": "radarr", - "version": "0.4.1", + "version": "0.5.0", "slug": "radarr", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-radarr", "version_regex": "v(\\d+\\.\\d+\\.\\d+\\.\\d+)-(ls\\d+)" diff --git a/radarr/root/etc/cont-init.d/00-ha-env b/radarr/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/radarr/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/sonarr/CHANGELOG.md b/sonarr/CHANGELOG.md index bd610588d..819e93a41 100644 --- a/sonarr/CHANGELOG.md +++ b/sonarr/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.0 + + - not a legacy addon anymore + - Update base image to linuxserver/sonarr:2.0.0.5338-ls50 + ## 0.2.2 - set snapshot_exclude for logs and MediaCover diff --git a/sonarr/Dockerfile b/sonarr/Dockerfile index ea22b70b8..6279396de 100644 --- a/sonarr/Dockerfile +++ b/sonarr/Dockerfile @@ -2,6 +2,17 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr /tmp/* + # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/sonarr|g" /etc/services.d/sonarr/run \ && sed -i "s|/config|/config/sonarr|g" /etc/cont-init.d/30-config diff --git a/sonarr/build.json b/sonarr/build.json index 046117204..9d1fb445c 100644 --- a/sonarr/build.json +++ b/sonarr/build.json @@ -1,13 +1,13 @@ { "build_from_template": { "image": "linuxserver/sonarr", - "version": "2.0.0.5338-ls31" + "version": "2.0.0.5338-ls50" }, "build_from": { - "armhf": "linuxserver/sonarr:arm32v7-2.0.0.5338-ls31", - "aarch64": "linuxserver/sonarr:arm64v8-2.0.0.5338-ls31", - "amd64": "linuxserver/sonarr:amd64-2.0.0.5338-ls31" + "armhf": "linuxserver/sonarr:arm32v7-2.0.0.5338-ls50", + "aarch64": "linuxserver/sonarr:arm64v8-2.0.0.5338-ls50", + "amd64": "linuxserver/sonarr:amd64-2.0.0.5338-ls50" }, "squash": false, "args": {} -} \ No newline at end of file +} diff --git a/sonarr/config.json b/sonarr/config.json index c99318997..b1f1c2899 100644 --- a/sonarr/config.json +++ b/sonarr/config.json @@ -1,8 +1,8 @@ { "name": "sonarr", - "version": "0.2.2", + "version": "0.3.0", "slug": "sonarr", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-sonarr", "version_regex": "(\\d+\\.\\d+\\.\\d+\\.\\d+)-(ls\\d+)" diff --git a/sonarr/root/etc/cont-init.d/00-ha-env b/sonarr/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/sonarr/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/transmission-magnet-redirect/CHANGELOG.md b/transmission-magnet-redirect/CHANGELOG.md index 3bbae8766..029714ef0 100644 --- a/transmission-magnet-redirect/CHANGELOG.md +++ b/transmission-magnet-redirect/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.0 + + - not a legacy addon anymore + ## 0.1.2 - transmission-magnet-redirect 0.1.2 (petersendev/transmission-magnet-redirect:0.1.2) \ No newline at end of file diff --git a/transmission-magnet-redirect/Dockerfile b/transmission-magnet-redirect/Dockerfile index 064f9b7f7..045d69c4b 100644 --- a/transmission-magnet-redirect/Dockerfile +++ b/transmission-magnet-redirect/Dockerfile @@ -1,3 +1,41 @@ ARG BUILD_FROM # hadolint ignore=DL3006 -FROM $BUILD_FROM \ No newline at end of file +FROM $BUILD_FROM + +# Set shell +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +ARG BUILD_ARCH=amd64 +RUN apt-get update \ + \ + && apt-get install -y --no-install-recommends \ + jq=1.5+dfsg-2+b1 \ + \ + && S6_ARCH="${BUILD_ARCH}" \ + && if [ "${BUILD_ARCH}" = "i386" ]; then S6_ARCH="x86"; fi \ + && if [ "${BUILD_ARCH}" = "armv7" ]; then S6_ARCH="arm"; fi \ + \ + && curl -L -s "https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${S6_ARCH}.tar.gz" \ + | tar zxvf - -C / \ + \ + && mkdir -p /etc/fix-attrs.d \ + && mkdir -p /etc/services.d \ + \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr \ + /tmp/* \ + /var/{cache,log}/* \ + /var/lib/apt/lists/* + +# copy local files +COPY root/ / + +ENTRYPOINT [ "/init" ] \ No newline at end of file diff --git a/transmission-magnet-redirect/config.json b/transmission-magnet-redirect/config.json index 899fb262b..d88ab06ba 100644 --- a/transmission-magnet-redirect/config.json +++ b/transmission-magnet-redirect/config.json @@ -1,8 +1,8 @@ { "name": "transmission-magnet-redirect", - "version": "0.1.2", + "version": "0.2.0", "slug": "transmission-magnet-redirect", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/petersendev/docker-transmission-magnet-redirect", "version_regex": "(\\d+\\.\\d\\.\\d)" diff --git a/transmission-magnet-redirect/root/etc/cont-init.d/00-ha-env b/transmission-magnet-redirect/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/transmission-magnet-redirect/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file diff --git a/transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/finish b/transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/finish new file mode 100644 index 000000000..000f80a10 --- /dev/null +++ b/transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/finish @@ -0,0 +1,6 @@ +#!/usr/bin/execlineb -S0 + +if -n { s6-test $# -ne 0 } +if -n { s6-test ${1} -eq 256 } + +s6-svscanctl -t /var/run/s6/services \ No newline at end of file diff --git a/transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/run b/transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/run new file mode 100644 index 000000000..d40e61cd0 --- /dev/null +++ b/transmission-magnet-redirect/root/etc/services.d/transmission-magnet-redirect/run @@ -0,0 +1,6 @@ +#!/usr/bin/with-contenv bashio + +bashio::log.info 'Starting transmission-magnet-redirect...' + +cd /app +exec dotnet TransmissionMagnetRedirect.dll \ No newline at end of file diff --git a/transmission-openvpn/CHANGELOG.md b/transmission-openvpn/CHANGELOG.md index f2172ce5d..0d08d00c8 100644 --- a/transmission-openvpn/CHANGELOG.md +++ b/transmission-openvpn/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.0 + + - not a legacy addon anymore + ## 0.2.2 - Added transmission environment variables to options validation diff --git a/transmission-openvpn/Dockerfile b/transmission-openvpn/Dockerfile index 13d900c35..6eb1db8b4 100644 --- a/transmission-openvpn/Dockerfile +++ b/transmission-openvpn/Dockerfile @@ -2,6 +2,17 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr /tmp/* + RUN usermod -d /config-internal abc \ && sed -i "s|/config|/config-internal|g" /etc/openvpn/adjustConfigs.sh \ && sed -i "s|/config|/config-internal|g" /etc/openvpn/updateConfigs.sh \ diff --git a/transmission-openvpn/config.json b/transmission-openvpn/config.json index d29569a61..d5a1ed6ea 100644 --- a/transmission-openvpn/config.json +++ b/transmission-openvpn/config.json @@ -1,8 +1,8 @@ { "name": "transmission-openvpn", - "version": "0.2.2", + "version": "0.3.0", "slug": "transmission-openvpn", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/haugene/docker-transmission-openvpn", "version_regex": "(\\d+\\.\\d+)", diff --git a/transmission-openvpn/root/customstart.sh b/transmission-openvpn/root/customstart.sh index 1d059526c..f05679f4f 100644 --- a/transmission-openvpn/root/customstart.sh +++ b/transmission-openvpn/root/customstart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/bashio if [ ! -d /config/transmission-openvpn ]; then echo "Creating /config/transmission-openvpn" @@ -11,4 +11,8 @@ if [ -d /config/transmission-openvpn/openvpn ]; then cp -R /config/transmission-openvpn/openvpn/* /etc/openvpn/ fi +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + export $k=$(bashio::config $k) +done + /etc/openvpn/start.sh diff --git a/znc/CHANGELOG.md b/znc/CHANGELOG.md index 006da6b9d..8eba79dc8 100644 --- a/znc/CHANGELOG.md +++ b/znc/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.0 + + - not a legacy addon anymore + ## 0.3.0 - Update znc to 1.7.5 (linuxserver/znc:znc-1.7.5-ls23) diff --git a/znc/Dockerfile b/znc/Dockerfile index e27969f41..2821603a8 100644 --- a/znc/Dockerfile +++ b/znc/Dockerfile @@ -2,6 +2,22 @@ ARG BUILD_FROM # hadolint ignore=DL3006 FROM $BUILD_FROM +RUN apk add --no-cache \ + curl=7.67.0-r0 \ + jq=1.6-r0 \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.8.0.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + \ + && rm -f -r \ + /tmp/* + # use /data instead of /config for hass.io environment RUN sed -i "s|/config|/config/znc|g" /etc/services.d/znc/run \ && sed -i "s|/config|/config/znc|g" /etc/cont-init.d/20-config \ diff --git a/znc/build.json b/znc/build.json index 08f68c8fa..d08e7fcd4 100644 --- a/znc/build.json +++ b/znc/build.json @@ -1,12 +1,12 @@ { "build_from_template": { "image": "linuxserver/znc", - "version": "znc-1.7.5-ls23" + "version": "znc-1.7.5-ls28" }, "build_from": { - "armhf": "linuxserver/znc:arm32v7-znc-1.7.5-ls23", - "aarch64": "linuxserver/znc:arm64v8-znc-1.7.5-ls23", - "amd64": "linuxserver/znc:amd64-znc-1.7.5-ls23" + "armhf": "linuxserver/znc:arm32v7-znc-1.7.5-ls28", + "aarch64": "linuxserver/znc:arm64v8-znc-1.7.5-ls28", + "amd64": "linuxserver/znc:amd64-znc-1.7.5-ls28" }, "squash": false, "args": {} diff --git a/znc/config.json b/znc/config.json index 54744fa40..7c518be5b 100644 --- a/znc/config.json +++ b/znc/config.json @@ -1,8 +1,8 @@ { "name": "znc", - "version": "0.3.0", + "version": "0.4.0", "slug": "znc", - "legacy": true, + "legacy": false, "maintenance": { "github_release": "https://github.com/linuxserver/docker-znc", "version_regex": "(\\d+\\.\\d+\\.\\d+-?\\w*)-(ls\\d+)" diff --git a/znc/root/etc/cont-init.d/00-ha-env b/znc/root/etc/cont-init.d/00-ha-env new file mode 100644 index 000000000..3b3e69246 --- /dev/null +++ b/znc/root/etc/cont-init.d/00-ha-env @@ -0,0 +1,5 @@ +#!/usr/bin/with-contenv bashio + +for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do + printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k +done \ No newline at end of file