From 1058a4a00f21ee6779afcb84390f92ec29dc7154 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 25 Dec 2024 12:23:53 +0100 Subject: [PATCH 01/14] add cross/7zip - add cross7zip v24.09 - add p7zip to development environment - add 7z to extract methods - temp install p7zip --- Dockerfile | 1 + cross/7zip/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ cross/7zip/PLIST | 1 + cross/7zip/digests | 3 +++ mk/spksrc.extract.mk | 1 + 5 files changed, 44 insertions(+) create mode 100644 cross/7zip/Makefile create mode 100644 cross/7zip/PLIST create mode 100644 cross/7zip/digests diff --git a/Dockerfile b/Dockerfile index 3bf80f7517b..0e895434530 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,6 +59,7 @@ RUN apt update && apt install --no-install-recommends -y \ mlocate \ moreutils \ nasm \ + p7zip \ patchelf \ php \ pkg-config \ diff --git a/cross/7zip/Makefile b/cross/7zip/Makefile new file mode 100644 index 00000000000..748b7ed8214 --- /dev/null +++ b/cross/7zip/Makefile @@ -0,0 +1,38 @@ +PKG_NAME = 7z +PKG_VERS = 24.09 +PKG_EXT = 7z +PKG_DIST_NAME = $(PKG_NAME)$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) +PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone2 + +EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) + +DEPENDS = + +REQUIRED_MIN_DSM = 7.1 +UNSUPPORTED_ARCHS = comcerto2k + +HOMEPAGE = https://www.7-zip.org/ +COMMENT = 7-Zip is a file archiver with a high compression ratio. +LICENSE = https://github.com/ip7z/7zip/blob/main/DOC/License.txt + +CONFIGURE_TARGET = nop +COMPILE_MAKE_OPTIONS = -f makefile.gcc + +INSTALL_TARGET = 7z_install + +PRE_DOWNLOAD_TARGET = install_p7zip + +include ../../mk/spksrc.cross-cc.mk + +.PHONY: 7z_install +7z_install: + @$(MSG) install target files + @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin + @install -m744 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin + +.PHONY: install_p7zip +install_p7zip: + @$(MSG) "Install p7zip (must be added to Dockerfile)" + sudo apt-get update + sudo apt-get install p7zip diff --git a/cross/7zip/PLIST b/cross/7zip/PLIST new file mode 100644 index 00000000000..ea23c8d231e --- /dev/null +++ b/cross/7zip/PLIST @@ -0,0 +1 @@ +bin:bin/7zz diff --git a/cross/7zip/digests b/cross/7zip/digests new file mode 100644 index 00000000000..885a5873c2f --- /dev/null +++ b/cross/7zip/digests @@ -0,0 +1,3 @@ +7z2409-src.7z SHA1 e48ade184e7bb06bb1e58e9ce2c40e9300e080e9 +7z2409-src.7z SHA256 a33569eed0ce628fb9ceb9f46ac257d3f36b3966471667e65ba01878673c9faa +7z2409-src.7z MD5 611e2c985d25c82e00c001dc53ec70e6 diff --git a/mk/spksrc.extract.mk b/mk/spksrc.extract.mk index e593aed2ee4..7590f7de881 100644 --- a/mk/spksrc.extract.mk +++ b/mk/spksrc.extract.mk @@ -21,6 +21,7 @@ EXTRACT_CMD.tbz = $(TAR_CMD) -xjpf $(DIST_FILE) -C $(EXTRACT_PATH) $(ADDITIONAL_ EXTRACT_CMD.tar.xz = $(TAR_CMD) -xJpf $(DIST_FILE) -C $(EXTRACT_PATH) $(ADDITIONAL_EXTRACTFLAGS) EXTRACT_CMD.tar.lzma = $(TAR_CMD) --lzma -xpf $(DIST_FILE) -C $(EXTRACT_PATH) $(ADDITIONAL_EXTRACTFLAGS) EXTRACT_CMD.tar.lz = $(TAR_CMD) --lzip -xpf $(DIST_FILE) -C $(EXTRACT_PATH) $(ADDITIONAL_EXTRACTFLAGS) +EXTRACT_CMD.7z = 7zr x $(DIST_FILE) -o$(EXTRACT_PATH) $(ADDITIONAL_EXTRACTFLAGS) EXTRACT_CMD.zip = unzip $(DIST_FILE) -d $(EXTRACT_PATH) $(ADDITIONAL_EXTRACTFLAGS) EXTRACT_CMD.deb = dpkg-deb -R $(DIST_FILE) $(EXTRACT_PATH) $(ADDITIONAL_EXTRACTFLAGS) endif From 1323aea3afb640218fe01e53e270a92e0f4426d0 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Wed, 25 Dec 2024 12:31:05 +0100 Subject: [PATCH 02/14] add cross/unrar7 - add unrar v7.1.2 --- cross/unrar7/Makefile | 20 +++++++++++++++++++ cross/unrar7/PLIST | 1 + cross/unrar7/digests | 3 +++ .../001-remove-default-env-flags.patch | 19 ++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 cross/unrar7/Makefile create mode 100644 cross/unrar7/PLIST create mode 100644 cross/unrar7/digests create mode 100644 cross/unrar7/patches/001-remove-default-env-flags.patch diff --git a/cross/unrar7/Makefile b/cross/unrar7/Makefile new file mode 100644 index 00000000000..1d7b5f12886 --- /dev/null +++ b/cross/unrar7/Makefile @@ -0,0 +1,20 @@ +PKG_NAME = unrar +PKG_VERS = 7.1.2 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME)src-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://www.rarlab.com/rar +PKG_DIR = $(PKG_NAME) + +DEPENDS = + +REQUIRED_MIN_DSM = 7.0 +UNSUPPORTED_ARCHS = comcerto2k + +HOMEPAGE = https://rarlab.com +COMMENT = Extract files from rar archives. +LICENSE = freeware + +CONFIGURE_TARGET = nop +INSTALL_MAKE_OPTIONS = install DESTDIR=$(STAGING_INSTALL_PREFIX) + +include ../../mk/spksrc.cross-cc.mk diff --git a/cross/unrar7/PLIST b/cross/unrar7/PLIST new file mode 100644 index 00000000000..7e25c9c6ee8 --- /dev/null +++ b/cross/unrar7/PLIST @@ -0,0 +1 @@ +bin:bin/unrar diff --git a/cross/unrar7/digests b/cross/unrar7/digests new file mode 100644 index 00000000000..c19b197228b --- /dev/null +++ b/cross/unrar7/digests @@ -0,0 +1,3 @@ +unrarsrc-7.1.2.tar.gz SHA1 e141995933bc1821b8103dc8b99a8769dac1b482 +unrarsrc-7.1.2.tar.gz SHA256 143dcacb3a9d9ca0af695adecabe1350b0a3e93d927a065ef8f7cc605ab2d322 +unrarsrc-7.1.2.tar.gz MD5 98367e4b543a56b095ea48b1221dda26 diff --git a/cross/unrar7/patches/001-remove-default-env-flags.patch b/cross/unrar7/patches/001-remove-default-env-flags.patch new file mode 100644 index 00000000000..c2aa9388a81 --- /dev/null +++ b/cross/unrar7/patches/001-remove-default-env-flags.patch @@ -0,0 +1,19 @@ +--- makefile.orig 2024-08-19 08:26:32.000000000 +0000 ++++ makefile 2024-12-25 09:47:18.884839597 +0000 +@@ -5,12 +5,12 @@ + # 2024.08.19: -march=native isn't recognized on some platforms such as RISCV64. + # Thus we removed it. Clang ARM users can add -march=armv8-a+crypto to enable + # ARM NEON crypto. +-CXX=c++ +-CXXFLAGS=-O2 -std=c++11 -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else ++#CXX=c++ ++CXXFLAGS=-O2 -std=c++11 + LIBFLAGS=-fPIC + DEFINES=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP +-STRIP=strip +-AR=ar ++#STRIP=strip ++#AR=ar + LDFLAGS=-pthread + DESTDIR=/usr + From 6969245605bdf4572a89c2f5ef41484fadc0197a Mon Sep 17 00:00:00 2001 From: hgy59 Date: Thu, 2 Jan 2025 18:14:06 +0100 Subject: [PATCH 03/14] cross/7zip: use xz archive for source - avoid the need of p7zip --- cross/7zip/Makefile | 12 +++--------- cross/7zip/digests | 6 +++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/cross/7zip/Makefile b/cross/7zip/Makefile index 748b7ed8214..b34693ae465 100644 --- a/cross/7zip/Makefile +++ b/cross/7zip/Makefile @@ -1,10 +1,11 @@ PKG_NAME = 7z PKG_VERS = 24.09 -PKG_EXT = 7z +PKG_EXT = tar.xz PKG_DIST_NAME = $(PKG_NAME)$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone2 +# source archive does not have a package named top folder EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) DEPENDS = @@ -21,18 +22,11 @@ COMPILE_MAKE_OPTIONS = -f makefile.gcc INSTALL_TARGET = 7z_install -PRE_DOWNLOAD_TARGET = install_p7zip - include ../../mk/spksrc.cross-cc.mk .PHONY: 7z_install 7z_install: - @$(MSG) install target files + @$(MSG) install target file @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin @install -m744 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin -.PHONY: install_p7zip -install_p7zip: - @$(MSG) "Install p7zip (must be added to Dockerfile)" - sudo apt-get update - sudo apt-get install p7zip diff --git a/cross/7zip/digests b/cross/7zip/digests index 885a5873c2f..87c781744ab 100644 --- a/cross/7zip/digests +++ b/cross/7zip/digests @@ -1,3 +1,3 @@ -7z2409-src.7z SHA1 e48ade184e7bb06bb1e58e9ce2c40e9300e080e9 -7z2409-src.7z SHA256 a33569eed0ce628fb9ceb9f46ac257d3f36b3966471667e65ba01878673c9faa -7z2409-src.7z MD5 611e2c985d25c82e00c001dc53ec70e6 +7z2409-src.tar.xz SHA1 fb0ef0558895ad5f33f6ba7e096c90db3f60f146 +7z2409-src.tar.xz SHA256 49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a +7z2409-src.tar.xz MD5 310660dea1e78cfd676cf142f8dc247a From afa3d4aaea34bf76fc675e9b29da7aa62aa45a26 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 3 Jan 2025 10:36:08 +0100 Subject: [PATCH 04/14] rename cross/7zip to cross/7zz --- cross/{7zip => 7zz}/Makefile | 4 ++-- cross/{7zip => 7zz}/PLIST | 0 cross/{7zip => 7zz}/digests | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename cross/{7zip => 7zz}/Makefile (91%) rename cross/{7zip => 7zz}/PLIST (100%) rename cross/{7zip => 7zz}/digests (100%) diff --git a/cross/7zip/Makefile b/cross/7zz/Makefile similarity index 91% rename from cross/7zip/Makefile rename to cross/7zz/Makefile index b34693ae465..99abbe95f5b 100644 --- a/cross/7zip/Makefile +++ b/cross/7zz/Makefile @@ -1,7 +1,7 @@ -PKG_NAME = 7z +PKG_NAME = 7zz PKG_VERS = 24.09 PKG_EXT = tar.xz -PKG_DIST_NAME = $(PKG_NAME)$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) +PKG_DIST_NAME = 7z$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone2 diff --git a/cross/7zip/PLIST b/cross/7zz/PLIST similarity index 100% rename from cross/7zip/PLIST rename to cross/7zz/PLIST diff --git a/cross/7zip/digests b/cross/7zz/digests similarity index 100% rename from cross/7zip/digests rename to cross/7zz/digests From 8b5f91201c7e7582a9a9631ec21c08f5e42f4a61 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 3 Jan 2025 10:37:31 +0100 Subject: [PATCH 05/14] add cross/7za --- cross/7za/Makefile | 32 ++++++++++++++++++++++++++++++++ cross/7za/PLIST | 1 + cross/7za/digests | 3 +++ 3 files changed, 36 insertions(+) create mode 100644 cross/7za/Makefile create mode 100644 cross/7za/PLIST create mode 100644 cross/7za/digests diff --git a/cross/7za/Makefile b/cross/7za/Makefile new file mode 100644 index 00000000000..0fc15c8ae74 --- /dev/null +++ b/cross/7za/Makefile @@ -0,0 +1,32 @@ +PKG_NAME = 7za +PKG_VERS = 24.09 +PKG_EXT = tar.xz +PKG_DIST_NAME = 7z$(subst .,,$(PKG_VERS))-src.$(PKG_EXT) +PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone + +# source archive does not have a package named top folder +EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) + +DEPENDS = + +REQUIRED_MIN_DSM = 7.1 +UNSUPPORTED_ARCHS = comcerto2k + +HOMEPAGE = https://www.7-zip.org/ +COMMENT = 7-Zip is a file archiver with a high compression ratio. +LICENSE = https://github.com/ip7z/7zip/blob/main/DOC/License.txt + +CONFIGURE_TARGET = nop +COMPILE_MAKE_OPTIONS = -f makefile.gcc + +INSTALL_TARGET = 7z_install + +include ../../mk/spksrc.cross-cc.mk + +.PHONY: 7z_install +7z_install: + @$(MSG) install target file + @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin + @install -m744 $(WORK_DIR)/$(PKG_DIR)/_o/7za $(STAGING_INSTALL_PREFIX)/bin + diff --git a/cross/7za/PLIST b/cross/7za/PLIST new file mode 100644 index 00000000000..67682e3e93f --- /dev/null +++ b/cross/7za/PLIST @@ -0,0 +1 @@ +bin:bin/7za diff --git a/cross/7za/digests b/cross/7za/digests new file mode 100644 index 00000000000..87c781744ab --- /dev/null +++ b/cross/7za/digests @@ -0,0 +1,3 @@ +7z2409-src.tar.xz SHA1 fb0ef0558895ad5f33f6ba7e096c90db3f60f146 +7z2409-src.tar.xz SHA256 49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a +7z2409-src.tar.xz MD5 310660dea1e78cfd676cf142f8dc247a From ed99274d67bed04ede272e765b6b42231e76ac66 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 3 Jan 2025 10:43:56 +0100 Subject: [PATCH 06/14] sabnzbd: use cross/7za and cross/unrar7 for DSM 7 --- spk/sabnzbd/Makefile | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index c75aba95e2c..4f3b01f6333 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -4,7 +4,15 @@ SPK_REV = 72 SPK_ICON = src/sabnzbd.png PYTHON_PACKAGE = python311 -DEPENDS = cross/busybox cross/par2cmdline-turbo cross/unrar cross/p7zip cross/$(SPK_NAME) + +DEPENDS = cross/busybox cross/par2cmdline-turbo cross/sabnzbd +OPTIONAL_DEPENDS = cross/unrar7 cross/7za cross/unrar cross/p7zip + +# python311 not supported +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) +# unrar not supported +UNSUPPORTED_ARCHS += $(ARMv5_ARCHS) + SPK_DEPENDS = "python311>=3.11.5-8" WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt @@ -28,19 +36,31 @@ SERVICE_SETUP = src/service-setup.sh SERVICE_PORT = 8080 SERVICE_PORT_TITLE = $(DISPLAY_NAME) -# Ensure C++11 compatibility for unrar -UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS) - # Admin link for in DSM UI ADMIN_PORT = $(SERVICE_PORT) + +SPK_COMMANDS = bin/unrar bin/7za + +include ../../mk/spksrc.common.mk + +ifeq ($(call version_lt, $(TCVERSION), 7.0),1) +DEPENDS += cross/unrar +else +DEPENDS += cross/unrar7 +endif + +ifeq ($(call version_lt, $(TCVERSION), 7.1),1) +DEPENDS += cross/p7zip +else +DEPENDS += cross/7za +endif + POST_STRIP_TARGET = sabnzbd_extra_install # Add nice and ionice commands ENV += BUSYBOX_CONFIG="nice ionice" -SPK_COMMANDS = bin/7za - # [cryptography] DEPENDS += cross/cryptography From c3042d502d5caa9d5aaa8c1c5a0535d721616bf1 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 3 Jan 2025 11:18:14 +0100 Subject: [PATCH 07/14] sabnzbd: fix comcerto2k --- spk/sabnzbd/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index 4f3b01f6333..55616df9290 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -46,12 +46,16 @@ include ../../mk/spksrc.common.mk ifeq ($(call version_lt, $(TCVERSION), 7.0),1) DEPENDS += cross/unrar +else ifeq ($(findstring $(ARCH),comcerto2k),$(ARCH)) +DEPENDS += cross/unrar else DEPENDS += cross/unrar7 endif ifeq ($(call version_lt, $(TCVERSION), 7.1),1) DEPENDS += cross/p7zip +else ifeq ($(findstring $(ARCH),comcerto2k),$(ARCH)) +DEPENDS += cross/p7zip else DEPENDS += cross/7za endif From fb5f963b139cbf424ef59036bc4053dc8270f329 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Fri, 3 Jan 2025 21:12:22 +0100 Subject: [PATCH 08/14] fix 7zip for armv7 and older compilers (DSM 6) - add patch to define additional cflags for ARMv7 - add patch for older compilers (required for x64 and evansport on DSM 6) - add patch to fix XzCrc64Opt.c (required for qoriq) - add custom patch target to make files to patch writable and to run patch in different folder --- cross/7za/Makefile | 38 +++++++++++-- .../001-allow-additional-cflags-for-gcc.patch | 15 ++++++ .../002-fix-hw_aes_256-for-older-gcc.patch | 53 +++++++++++++++++++ cross/7za/patches/003-fix-XzCrc64Opt.patch | 14 +++++ cross/7zz/Makefile | 38 +++++++++++-- .../001-allow-additional-cflags-for-gcc.patch | 15 ++++++ .../002-fix-hw_aes_256-for-older-gcc.patch | 53 +++++++++++++++++++ cross/7zz/patches/003-fix-XzCrc64Opt.patch | 14 +++++ spk/sabnzbd/Makefile | 13 +---- 9 files changed, 232 insertions(+), 21 deletions(-) create mode 100644 cross/7za/patches/001-allow-additional-cflags-for-gcc.patch create mode 100644 cross/7za/patches/002-fix-hw_aes_256-for-older-gcc.patch create mode 100644 cross/7za/patches/003-fix-XzCrc64Opt.patch create mode 100644 cross/7zz/patches/001-allow-additional-cflags-for-gcc.patch create mode 100644 cross/7zz/patches/002-fix-hw_aes_256-for-older-gcc.patch create mode 100644 cross/7zz/patches/003-fix-XzCrc64Opt.patch diff --git a/cross/7za/Makefile b/cross/7za/Makefile index 0fc15c8ae74..6dc88097e94 100644 --- a/cross/7za/Makefile +++ b/cross/7za/Makefile @@ -6,12 +6,13 @@ PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone # source archive does not have a package named top folder +# https://github.com/ip7z/7zip/issues/45 EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) DEPENDS = -REQUIRED_MIN_DSM = 7.1 -UNSUPPORTED_ARCHS = comcerto2k +# compiler too old +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) HOMEPAGE = https://www.7-zip.org/ COMMENT = 7-Zip is a file archiver with a high compression ratio. @@ -20,13 +21,40 @@ LICENSE = https://github.com/ip7z/7zip/blob/main/DOC/License.txt CONFIGURE_TARGET = nop COMPILE_MAKE_OPTIONS = -f makefile.gcc +PATCH_TARGET = 7z_patch INSTALL_TARGET = 7z_install include ../../mk/spksrc.cross-cc.mk +# disable unsupported HW capabilities: +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) +# ARMv7 fails with some undefined symbols +ADDITIONAL_CFLAGS += -DHWCAP2_CRC32=0 -DHWCAP2_SHA1=0 -DHWCAP2_SHA2=0 -DHWCAP2_AES=0 +endif +ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) +# ARMv7L is missing one more symbol: +ADDITIONAL_CFLAGS += -DHWCAP_NEON=0 +endif + +ENV += ADDITIONAL_CFLAGS="$(ADDITIONAL_CFLAGS)" + +.PHONY: 7z_patch +7z_patch: +ifneq ($(strip $(PATCHES)),) + @$(MSG) Make files to patch writable + chmod +w $(EXTRACT_PATH)/CPP/7zip/7zip_gcc.mak + chmod +w $(EXTRACT_PATH)/CPP/7zip/Crypto/MyAes.cpp + chmod +w $(EXTRACT_PATH)/C/XzCrc64Opt.c + @$(MSG) Run patch in $(EXTRACT_PATH) instead of $(WORK_DIR)/$(PKG_DIR) + @for patchfile in $(PATCHES) ; \ + do \ + echo "patch -p$(PATCHES_LEVEL) < $${patchfile}" ; \ + cat $${patchfile} | (cd $(EXTRACT_PATH) && patch -p$(PATCHES_LEVEL)) ; \ + done +endif + .PHONY: 7z_install 7z_install: - @$(MSG) install target file + @$(MSG) Install target file @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin - @install -m744 $(WORK_DIR)/$(PKG_DIR)/_o/7za $(STAGING_INSTALL_PREFIX)/bin - + @install -m 644 $(WORK_DIR)/$(PKG_DIR)/_o/7za $(STAGING_INSTALL_PREFIX)/bin diff --git a/cross/7za/patches/001-allow-additional-cflags-for-gcc.patch b/cross/7za/patches/001-allow-additional-cflags-for-gcc.patch new file mode 100644 index 00000000000..2f2220831cf --- /dev/null +++ b/cross/7za/patches/001-allow-additional-cflags-for-gcc.patch @@ -0,0 +1,15 @@ +# add ADDITIONAL_CFLAGS to makefile for gcc +# +# allow to define additional cflags (required to fix build for 32-bit arm archs) +# +--- CPP/7zip/7zip_gcc.mak.orig 2024-11-25 17:00:00.000000000 +0000 ++++ CPP/7zip/7zip_gcc.mak 2025-01-03 17:13:03.955679931 +0000 +@@ -50,7 +50,7 @@ + endif + + # CFLAGS_BASE_LIST = -S +-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ ++CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) $(ADDITIONAL_CFLAGS) \ + $(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -fPIC + diff --git a/cross/7za/patches/002-fix-hw_aes_256-for-older-gcc.patch b/cross/7za/patches/002-fix-hw_aes_256-for-older-gcc.patch new file mode 100644 index 00000000000..0e59094d48d --- /dev/null +++ b/cross/7za/patches/002-fix-hw_aes_256-for-older-gcc.patch @@ -0,0 +1,53 @@ +# Fix provided by Igor Pavlov for: +# Inquiry Regarding Build Error Encountered While Compiling 7-Zip:undefined reference to `AesCbc_Decode_HW_256' +# in https://sourceforge.net/p/sevenzip/discussion/45797/thread/2a49e0adde/ +# +--- CPP/7zip/Crypto/MyAes.cpp.orig 2024-03-01 09:00:00.000000000 +0000 ++++ CPP/7zip/Crypto/MyAes.cpp 2025-01-03 18:38:35.330153025 +0000 +@@ -153,7 +153,26 @@ + #ifndef Z7_EXTRACT_ONLY + + #ifdef MY_CPU_X86_OR_AMD64 +- #define USE_HW_AES ++ ++ #if defined(__INTEL_COMPILER) ++ #if (__INTEL_COMPILER >= 1110) ++ #define USE_HW_AES ++ #if (__INTEL_COMPILER >= 1900) ++ #define USE_HW_VAES ++ #endif ++ #endif ++ #elif defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30800) \ ++ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40400) ++ #define USE_HW_AES ++ #if defined(__clang__) && (__clang_major__ >= 8) \ ++ || defined(__GNUC__) && (__GNUC__ >= 8) ++ #define USE_HW_VAES ++ #endif ++ #elif defined(_MSC_VER) ++ #define USE_HW_AES ++ #define USE_HW_VAES ++ #endif ++ + #elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) + + #if defined(__ARM_FEATURE_AES) \ +@@ -186,15 +205,15 @@ + #define SET_AES_FUNC_2(f2) \ + if (algo == 2) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW) \ + { f = f2; } +- #ifdef MY_CPU_X86_OR_AMD64 ++ #ifdef USE_HW_VAES + #define SET_AES_FUNC_23(f2, f3) \ + SET_AES_FUNC_2(f2) \ + if (algo == 3) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW_256) \ + { f = f3; } +- #else // MY_CPU_X86_OR_AMD64 ++ #else // USE_HW_VAES + #define SET_AES_FUNC_23(f2, f3) \ + SET_AES_FUNC_2(f2) +- #endif // MY_CPU_X86_OR_AMD64 ++ #endif // USE_HW_VAES + #else // USE_HW_AES + #define SET_AES_FUNC_23(f2, f3) + #endif // USE_HW_AES diff --git a/cross/7za/patches/003-fix-XzCrc64Opt.patch b/cross/7za/patches/003-fix-XzCrc64Opt.patch new file mode 100644 index 00000000000..4147f02d7ec --- /dev/null +++ b/cross/7za/patches/003-fix-XzCrc64Opt.patch @@ -0,0 +1,14 @@ +# fix preprocessor commands +# https://sourceforge.net/p/sevenzip/discussion/45797/thread/d9908ffd01/ +# +--- C/XzCrc64Opt.c.orig 2023-12-08 08:00:00.000000000 +0000 ++++ C/XzCrc64Opt.c 2025-01-03 19:08:34.320848333 +0000 +@@ -235,7 +235,7 @@ + v = Q32BE(1, w1) ^ Q32BE(0, w0); + v ^= Q32BE(3, d1) ^ Q32BE(2, d0); + #endif +-#elif ++#else + #error Stop_Compiling_Bad_CRC64_NUM_TABLES + #endif + p += Z7_CRC64_NUM_TABLES_USE; diff --git a/cross/7zz/Makefile b/cross/7zz/Makefile index 99abbe95f5b..f96840b6aec 100644 --- a/cross/7zz/Makefile +++ b/cross/7zz/Makefile @@ -6,12 +6,13 @@ PKG_DIST_SITE = https://github.com/ip7z/7zip/releases/download/$(PKG_VERS) PKG_DIR = $(PKG_NAME)-$(PKG_VERS)/CPP/7zip/Bundles/Alone2 # source archive does not have a package named top folder +# https://github.com/ip7z/7zip/issues/45 EXTRACT_PATH = $(WORK_DIR)/$(PKG_NAME)-$(PKG_VERS) DEPENDS = -REQUIRED_MIN_DSM = 7.1 -UNSUPPORTED_ARCHS = comcerto2k +# compiler too old +UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) $(ARMv5_ARCHS) HOMEPAGE = https://www.7-zip.org/ COMMENT = 7-Zip is a file archiver with a high compression ratio. @@ -20,13 +21,40 @@ LICENSE = https://github.com/ip7z/7zip/blob/main/DOC/License.txt CONFIGURE_TARGET = nop COMPILE_MAKE_OPTIONS = -f makefile.gcc +PATCH_TARGET = 7z_patch INSTALL_TARGET = 7z_install include ../../mk/spksrc.cross-cc.mk +# disable unsupported HW capabilities: +ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) +# ARMv7 fails with some undefined symbols +ADDITIONAL_CFLAGS += -DHWCAP2_CRC32=0 -DHWCAP2_SHA1=0 -DHWCAP2_SHA2=0 -DHWCAP2_AES=0 +endif +ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH)) +# ARMv7L is missing one more symbol: +ADDITIONAL_CFLAGS += -DHWCAP_NEON=0 +endif + +ENV += ADDITIONAL_CFLAGS="$(ADDITIONAL_CFLAGS)" + +.PHONY: 7z_patch +7z_patch: +ifneq ($(strip $(PATCHES)),) + @$(MSG) Make files to patch writable + chmod +w $(EXTRACT_PATH)/CPP/7zip/7zip_gcc.mak + chmod +w $(EXTRACT_PATH)/CPP/7zip/Crypto/MyAes.cpp + chmod +w $(EXTRACT_PATH)/C/XzCrc64Opt.c + @$(MSG) Run patch in $(EXTRACT_PATH) instead of $(WORK_DIR)/$(PKG_DIR) + @for patchfile in $(PATCHES) ; \ + do \ + echo "patch -p$(PATCHES_LEVEL) < $${patchfile}" ; \ + cat $${patchfile} | (cd $(EXTRACT_PATH) && patch -p$(PATCHES_LEVEL)) ; \ + done +endif + .PHONY: 7z_install 7z_install: - @$(MSG) install target file + @$(MSG) Install target file @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin - @install -m744 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin - + @install -m 644 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin diff --git a/cross/7zz/patches/001-allow-additional-cflags-for-gcc.patch b/cross/7zz/patches/001-allow-additional-cflags-for-gcc.patch new file mode 100644 index 00000000000..2f2220831cf --- /dev/null +++ b/cross/7zz/patches/001-allow-additional-cflags-for-gcc.patch @@ -0,0 +1,15 @@ +# add ADDITIONAL_CFLAGS to makefile for gcc +# +# allow to define additional cflags (required to fix build for 32-bit arm archs) +# +--- CPP/7zip/7zip_gcc.mak.orig 2024-11-25 17:00:00.000000000 +0000 ++++ CPP/7zip/7zip_gcc.mak 2025-01-03 17:13:03.955679931 +0000 +@@ -50,7 +50,7 @@ + endif + + # CFLAGS_BASE_LIST = -S +-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ ++CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) $(ADDITIONAL_CFLAGS) \ + $(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -fPIC + diff --git a/cross/7zz/patches/002-fix-hw_aes_256-for-older-gcc.patch b/cross/7zz/patches/002-fix-hw_aes_256-for-older-gcc.patch new file mode 100644 index 00000000000..0e59094d48d --- /dev/null +++ b/cross/7zz/patches/002-fix-hw_aes_256-for-older-gcc.patch @@ -0,0 +1,53 @@ +# Fix provided by Igor Pavlov for: +# Inquiry Regarding Build Error Encountered While Compiling 7-Zip:undefined reference to `AesCbc_Decode_HW_256' +# in https://sourceforge.net/p/sevenzip/discussion/45797/thread/2a49e0adde/ +# +--- CPP/7zip/Crypto/MyAes.cpp.orig 2024-03-01 09:00:00.000000000 +0000 ++++ CPP/7zip/Crypto/MyAes.cpp 2025-01-03 18:38:35.330153025 +0000 +@@ -153,7 +153,26 @@ + #ifndef Z7_EXTRACT_ONLY + + #ifdef MY_CPU_X86_OR_AMD64 +- #define USE_HW_AES ++ ++ #if defined(__INTEL_COMPILER) ++ #if (__INTEL_COMPILER >= 1110) ++ #define USE_HW_AES ++ #if (__INTEL_COMPILER >= 1900) ++ #define USE_HW_VAES ++ #endif ++ #endif ++ #elif defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 30800) \ ++ || defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40400) ++ #define USE_HW_AES ++ #if defined(__clang__) && (__clang_major__ >= 8) \ ++ || defined(__GNUC__) && (__GNUC__ >= 8) ++ #define USE_HW_VAES ++ #endif ++ #elif defined(_MSC_VER) ++ #define USE_HW_AES ++ #define USE_HW_VAES ++ #endif ++ + #elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE) + + #if defined(__ARM_FEATURE_AES) \ +@@ -186,15 +205,15 @@ + #define SET_AES_FUNC_2(f2) \ + if (algo == 2) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW) \ + { f = f2; } +- #ifdef MY_CPU_X86_OR_AMD64 ++ #ifdef USE_HW_VAES + #define SET_AES_FUNC_23(f2, f3) \ + SET_AES_FUNC_2(f2) \ + if (algo == 3) if (g_Aes_SupportedFunctions_Flags & k_Aes_SupportedFunctions_HW_256) \ + { f = f3; } +- #else // MY_CPU_X86_OR_AMD64 ++ #else // USE_HW_VAES + #define SET_AES_FUNC_23(f2, f3) \ + SET_AES_FUNC_2(f2) +- #endif // MY_CPU_X86_OR_AMD64 ++ #endif // USE_HW_VAES + #else // USE_HW_AES + #define SET_AES_FUNC_23(f2, f3) + #endif // USE_HW_AES diff --git a/cross/7zz/patches/003-fix-XzCrc64Opt.patch b/cross/7zz/patches/003-fix-XzCrc64Opt.patch new file mode 100644 index 00000000000..4147f02d7ec --- /dev/null +++ b/cross/7zz/patches/003-fix-XzCrc64Opt.patch @@ -0,0 +1,14 @@ +# fix preprocessor commands +# https://sourceforge.net/p/sevenzip/discussion/45797/thread/d9908ffd01/ +# +--- C/XzCrc64Opt.c.orig 2023-12-08 08:00:00.000000000 +0000 ++++ C/XzCrc64Opt.c 2025-01-03 19:08:34.320848333 +0000 +@@ -235,7 +235,7 @@ + v = Q32BE(1, w1) ^ Q32BE(0, w0); + v ^= Q32BE(3, d1) ^ Q32BE(2, d0); + #endif +-#elif ++#else + #error Stop_Compiling_Bad_CRC64_NUM_TABLES + #endif + p += Z7_CRC64_NUM_TABLES_USE; diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index 55616df9290..0ea21ee440b 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -5,8 +5,8 @@ SPK_ICON = src/sabnzbd.png PYTHON_PACKAGE = python311 -DEPENDS = cross/busybox cross/par2cmdline-turbo cross/sabnzbd -OPTIONAL_DEPENDS = cross/unrar7 cross/7za cross/unrar cross/p7zip +DEPENDS = cross/busybox cross/par2cmdline-turbo cross/7za cross/sabnzbd +OPTIONAL_DEPENDS = cross/unrar7 cross/unrar # python311 not supported UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) @@ -43,7 +43,6 @@ ADMIN_PORT = $(SERVICE_PORT) SPK_COMMANDS = bin/unrar bin/7za include ../../mk/spksrc.common.mk - ifeq ($(call version_lt, $(TCVERSION), 7.0),1) DEPENDS += cross/unrar else ifeq ($(findstring $(ARCH),comcerto2k),$(ARCH)) @@ -52,14 +51,6 @@ else DEPENDS += cross/unrar7 endif -ifeq ($(call version_lt, $(TCVERSION), 7.1),1) -DEPENDS += cross/p7zip -else ifeq ($(findstring $(ARCH),comcerto2k),$(ARCH)) -DEPENDS += cross/p7zip -else -DEPENDS += cross/7za -endif - POST_STRIP_TARGET = sabnzbd_extra_install # Add nice and ionice commands From 673f08aeb1219743ae0e37fa7bd0e1fa2461c2cd Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 11 Jan 2025 08:09:58 +0100 Subject: [PATCH 09/14] sabnzbd: update changelog and package revision --- spk/sabnzbd/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index 0ea21ee440b..e7f7938e77f 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -1,6 +1,6 @@ SPK_NAME = sabnzbd SPK_VERS = 4.4.1 -SPK_REV = 72 +SPK_REV = 73 SPK_ICON = src/sabnzbd.png PYTHON_PACKAGE = python311 @@ -23,7 +23,7 @@ DESCRIPTION_FRE = SABnzbd rend Usenet aussi simple et automatisé que possible. DESCRIPTION_SPN = SABnzbd hace que Usenet sea lo más simple posible, automatizando todo lo que se puede. Todo lo que tienes que hacer es agregar un archivo .nzb. SABnzbd empieza desde ahí. Tus archivos serán automáticamente descargados, verificados, reparados, descomprimidos y archivados. DISPLAY_NAME = SABnzbd STARTABLE = yes -CHANGELOG = "Update SABnzbd to 4.4.1." +CHANGELOG = "1. Update SABnzbd to 4.4.1.
2. Update 7za to v24.09.
3. Update unrar to v7.1.2 (DSM 7 only)." HOMEPAGE = https://sabnzbd.org LICENSE = GPL From 91f147a3909666288c93908f3bbc6700e675a979 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sat, 11 Jan 2025 08:15:20 +0100 Subject: [PATCH 10/14] sabnzbdd: revert unrar in SPK_COMMANDS --- spk/sabnzbd/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index e7f7938e77f..fb7b049e902 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -39,9 +39,6 @@ SERVICE_PORT_TITLE = $(DISPLAY_NAME) # Admin link for in DSM UI ADMIN_PORT = $(SERVICE_PORT) - -SPK_COMMANDS = bin/unrar bin/7za - include ../../mk/spksrc.common.mk ifeq ($(call version_lt, $(TCVERSION), 7.0),1) DEPENDS += cross/unrar @@ -56,6 +53,8 @@ POST_STRIP_TARGET = sabnzbd_extra_install # Add nice and ionice commands ENV += BUSYBOX_CONFIG="nice ionice" +SPK_COMMANDS = bin/7za + # [cryptography] DEPENDS += cross/cryptography From 91088939db47a62f7bca5f3bfa3a022912d14a39 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 13 Jan 2025 17:36:23 +0100 Subject: [PATCH 11/14] sabnzb: remove cross/busybox dependency - remove cross/busybox: use cross/coreutils for nice and cross/ionice - update cross/coreutils from v8.21 to v9.5 and limit tools to 'nice' - remarks: DSM 6+ and SRM 1.3+ already have nice (but an older version) --- cross/coreutils/Makefile | 16 +++-- cross/coreutils/PLIST | 101 ------------------------------ cross/coreutils/PLIST.all | 102 +++++++++++++++++++++++++++++++ cross/coreutils/digests | 6 +- spk/sabnzbd/Makefile | 5 +- spk/sabnzbd/src/service-setup.sh | 3 - 6 files changed, 117 insertions(+), 116 deletions(-) create mode 100644 cross/coreutils/PLIST.all diff --git a/cross/coreutils/Makefile b/cross/coreutils/Makefile index 2b3d409315e..3b17d9a52f0 100644 --- a/cross/coreutils/Makefile +++ b/cross/coreutils/Makefile @@ -1,17 +1,23 @@ PKG_NAME = coreutils -PKG_VERS = 8.21 +PKG_VERS = 9.5 PKG_EXT = tar.xz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) -PKG_DIST_SITE = https://ftp.gnu.org/gnu/$(PKG_NAME) +PKG_DIST_SITE = https://ftp.gnu.org/gnu/coreutils PKG_DIR = $(PKG_NAME)-$(PKG_VERS) DEPENDS = HOMEPAGE = https://www.gnu.org/s/coreutils/ -COMMENT = Basic file, shell and text manipulation utilities of the GNU operating system -LICENSE = GPL +COMMENT = Basic file, shell and text manipulation utilities of the GNU operating system. We use 'nice' only. +LICENSE = GPLv3 GNU_CONFIGURE = 1 -CONFIGURE_ARGS = --disable-nls include ../../mk/spksrc.cross-cc.mk + +# 32-bit archs require glibc >= 2.34 (i.e. DSM 7.2) to support 64 bit timestamps +ifneq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) +ifeq ($(call version_lt, $(TC_GLIBC), 2.34),1) +CONFIGURE_ARGS += --disable-year2038 +endif +endif diff --git a/cross/coreutils/PLIST b/cross/coreutils/PLIST index 14857245f0b..d32352f715b 100644 --- a/cross/coreutils/PLIST +++ b/cross/coreutils/PLIST @@ -1,102 +1 @@ -bin:bin/[ -bin:bin/base64 -bin:bin/basename -bin:bin/cat -bin:bin/chcon -bin:bin/chgrp -bin:bin/chmod -bin:bin/chown -bin:bin/chroot -bin:bin/cksum -bin:bin/comm -bin:bin/cp -bin:bin/csplit -bin:bin/cut -bin:bin/date -bin:bin/dd -bin:bin/dir -bin:bin/dircolors -bin:bin/dirname -bin:bin/du -bin:bin/echo -bin:bin/env -bin:bin/expand -bin:bin/expr -bin:bin/factor -bin:bin/false -bin:bin/fmt -bin:bin/fold -bin:bin/groups -bin:bin/head -bin:bin/hostid -bin:bin/id -bin:bin/install -bin:bin/join -bin:bin/kill -bin:bin/link -bin:bin/ln -bin:bin/logname -bin:bin/ls -bin:bin/md5sum -bin:bin/mkdir -bin:bin/mkfifo -bin:bin/mknod -bin:bin/mktemp -bin:bin/mv bin:bin/nice -bin:bin/nl -bin:bin/nohup -bin:bin/nproc -bin:bin/od -bin:bin/paste -bin:bin/pathchk -bin:bin/pinky -bin:bin/pr -bin:bin/printenv -bin:bin/printf -bin:bin/ptx -bin:bin/pwd -bin:bin/readlink -bin:bin/realpath -bin:bin/rm -bin:bin/rmdir -bin:bin/runcon -bin:bin/seq -bin:bin/sha1sum -bin:bin/sha224sum -bin:bin/sha256sum -bin:bin/sha384sum -bin:bin/sha512sum -bin:bin/shred -bin:bin/shuf -bin:bin/sleep -bin:bin/sort -bin:bin/split -bin:bin/stat -bin:bin/stdbuf -bin:bin/stty -bin:bin/sum -bin:bin/sync -bin:bin/tac -bin:bin/tail -bin:bin/tee -bin:bin/test -bin:bin/timeout -bin:bin/touch -bin:bin/tr -bin:bin/true -bin:bin/truncate -bin:bin/tsort -bin:bin/tty -bin:bin/uname -bin:bin/unexpand -bin:bin/uniq -bin:bin/unlink -bin:bin/uptime -bin:bin/users -bin:bin/vdir -bin:bin/wc -bin:bin/who -bin:bin/whoami -bin:bin/yes -lib:libexec/coreutils/libstdbuf.so diff --git a/cross/coreutils/PLIST.all b/cross/coreutils/PLIST.all new file mode 100644 index 00000000000..14857245f0b --- /dev/null +++ b/cross/coreutils/PLIST.all @@ -0,0 +1,102 @@ +bin:bin/[ +bin:bin/base64 +bin:bin/basename +bin:bin/cat +bin:bin/chcon +bin:bin/chgrp +bin:bin/chmod +bin:bin/chown +bin:bin/chroot +bin:bin/cksum +bin:bin/comm +bin:bin/cp +bin:bin/csplit +bin:bin/cut +bin:bin/date +bin:bin/dd +bin:bin/dir +bin:bin/dircolors +bin:bin/dirname +bin:bin/du +bin:bin/echo +bin:bin/env +bin:bin/expand +bin:bin/expr +bin:bin/factor +bin:bin/false +bin:bin/fmt +bin:bin/fold +bin:bin/groups +bin:bin/head +bin:bin/hostid +bin:bin/id +bin:bin/install +bin:bin/join +bin:bin/kill +bin:bin/link +bin:bin/ln +bin:bin/logname +bin:bin/ls +bin:bin/md5sum +bin:bin/mkdir +bin:bin/mkfifo +bin:bin/mknod +bin:bin/mktemp +bin:bin/mv +bin:bin/nice +bin:bin/nl +bin:bin/nohup +bin:bin/nproc +bin:bin/od +bin:bin/paste +bin:bin/pathchk +bin:bin/pinky +bin:bin/pr +bin:bin/printenv +bin:bin/printf +bin:bin/ptx +bin:bin/pwd +bin:bin/readlink +bin:bin/realpath +bin:bin/rm +bin:bin/rmdir +bin:bin/runcon +bin:bin/seq +bin:bin/sha1sum +bin:bin/sha224sum +bin:bin/sha256sum +bin:bin/sha384sum +bin:bin/sha512sum +bin:bin/shred +bin:bin/shuf +bin:bin/sleep +bin:bin/sort +bin:bin/split +bin:bin/stat +bin:bin/stdbuf +bin:bin/stty +bin:bin/sum +bin:bin/sync +bin:bin/tac +bin:bin/tail +bin:bin/tee +bin:bin/test +bin:bin/timeout +bin:bin/touch +bin:bin/tr +bin:bin/true +bin:bin/truncate +bin:bin/tsort +bin:bin/tty +bin:bin/uname +bin:bin/unexpand +bin:bin/uniq +bin:bin/unlink +bin:bin/uptime +bin:bin/users +bin:bin/vdir +bin:bin/wc +bin:bin/who +bin:bin/whoami +bin:bin/yes +lib:libexec/coreutils/libstdbuf.so diff --git a/cross/coreutils/digests b/cross/coreutils/digests index 73bacdb4d5b..2a54943fc09 100644 --- a/cross/coreutils/digests +++ b/cross/coreutils/digests @@ -1,3 +1,3 @@ -coreutils-8.21.tar.xz SHA1 3fba93c72fab62f3742fe50957d3a86d4cd08176 -coreutils-8.21.tar.xz SHA256 adaa44bdab3fa5eb352e80d8a31fdbf957b78653d0c2cd30d63e161444288e18 -coreutils-8.21.tar.xz MD5 065ba41828644eca5dd8163446de5d64 +coreutils-9.5.tar.xz SHA1 867fed7ce2ee15c5150a355a5f3a3b50578cf78d +coreutils-9.5.tar.xz SHA256 cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a +coreutils-9.5.tar.xz MD5 e99adfa059a63db3503cc71f3d151e31 diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index fb7b049e902..5a65abd9ae5 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -5,7 +5,7 @@ SPK_ICON = src/sabnzbd.png PYTHON_PACKAGE = python311 -DEPENDS = cross/busybox cross/par2cmdline-turbo cross/7za cross/sabnzbd +DEPENDS = cross/ionice cross/coreutils cross/par2cmdline-turbo cross/7za cross/sabnzbd OPTIONAL_DEPENDS = cross/unrar7 cross/unrar # python311 not supported @@ -50,9 +50,6 @@ endif POST_STRIP_TARGET = sabnzbd_extra_install -# Add nice and ionice commands -ENV += BUSYBOX_CONFIG="nice ionice" - SPK_COMMANDS = bin/7za # [cryptography] diff --git a/spk/sabnzbd/src/service-setup.sh b/spk/sabnzbd/src/service-setup.sh index ab7657a8982..a854319c409 100644 --- a/spk/sabnzbd/src/service-setup.sh +++ b/spk/sabnzbd/src/service-setup.sh @@ -40,7 +40,4 @@ service_postinst () mkdir -p "$(dirname ${LOG_FILE})" fi fi - - # Install nice/ionice - ${BIN}/busybox --install ${BIN} } From f29708ea70cefd02eb54b681830f26476a224fbf Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 13 Jan 2025 19:27:41 +0100 Subject: [PATCH 12/14] sabnzbd: update cross/par2cmdline-turbo - update cross/par2cmdline-turbo to v1.2.0 and optimize code - fix of https://github.com/animetosho/par2cmdline-turbo/issues/22 is included - former post_install_target is obsolete --- cross/par2cmdline-turbo/Makefile | 39 ++++++++++++-------------------- cross/par2cmdline-turbo/digests | 6 ++--- spk/sabnzbd/Makefile | 4 ++-- 3 files changed, 19 insertions(+), 30 deletions(-) diff --git a/cross/par2cmdline-turbo/Makefile b/cross/par2cmdline-turbo/Makefile index be2bac4d326..7a84462bf92 100644 --- a/cross/par2cmdline-turbo/Makefile +++ b/cross/par2cmdline-turbo/Makefile @@ -1,41 +1,30 @@ PKG_NAME = par2cmdline-turbo -PKG_VERS = 1.1.0 +PKG_VERS = 1.2.0 PKG_EXT = tar.gz -PKG_GIT_HASH = e00677a8249f438f0f52b0270af9e8c7116eeac0 -PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT) +PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = https://github.com/animetosho/par2cmdline-turbo/archive -PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT) -PKG_DIR = $(PKG_NAME)-$(PKG_GIT_HASH) +PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) DEPENDS = +# A compiler with support for C++11 language features is required. +UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS) + HOMEPAGE = https://github.com/animetosho/par2cmdline-turbo COMMENT = This is a simple fork of par2cmdline which replaces core computation routines with ParPars processing backend, improving par2cmdlines performance on x86/ARM platforms. par2cmdline is a PAR 2.0 compatible file verification and repair tool. LICENSE = GPL -# Ensure C++11 compatibility -UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS) +PRE_CONFIGURE_TARGET = par2cmdline-turbo_pre_configure GNU_CONFIGURE = 1 -ADDITIONAL_CFLAGS = -std=c11 -PRE_CONFIGURE_TARGET = myPreConfigure -POST_INSTALL_TARGET = myPostInstall +ADDITIONAL_CPPFLAGS = -O2 +# ignore some compiler warnings +ADDITIONAL_CPPFLAGS += -Wno-unused-variable -Wno-unused-function include ../../mk/spksrc.cross-cc.mk -PAR2_TOOLS = par2create par2repair par2verify - -.PHONY: myPreConfigure -myPreConfigure: - $(RUN) ./automake.sh - -.PHONY: myPostInstall -myPostInstall: - (cd $(INSTALL_DIR)/$(INSTALL_PREFIX)/bin ; \ - for tool in $(PAR2_TOOLS); \ - do \ - rm $${tool} ; \ - ln -sf par2 $${tool} ; \ - done \ - ) +.PHONY: par2cmdline-turbo_pre_configure +par2cmdline-turbo_pre_configure: + @$(RUN) ./automake.sh diff --git a/cross/par2cmdline-turbo/digests b/cross/par2cmdline-turbo/digests index 0192a8e6a58..a581d3c74ce 100644 --- a/cross/par2cmdline-turbo/digests +++ b/cross/par2cmdline-turbo/digests @@ -1,3 +1,3 @@ -par2cmdline-turbo-gite00677a8249f438f0f52b0270af9e8c7116eeac0.tar.gz SHA1 17187908f279068a5306b88b6adcb3ad63d83356 -par2cmdline-turbo-gite00677a8249f438f0f52b0270af9e8c7116eeac0.tar.gz SHA256 bb0ad1baa2625a6bd61122e43e84a1aa62a6da8d6ddc4eb024adfe5c4bf7f81a -par2cmdline-turbo-gite00677a8249f438f0f52b0270af9e8c7116eeac0.tar.gz MD5 fee6b5fd2997095ad52c25f344062a7b +par2cmdline-turbo-1.2.0.tar.gz SHA1 07d2dd77d7a27504ee3118c8e90699d635cae211 +par2cmdline-turbo-1.2.0.tar.gz SHA256 5d3911d1defaf2aa9d17f8b37325fa3152edce5814c5110647b2e5197706bfa4 +par2cmdline-turbo-1.2.0.tar.gz MD5 01df3c7dd697f2e5f6c9a4b76e545f50 diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index 5a65abd9ae5..c73ea381d96 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -13,7 +13,7 @@ UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) # unrar not supported UNSUPPORTED_ARCHS += $(ARMv5_ARCHS) -SPK_DEPENDS = "python311>=3.11.5-8" +SPK_DEPENDS = $(PYTHON_PACKAGE) WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt @@ -23,7 +23,7 @@ DESCRIPTION_FRE = SABnzbd rend Usenet aussi simple et automatisé que possible. DESCRIPTION_SPN = SABnzbd hace que Usenet sea lo más simple posible, automatizando todo lo que se puede. Todo lo que tienes que hacer es agregar un archivo .nzb. SABnzbd empieza desde ahí. Tus archivos serán automáticamente descargados, verificados, reparados, descomprimidos y archivados. DISPLAY_NAME = SABnzbd STARTABLE = yes -CHANGELOG = "1. Update SABnzbd to 4.4.1.
2. Update 7za to v24.09.
3. Update unrar to v7.1.2 (DSM 7 only)." +CHANGELOG = "1. Update SABnzbd to 4.4.1.
2. Update 7za to v24.09.
3. Update unrar to v7.1.2 (DSM 7 only).
4. Update par2cmdline-turbo to v1.2.0." HOMEPAGE = https://sabnzbd.org LICENSE = GPL From fbbc933a2a9557241810a7968f4fd88db21cc761 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Mon, 13 Jan 2025 23:32:03 +0100 Subject: [PATCH 13/14] fix 7zip - install tools with executable flag --- cross/7za/Makefile | 2 +- cross/7zz/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cross/7za/Makefile b/cross/7za/Makefile index 6dc88097e94..d224de08dbd 100644 --- a/cross/7za/Makefile +++ b/cross/7za/Makefile @@ -57,4 +57,4 @@ endif 7z_install: @$(MSG) Install target file @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin - @install -m 644 $(WORK_DIR)/$(PKG_DIR)/_o/7za $(STAGING_INSTALL_PREFIX)/bin + @install -m 755 $(WORK_DIR)/$(PKG_DIR)/_o/7za $(STAGING_INSTALL_PREFIX)/bin diff --git a/cross/7zz/Makefile b/cross/7zz/Makefile index f96840b6aec..afe7aa07492 100644 --- a/cross/7zz/Makefile +++ b/cross/7zz/Makefile @@ -57,4 +57,4 @@ endif 7z_install: @$(MSG) Install target file @install -d -m 755 $(STAGING_INSTALL_PREFIX)/bin - @install -m 644 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin + @install -m 755 $(WORK_DIR)/$(PKG_DIR)/_o/7zz $(STAGING_INSTALL_PREFIX)/bin From e642275e879184f0e5be6c287b38fb97e1efb173 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Tue, 14 Jan 2025 21:18:16 +0100 Subject: [PATCH 14/14] sabnzbd: replace 7za by 7zz --- spk/sabnzbd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spk/sabnzbd/Makefile b/spk/sabnzbd/Makefile index c73ea381d96..c0035e626b5 100644 --- a/spk/sabnzbd/Makefile +++ b/spk/sabnzbd/Makefile @@ -5,7 +5,7 @@ SPK_ICON = src/sabnzbd.png PYTHON_PACKAGE = python311 -DEPENDS = cross/ionice cross/coreutils cross/par2cmdline-turbo cross/7za cross/sabnzbd +DEPENDS = cross/ionice cross/coreutils cross/par2cmdline-turbo cross/7zz cross/sabnzbd OPTIONAL_DEPENDS = cross/unrar7 cross/unrar # python311 not supported @@ -23,7 +23,7 @@ DESCRIPTION_FRE = SABnzbd rend Usenet aussi simple et automatisé que possible. DESCRIPTION_SPN = SABnzbd hace que Usenet sea lo más simple posible, automatizando todo lo que se puede. Todo lo que tienes que hacer es agregar un archivo .nzb. SABnzbd empieza desde ahí. Tus archivos serán automáticamente descargados, verificados, reparados, descomprimidos y archivados. DISPLAY_NAME = SABnzbd STARTABLE = yes -CHANGELOG = "1. Update SABnzbd to 4.4.1.
2. Update 7za to v24.09.
3. Update unrar to v7.1.2 (DSM 7 only).
4. Update par2cmdline-turbo to v1.2.0." +CHANGELOG = "1. Update SABnzbd to 4.4.1.
2. Replace 7za by 7zz v24.09.
3. Update unrar to v7.1.2 (DSM 7 only).
4. Update par2cmdline-turbo to v1.2.0." HOMEPAGE = https://sabnzbd.org LICENSE = GPL @@ -50,7 +50,7 @@ endif POST_STRIP_TARGET = sabnzbd_extra_install -SPK_COMMANDS = bin/7za +SPK_COMMANDS = bin/7zz # [cryptography] DEPENDS += cross/cryptography