diff --git a/.github/actions/prepare.sh b/.github/actions/prepare.sh index 4cfad5d56..895660581 100755 --- a/.github/actions/prepare.sh +++ b/.github/actions/prepare.sh @@ -6,7 +6,6 @@ # # Functions: # - Evaluate all packages to build depending on files defined in ${GH_FILES}. -# - ffmpeg is moved to head of packages to built first if triggered by its own or a dependent. # - Referenced native and cross packages of the packages to build are added to the download list. set -o pipefail @@ -14,8 +13,8 @@ set -o pipefail echo "::group:: ---- find dependent packages" # filter for changes made in the spk directories and take unique package name (without spk folder) -SPK_TO_BUILD+=" " -SPK_TO_BUILD+=$(echo "${GH_FILES}" | tr ' ' '\n' | grep -oP "(spk)/\K[^\/]*" | sort -u | tr '\n' ' ') +GH_FILES=$(find -type f -printf '%P\n') +SPK_TO_BUILD=$(echo "${GH_FILES}" | tr ' ' '\n' | grep -oP "(spk)/\K[^\/]*" | sort -u | tr '\n' ' ') # filter for changes made in the cross and native directories and take unique package name (including cross or native folder) DEPENDENT_PACKAGES=$(echo "${GH_FILES}" | tr ' ' '\n' | grep -oP "(cross|native)/[^\/]*" | sort -u | tr '\n' ' ') @@ -49,22 +48,6 @@ fi # remove duplicate packages packages=$(printf %s "${SPK_TO_BUILD}" | tr ' ' '\n' | sort -u | tr '\n' ' ') - -# find all packages that depend on spk/ffmpeg is built before. -all_ffmpeg_packages=$(find spk/ -maxdepth 2 -mindepth 2 -name "Makefile" -exec grep -Ho "export FFMPEG_DIR" {} \; | grep -Po ".*spk/\K[^/]*" | sort | tr '\n' ' ') - -# if ffmpeg or one of its dependents is to build, ensure -# ffmpeg is first package in the list of packages to build. -for package in ${packages} -do - if [ "$(echo ffmpeg ${all_ffmpeg_packages} | grep -ow ${package})" != "" ]; then - packages_without_ffmpeg=$(echo "${packages}" | tr ' ' '\n' | grep -v "ffmpeg" | tr '\n' ' ') - packages="ffmpeg ${packages_without_ffmpeg}" - break; - fi -done - - # find all noarch packages all_noarch=$(find spk/ -maxdepth 2 -mindepth 2 -name "Makefile" -exec grep -Ho "override ARCH" {} \; | grep -Po ".*spk/\K[^/]*" | sort | tr '\n' ' ') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e8f27fffe..51555cefd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,6 @@ name: Build on: workflow_dispatch: inputs: - package: - description: 'Package to build' - required: true - default: 'syno-magnet' publish: description: 'Publish to repository' required: false @@ -18,8 +14,9 @@ on: - 'native/**' push: branches: - - "**" + - master paths: + - '.github/workflows/*' - 'spk/**' - 'cross/**' - 'native/**' @@ -39,26 +36,9 @@ jobs: fetch-depth: 0 persist-credentials: false - - name: Get changed files for pull request - if: github.event_name == 'pull_request' - id: getfile_pr - run: | - git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | xargs - echo "::set-output name=files::$(git diff --no-commit-id --name-only -r origin/master...${{github.event.pull_request.head.sha}} | xargs)" - - - name: Get changed files for push - if: github.event_name == 'push' - id: getfile - run: | - git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | xargs - echo "::set-output name=files::$(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | xargs)" - - name: Evaluate dependencies id: dependencies run: ./.github/actions/prepare.sh - env: - GH_FILES: ${{ steps.getfile.outputs.files }} ${{ steps.getfile_pr.outputs.files }} - SPK_TO_BUILD: ${{ github.event.inputs.package }} - name: Cache downloaded files uses: actions/cache@v3 @@ -99,30 +79,42 @@ jobs: path: distrib key: distrib-${{ github.run_id }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Build Package (based on changed files) # We don't want to stop the build on errors. # Errors are reported in "Build Status" continue-on-error: true - uses: docker://ghcr.io/synocommunity/spksrc:latest - with: - entrypoint: ./.github/actions/build.sh env: ARCH_PACKAGES: ${{ needs.prepare.outputs.arch_packages }} NOARCH_PACKAGES: ${{ needs.prepare.outputs.noarch_packages }} PUBLISH: ${{ github.event.inputs.publish }} API_KEY: ${{ secrets.PUBLISH_API_KEY }} - # https://github.com/SynoCommunity/spksrc/wiki/Compile-and-build-rules GH_ARCH: ${{ matrix.arch }} BUILD_ERROR_FILE: /github/workspace/build_errors.txt BUILD_ERROR_LOGFILE: /github/workspace/build_log_errors.txt BUILD_UNSUPPORTED_FILE: /github/workspace/build_unsupported.txt BUILD_SUCCESS_FILE: /github/workspace/build_success.txt + run: | + /usr/bin/docker run --rm --privileged --workdir /github/workspace \ + -e ARCH_PACKAGES \ + -e NOARCH_PACKAGES \ + -e PUBLISH \ + -e API_KEY \ + -e GH_ARCH \ + -e BUILD_ERROR_FILE \ + -e BUILD_ERROR_LOGFILE \ + -e BUILD_UNSUPPORTED_FILE \ + -e BUILD_SUCCESS_FILE \ + -e INPUT_ENTRYPOINT -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true --entrypoint "./.github/actions/build.sh" -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/spksrc/spksrc":"/github/workspace" ghcr.io/servarr/spksrc:latest + - name: Build Status id: build_status # We need this status since we don't want to stop the build on errors. # Here we fail on build errors found in the build error file. - uses: docker://ghcr.io/synocommunity/spksrc:latest + uses: docker://ghcr.io/servarr/spksrc:latest with: entrypoint: ./.github/actions/build_status.sh env: @@ -135,6 +127,22 @@ jobs: if: always() uses: actions/upload-artifact@v3 with: - name: Packages for ${{ matrix.arch }} + name: ${{ matrix.arch }} path: packages/*.spk if-no-files-found: ignore + publish: + needs: build + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Download artifact + uses: actions/download-artifact@v3 + + - name: Publish release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create -d -p v$GITHUB_RUN_NUMBER --generate-notes --title "Servarr Synology Packages v$GITHUB_RUN_NUMBER" --target $GITHUB_SHA **/*.spk diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2b3e6cc08..f1a39ae19 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -20,7 +20,7 @@ on: jobs: docker: runs-on: ubuntu-latest - if: github.repository_owner == 'SynoCommunity' + if: github.repository_owner == 'Servarr' steps: - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -29,7 +29,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -40,4 +40,4 @@ jobs: if: ${{ github.event_name != 'pull_request' }} with: push: true - tags: ghcr.io/synocommunity/spksrc:latest + tags: ghcr.io/servarr/spksrc:latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 05b3fe3a4..b3da5ce1f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,8 @@ on: paths-ignore: - "**.md" push: + branches: + - master paths-ignore: - "**.md" diff --git a/Dockerfile b/Dockerfile index e49092cd0..f2eca28d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ check \ cmake \ curl \ - cython \ - debootstrap \ + debootstrap \ + debuerreotype \ ed \ expect \ fakeroot \ @@ -51,18 +51,12 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ mercurial \ moreutils \ ncurses-dev \ - ninja-build \ - php \ pkg-config \ - python3 \ - python3-distutils \ rename \ rsync \ scons \ - subversion \ sudo \ swig \ - texinfo \ unzip \ xmlto \ zlib1g-dev && \ @@ -72,18 +66,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ adduser user sudo && \ echo "%users ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/users -# Install setuptools, wheel and pip for Python2 -RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py -O - | python2 -# Install virtualenv and httpie for Python2 -# Use pip2 as default pip -> python3 -RUN pip2 install virtualenv httpie - -# Install setuptools, wheel and pip for Python3 -# Default pip -> python3 aware for native python wheels builds -RUN wget https://bootstrap.pypa.io/get-pip.py -O - | python3 -# Install meson cross-platform build system -RUN pip3 install meson==0.56.0 - # Volume pointing to spksrc sources VOLUME /spksrc diff --git a/Makefile b/Makefile index a7504a861..c4d4427ab 100644 --- a/Makefile +++ b/Makefile @@ -173,8 +173,8 @@ dsm-%: local.mk @grep -q "^DEFAULT_TC.*=.*$*.*" local.mk || sed -i "/^DEFAULT_TC =/s/$$/ $*/" local.mk setup-synocommunity: setup - @sed -i -e "s|PUBLISH_URL\s*=.*|PUBLISH_URL = https://api.synocommunity.com|" \ - -e "s|DISTRIBUTOR\s*=.*|DISTRIBUTOR = SynoCommunity|" \ - -e "s|DISTRIBUTOR_URL\s*=.*|DISTRIBUTOR_URL = https://synocommunity.com|" \ - -e "s|REPORT_URL\s*=.*|REPORT_URL = https://github.com/SynoCommunity/spksrc/issues|" \ + @sed -i -e "s|PUBLISH_URL\s*=.*|PUBLISH_URL = https://syno.servarr.com|" \ + -e "s|DISTRIBUTOR\s*=.*|DISTRIBUTOR = Servarr|" \ + -e "s|DISTRIBUTOR_URL\s*=.*|DISTRIBUTOR_URL = https://github.com/Servarr/spksrc|" \ + -e "s|REPORT_URL\s*=.*|REPORT_URL = https://github.com/Servarr/spksrc/issues|" \ local.mk diff --git a/cross/bubblewrap/Makefile b/cross/bubblewrap/Makefile new file mode 100644 index 000000000..2ef2a164a --- /dev/null +++ b/cross/bubblewrap/Makefile @@ -0,0 +1,23 @@ +PKG_NAME = bubblewrap +PKG_VERS = 0.6.1 +PKG_EXT = tar.xz +PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/containers/bubblewrap/releases/download/v$(PKG_VERS) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +DEPENDS = cross/libcap + +HOMEPAGE = https://github.com/containers/bubblewrap +LICENSE = LGPLv2 + +GNU_CONFIGURE = 1 + +PRE_CONFIGURE_TARGET = bubblewrap_pre_configure + +PATCHES_LEVEL = 1 + +include ../../mk/spksrc.cross-cc.mk + +.PHONY: bubblewrap_pre_configure +bubblewrap_pre_configure: + @$(RUN) ./autogen.sh $(REAL_CONFIGURE_ARGS) diff --git a/cross/bubblewrap/PLIST b/cross/bubblewrap/PLIST new file mode 100644 index 000000000..9b4025bce --- /dev/null +++ b/cross/bubblewrap/PLIST @@ -0,0 +1 @@ +bin:bin/bwrap diff --git a/cross/bubblewrap/digests b/cross/bubblewrap/digests new file mode 100644 index 000000000..62c814a53 --- /dev/null +++ b/cross/bubblewrap/digests @@ -0,0 +1,3 @@ +bubblewrap-0.6.1.tar.xz SHA1 97058281dcce2fcc749ea406abb0f99d9dacfaec +bubblewrap-0.6.1.tar.xz SHA256 9609c7dc162bc68abc29abfab566934fdca37520a15ed01b675adcf3a4303282 +bubblewrap-0.6.1.tar.xz MD5 a481e7981e9c00e6b3eeaa05e9c2dc07 diff --git a/cross/bubblewrap/patches/0001-Remove-seccomp-PR_SET_NO_NEW_PRIVS-PR_SET_CHILD_SUBR.patch b/cross/bubblewrap/patches/0001-Remove-seccomp-PR_SET_NO_NEW_PRIVS-PR_SET_CHILD_SUBR.patch new file mode 100644 index 000000000..fcff60a97 --- /dev/null +++ b/cross/bubblewrap/patches/0001-Remove-seccomp-PR_SET_NO_NEW_PRIVS-PR_SET_CHILD_SUBR.patch @@ -0,0 +1,309 @@ +From 4ffde446cf59c72c7cd8fe9104d82168baa1b355 Mon Sep 17 00:00:00 2001 +From: ta264 +Date: Thu, 5 May 2022 19:00:44 +0100 +Subject: [PATCH] Remove seccomp, PR_SET_NO_NEW_PRIVS, PR_SET_CHILD_SUBREAPER + +--- + bubblewrap.c | 171 +-------------------------------------------------- + configure.ac | 1 - + 2 files changed, 2 insertions(+), 170 deletions(-) + +diff --git a/bubblewrap.c b/bubblewrap.c +index 2f2fca5..bca2b24 100644 +--- a/bubblewrap.c ++++ b/bubblewrap.c +@@ -31,9 +31,6 @@ + #include + #include + #include +-#include +-#include +-#include + + #include "utils.h" + #include "network.h" +@@ -84,12 +81,10 @@ int opt_block_fd = -1; + int opt_userns_block_fd = -1; + int opt_info_fd = -1; + int opt_json_status_fd = -1; +-int opt_seccomp_fd = -1; + const char *opt_sandbox_hostname = NULL; + char *opt_args_data = NULL; /* owned */ + int opt_userns_fd = -1; + int opt_userns2_fd = -1; +-int opt_pidns_fd = -1; + int next_perms = -1; + + #define CAP_TO_MASK_0(x) (1L << ((x) & 31)) +@@ -235,51 +230,6 @@ lock_file_new (const char *path) + return lock; + } + +-typedef struct _SeccompProgram SeccompProgram; +- +-struct _SeccompProgram +-{ +- struct sock_fprog program; +- SeccompProgram *next; +-}; +- +-DEFINE_LINKED_LIST (SeccompProgram, seccomp_program) +- +-static SeccompProgram * +-seccomp_program_new (int *fd) +-{ +- SeccompProgram *self = _seccomp_program_append_new (); +- cleanup_free char *data = NULL; +- size_t len; +- +- data = load_file_data (*fd, &len); +- +- if (data == NULL) +- die_with_error ("Can't read seccomp data"); +- +- close (*fd); +- *fd = -1; +- +- if (len % 8 != 0) +- die ("Invalid seccomp data, must be multiple of 8"); +- +- self->program.len = len / 8; +- self->program.filter = (struct sock_filter *) steal_pointer (&data); +- return self; +-} +- +-static void +-seccomp_programs_apply (void) +-{ +- SeccompProgram *program; +- +- for (program = seccomp_programs; program != NULL; program = program->next) +- { +- if (prctl (PR_SET_SECCOMP, SECCOMP_MODE_FILTER, &program->program) != 0) +- die_with_error ("prctl(PR_SET_SECCOMP)"); +- } +-} +- + static void + usage (int ecode, FILE *out) + { +@@ -301,7 +251,6 @@ usage (int ecode, FILE *out) + " --unshare-cgroup-try Create new cgroup namespace if possible else continue by skipping it\n" + " --userns FD Use this user namespace (cannot combine with --unshare-user)\n" + " --userns2 FD After setup switch to this user namespace, only useful with --userns\n" +- " --pidns FD Use this user namespace (as parent namespace if using --unshare-pid)\n" + " --uid UID Custom uid in the sandbox (requires --unshare-user or --userns)\n" + " --gid GID Custom gid in the sandbox (requires --unshare-user or --userns)\n" + " --hostname NAME Custom hostname in the sandbox (requires --unshare-uts)\n" +@@ -329,8 +278,6 @@ usage (int ecode, FILE *out) + " --bind-data FD DEST Copy from FD to file which is bind-mounted on DEST\n" + " --ro-bind-data FD DEST Copy from FD to file which is readonly bind-mounted on DEST\n" + " --symlink SRC DEST Create symlink at DEST with target SRC\n" +- " --seccomp FD Load and use seccomp rules from FD (not repeatable)\n" +- " --add-seccomp FD Load and use seccomp rules from FD (repeatable)\n" + " --block-fd FD Block on FD until some data to read is available\n" + " --userns-block-fd FD Block on FD until the user namespace is ready\n" + " --info-fd FD Write information about the running container to FD\n" +@@ -592,8 +539,6 @@ do_init (int event_fd, pid_t initial_pid) + /* Optionally bind our lifecycle to that of the caller */ + handle_die_with_parent (); + +- seccomp_programs_apply (); +- + while (TRUE) + { + pid_t child; +@@ -1209,7 +1154,7 @@ setup_newroot (bool unshare_pid, + if (ensure_dir (dest, 0755) != 0) + die_with_error ("Can't mkdir %s", op->dest); + +- if (unshare_pid || opt_pidns_fd != -1) ++ if (unshare_pid) + { + /* Our own procfs */ + privileged_op (privileged_op_socket, +@@ -2123,50 +2068,6 @@ parse_args_recurse (int *argcp, + + opt_json_status_fd = the_fd; + +- argv += 1; +- argc -= 1; +- } +- else if (strcmp (arg, "--seccomp") == 0) +- { +- int the_fd; +- char *endptr; +- +- if (argc < 2) +- die ("--seccomp takes an argument"); +- +- if (seccomp_programs != NULL) +- die ("--seccomp cannot be combined with --add-seccomp-fd"); +- +- if (opt_seccomp_fd != -1) +- warn_only_last_option ("--seccomp"); +- +- the_fd = strtol (argv[1], &endptr, 10); +- if (argv[1][0] == 0 || endptr[0] != 0 || the_fd < 0) +- die ("Invalid fd: %s", argv[1]); +- +- opt_seccomp_fd = the_fd; +- +- argv += 1; +- argc -= 1; +- } +- else if (strcmp (arg, "--add-seccomp-fd") == 0) +- { +- int the_fd; +- char *endptr; +- +- if (argc < 2) +- die ("--add-seccomp-fd takes an argument"); +- +- if (opt_seccomp_fd != -1) +- die ("--add-seccomp-fd cannot be combined with --seccomp"); +- +- the_fd = strtol (argv[1], &endptr, 10); +- if (argv[1][0] == 0 || endptr[0] != 0 || the_fd < 0) +- die ("Invalid fd: %s", argv[1]); +- +- /* takes ownership of fd */ +- seccomp_program_new (&the_fd); +- + argv += 1; + argc -= 1; + } +@@ -2207,26 +2108,6 @@ parse_args_recurse (int *argcp, + + opt_userns2_fd = the_fd; + +- argv += 1; +- argc -= 1; +- } +- else if (strcmp (arg, "--pidns") == 0) +- { +- int the_fd; +- char *endptr; +- +- if (argc < 2) +- die ("--pidns takes an argument"); +- +- if (opt_pidns_fd != -1) +- warn_only_last_option ("--pidns"); +- +- the_fd = strtol (argv[1], &endptr, 10); +- if (argv[1][0] == 0 || endptr[0] != 0 || the_fd < 0) +- die ("Invalid fd: %s", argv[1]); +- +- opt_pidns_fd = the_fd; +- + argv += 1; + argc -= 1; + } +@@ -2569,10 +2450,6 @@ main (int argc, + /* Get the (optional) privileges we need */ + acquire_privs (); + +- /* Never gain any more privs during exec */ +- if (prctl (PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) < 0) +- die_with_error ("prctl(PR_SET_NO_NEW_PRIVS) failed"); +- + /* The initial code is run with high permissions + (i.e. CAP_SYS_ADMIN), so take lots of care. */ + +@@ -2724,7 +2601,7 @@ main (int argc, + clone_flags = SIGCHLD | CLONE_NEWNS; + if (opt_unshare_user) + clone_flags |= CLONE_NEWUSER; +- if (opt_unshare_pid && opt_pidns_fd == -1) ++ if (opt_unshare_pid) + clone_flags |= CLONE_NEWPID; + if (opt_unshare_net) + clone_flags |= CLONE_NEWNET; +@@ -2771,14 +2648,6 @@ main (int argc, + die_with_error ("Joining specified user namespace failed"); + } + +- /* Sometimes we have uninteresting intermediate pids during the setup, set up code to pass the real pid down */ +- if (opt_pidns_fd != -1) +- { +- /* Mark us as a subreaper, this way we can get exit status from grandchildren */ +- prctl (PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0); +- create_pid_socketpair (intermediate_pids_sockets); +- } +- + pid = raw_clone (clone_flags, NULL); + if (pid == -1) + { +@@ -2868,31 +2737,6 @@ main (int argc, + return monitor_child (event_fd, pid, setup_finished_pipe[0]); + } + +- if (opt_pidns_fd > 0) +- { +- if (setns (opt_pidns_fd, CLONE_NEWPID) != 0) +- die_with_error ("Setting pidns failed"); +- +- /* fork to get the passed in pid ns */ +- fork_intermediate_child (); +- +- /* We might both have specified an --pidns *and* --unshare-pid, so set up a new child pid namespace under the specified one */ +- if (opt_unshare_pid) +- { +- if (unshare (CLONE_NEWPID)) +- die_with_error ("unshare pid ns"); +- +- /* fork to get the new pid ns */ +- fork_intermediate_child (); +- } +- +- /* We're back, either in a child or grandchild, so message the actual pid to the monitor */ +- +- close (intermediate_pids_sockets[0]); +- send_pid_on_socket (intermediate_pids_sockets[1]); +- close (intermediate_pids_sockets[1]); +- } +- + /* Child, in sandbox, privileged in the parent or in the user namespace (if --unshare-user). + * + * Note that for user namespaces we run as euid 0 during clone(), so +@@ -3113,13 +2957,6 @@ main (int argc, + close (opt_block_fd); + } + +- if (opt_seccomp_fd != -1) +- { +- assert (seccomp_programs == NULL); +- /* takes ownership of fd */ +- seccomp_program_new (&opt_seccomp_fd); +- } +- + umask (old_umask); + + new_cwd = "/"; +@@ -3212,10 +3049,6 @@ main (int argc, + if (!is_privileged) + set_ambient_capabilities (); + +- /* Should be the last thing before execve() so that filters don't +- * need to handle anything above */ +- seccomp_programs_apply (); +- + if (setup_finished_pipe[1] != -1) + { + char data = 0; +diff --git a/configure.ac b/configure.ac +index d6b72f3..9a62dac 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -91,7 +91,6 @@ dnl Keep this in sync with ostree, except remove -Werror=declaration-after-state + CC_CHECK_FLAGS_APPEND([WARN_CFLAGS], [CFLAGS], [\ + -pipe \ + -Wall \ +- -Werror=shadow \ + -Werror=empty-body \ + -Werror=strict-prototypes \ + -Werror=missing-prototypes \ +-- +2.25.1 + diff --git a/cross/debian-bullseye/Makefile b/cross/debian-bullseye/Makefile new file mode 100644 index 000000000..87fb6a8ea --- /dev/null +++ b/cross/debian-bullseye/Makefile @@ -0,0 +1,45 @@ +PKG_NAME = debian-$(PKG_VERS) +PKG_VERS = bullseye + +DISTRIB_DIR = $(BASE_DISTRIB_DIR)/$(PKG_NAME)-$(PKG_DIST_ARCH) + +PKG_EXT = tar.xz +PKG_DIST_NAME = rootfs.$(PKG_EXT) +PKG_DIST_SITE = https://raw.githubusercontent.com/debuerreotype/docker-debian-artifacts/$(PKG_SHA)/$(PKG_VERS)/slim + +DEPENDS = + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) + +HOMEPAGE = https://www.debian.org/ +COMMENT = Debian base image +LICENSE = GPLv3 + +CHECKSUM_TARGET = debian_checksum +INSTALL_TARGET = debian_install + +EXTRACT_PATH=$(WORK_DIR)/rootfs + +PKG_DIST_ARCH_LIST = x64 armv7 arm64 + +include ../../mk/spksrc.archs.mk + +PKG_DIST_ARCH = x64 +PKG_SHA = e8e26161d828d035f0eb2f06a57c7972375a769a +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm +PKG_SHA = dac1fb21147a9d20e3234a90a83269c9ea02588e +else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm64 +PKG_SHA = 0cb2f80d1b5fc71d626a65a80bde83dff6be6278 +endif + +include ../../mk/spksrc.install-resources.mk + +.PHONY: debian_install debian_checksum +debian_checksum: + +debian_install: + mkdir -p $(STAGING_INSTALL_PREFIX)/rootfs + tar -cf - -C $(WORK_DIR)/rootfs . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/rootfs + curl -so $(STAGING_INSTALL_PREFIX)/rootfs/debuerreotype-epoch https://raw.githubusercontent.com/debuerreotype/docker-debian-artifacts/$(PKG_SHA)/$(PKG_VERS)/slim/rootfs.debuerreotype-epoch diff --git a/cross/debian-bullseye/PLIST.auto b/cross/debian-bullseye/PLIST.auto new file mode 100644 index 000000000..e69de29bb diff --git a/cross/debian-buster/Makefile b/cross/debian-buster/Makefile new file mode 100644 index 000000000..faecd7b6c --- /dev/null +++ b/cross/debian-buster/Makefile @@ -0,0 +1,52 @@ +PKG_NAME = debian-$(PKG_VERS) +PKG_VERS = buster + +DISTRIB_DIR = $(BASE_DISTRIB_DIR)/$(PKG_NAME)-$(PKG_DIST_ARCH) + +PKG_EXT = tar.xz +PKG_DIST_NAME = rootfs.$(PKG_EXT) +PKG_DIST_SITE = https://raw.githubusercontent.com/debuerreotype/docker-debian-artifacts/$(PKG_SHA)/$(PKG_VERS)/slim + +DEPENDS = + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv7L_ARCHS) + +HOMEPAGE = https://www.debian.org/ +COMMENT = Debian base image +LICENSE = GPLv3 + +CHECKSUM_TARGET = debian_checksum +INSTALL_TARGET = debian_install + +EXTRACT_PATH=$(WORK_DIR)/rootfs + +include ../../mk/spksrc.archs.mk + +PKG_DIST_ARCH = x64 +PKG_SHA = e8e26161d828d035f0eb2f06a57c7972375a769a +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm +PKG_SHA = dac1fb21147a9d20e3234a90a83269c9ea02588e +else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm64 +PKG_SHA = 0cb2f80d1b5fc71d626a65a80bde83dff6be6278 +else ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = x86 +PKG_SHA = 7b1476e024fa599a18949a449b6f73cb373e45a9 +else ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = armv5 +PKG_SHA = cdf4686a54ee2835b16dbb1cae620e5952667f88 +else ifeq ($(findstring $(ARCH),$(ARMvv7L_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = armv5 +PKG_SHA = cdf4686a54ee2835b16dbb1cae620e5952667f88 +endif + +include ../../mk/spksrc.install-resources.mk + +.PHONY: debian_install debian_checksum +debian_checksum: + +debian_install: + mkdir -p $(STAGING_INSTALL_PREFIX)/rootfs + tar -cf - -C $(WORK_DIR)/rootfs . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/rootfs + curl -so $(STAGING_INSTALL_PREFIX)/rootfs/debuerreotype-epoch https://raw.githubusercontent.com/debuerreotype/docker-debian-artifacts/$(PKG_SHA)/$(PKG_VERS)/slim/rootfs.debuerreotype-epoch diff --git a/cross/debian-buster/PLIST.auto b/cross/debian-buster/PLIST.auto new file mode 100644 index 000000000..e69de29bb diff --git a/cross/debian-stretch/Makefile b/cross/debian-stretch/Makefile new file mode 100644 index 000000000..edd6550e6 --- /dev/null +++ b/cross/debian-stretch/Makefile @@ -0,0 +1,45 @@ +PKG_NAME = debian-$(PKG_VERS) +PKG_VERS = stretch + +DISTRIB_DIR = $(BASE_DISTRIB_DIR)/$(PKG_NAME)-$(PKG_DIST_ARCH) + +PKG_EXT = tar.xz +PKG_DIST_NAME = rootfs.$(PKG_EXT) +PKG_DIST_SITE = https://raw.githubusercontent.com/debuerreotype/docker-debian-artifacts/$(PKG_SHA)/$(PKG_VERS)/slim + +DEPENDS = + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) + +HOMEPAGE = https://www.debian.org/ +COMMENT = Debian base image +LICENSE = GPLv3 + +CHECKSUM_TARGET = debian_checksum +INSTALL_TARGET = debian_install + +EXTRACT_PATH=$(WORK_DIR)/rootfs + +PKG_DIST_ARCH_LIST = x64 armv7 arm64 + +include ../../mk/spksrc.archs.mk + +PKG_DIST_ARCH = x64 +PKG_SHA = e8e26161d828d035f0eb2f06a57c7972375a769a +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm +PKG_SHA = dac1fb21147a9d20e3234a90a83269c9ea02588e +else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm64 +PKG_SHA = 0cb2f80d1b5fc71d626a65a80bde83dff6be6278 +endif + +include ../../mk/spksrc.install-resources.mk + +.PHONY: debian_install debian_checksum +debian_checksum: + +debian_install: + mkdir -p $(STAGING_INSTALL_PREFIX)/rootfs + tar -cf - -C $(WORK_DIR)/rootfs . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/rootfs + curl -so $(STAGING_INSTALL_PREFIX)/rootfs/debuerreotype-epoch https://raw.githubusercontent.com/debuerreotype/docker-debian-artifacts/$(PKG_SHA)/$(PKG_VERS)/slim/rootfs.debuerreotype-epoch diff --git a/cross/debian-stretch/PLIST.auto b/cross/debian-stretch/PLIST.auto new file mode 100644 index 000000000..e69de29bb diff --git a/cross/libstdc++/Makefile b/cross/libstdc++/Makefile deleted file mode 100644 index 73480f376..000000000 --- a/cross/libstdc++/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -PKG_NAME = libstdc++6 -PKG_VERS = 6.3.0-18+deb9u1 -PKG_EXT = deb -PKG_DIST_NAME = $(PKG_NAME)_$(PKG_VERS)_$(PKG_DIST_ARCH).$(PKG_EXT) -PKG_DIST_SITE = http://http.us.debian.org/debian/pool/main/g/gcc-6/ -PKG_DIR = $(PKG_NAME)-$(PKG_VERS) -EXTRACT_PATH = $(WORK_DIR)/$(PKG_DIR) - -DEPENDS = - -UNSUPPORTED_ARCHS = $(PPC_ARCHS) - -HOMEPAGE = https://gcc.gnu.org/ -COMMENT = The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, and D, as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user\'s freedom. -LICENSE = GPLv3 - -INSTALL_TARGET = libstdc++6_install - -include ../../mk/spksrc.archs.mk - -# use digests with multiple files -PKG_DIST_ARCH_LIST = amd64 armhf arm64 armel i386 - -PKG_DIST_ARCH = amd64 -LIB_DIR = x86_64-linux-gnu -ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv5_ARCHS)),$(ARCH)) -PKG_DIST_ARCH = armhf -LIB_DIR = arm-linux-gnueabihf -else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) -PKG_DIST_ARCH = arm64 -LIB_DIR = aarch64-linux-gnu -else ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) -PKG_DIST_ARCH = armel -LIB_DIR = arm-linux-gnueabi -else ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) -PKG_DIST_ARCH = i386 -LIB_DIR = i386-linux-gnu -endif - -include ../../mk/spksrc.install-resources.mk - -.PHONY: libstdc++6_install -libstdc++6_install: - install -m 755 -d $(STAGING_INSTALL_PREFIX)/lib - install -m 644 $(WORK_DIR)/$(PKG_DIR)/usr/lib/$(LIB_DIR)/libstdc++.so.6.0.22 $(STAGING_INSTALL_PREFIX)/lib - ln -s libstdc++.so.6.0.22 $(STAGING_INSTALL_PREFIX)/lib/libstdc++.so.6 diff --git a/cross/libstdc++/PLIST b/cross/libstdc++/PLIST deleted file mode 100644 index ed8e82b71..000000000 --- a/cross/libstdc++/PLIST +++ /dev/null @@ -1,2 +0,0 @@ -lnk:lib/libstdc++.so.6 -lib:lib/libstdc++.so.6.0.22 diff --git a/cross/libstdc++/digests b/cross/libstdc++/digests deleted file mode 100644 index faaa2f6fb..000000000 --- a/cross/libstdc++/digests +++ /dev/null @@ -1,15 +0,0 @@ -libstdc++6_6.3.0-18+deb9u1_amd64.deb SHA1 d4161e6afc9e47ea0e49262c240c1e03665cc827 -libstdc++6_6.3.0-18+deb9u1_amd64.deb SHA256 d05373fbbb0d2c538fa176dfe71d1fa7983c58d35a7a456263ca87e8e0d45030 -libstdc++6_6.3.0-18+deb9u1_amd64.deb MD5 65d6d1479e90397f7144bf1a8a152746 -libstdc++6_6.3.0-18+deb9u1_armhf.deb SHA1 1623e33f9c129c036ede644bc0b5b249fd642935 -libstdc++6_6.3.0-18+deb9u1_armhf.deb SHA256 1d92ff5a7e33ee75052c9bac4755ee912e8caedbd69c002bd8f10cd4667941e4 -libstdc++6_6.3.0-18+deb9u1_armhf.deb MD5 5f3e9455508826a8da359b0f3e89cb5d -libstdc++6_6.3.0-18+deb9u1_arm64.deb SHA1 7854d7377fdd988c979d3eb5ab55579471c17190 -libstdc++6_6.3.0-18+deb9u1_arm64.deb SHA256 d379867da69254631b75d616f06fe0f2395e5151d5338b735c145be2041ff81f -libstdc++6_6.3.0-18+deb9u1_arm64.deb MD5 7b3c0cba5c63aa13647b41d0153a6d09 -libstdc++6_6.3.0-18+deb9u1_armel.deb SHA1 ecc59bef953be94e929ae8358b1f2f5f76dcb7cb -libstdc++6_6.3.0-18+deb9u1_armel.deb SHA256 e1e05ec07f8164c8f3fc25339a10d432b422ee159f1431a0645a2fe13b3416dc -libstdc++6_6.3.0-18+deb9u1_armel.deb MD5 75939546e834812b7724008d585f5638 -libstdc++6_6.3.0-18+deb9u1_i386.deb SHA1 3000c76cab8fb99e6b7237c0adffc129561f42a8 -libstdc++6_6.3.0-18+deb9u1_i386.deb SHA256 414f272767f0a0d02333e74f00927dd4343bb1570d41df01a81057d28841615f -libstdc++6_6.3.0-18+deb9u1_i386.deb MD5 c4c28228cf72065bff71aeaec485a214 diff --git a/cross/lidarr/Makefile b/cross/lidarr/Makefile new file mode 100644 index 000000000..40d59a3ce --- /dev/null +++ b/cross/lidarr/Makefile @@ -0,0 +1,36 @@ +PKG_NAME = Lidarr +PKG_VERS = 1.0.0.2570 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME).develop.$(PKG_VERS).linux-core-$(PKG_DIST_ARCH).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/Lidarr/Lidarr/releases/download/v$(PKG_VERS) +PKG_DIR = Lidarr + +DEPENDS = + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) + +HOMEPAGE = https://lidarr.audio/ +COMMENT = Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available. + +INSTALL_TARGET = lidarr_install + +# use digests with multiple files +PKG_DIST_ARCH_LIST = x64 x86 arm arm64 + +include ../../mk/spksrc.archs.mk +PKG_DIST_ARCH = x64 +ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = x86 +else ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm +else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm64 +endif + +include ../../mk/spksrc.install-resources.mk + +.PHONY: lidarr_install +lidarr_install: + rm -rf $(WORK_DIR)/$(PKG_DIR)/Lidarr.Update + mkdir -p $(STAGING_INSTALL_PREFIX)/usr/lib/lidarr/bin + tar -cf - -C $(WORK_DIR)/$(PKG_NAME) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/usr/lib/lidarr/bin diff --git a/cross/lidarr/PLIST b/cross/lidarr/PLIST new file mode 100644 index 000000000..778fe35b3 --- /dev/null +++ b/cross/lidarr/PLIST @@ -0,0 +1 @@ +rsc:usr/lib/lidarr diff --git a/cross/lidarr/digests b/cross/lidarr/digests new file mode 100644 index 000000000..9926724f0 --- /dev/null +++ b/cross/lidarr/digests @@ -0,0 +1,12 @@ +Lidarr.develop.1.0.0.2570.linux-core-x64.tar.gz SHA1 84824a86e728b6f954a92ebf873a4812bb44a3b9 +Lidarr.develop.1.0.0.2570.linux-core-x64.tar.gz SHA256 0c7c7ee2bdf9f81f1ee5ce3c4e6a4f070357775d6ce73ca10fb6cbc9cbcde953 +Lidarr.develop.1.0.0.2570.linux-core-x64.tar.gz MD5 94d3bdbd401fc708b3f7ea22842b8fad +Lidarr.develop.1.0.0.2570.linux-core-x86.tar.gz SHA1 216183a4a9d584ef7acdade61f59f1bef3c3ae81 +Lidarr.develop.1.0.0.2570.linux-core-x86.tar.gz SHA256 ce00f8b9f9d016a0a56e9f68f66504834905654d15f545120773a8c734a4d960 +Lidarr.develop.1.0.0.2570.linux-core-x86.tar.gz MD5 68e33d6454a66b0c0ecc1523b1ef2944 +Lidarr.develop.1.0.0.2570.linux-core-arm.tar.gz SHA1 c21d31387597e32400eefb29ff6496982fdf2871 +Lidarr.develop.1.0.0.2570.linux-core-arm.tar.gz SHA256 8043ed04284d02307cb6308c8a678c5d34e9adb5dbb3b7e4ad80b6caeedf213e +Lidarr.develop.1.0.0.2570.linux-core-arm.tar.gz MD5 a2721eeee77a9569d6b5d45cf83950d2 +Lidarr.develop.1.0.0.2570.linux-core-arm64.tar.gz SHA1 7c223b22591d77f2a3d4c3150af6f10b74ada872 +Lidarr.develop.1.0.0.2570.linux-core-arm64.tar.gz SHA256 eab18cca74112b3e530722bfcaeefaa6efa15dd4afc02718c5d7137976a70ef3 +Lidarr.develop.1.0.0.2570.linux-core-arm64.tar.gz MD5 0e6e7a1068501bedcbb2f75a853d67a3 diff --git a/cross/prowlarr/Makefile b/cross/prowlarr/Makefile new file mode 100644 index 000000000..ecd3ba09f --- /dev/null +++ b/cross/prowlarr/Makefile @@ -0,0 +1,34 @@ +PKG_NAME = Prowlarr +PKG_VERS = 0.3.0.1730 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME).develop.$(PKG_VERS).linux-core-$(PKG_DIST_ARCH).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/Prowlarr/Prowlarr/releases/download/v$(PKG_VERS) +PKG_DIR = Prowlarr + +DEPENDS = + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) + +HOMEPAGE = https://prowlarr.com/ +COMMENT = Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports management of both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Lidarr, Mylar3, Radarr, Readarr, and Sonarr offering complete management of your indexers with no per app Indexer setup required (we do it all). + +INSTALL_TARGET = prowlarr_install + +# use digests with multiple files +PKG_DIST_ARCH_LIST = x64 arm arm64 + +include ../../mk/spksrc.archs.mk +PKG_DIST_ARCH = x64 +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm +else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm64 +endif + +include ../../mk/spksrc.install-resources.mk + +.PHONY: prowlarr_install +prowlarr_install: + rm -rf $(WORK_DIR)/$(PKG_DIR)/Prowlarr.Update + mkdir -p $(STAGING_INSTALL_PREFIX)/usr/lib/prowlarr/bin + tar -cf - -C $(WORK_DIR)/$(PKG_NAME) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/usr/lib/prowlarr/bin diff --git a/cross/prowlarr/PLIST b/cross/prowlarr/PLIST new file mode 100644 index 000000000..4d1ea8192 --- /dev/null +++ b/cross/prowlarr/PLIST @@ -0,0 +1 @@ +rsc:usr/lib/prowlarr diff --git a/cross/prowlarr/digests b/cross/prowlarr/digests new file mode 100644 index 000000000..05e299437 --- /dev/null +++ b/cross/prowlarr/digests @@ -0,0 +1,9 @@ +Prowlarr.develop.0.3.0.1730.linux-core-x64.tar.gz SHA1 e24ff8bc15ba8070350108b8dbfb46769fe5da08 +Prowlarr.develop.0.3.0.1730.linux-core-x64.tar.gz SHA256 7a264b8291dee49e8e9475da388a435e6f8896cfd0e5d2b9bb335f3dcde0555e +Prowlarr.develop.0.3.0.1730.linux-core-x64.tar.gz MD5 c45e15240c8a8e552677178dcff60d34 +Prowlarr.develop.0.3.0.1730.linux-core-arm.tar.gz SHA1 5c3ddbfd0d2a12c19a38d55f2d21a540dfa9870d +Prowlarr.develop.0.3.0.1730.linux-core-arm.tar.gz SHA256 8f758ee24db731f5156110bdabf400f01b715c7ab78c82def8bf1041e8d754bd +Prowlarr.develop.0.3.0.1730.linux-core-arm.tar.gz MD5 0a03f2f15b6b96716e1804a39fd9ce05 +Prowlarr.develop.0.3.0.1730.linux-core-arm64.tar.gz SHA1 c853a7f839c8828b6fcda8ef6de7819e729ce3d4 +Prowlarr.develop.0.3.0.1730.linux-core-arm64.tar.gz SHA256 52e54727d5c5160b93aa13adb88291b0d99bb35b95f60940d7b6b11bdee47633 +Prowlarr.develop.0.3.0.1730.linux-core-arm64.tar.gz MD5 82f923ac4852ed90206e7bd1223197ac diff --git a/cross/radarr/Makefile b/cross/radarr/Makefile index 74062093d..7970cc967 100644 --- a/cross/radarr/Makefile +++ b/cross/radarr/Makefile @@ -1,5 +1,5 @@ PKG_NAME = Radarr -PKG_VERS = 3.2.2.5080 +PKG_VERS = 4.1.0.6175 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME).master.$(PKG_VERS).linux-core-$(PKG_DIST_ARCH).$(PKG_EXT) PKG_DIST_SITE = https://github.com/Radarr/Radarr/releases/download/v$(PKG_VERS) @@ -31,5 +31,5 @@ include ../../mk/spksrc.install-resources.mk .PHONY: radarr_install radarr_install: rm -rf $(WORK_DIR)/$(PKG_DIR)/Radarr.Update - mkdir -p $(STAGING_INSTALL_PREFIX)/share/$(PKG_DIR)/bin - tar -cf - -C $(WORK_DIR)/$(PKG_DIR) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/share/$(PKG_DIR)/bin + mkdir -p $(STAGING_INSTALL_PREFIX)/usr/lib/radarr/bin + tar -cf - -C $(WORK_DIR)/$(PKG_NAME) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/usr/lib/radarr/bin diff --git a/cross/radarr/PLIST b/cross/radarr/PLIST index 116044178..29cf9b5a2 100644 --- a/cross/radarr/PLIST +++ b/cross/radarr/PLIST @@ -1 +1 @@ -rsc:share/Radarr +rsc:usr/lib/radarr diff --git a/cross/radarr/digests b/cross/radarr/digests index 96a491c1c..4cf1062fe 100644 --- a/cross/radarr/digests +++ b/cross/radarr/digests @@ -1,9 +1,9 @@ -Radarr.master.3.2.2.5080.linux-core-x64.tar.gz SHA1 32515f7da6a77a1ec460da0d2c5f93c2f974b77e -Radarr.master.3.2.2.5080.linux-core-x64.tar.gz SHA256 2300fb3c5473ea68c48d44dba6a22da2bbc5301fe170c7118471bc5d01efd223 -Radarr.master.3.2.2.5080.linux-core-x64.tar.gz MD5 875c37b575a399acd0e3cd560b6e3d85 -Radarr.master.3.2.2.5080.linux-core-arm.tar.gz SHA1 6e88a900a9dc1d375541fb560f7625c8427c7c98 -Radarr.master.3.2.2.5080.linux-core-arm.tar.gz SHA256 7300be4d40037b08bdb10708a198eebb47d59fe868c119d51df3597257a39e11 -Radarr.master.3.2.2.5080.linux-core-arm.tar.gz MD5 128e56246e5666e9bc4f8a94860bee5e -Radarr.master.3.2.2.5080.linux-core-arm64.tar.gz SHA1 b58fa6c6266254fac25c030a0f26615693a37899 -Radarr.master.3.2.2.5080.linux-core-arm64.tar.gz SHA256 f4ebb4f0f2371cd40ee836bbe99324cf1d50954fa86aaf53afebea3d3d39c67c -Radarr.master.3.2.2.5080.linux-core-arm64.tar.gz MD5 baf77ea0f683d2a41f6dbca6d538015c +Radarr.master.4.1.0.6175.linux-core-arm.tar.gz SHA1 51e1f2364e0ac94a33cfce708e17acc153024672 +Radarr.master.4.1.0.6175.linux-core-arm.tar.gz SHA256 e89d16862c6a97ff3929c06547b2581f3df3cb29be6e26b54e0406774fee1693 +Radarr.master.4.1.0.6175.linux-core-arm.tar.gz MD5 203f522e60f5dc703da38453cf0c5c01 +Radarr.master.4.1.0.6175.linux-core-arm64.tar.gz SHA1 35a507acf0632895a9a6bbbed5edfa657c54aae6 +Radarr.master.4.1.0.6175.linux-core-arm64.tar.gz SHA256 39a088da778bf1b3057ff42e6446572ae6602419d44fe4365cc0a17d2a85e417 +Radarr.master.4.1.0.6175.linux-core-arm64.tar.gz MD5 70e740303f977d45a21228541cc0fca1 +Radarr.master.4.1.0.6175.linux-core-x64.tar.gz SHA1 ade14190eccef6058fc985a945f35d46dfc25dfd +Radarr.master.4.1.0.6175.linux-core-x64.tar.gz SHA256 de8c42060fa5c4df1e19a4b592620ad242f6a9434e2c784b9e430f98f959732c +Radarr.master.4.1.0.6175.linux-core-x64.tar.gz MD5 94bfaafa5cadd1a814d5129d7e8a7116 diff --git a/cross/readarr/Makefile b/cross/readarr/Makefile new file mode 100644 index 000000000..1f84c6a6c --- /dev/null +++ b/cross/readarr/Makefile @@ -0,0 +1,34 @@ +PKG_NAME = Readarr +PKG_VERS = 0.1.0.1248 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME).develop.$(PKG_VERS).linux-core-$(PKG_DIST_ARCH).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/Readarr/Readarr/releases/download/v$(PKG_VERS) +PKG_DIR = Readarr + +DEPENDS = + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) + +HOMEPAGE = https://readarr.com/ +COMMENT = Readarr is an ebook and audiobook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books from your favorite authors and will grab, sort, and rename them. Note that only one type of a given book is supported. If you want both an audiobook and ebook of a given book you will need multiple instances. + +INSTALL_TARGET = readarr_install + +# use digests with multiple files +PKG_DIST_ARCH_LIST = x64 arm arm64 + +include ../../mk/spksrc.archs.mk +PKG_DIST_ARCH = x64 +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm +else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) +PKG_DIST_ARCH = arm64 +endif + +include ../../mk/spksrc.install-resources.mk + +.PHONY: readarr_install +readarr_install: + rm -rf $(WORK_DIR)/$(PKG_DIR)/Readarr.Update + mkdir -p $(STAGING_INSTALL_PREFIX)/usr/lib/readarr/bin + tar -cf - -C $(WORK_DIR)/$(PKG_NAME) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/usr/lib/readarr/bin diff --git a/cross/readarr/PLIST b/cross/readarr/PLIST new file mode 100644 index 000000000..864c1bc76 --- /dev/null +++ b/cross/readarr/PLIST @@ -0,0 +1 @@ +rsc:usr/lib/readarr diff --git a/cross/readarr/digests b/cross/readarr/digests new file mode 100644 index 000000000..f6fb4dd2a --- /dev/null +++ b/cross/readarr/digests @@ -0,0 +1,9 @@ +Readarr.develop.0.1.0.1248.linux-core-x64.tar.gz SHA1 6df078b5c944cba556520858d6a18b2af34d035b +Readarr.develop.0.1.0.1248.linux-core-x64.tar.gz SHA256 182fe1c28424cea913390add3b8d02d742b530d9a5727f574f0c161e8f7a9784 +Readarr.develop.0.1.0.1248.linux-core-x64.tar.gz MD5 083d4205246461ec08915a75c9fa8993 +Readarr.develop.0.1.0.1248.linux-core-arm.tar.gz SHA1 dc85c8ed83b6bfcd2ee9ec6d866c386a14627d75 +Readarr.develop.0.1.0.1248.linux-core-arm.tar.gz SHA256 5e59249d71607d50f138800e58f353d43442189cd9d28402fcdf82a3837e8fa5 +Readarr.develop.0.1.0.1248.linux-core-arm.tar.gz MD5 bddb35798e1b6ccb980fa93ef5e24a6b +Readarr.develop.0.1.0.1248.linux-core-arm64.tar.gz SHA1 e636af9e59c1d92bae9dc332ccaddf8f4f17767b +Readarr.develop.0.1.0.1248.linux-core-arm64.tar.gz SHA256 c7c06702e0d6b9d6d22abb665e6e8f15e17136b7d5609a2dd6bed5c81e98b96b +Readarr.develop.0.1.0.1248.linux-core-arm64.tar.gz MD5 cb07dea6b85c667da4618c54711c1fba diff --git a/cross/sonarr/Makefile b/cross/sonarr/Makefile new file mode 100644 index 000000000..cb57de7f0 --- /dev/null +++ b/cross/sonarr/Makefile @@ -0,0 +1,22 @@ +PKG_NAME = Sonarr +PKG_VERS = 3.0.8.1507 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME).main.$(PKG_VERS).linux.$(PKG_EXT) +PKG_DIST_SITE = https://download.sonarr.tv/v3/main/$(PKG_VERS) +PKG_DIR = $(PKG_NAME) + +DEPENDS = + +HOMEPAGE = https://sonarr.tv +COMMENT = Sonarr is a PVR for newsgroup users. It can monitor multiple RSS feeds for new episodes of your favourite shows and will grab, sorts and rename them. It can also be configured to automatically upgrade the quality of files already downloaded if a better quality format becomes available. +LICENSE = GNU GPL v3 + +INSTALL_TARGET = sonarr_install + +include ../../mk/spksrc.install-resources.mk + +.PHONY: radarr_install +sonarr_install: + rm -rf $(WORK_DIR)/$(PKG_DIR)/Sonarr.Update + mkdir -p $(STAGING_INSTALL_PREFIX)/usr/lib/sonarr/bin + tar -cf - -C $(WORK_DIR)/$(PKG_DIR) . | tar -xf - -C $(STAGING_INSTALL_PREFIX)/usr/lib/sonarr/bin diff --git a/cross/sonarr/PLIST b/cross/sonarr/PLIST new file mode 100644 index 000000000..ccfd8c230 --- /dev/null +++ b/cross/sonarr/PLIST @@ -0,0 +1 @@ +rsc:usr/lib/sonarr diff --git a/cross/sonarr/digests b/cross/sonarr/digests new file mode 100644 index 000000000..8491fe009 --- /dev/null +++ b/cross/sonarr/digests @@ -0,0 +1,3 @@ +Sonarr.main.3.0.8.1507.linux.tar.gz SHA1 67fa02872eae3ce9c7a271db855aee42f5c4dc35 +Sonarr.main.3.0.8.1507.linux.tar.gz SHA256 3b652f5358ee3b9e206fd2d59c4b885e14f4531dab108ab659d9aca16543875c +Sonarr.main.3.0.8.1507.linux.tar.gz MD5 c547b7631aacb2db854bff03c6b4b566 diff --git a/cross/sqlite/Makefile b/cross/sqlite/Makefile index 5b64750fa..11bcee118 100644 --- a/cross/sqlite/Makefile +++ b/cross/sqlite/Makefile @@ -1,5 +1,5 @@ PKG_NAME = sqlite-autoconf -PKG_VERS = 3340100 +PKG_VERS = 3360000 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://www.sqlite.org/2021 diff --git a/cross/sqlite/PLIST b/cross/sqlite/PLIST index eb822d6c6..a7d644d24 100644 --- a/cross/sqlite/PLIST +++ b/cross/sqlite/PLIST @@ -1,4 +1,3 @@ -bin:bin/sqlite3 lnk:lib/libsqlite3.so lnk:lib/libsqlite3.so.0 lib:lib/libsqlite3.so.0.8.6 diff --git a/cross/sqlite/digests b/cross/sqlite/digests index 0e5cd06d5..07c8f3f4d 100644 --- a/cross/sqlite/digests +++ b/cross/sqlite/digests @@ -1,3 +1,3 @@ -sqlite-autoconf-3340100.tar.gz SHA1 c20286e11fe5c2e3712ce74890e1692417de6890 -sqlite-autoconf-3340100.tar.gz SHA256 2a3bca581117b3b88e5361d0ef3803ba6d8da604b1c1a47d902ef785c1b53e89 -sqlite-autoconf-3340100.tar.gz MD5 14dca9d44fb6a57f6521c1ace4be5a68 +sqlite-autoconf-3360000.tar.gz SHA1 a4bcf9e951bfb9745214241ba08476299fc2dc1e +sqlite-autoconf-3360000.tar.gz SHA256 bd90c3eb96bee996206b83be7065c9ce19aef38c3f4fb53073ada0d0b69bbce3 +sqlite-autoconf-3360000.tar.gz MD5 f5752052fc5b8e1b539af86a3671eac7 diff --git a/mk/spksrc.install.mk b/mk/spksrc.install.mk index 18096e83e..57767f740 100644 --- a/mk/spksrc.install.mk +++ b/mk/spksrc.install.mk @@ -58,7 +58,7 @@ install_msg_target: $(PRE_INSTALL_PLIST): $(create_target_dir) @mkdir -p $(INSTALL_DIR)/$(INSTALL_PREFIX) $(INSTALL_DIR)/$(INSTALL_PREFIX_VAR) - find $(PLIST_SEARCH_PATH) \! -type d -printf '%P\n' | sed 's?^target/??g' | sort > $@ + find $(PLIST_SEARCH_PATH) -printf '%P\n' | sed 's?^target/??g' | sort > $@ pre_install_target: install_msg_target $(PRE_INSTALL_PLIST) @@ -71,7 +71,8 @@ install_destdir_target: $(PRE_INSTALL_TARGET) post_install_target: $(INSTALL_TARGET) $(INSTALL_PLIST): - find $(PLIST_SEARCH_PATH)/ \! -type d -printf '%P\n' | sed 's?^target/??g' | sort | \ + @echo Creating standard plist + find $(PLIST_SEARCH_PATH)/ -printf '%P\n' | sed 's?^target/??g' | sort | \ diff $(PRE_INSTALL_PLIST) - | grep '>' | sed 's?> ??g' > $@ install_correct_lib_files: $(INSTALL_PLIST) diff --git a/mk/spksrc.plist.mk b/mk/spksrc.plist.mk index 528a93908..4aa49dc49 100644 --- a/mk/spksrc.plist.mk +++ b/mk/spksrc.plist.mk @@ -21,7 +21,7 @@ cat_PLIST: # If there is a PLIST.auto file or if parent directory is kernel \ elif [ -f PLIST.auto -o $$(basename $$(dirname $$(pwd))) = "kernel" ] ; \ then \ - cat $(WORK_DIR)/$(PKG_NAME).plist.tmp | sort | while read -r file ; \ + cat $(WORK_DIR)/$(PKG_NAME).plist | sort | while read -r file ; \ do \ type=$$(file --brief "$(INSTALL_DIR)/$(INSTALL_PREFIX)/$$file" | cut -d , -f1) ; \ case $$type in \ diff --git a/mk/spksrc.spk.mk b/mk/spksrc.spk.mk index d16ff91c6..abfcf76eb 100644 --- a/mk/spksrc.spk.mk +++ b/mk/spksrc.spk.mk @@ -51,7 +51,12 @@ ARCH_SUFFIX = -$(SPK_TCVERS) FIRMWARE = $(OS_MIN_VER) endif -SPK_FILE_NAME = $(PACKAGES_DIR)/$(SPK_NAME)_$(SPK_NAME_ARCH)-$(SPK_TCVERS)_$(SPK_VERS)-$(SPK_REV).spk +SPK_REV = 9999 +ifdef GITHUB_RUN_NUMBER +SPK_REV = $(GITHUB_RUN_NUMBER) +endif + +SPK_FILE_NAME = $(PACKAGES_DIR)/$(SPK_NAME)_$(SPK_VERS)-spk$(SPK_REV)_$(SPK_NAME_ARCH)-dsm$(SPK_TCVERS).spk ##### diff --git a/spk/bubblewrap/Makefile b/spk/bubblewrap/Makefile new file mode 100644 index 000000000..f8542d3b5 --- /dev/null +++ b/spk/bubblewrap/Makefile @@ -0,0 +1,26 @@ +SPK_NAME = bubblewrap +SPK_VERS = 0.6.1 +SPK_ICON = src/bubblewrap.jpg + +DEPENDS = cross/$(SPK_NAME) + +REQUIRED_MIN_DSM = 7.0 + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) + +MAINTAINER = Servarr +DESCRIPTION = The goal of bubblewrap is to run an application in a sandbox, where it has restricted access to parts of the operating system or user data such as the home directory. +DISPLAY_NAME = Bubblewrap +STARTABLE = no +CHANGELOG = "${DISPLAY_NAME} v$(SPK_VERS)" + +HOMEPAGE = https://github.com/containers/bubblewrap +LICENSE = GPLv2 + +SERVICE_SETUP = src/service-setup.sh + +WIZARDS_DIR = src/wizard/ + +SPK_COMMANDS = bin/bwrap + +include ../../mk/spksrc.spk.mk diff --git a/spk/bubblewrap/src/bubblewrap.jpg b/spk/bubblewrap/src/bubblewrap.jpg new file mode 100644 index 000000000..d3c243dfa Binary files /dev/null and b/spk/bubblewrap/src/bubblewrap.jpg differ diff --git a/spk/bubblewrap/src/service-setup.sh b/spk/bubblewrap/src/service-setup.sh new file mode 100644 index 000000000..17cc100a4 --- /dev/null +++ b/spk/bubblewrap/src/service-setup.sh @@ -0,0 +1,22 @@ + +# bwrap service setup + +BWRAP="${SYNOPKG_PKGDEST}/bin/bwrap" + +fix_permissions () +{ + if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then + chown root:root "${BWRAP}" + chmod u+s "${BWRAP}" + fi +} + +service_postinst () +{ + fix_permissions +} + +service_postupgrade () +{ + fix_permissions +} diff --git a/spk/bubblewrap/src/wizard/install_uifile b/spk/bubblewrap/src/wizard/install_uifile new file mode 100644 index 000000000..525fabb40 --- /dev/null +++ b/spk/bubblewrap/src/wizard/install_uifile @@ -0,0 +1,6 @@ +[{ + "step_title": "Manual configuration required!", + "items": [{ + "desc": "This package, and any packages that depend on it, will not work until you perform the manual steps explained here." + }] +}] diff --git a/spk/bubblewrap/src/wizard/upgrade_uifile b/spk/bubblewrap/src/wizard/upgrade_uifile new file mode 100644 index 000000000..525fabb40 --- /dev/null +++ b/spk/bubblewrap/src/wizard/upgrade_uifile @@ -0,0 +1,6 @@ +[{ + "step_title": "Manual configuration required!", + "items": [{ + "desc": "This package, and any packages that depend on it, will not work until you perform the manual steps explained here." + }] +}] diff --git a/spk/lidarr/Makefile b/spk/lidarr/Makefile new file mode 100644 index 000000000..20ea7458c --- /dev/null +++ b/spk/lidarr/Makefile @@ -0,0 +1,68 @@ +SPK_NAME = lidarr_official +SPK_CONFLICT = lidarr +SPK_VERS = 1.0.0.2570 +SPK_ICON = src/lidarr.png + +REQUIRED_MIN_DSM = 6.0 + +# .NET is not supported on PPC, ARM5, ARM7L and x86 +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) + +DEPENDS = cross/lidarr + +MAINTAINER = Team Lidarr +MAINTAINER_URL = https://lidarr.audio/ +HELPURL = https://wiki.servarr.com/Lidarr +SUPPORTURL = https://lidarr.audio/\#support + +DESCRIPTION = Lidarr is a music collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new tracks from your favorite artists and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available. +STARTABLE = yes +DISPLAY_NAME = Lidarr +CHANGELOG = "${DISPLAY_NAME} v$(SPK_VERS)" + +HOMEPAGE = $(MAINTAINER_URL) +LICENSE = GPLv3 + +SERVICE_USER = auto +SERVICE_SETUP = src/service-setup.sh +SERVICE_PORT = 8686 +SERVICE_PORT_TITLE = $(DISPLAY_NAME) + +# Admin link for in DSM UI +ADMIN_PORT = $(SERVICE_PORT) + +WIZARDS_DIR = src/wizard/ + +POST_STRIP_TARGET = app_extra_install + +# DSM prevents executing from /tmp in 7.1 +USE_ALTERNATE_TMPDIR = 1 + +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +DEPENDS += cross/bubblewrap cross/debian-buster +app_extra_install: rootfs_install +else ifeq ($(ARCH), comcerto2k) +DEPENDS += cross/debian-buster +SPK_DEPENDS = "bubblewrap>=0.6.1" +app_extra_install: rootfs_install +else +DEPENDS += cross/sqlite cross/lidarr +endif + +include ../../mk/spksrc.spk.mk + +PACKAGE_VERSION = $(SPK_VERS)-spk$(SPK_REV)-$(SPK_NAME_ARCH)-$(SPK_TCVERS) +PACKAGE_AUTHOR = [$(MAINTAINER)]($(MAINTAINER_URL)) + +.PHONY: app_extra_install rootfs_install + +rootfs_install: + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs update; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs install -y --no-install-recommends --no-install-suggests ca-certificates locales tzdata libicu63 libssl1.1 libstdc++6 zlib1g libsqlite3-0; \ + rm -rf $(STAGING_DIR)/tmp/* $(STAGING_DIR)/var/lib/apt/lists/* $(STAGING_DIR)/var/tmp/*; \ + +app_extra_install: + @install -m 755 -d $(STAGING_DIR)/app + @echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/usr/lib/lidarr/package_info diff --git a/spk/lidarr/src/lidarr.png b/spk/lidarr/src/lidarr.png new file mode 100644 index 000000000..f048bf77d Binary files /dev/null and b/spk/lidarr/src/lidarr.png differ diff --git a/spk/lidarr/src/service-setup.sh b/spk/lidarr/src/service-setup.sh new file mode 100644 index 000000000..a96c2f00a --- /dev/null +++ b/spk/lidarr/src/service-setup.sh @@ -0,0 +1,55 @@ +APP_LOWER="lidarr" +APP_UPPER="Lidarr" + +GROUP="sc-download" + +USR_LIB="/usr/lib/${APP_LOWER}" +PID_FILE="${SYNOPKG_PKGVAR}/${APP_LOWER}.pid" + +# If the bwrap binary is in this package, use it, otherwise use from standalone package. +BWRAP="${SYNOPKG_PKGDEST}/bin/bwrap" +if [ ! -f "${BWRAP}" ]; then + BWRAP="/var/packages/bubblewrap/target/bin/bwrap" +fi + +# Some versions include a rootfs to create a chroot container with newer libraries. +ROOTFS="${SYNOPKG_PKGDEST}/rootfs" +if [ -d "${ROOTFS}" ]; then + APP="${USR_LIB}/bin/${APP_UPPER}" + CONFIG_DIR="/var/lib/${APP_LOWER}" + SERVICE_COMMAND="${BWRAP} --bind ${ROOTFS} / --proc /proc --dev /dev --bind ${SYNOPKG_PKGDEST}${USR_LIB} ${USR_LIB} --bind ${SYNOPKG_PKGVAR} ${CONFIG_DIR} --bind /volume1 /volume1 --setenv HOME ${SYNOPKG_PKGVAR} ${APP} --nobrowser --data=${CONFIG_DIR}" +else + APP="${SYNOPKG_PKGDEST}${USR_LIB}/bin/${APP_UPPER}" + SERVICE_COMMAND="env HOME=${SYNOPKG_PKGVAR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${APP} --nobrowser --data=${SYNOPKG_PKGVAR}" +fi + +SVC_BACKGROUND=y + +fix_permissions () +{ + if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then + if [ -f "${BWRAP}" ]; then + chown root:root "${BWRAP}" + chmod u+s "${BWRAP}" + fi + + set_unix_permissions "${SYNOPKG_PKGVAR}" + fi +} + +service_postinst () +{ + # Move config.xml to .config + mv ${SYNOPKG_PKGDEST}/app/config.xml ${SYNOPKG_PKGVAR} + + fix_permissions +} + +service_postupgrade () +{ + # Do an update check on start to avoid possible + # downgrade when synocommunity package is updated + touch ${SYNOPKG_PKGVAR}/update_required + + fix_permissions +} diff --git a/spk/lidarr/src/wizard/install_uifile b/spk/lidarr/src/wizard/install_uifile new file mode 100644 index 000000000..375b37804 --- /dev/null +++ b/spk/lidarr/src/wizard/install_uifile @@ -0,0 +1,11 @@ +[{ + "step_title": "Starting and updating Lidarr", + "items": [{ + "desc": "The first time Lidarr is started it might take a few moments for the interface to become available!

Keep Lidarr up-to-date by using Lidarr's built-in updater.
Navigate to System>Updates in the Lidarr UI." + }] +},{ + "step_title": "DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + }] +}] diff --git a/spk/lidarr/src/wizard/install_uifile_fre b/spk/lidarr/src/wizard/install_uifile_fre new file mode 100644 index 000000000..b4491578e --- /dev/null +++ b/spk/lidarr/src/wizard/install_uifile_fre @@ -0,0 +1,11 @@ +[{ + "step_title": "Mettre à jour Lidarr", + "items": [{ + "desc": "Au premier démarrage de Lidarr cela peut prendre un moment avant que l'interface ne soit disponible !

Garder Lidarr à jour en utilisant System>Updates dans l'interface Lidarr." + }] +},{ + "step_title": "Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + }] +}] diff --git a/spk/lidarr/src/wizard/upgrade_uifile b/spk/lidarr/src/wizard/upgrade_uifile new file mode 100644 index 000000000..b24d49852 --- /dev/null +++ b/spk/lidarr/src/wizard/upgrade_uifile @@ -0,0 +1,13 @@ +[{ + "step_title": "Updating Lidarr", + "items": [{ + "desc": "Keep Lidarr up-to-date by using Lidarr's built-in updater.
Navigate to System>Updates in the Lidarr UI." + }] +}, { + "step_title": "DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + },{ + "desc": "NOTE: The package upgrade will try to set the correct permissions on your folders. If you get permission errors within Radarr, manually set Read/Write permissions for the 'sc-download' group on the reported folders using File Station." + }] +}] diff --git a/spk/lidarr/src/wizard/upgrade_uifile_fre b/spk/lidarr/src/wizard/upgrade_uifile_fre new file mode 100644 index 000000000..7644d1609 --- /dev/null +++ b/spk/lidarr/src/wizard/upgrade_uifile_fre @@ -0,0 +1,13 @@ +[{ + "step_title": "Mettre à jour Lidarr", + "items": [{ + "desc": "Garder Lidarr à jour en utilisant System>Updates dans l'interface Lidarr." + }] +},{ + "step_title": "Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + },{ + "desc": "NOTE: La mise à jour de l'application va tenter de corriger les permissions des répertoires. En cas d'erreur de permission dans Radarr, donner les droits de Lecture/Ecriture au groupe 'sc-download' sur les répertoires mentionnés depuis File Station." + }] +}] diff --git a/spk/prowlarr/Makefile b/spk/prowlarr/Makefile new file mode 100644 index 000000000..9e33f1e03 --- /dev/null +++ b/spk/prowlarr/Makefile @@ -0,0 +1,68 @@ +SPK_NAME = prowlarr_official +SPK_CONFLICT = prowlarr +SPK_VERS = 0.3.0.1730 +SPK_ICON = src/prowlarr.png + +REQUIRED_MIN_DSM = 6.0 + +# .NET is not supported on PPC, ARM5, ARM7L and x86 +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) + +DEPENDS = cross/prowlarr + +MAINTAINER = Team Prowlarr +MAINTAINER_URL = https://prowlarr.com/ +HELPURL = https://wiki.servarr.com/Prowlarr +SUPPORTURL = https://prowlarr.audio/\#support + +DESCRIPTION = Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps. Prowlarr supports management of both Torrent Trackers and Usenet Indexers. It integrates seamlessly with Lidarr, Mylar3, Radarr, Readarr, and Sonarr offering complete management of your indexers with no per app Indexer setup required (we do it all). +STARTABLE = yes +DISPLAY_NAME = Prowlarr +CHANGELOG = "${DISPLAY_NAME} v$(SPK_VERS)" + +HOMEPAGE = $(MAINTAINER_URL) +LICENSE = GPLv3 + +SERVICE_USER = auto +SERVICE_SETUP = src/service-setup.sh +SERVICE_PORT = 9696 +SERVICE_PORT_TITLE = $(DISPLAY_NAME) + +# Admin link for in DSM UI +ADMIN_PORT = $(SERVICE_PORT) + +WIZARDS_DIR = src/wizard/ + +POST_STRIP_TARGET = app_extra_install + +# DSM prevents executing from /tmp in 7.1 +USE_ALTERNATE_TMPDIR = 1 + +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +DEPENDS += cross/bubblewrap cross/debian-buster +app_extra_install: rootfs_install +else ifeq ($(ARCH), comcerto2k) +DEPENDS += cross/debian-buster +SPK_DEPENDS = "bubblewrap>=0.6.1" +app_extra_install: rootfs_install +else +DEPENDS += cross/sqlite cross/prowlarr +endif + +include ../../mk/spksrc.spk.mk + +PACKAGE_VERSION = $(SPK_VERS)-spk$(SPK_REV)-$(SPK_NAME_ARCH)-$(SPK_TCVERS) +PACKAGE_AUTHOR = [$(MAINTAINER)]($(MAINTAINER_URL)) + +.PHONY: app_extra_install rootfs_install + +rootfs_install: + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs update; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs install -y --no-install-recommends --no-install-suggests ca-certificates locales tzdata libicu63 libssl1.1 libstdc++6 zlib1g libsqlite3-0; \ + rm -rf $(STAGING_DIR)/tmp/* $(STAGING_DIR)/var/lib/apt/lists/* $(STAGING_DIR)/var/tmp/*; \ + +app_extra_install: + @install -m 755 -d $(STAGING_DIR)/app + @echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/usr/lib/prowlarr/package_info diff --git a/spk/prowlarr/src/prowlarr.png b/spk/prowlarr/src/prowlarr.png new file mode 100644 index 000000000..9a8954167 Binary files /dev/null and b/spk/prowlarr/src/prowlarr.png differ diff --git a/spk/prowlarr/src/service-setup.sh b/spk/prowlarr/src/service-setup.sh new file mode 100644 index 000000000..09ec651b7 --- /dev/null +++ b/spk/prowlarr/src/service-setup.sh @@ -0,0 +1,55 @@ +APP_LOWER="prowlarr" +APP_UPPER="Prowlarr" + +GROUP="sc-download" + +USR_LIB="/usr/lib/${APP_LOWER}" +PID_FILE="${SYNOPKG_PKGVAR}/${APP_LOWER}.pid" + +# If the bwrap binary is in this package, use it, otherwise use from standalone package. +BWRAP="${SYNOPKG_PKGDEST}/bin/bwrap" +if [ ! -f "${BWRAP}" ]; then + BWRAP="/var/packages/bubblewrap/target/bin/bwrap" +fi + +# Some versions include a rootfs to create a chroot container with newer libraries. +ROOTFS="${SYNOPKG_PKGDEST}/rootfs" +if [ -d "${ROOTFS}" ]; then + APP="${USR_LIB}/bin/${APP_UPPER}" + CONFIG_DIR="/var/lib/${APP_LOWER}" + SERVICE_COMMAND="${BWRAP} --bind ${ROOTFS} / --proc /proc --dev /dev --bind ${SYNOPKG_PKGDEST}${USR_LIB} ${USR_LIB} --bind ${SYNOPKG_PKGVAR} ${CONFIG_DIR} --bind /volume1 /volume1 --setenv HOME ${SYNOPKG_PKGVAR} ${APP} --nobrowser --data=${CONFIG_DIR}" +else + APP="${SYNOPKG_PKGDEST}${USR_LIB}/bin/${APP_UPPER}" + SERVICE_COMMAND="env HOME=${SYNOPKG_PKGVAR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${APP} --nobrowser --data=${SYNOPKG_PKGVAR}" +fi + +SVC_BACKGROUND=y + +fix_permissions () +{ + if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then + if [ -f "${BWRAP}" ]; then + chown root:root "${BWRAP}" + chmod u+s "${BWRAP}" + fi + + set_unix_permissions "${SYNOPKG_PKGVAR}" + fi +} + +service_postinst () +{ + # Move config.xml to .config + mv ${SYNOPKG_PKGDEST}/app/config.xml ${SYNOPKG_PKGVAR} + + fix_permissions +} + +service_postupgrade () +{ + # Do an update check on start to avoid possible + # downgrade when synocommunity package is updated + touch ${SYNOPKG_PKGVAR}/update_required + + fix_permissions +} diff --git a/spk/prowlarr/src/wizard/install_uifile b/spk/prowlarr/src/wizard/install_uifile new file mode 100644 index 000000000..78424cc5e --- /dev/null +++ b/spk/prowlarr/src/wizard/install_uifile @@ -0,0 +1,11 @@ +[{ + "step_title": "Starting and updating Prowlarr", + "items": [{ + "desc": "The first time Prowlarr is started it might take a few moments for the interface to become available!

Keep Prowlarr up-to-date by using Prowlarr's built-in updater.
Navigate to System>Updates in the Prowlarr UI." + }] +},{ + "step_title": "DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + }] +}] diff --git a/spk/prowlarr/src/wizard/install_uifile_fre b/spk/prowlarr/src/wizard/install_uifile_fre new file mode 100644 index 000000000..d88b9f57c --- /dev/null +++ b/spk/prowlarr/src/wizard/install_uifile_fre @@ -0,0 +1,11 @@ +[{ + "step_title": "Mettre à jour Prowlarr", + "items": [{ + "desc": "Au premier démarrage de Prowlarr cela peut prendre un moment avant que l'interface ne soit disponible !

Garder Prowlarr à jour en utilisant System>Updates dans l'interface Prowlarr." + }] +},{ + "step_title": "Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + }] +}] diff --git a/spk/prowlarr/src/wizard/upgrade_uifile b/spk/prowlarr/src/wizard/upgrade_uifile new file mode 100644 index 000000000..bddeed405 --- /dev/null +++ b/spk/prowlarr/src/wizard/upgrade_uifile @@ -0,0 +1,13 @@ +[{ + "step_title": "Updating Prowlarr", + "items": [{ + "desc": "Keep Prowlarr up-to-date by using Prowlarr's built-in updater.
Navigate to System>Updates in the Prowlarr UI." + }] +}, { + "step_title": "DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + },{ + "desc": "NOTE: The package upgrade will try to set the correct permissions on your folders. If you get permission errors within Radarr, manually set Read/Write permissions for the 'sc-download' group on the reported folders using File Station." + }] +}] diff --git a/spk/prowlarr/src/wizard/upgrade_uifile_fre b/spk/prowlarr/src/wizard/upgrade_uifile_fre new file mode 100644 index 000000000..3980af955 --- /dev/null +++ b/spk/prowlarr/src/wizard/upgrade_uifile_fre @@ -0,0 +1,13 @@ +[{ + "step_title": "Mettre à jour Prowlarr", + "items": [{ + "desc": "Garder Prowlarr à jour en utilisant System>Updates dans l'interface Prowlarr." + }] +},{ + "step_title": "Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + },{ + "desc": "NOTE: La mise à jour de l'application va tenter de corriger les permissions des répertoires. En cas d'erreur de permission dans Radarr, donner les droits de Lecture/Ecriture au groupe 'sc-download' sur les répertoires mentionnés depuis File Station." + }] +}] diff --git a/spk/radarr/Makefile b/spk/radarr/Makefile index 6249980f9..01f642c03 100644 --- a/spk/radarr/Makefile +++ b/spk/radarr/Makefile @@ -1,14 +1,14 @@ -SPK_NAME = radarr -SPK_VERS = $(shell date +%Y%m%d) -SPK_REV = 16 +SPK_NAME = radarr_official +SPK_CONFLICT = radarr +SPK_VERS = 4.1.0.6175 SPK_ICON = src/radarr.png -REQUIRED_MIN_DSM = 5.0 +REQUIRED_MIN_DSM = 6.0 # .NET is not supported on PPC, ARM5, ARM7L and x86 UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) -DEPENDS = cross/libstdc++ cross/libmediainfo cross/sqlite cross/radarr +DEPENDS = cross/radarr MAINTAINER = Team Radarr MAINTAINER_URL = https://radarr.video/ @@ -18,9 +18,9 @@ SUPPORTURL = https://radarr.video/\#support DESCRIPTION = Radarr is a movie collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new movies and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available. STARTABLE = yes DISPLAY_NAME = Radarr -CHANGELOG = "Update Radarr to v3.0.2.4552 .NET Core" +CHANGELOG = "${DISPLAY_NAME} v$(SPK_VERS)" -HOMEPAGE = https://radarr.video/ +HOMEPAGE = $(MAINTAINER_URL) LICENSE = GPLv3 SERVICE_USER = auto @@ -33,18 +33,37 @@ ADMIN_PORT = $(SERVICE_PORT) WIZARDS_DIR = src/wizard/ -POST_STRIP_TARGET = radarr_extra_install +POST_STRIP_TARGET = app_extra_install -# use alternate TMPDIR as /tmp might be too small. +# DSM prevents executing from /tmp in 7.1 USE_ALTERNATE_TMPDIR = 1 +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +DEPENDS += cross/bubblewrap cross/debian-buster +app_extra_install: rootfs_install +else ifeq ($(ARCH), comcerto2k) +DEPENDS += cross/debian-buster +SPK_DEPENDS = "bubblewrap>=0.6.1" +app_extra_install: rootfs_install +else +DEPENDS += cross/sqlite cross/radarr +endif + include ../../mk/spksrc.spk.mk -PACKAGE_VERSION = $(SPK_NAME_ARCH)-$(SPK_TCVERS)_$(SPK_VERS)-$(SPK_REV) -PACKAGE_AUTHOR = [Team Radarr](https://radarr.video) +PACKAGE_VERSION = $(SPK_VERS)-spk$(SPK_REV)-$(SPK_NAME_ARCH)-$(SPK_TCVERS) +PACKAGE_AUTHOR = [$(MAINTAINER)]($(MAINTAINER_URL)) + +.PHONY: app_extra_install rootfs_install + +rootfs_install: + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs update; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs install -y --no-install-recommends --no-install-suggests ca-certificates locales tzdata libicu63 libssl1.1 libstdc++6 zlib1g libsqlite3-0; \ + rm -rf $(STAGING_DIR)/tmp/* $(STAGING_DIR)/var/lib/apt/lists/* $(STAGING_DIR)/var/tmp/*; \ -.PHONY: radarr_extra_install -radarr_extra_install: +app_extra_install: @install -m 755 -d $(STAGING_DIR)/app @install -m 644 src/config.xml $(STAGING_DIR)/app/config.xml - @echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/share/Radarr/package_info + @echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/usr/lib/radarr/package_info diff --git a/spk/radarr/src/service-setup.sh b/spk/radarr/src/service-setup.sh index 8ddc98117..08aa2b9cf 100644 --- a/spk/radarr/src/service-setup.sh +++ b/spk/radarr/src/service-setup.sh @@ -1,68 +1,55 @@ - -# Radarr service setup - -RADARR="${SYNOPKG_PKGDEST}/share/Radarr/bin/Radarr" - -# Radarr uses custom Config and PID directories -HOME_DIR="${SYNOPKG_PKGVAR}" -CONFIG_DIR="${SYNOPKG_PKGVAR}/.config" -PID_FILE="${CONFIG_DIR}/Radarr/radarr.pid" - -# Some have it stored in the root of package -LEGACY_CONFIG_DIR="${SYNOPKG_PKGDEST}/.config" +APP_LOWER="radarr" +APP_UPPER="Radarr" GROUP="sc-download" -LEGACY_GROUP="sc-media" -SERVICE_COMMAND="env HOME=${HOME_DIR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${RADARR}" +USR_LIB="/usr/lib/${APP_LOWER}" +PID_FILE="${SYNOPKG_PKGVAR}/${APP_LOWER}.pid" + +# If the bwrap binary is in this package, use it, otherwise use from standalone package. +BWRAP="${SYNOPKG_PKGDEST}/bin/bwrap" +if [ ! -f "${BWRAP}" ]; then + BWRAP="/var/packages/bubblewrap/target/bin/bwrap" +fi + +# Some versions include a rootfs to create a chroot container with newer libraries. +ROOTFS="${SYNOPKG_PKGDEST}/rootfs" +if [ -d "${ROOTFS}" ]; then + APP="${USR_LIB}/bin/${APP_UPPER}" + CONFIG_DIR="/var/lib/${APP_LOWER}" + SERVICE_COMMAND="${BWRAP} --bind ${ROOTFS} / --proc /proc --dev /dev --bind ${SYNOPKG_PKGDEST}${USR_LIB} ${USR_LIB} --bind ${SYNOPKG_PKGVAR} ${CONFIG_DIR} --bind /volume1 /volume1 --setenv HOME ${SYNOPKG_PKGVAR} ${APP} --nobrowser --data=${CONFIG_DIR}" +else + APP="${SYNOPKG_PKGDEST}${USR_LIB}/bin/${APP_UPPER}" + SERVICE_COMMAND="env HOME=${SYNOPKG_PKGVAR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${APP} --nobrowser --data=${SYNOPKG_PKGVAR}" +fi + SVC_BACKGROUND=y -service_postinst () +fix_permissions () { - # Move config.xml to .config - mkdir -p ${CONFIG_DIR}/Radarr - mv ${SYNOPKG_PKGDEST}/app/config.xml ${CONFIG_DIR}/Radarr/config.xml - if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then - set_unix_permissions "${CONFIG_DIR}" + if [ -f "${BWRAP}" ]; then + chown root:root "${BWRAP}" + chmod u+s "${BWRAP}" + fi - # If nessecary, add user also to the old group before removing it - syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "${LEGACY_GROUP}" - syno_user_add_to_legacy_group "${EFF_USER}" "${USER}" "users" + set_unix_permissions "${SYNOPKG_PKGVAR}" fi } -service_preupgrade () +service_postinst () { - # We have to account for legacy folder in the root - # It should go, after the upgrade, into /var/.config/ - # The /var/ folder gets automatically copied by service-installer after this - if [ -d "${LEGACY_CONFIG_DIR}" ]; then - echo "Moving ${LEGACY_CONFIG_DIR} to ${INST_VAR}" - mv ${LEGACY_CONFIG_DIR} ${CONFIG_DIR} 2>&1 - else - # Create, in case it's missing for some reason - mkdir ${CONFIG_DIR} 2>&1 - fi + # Move config.xml to .config + mv ${SYNOPKG_PKGDEST}/app/config.xml ${SYNOPKG_PKGVAR} + + fix_permissions } service_postupgrade () { - # Make Radarr do an update check on start to avoid possible Radarr + # Do an update check on start to avoid possible # downgrade when synocommunity package is updated - touch ${CONFIG_DIR}/Radarr/update_required + touch ${SYNOPKG_PKGVAR}/update_required - if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then - set_unix_permissions "${CONFIG_DIR}" - fi - - UPDATE_FROM_VERSION=${SYNOPKG_OLD_PKGVER%-*} - UPDATE_FROM_REV=${SYNOPKG_OLD_PKGVER##*-} - if [ ${UPDATE_FROM_REV} -lt 6 ]; then - # If backup was created before new-style packages - # new updates/backups will fail due to permissions (see #3185) - # fixed in #3190, i.e. radarr v20180303-6 - set_unix_permissions "/tmp/radarr_backup" - set_unix_permissions "/tmp/radarr_update" - fi + fix_permissions } diff --git a/spk/readarr/Makefile b/spk/readarr/Makefile new file mode 100644 index 000000000..50fa02493 --- /dev/null +++ b/spk/readarr/Makefile @@ -0,0 +1,68 @@ +SPK_NAME = readarr_official +SPK_CONFLICT = readarr +SPK_VERS = 0.1.0.1248 +SPK_ICON = src/readarr.png + +REQUIRED_MIN_DSM = 6.0 + +# .NET is not supported on PPC, ARM5, ARM7L and x86 +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(i686_ARCHS) + +DEPENDS = cross/readarr + +MAINTAINER = Team Readarr +MAINTAINER_URL = https://readarr.com/ +HELPURL = https://wiki.servarr.com/Readarr +SUPPORTURL = https://readarr.audio/\#support + +DESCRIPTION = Readarr is an ebook and audiobook collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new books from your favorite authors and will grab, sort, and rename them. Note that only one type of a given book is supported. If you want both an audiobook and ebook of a given book you will need multiple instances. +STARTABLE = yes +DISPLAY_NAME = Readarr +CHANGELOG = "${DISPLAY_NAME} v$(SPK_VERS)" + +HOMEPAGE = $(MAINTAINER_URL) +LICENSE = GPLv3 + +SERVICE_USER = auto +SERVICE_SETUP = src/service-setup.sh +SERVICE_PORT = 8787 +SERVICE_PORT_TITLE = $(DISPLAY_NAME) + +# Admin link for in DSM UI +ADMIN_PORT = $(SERVICE_PORT) + +WIZARDS_DIR = src/wizard/ + +POST_STRIP_TARGET = app_extra_install + +# DSM prevents executing from /tmp in 7.1 +USE_ALTERNATE_TMPDIR = 1 + +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +DEPENDS += cross/bubblewrap cross/debian-buster +app_extra_install: rootfs_install +else ifeq ($(ARCH), comcerto2k) +DEPENDS += cross/debian-buster +SPK_DEPENDS = "bubblewrap>=0.6.1" +app_extra_install: rootfs_install +else +DEPENDS += cross/sqlite cross/readarr +endif + +include ../../mk/spksrc.spk.mk + +PACKAGE_VERSION = $(SPK_VERS)-spk$(SPK_REV)-$(SPK_NAME_ARCH)-$(SPK_TCVERS) +PACKAGE_AUTHOR = [$(MAINTAINER)]($(MAINTAINER_URL)) + +.PHONY: app_extra_install rootfs_install + +rootfs_install: + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs update; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs install -y --no-install-recommends --no-install-suggests ca-certificates locales tzdata libicu63 libssl1.1 libstdc++6 zlib1g libsqlite3-0; \ + rm -rf $(STAGING_DIR)/tmp/* $(STAGING_DIR)/var/lib/apt/lists/* $(STAGING_DIR)/var/tmp/*; \ + +app_extra_install: + @install -m 755 -d $(STAGING_DIR)/app + @echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/usr/lib/readarr/package_info diff --git a/spk/readarr/src/readarr.png b/spk/readarr/src/readarr.png new file mode 100644 index 000000000..a66d4e23e Binary files /dev/null and b/spk/readarr/src/readarr.png differ diff --git a/spk/readarr/src/service-setup.sh b/spk/readarr/src/service-setup.sh new file mode 100644 index 000000000..0867ca7c7 --- /dev/null +++ b/spk/readarr/src/service-setup.sh @@ -0,0 +1,55 @@ +APP_LOWER="readarr" +APP_UPPER="Readarr" + +GROUP="sc-download" + +USR_LIB="/usr/lib/${APP_LOWER}" +PID_FILE="${SYNOPKG_PKGVAR}/${APP_LOWER}.pid" + +# If the bwrap binary is in this package, use it, otherwise use from standalone package. +BWRAP="${SYNOPKG_PKGDEST}/bin/bwrap" +if [ ! -f "${BWRAP}" ]; then + BWRAP="/var/packages/bubblewrap/target/bin/bwrap" +fi + +# Some versions include a rootfs to create a chroot container with newer libraries. +ROOTFS="${SYNOPKG_PKGDEST}/rootfs" +if [ -d "${ROOTFS}" ]; then + APP="${USR_LIB}/bin/${APP_UPPER}" + CONFIG_DIR="/var/lib/${APP_LOWER}" + SERVICE_COMMAND="${BWRAP} --bind ${ROOTFS} / --proc /proc --dev /dev --bind ${SYNOPKG_PKGDEST}${USR_LIB} ${USR_LIB} --bind ${SYNOPKG_PKGVAR} ${CONFIG_DIR} --bind /volume1 /volume1 --setenv HOME ${SYNOPKG_PKGVAR} ${APP} --nobrowser --data=${CONFIG_DIR}" +else + APP="${SYNOPKG_PKGDEST}${USR_LIB}/bin/${APP_UPPER}" + SERVICE_COMMAND="env HOME=${SYNOPKG_PKGVAR} LD_LIBRARY_PATH=${SYNOPKG_PKGDEST}/lib ${APP} --nobrowser --data=${SYNOPKG_PKGVAR}" +fi + +SVC_BACKGROUND=y + +fix_permissions () +{ + if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then + if [ -f "${BWRAP}" ]; then + chown root:root "${BWRAP}" + chmod u+s "${BWRAP}" + fi + + set_unix_permissions "${SYNOPKG_PKGVAR}" + fi +} + +service_postinst () +{ + # Move config.xml to .config + mv ${SYNOPKG_PKGDEST}/app/config.xml ${SYNOPKG_PKGVAR} + + fix_permissions +} + +service_postupgrade () +{ + # Do an update check on start to avoid possible + # downgrade when synocommunity package is updated + touch ${SYNOPKG_PKGVAR}/update_required + + fix_permissions +} diff --git a/spk/readarr/src/wizard/install_uifile b/spk/readarr/src/wizard/install_uifile new file mode 100644 index 000000000..c7af95050 --- /dev/null +++ b/spk/readarr/src/wizard/install_uifile @@ -0,0 +1,11 @@ +[{ + "step_title": "Starting and updating Readarr", + "items": [{ + "desc": "The first time Readarr is started it might take a few moments for the interface to become available!

Keep Readarr up-to-date by using Readarr's built-in updater.
Navigate to System>Updates in the Readarr UI." + }] +},{ + "step_title": "DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + }] +}] diff --git a/spk/readarr/src/wizard/install_uifile_fre b/spk/readarr/src/wizard/install_uifile_fre new file mode 100644 index 000000000..98ff32f0a --- /dev/null +++ b/spk/readarr/src/wizard/install_uifile_fre @@ -0,0 +1,11 @@ +[{ + "step_title": "Mettre à jour Readarr", + "items": [{ + "desc": "Au premier démarrage de Readarr cela peut prendre un moment avant que l'interface ne soit disponible !

Garder Readarr à jour en utilisant System>Updates dans l'interface Readarr." + }] +},{ + "step_title": "Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + }] +}] diff --git a/spk/readarr/src/wizard/upgrade_uifile b/spk/readarr/src/wizard/upgrade_uifile new file mode 100644 index 000000000..fa20a7908 --- /dev/null +++ b/spk/readarr/src/wizard/upgrade_uifile @@ -0,0 +1,13 @@ +[{ + "step_title": "Updating Readarr", + "items": [{ + "desc": "Keep Readarr up-to-date by using Readarr's built-in updater.
Navigate to System>Updates in the Readarr UI." + }] +}, { + "step_title": "DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + },{ + "desc": "NOTE: The package upgrade will try to set the correct permissions on your folders. If you get permission errors within Radarr, manually set Read/Write permissions for the 'sc-download' group on the reported folders using File Station." + }] +}] diff --git a/spk/readarr/src/wizard/upgrade_uifile_fre b/spk/readarr/src/wizard/upgrade_uifile_fre new file mode 100644 index 000000000..0de5e38dc --- /dev/null +++ b/spk/readarr/src/wizard/upgrade_uifile_fre @@ -0,0 +1,13 @@ +[{ + "step_title": "Mettre à jour Readarr", + "items": [{ + "desc": "Garder Readarr à jour en utilisant System>Updates dans l'interface Readarr." + }] +},{ + "step_title": "Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + },{ + "desc": "NOTE: La mise à jour de l'application va tenter de corriger les permissions des répertoires. En cas d'erreur de permission dans Radarr, donner les droits de Lecture/Ecriture au groupe 'sc-download' sur les répertoires mentionnés depuis File Station." + }] +}] diff --git a/spk/sonarr/Makefile b/spk/sonarr/Makefile new file mode 100644 index 000000000..3765b31e4 --- /dev/null +++ b/spk/sonarr/Makefile @@ -0,0 +1,68 @@ +SPK_NAME = sonarr_servarr +SPK_CONFLICT = nzbdrone +SPK_VERS = 3.0.8.1507 +SPK_ICON = src/sonarr.png + +REQUIRED_MIN_DSM = 6.0 + +UNSUPPORTED_ARCHS = $(PPC_ARCHS) $(ARMv7L_ARCHS) + +DEPENDS = cross/sonarr cross/debian-buster + +MAINTAINER = Servarr +MAINTAINER_URL = https://sonarr.tv/ +HELPURL = https://wiki.servarr.com/Sonarr +SUPPORTURL = https://sonarr.tv/\#support + +DESCRIPTION = Sonarr is a PVR for newsgroup and torrent users. It can monitor multiple RSS feeds for new episodes of your favourite shows and will grab, sorts and rename them. It can also be configured to automatically upgrade the quality of files already downloaded if a better quality format becomes available. +DESCRIPTION_FRE = Sonarr est un PVR pour les utilisateurs de groupes de discussion et torrents. Il peut surveiller plusieurs flux RSS pour les nouveaux épisodes de vos séries préférées et saisira, sortes et les renomme. Il peut également être configuré pour mettre à jour automatiquement la qualité des fichiers déjà téléchargés si un meilleur format de qualité devient disponible. +DESCRIPTION_SPN = Sonarr es un PVR para los usuarios de grupos de noticias y torrents. Se puede controlar múltiples canales RSS para nuevos episodios de sus programas favoritos y se agarra, tipo y les cambia el nombre. También puede ser configurado para actualizar automáticamente la calidad de los archivos ya descargados si un formato de mejor calidad disponible. +DISPLAY_NAME = Sonarr +STARTABLE = yes +CHANGELOG = "${DISPLAY_NAME} v$(SPK_VERS)" + +HOMEPAGE = https://sonarr.tv +LICENSE = GPLv3 + +SERVICE_USER = auto +SERVICE_SETUP = src/service-setup.sh +SERVICE_PORT = 8989 +SERVICE_PORT_TITLE = $(DISPLAY_NAME) + +# Admin link for in DSM UI +ADMIN_PORT = $(SERVICE_PORT) + +WIZARDS_DIR = src/wizard/ + +POST_STRIP_TARGET = rootfs_install + +# DSM prevents executing from /tmp in 7.1 +USE_ALTERNATE_TMPDIR = 1 + +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, ${TCVERSION}, 7.0),1) +DEPENDS += cross/bubblewrap +else +SPK_DEPENDS = "bubblewrap>=0.6.1" +endif + +include ../../mk/spksrc.spk.mk + +PACKAGE_VERSION = $(SPK_VERS)-spk$(SPK_REV)-$(SPK_NAME_ARCH)-$(SPK_TCVERS) +PACKAGE_AUTHOR = [$(MAINTAINER)]($(MAINTAINER_URL)) + +.PHONY: app_extra_install rootfs_install + +rootfs_install: + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs update; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs install -y apt-transport-https dirmngr gnupg ca-certificates; \ + sudo debuerreotype-chroot $(STAGING_DIR)/rootfs apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF; \ + sudo debuerreotype-chroot $(STAGING_DIR)/rootfs sh -c 'echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official.list'; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs update; \ + sudo debuerreotype-apt-get $(STAGING_DIR)/rootfs install -y --no-install-recommends --no-install-suggests locales tzdata libsqlite3-0 libmediainfo0v5 mono-runtime ca-certificates-mono libmono-system-net-http4.0-cil libmono-corlib4.5-cil libmono-microsoft-csharp4.0-cil libmono-posix4.0-cil libmono-system-componentmodel-dataannotations4.0-cil libmono-system-configuration-install4.0-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-data-datasetextensions4.0-cil libmono-system-data4.0-cil libmono-system-identitymodel4.0-cil libmono-system-io-compression4.0-cil libmono-system-numerics4.0-cil libmono-system-runtime-serialization4.0-cil libmono-system-security4.0-cil libmono-system-servicemodel4.0a-cil libmono-system-serviceprocess4.0-cil libmono-system-transactions4.0-cil libmono-system-web4.0-cil libmono-system-xml-linq4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil; \ + rm -rf $(STAGING_DIR)/tmp/* $(STAGING_DIR)/var/lib/apt/lists/* $(STAGING_DIR)/var/tmp/*; \ + +app_extra_install: + @install -m 755 -d $(STAGING_DIR)/app + @echo "PackageVersion=$(PACKAGE_VERSION)\nPackageAuthor=$(PACKAGE_AUTHOR)" > $(STAGING_DIR)/usr/lib/sonarr/package_info diff --git a/spk/sonarr/src/service-setup.sh b/spk/sonarr/src/service-setup.sh new file mode 100644 index 000000000..469473937 --- /dev/null +++ b/spk/sonarr/src/service-setup.sh @@ -0,0 +1,48 @@ +APP_LOWER="sonarr" +APP_UPPER="Sonarr" + +GROUP="sc-download" + +USR_LIB="/usr/lib/${APP_LOWER}" +PID_FILE="${SYNOPKG_PKGVAR}/${APP_LOWER}.pid" + +# If the bwrap binary is in this package, use it, otherwise use from standalone package. +BWRAP="${SYNOPKG_PKGDEST}/bin/bwrap" +if [ ! -f "${BWRAP}" ]; then + BWRAP="/var/packages/bubblewrap/target/bin/bwrap" +fi + +# All sonarr packages include a rootfs +ROOTFS="${SYNOPKG_PKGDEST}/rootfs" + +APP="${USR_LIB}/bin/${APP_UPPER}" +CONFIG_DIR="/var/lib/${APP_LOWER}" +SERVICE_COMMAND="${BWRAP} --bind ${ROOTFS} / --proc /proc --dev /dev --bind ${SYNOPKG_PKGDEST}${USR_LIB} ${USR_LIB} --bind ${SYNOPKG_PKGVAR} ${CONFIG_DIR} --bind /volume1 /volume1 --setenv HOME ${SYNOPKG_PKGVAR} mono --debug ${APP}.exe -nobrowser -data=${CONFIG_DIR}" + +SVC_BACKGROUND=y + +fix_permissions () +{ + if [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 7 ]; then + if [ -f "${BWRAP}" ]; then + chown root:root "${BWRAP}" + chmod u+s "${BWRAP}" + fi + + set_unix_permissions "${SYNOPKG_PKGVAR}" + fi +} + +service_postinst () +{ + fix_permissions +} + +service_postupgrade () +{ + # Do an update check on start to avoid possible + # downgrade when synocommunity package is updated + touch ${SYNOPKG_PKGVAR}/update_required + + fix_permissions +} diff --git a/spk/sonarr/src/sonarr.png b/spk/sonarr/src/sonarr.png new file mode 100644 index 000000000..815750aa0 Binary files /dev/null and b/spk/sonarr/src/sonarr.png differ diff --git a/spk/sonarr/src/wizard/install_uifile b/spk/sonarr/src/wizard/install_uifile new file mode 100644 index 000000000..e7de3ed37 --- /dev/null +++ b/spk/sonarr/src/wizard/install_uifile @@ -0,0 +1,11 @@ +[{ + "step_title": "Updating Sonarr", + "items": [{ + "desc": "The first time Sonarr is started it might take a few moments for the interface to become available!

Keep Sonarr up-to-date by using Sonarr's built-in updater.
Navigate to System>Updates in the Sonarr UI." + }] +},{ + "step_title": "Attention! DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + }] +}] diff --git a/spk/sonarr/src/wizard/install_uifile_fre b/spk/sonarr/src/wizard/install_uifile_fre new file mode 100644 index 000000000..aa3ab97a1 --- /dev/null +++ b/spk/sonarr/src/wizard/install_uifile_fre @@ -0,0 +1,11 @@ +[{ + "step_title": "Mettre à jour Sonarr", + "items": [{ + "desc": "Au premier démarrage de Sonarr cela peut prendre un moment avant que l'interface ne soit disponible !

Garder Sonarr à jour en utilisant System>Updates dans l'interface Sonarr." + }] +},{ + "step_title": "Attention! Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + }] +}] diff --git a/spk/sonarr/src/wizard/upgrade_uifile b/spk/sonarr/src/wizard/upgrade_uifile new file mode 100644 index 000000000..c564b4c4d --- /dev/null +++ b/spk/sonarr/src/wizard/upgrade_uifile @@ -0,0 +1,18 @@ +[{ + "step_title": "RECOMMENDATION: Download A Backup Before Upgrading", + "items": [{ + "desc": "IMPORTANT: This update is an upgrade to Sonarr v3. We suggest that you download a manual backup as a precautionary measure before installing this update.

You can download a backup via Sonarr's built-in web-interface.
To do this, navigate to System>Backup in the Sonarr UI.

Create a backup and then download a copy of that backup before installing this upgrade." + }] +},{ + "step_title": "Updating Sonarr", + "items": [{ + "desc": "Keep Sonarr up-to-date by using Sonarr's built-in updater.
Navigate to System>Updates in the Sonarr UI." + }] +},{ + "step_title": "Attention! DSM Permissions", + "items": [{ + "desc": "Permissions for all download-related packages are managed with the group 'sc-download' in DSM." + },{ + "desc": "NOTE: The package upgrade will try to set the correct permissions on your folders. If you get permission errors within Sonarr, manually set Read/Write permissions for the 'sc-download' group on the reported folders using File Station." + }] +}] diff --git a/spk/sonarr/src/wizard/upgrade_uifile_fre b/spk/sonarr/src/wizard/upgrade_uifile_fre new file mode 100644 index 000000000..0f7fb188c --- /dev/null +++ b/spk/sonarr/src/wizard/upgrade_uifile_fre @@ -0,0 +1,18 @@ +[{ + "step_title": "RECOMMENDATION: Télécharger une sauvegarde avant la mise à niveau", + "items": [{ + "desc": "IMPORTANT: Cette mise à jour est une mise à niveau vers Sonarr v3. Nous vous suggérons de télécharger une sauvegarde manuelle par mesure de précaution avant d'installer cette mise à jour.

Vous pouvez télécharger une sauvegarde via l'interface Web intégrée de Sonarr.
Pour ce faire, accédez à System>Backup dans l'interface utilisateur Sonarr.

Créez une sauvegarde, puis téléchargez une copie de cette sauvegarde avant d'installer cette mise à niveau." + }] +},{ + "step_title": "Mettre à jour Sonarr", + "items": [{ + "desc": "Garder Sonarr à jour en utilisant System>Updates dans l'interface Sonarr." + }] +},{ + "step_title": "Attention! Permissions DSM", + "items": [{ + "desc": "Les permissions de toutes les applications de téléchargement sont gérées par le groupe 'sc-download' dans DSM." + },{ + "desc": "NOTE: La mise à jour de l'application va tenter de corriger les permissions des répertoires. En cas d'erreur de permission dans Sonarr, donner les droits de Lecture/Ecriture au groupe 'sc-download' sur les répertoires mentionnés depuis File Station." + }] +}]