MyGit

SynoCommunity/spksrc

Fork: 1237 Star: 3042 (更新于 2024-12-16 23:05:05)

license: NOASSERTION

Language: C .

Cross compilation framework to create native packages for the Synology's NAS

最后发布版本: transmission ( 2024-06-16 18:01:01)

官方网址 GitHub网址

Discord

SynoCommunity is now on Discord!

Discord

spksrc

spksrc is a cross compilation framework intended to compile and package software for Synology NAS devices. Packages are made available via the SynoCommunity repository.

DSM 7

DSM 7 was released on June 29 2021 as Version 7.0.41890.

  • The main issue we had with our reposity is fixed in spkrepo and online since February 2024
    • before the repository deliverd DSM 6 packages for Systems with DSM 7, when no DSM 7 package was available
    • this gave errors like "invalid file format" (or "package requires root privileges")
    • you still get this error when manually installing a DSM 6 package on DSM 7
  • You find the status of the former packages in the issue #4524 Meta: DSM7 package status
  • New packages support DSM 7 from initial package version (and some require at least DSM 7).
  • ATTENTION: As reported, package configuration settings may be lost following the upgrade to DSM 7 and the execution of a Package repair. Make sure to backup your settings and configuration for your SynoCommunity packages before installation of DSM 7 to facilitate restoration if needed.

Contributing

Before opening a new issue, check the FAQ and search open issues. If you can't find an answer, or if you want to open a package request, read CONTRIBUTING to make sure you include all the information needed for contributors to handle your request.

Setup Development Environment

Docker

The Docker development environment supports Linux and macOS systems, but not Windows due to limitations of the underlying file system.

  1. Fork and clone spksrc: git clone https://github.com/YOUR-USERNAME/spksrc
  2. Install Docker on your host OS (see Docker installation, or use a wget-based alternative for linux Install Docker with wget).
  3. Download the spksrc Docker container: docker pull ghcr.io/synocommunity/spksrc
  4. Run the container with the repository mounted into the /spksrc directory with the appropriate command for your host Operating System:
cd spksrc # Go to the cloned repository's root folder.

# If running on Linux:
docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc ghcr.io/synocommunity/spksrc /bin/bash

# If running on macOS:
docker run -it --platform=linux/amd64 -v $(pwd):/spksrc -w /spksrc -e TAR_CMD="fakeroot tar" ghcr.io/synocommunity/spksrc /bin/bash
  1. From there, follow the instructions in the Developers HOW TO.

Virtual machine

A virtual machine based on an 64-bit version of Debian 12 stable OS is recommended. Non-x86 architectures are not supported.

Install the requirements (in sync with Dockerfile):

sudo dpkg --add-architecture i386 && sudo apt-get update
sudo apt update
sudo apt install autoconf-archive autogen automake autopoint bash \
                 bash-completion bc bison build-essential check cmake \
                 curl cython3 debootstrap ed expect fakeroot flex \
                 g++-multilib gawk gettext gh git gperf httpie imagemagick \
                 intltool jq libtool-bin libbz2-dev libc6-i386 libcppunit-dev libffi-dev \
                 libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \
                 libpcre3-dev libssl-dev libtool libunistring-dev lzip \
                 man-db manpages-dev mercurial meson mlocate moreutils nasm \
                 ninja-build patchelf php pkg-config python3 python3-distutils \
                 python3-mako python3-pip python3-virtualenv python3-yaml \
                 rename ripgrep ruby-mustache rsync scons subversion \
                 swig texinfo time tree unzip xmlto yasm zip zlib1g-dev

From there, follow the instructions in the Developers HOW TO.

  • You may need to install some packages from testing like autoconf. Read about Apt-Pinning to know how to do that.
  • Some older toolchains may require 32-bit development versions of packages, e.g. zlib1g-dev:i386

LXC

A container based on 64-bit version of Debian 12 stable OS is recommended. Non-x86 architectures are not supported. The following assumes your LXD/LXC environment is already initiated (e.g. lxc init) and you have minimal LXD/LXC basic knowledge :

  1. Create a new container (will use x86_64/amd64 arch by default): lxc launch images:debian/12 spksrc
  2. Enable i386 arch: lxc exec spksrc -- /usr/bin/dpkg --add-architecture i386
  3. Update apt channels: lxc exec spksrc -- /usr/bin/apt update
  4. Install all required packages:
lxc exec spksrc -- /usr/bin/apt install autoconf-archive autogen automake autopoint bash \
                                        bash-completion bc bison build-essential check cmake \
                                        curl cython3 debootstrap ed expect fakeroot flex \
                                        g++-multilib gawk gettext gh git gperf httpie imagemagick \
                                        intltool jq libtool-bin libbz2-dev libc6-i386 libcppunit-dev libffi-dev \
                                        libgc-dev libgmp3-dev libltdl-dev libmount-dev libncurses-dev \
                                        libpcre3-dev libssl-dev libtool libunistring-dev lzip \
                                        man-db manpages-dev mercurial meson mlocate moreutils nasm \
                                        ninja-build patchelf php pkg-config python3 python3-distutils \
                                        python3-mako python3-pip python3-virtualenv python3-yaml \
                                        rename ripgrep ruby-mustache rsync scons subversion \
                                        swig texinfo time tree unzip xmlto yasm zip zlib1g-dev

LXC: spksrc user

  1. By default it is assumed that you will be running as spksrc user into the LXC container. Such user needs to be created into the default container image:
lxc exec spksrc -- /usr/sbin/adduser --uid 1001 spksrc
  1. Setup a default shell environment:
lxc exec spksrc --user 1001 -- cp /etc/skel/.profile /etc/skel/.bashrc ~spksrc/.

From there you can connect to your container as spksrc and follow the instructions in the Developers HOW TO.

lxc exec spksrc -- su --login spksrc
spksrc@spksrc:~$

(OPTIONAL) LXC: Shared spksrc user

You can create a shared user between your Debian/Ubuntu host and the LXC Debian container which simplifies greatly file management between the two. The following assumes you already created a user spksrc with uid 1001 in your Debian/Ubuntu host environment and that you which to share its /home userspace.

  1. Create a mapping rule between the hosts and the LXC image:
lxc config set spksrc raw.idmap "both 1001 1001"
lxc restart spksrc
Remapping container filesystem
  1. Add /home/spksrc from the hsot to the LXC container:
lxc config device add spksrc home disk path=/home/spksrc source=/home/spksrc
Device home added to spksrc
  1. Connect as spksrc user:
lxc exec spksrc -- su --login spksrc
spksrc@spksrc:~$

LXC: Proxy (OPTIONAL)

The following assume you have a running proxy on your LAN setup at IP 192.168.1.1 listening on port 3128 that will allow caching files.

  1. Enforce using a proxy:
lxc config set spksrc environment.http_proxy http://192.168.1.1:3128
lxc config set spksrc environment.https_proxy http://192.168.1.1:3128
  1. Enforce using a proxy with wget in the spksrc container user account:
lxc exec spksrc --user $(id -u spksrc) -- bash -c "cat << EOF > ~spksrc/.wgetrc
use_proxy = on
http_proxy = http://192.168.1.1:3128/
https_proxy = http://192.168.1.1:3128/
ftp_proxy = http://192.168.1.1:3128/
EOF"

Usage

Once you have a development environment set up, you can start building packages, create new ones, or improve upon existing packages while making your changes available to other people. See the Developers HOW TO for information on how to use spksrc.

License

When not explicitly set, files are placed under a 3 clause BSD license

最近版本更新:(数据更新于 2024-08-23 11:55:16)

2024-06-16 18:01:01 transmission

2024-06-01 04:20:34 pre-releases

2024-01-26 21:28:40 toolchains/rust/1.77.0-nightly

2023-09-16 04:08:51 native/llvm

2023-08-11 01:52:58 toolchains/srm1.2

2023-08-11 01:08:34 toolchains/dsm5.2

2023-05-21 09:18:20 sources

2017-12-17 03:41:14 pre-dsm6

SynoCommunity/spksrc同语言 C最近更新仓库

2024-12-21 10:48:05 EdgeTX/edgetx

2024-12-15 21:46:59 arendst/Tasmota

2024-12-13 20:23:33 XITRIX/Moonlight-Switch

2024-12-11 15:17:04 curl/curl

2024-12-07 10:42:25 libsdl-org/SDL

2024-12-05 06:52:52 openwrt/openwrt