From bcc83f6cec56d92011b1f73b9008a6a507100d04 Mon Sep 17 00:00:00 2001 From: xingguangcuican6666 Date: Tue, 28 Oct 2025 11:22:36 +0800 Subject: [PATCH] addpkg(main/cdrkit): 1.1.11-5 --- packages/cdrkit/0001-fix_cmakelists.patch | 21 + .../cdrkit/0002-remove_setuid_using.patch | 35 ++ .../cdrkit/0003-fix_valloc_undeclared.patch | 396 ++++++++++++++++++ packages/cdrkit/0004-fix_rcmd.patch | 34 ++ packages/cdrkit/0005-fix_checksum.patch | 25 ++ packages/cdrkit/0006-fix_md5_and_sha256.patch | 36 ++ .../0007-remove_pthreads_for_termux.patch | 23 + .../cdrkit/0008-fix_outfile_duplicate.patch | 25 ++ .../cdrkit/0009-add_android-shmem_lib.patch | 25 ++ packages/cdrkit/0010-remove_set-id_used.patch | 101 +++++ packages/cdrkit/0011-fix_comerr_problem.patch | 67 +++ .../cdrkit/0012-fix_building_problem.patch | 25 ++ .../cdrkit/0013-change_the_help_info.patch | 34 ++ packages/cdrkit/build.sh | 22 + 14 files changed, 869 insertions(+) create mode 100644 packages/cdrkit/0001-fix_cmakelists.patch create mode 100644 packages/cdrkit/0002-remove_setuid_using.patch create mode 100644 packages/cdrkit/0003-fix_valloc_undeclared.patch create mode 100644 packages/cdrkit/0004-fix_rcmd.patch create mode 100644 packages/cdrkit/0005-fix_checksum.patch create mode 100644 packages/cdrkit/0006-fix_md5_and_sha256.patch create mode 100644 packages/cdrkit/0007-remove_pthreads_for_termux.patch create mode 100644 packages/cdrkit/0008-fix_outfile_duplicate.patch create mode 100644 packages/cdrkit/0009-add_android-shmem_lib.patch create mode 100644 packages/cdrkit/0010-remove_set-id_used.patch create mode 100644 packages/cdrkit/0011-fix_comerr_problem.patch create mode 100644 packages/cdrkit/0012-fix_building_problem.patch create mode 100644 packages/cdrkit/0013-change_the_help_info.patch create mode 100644 packages/cdrkit/build.sh diff --git a/packages/cdrkit/0001-fix_cmakelists.patch b/packages/cdrkit/0001-fix_cmakelists.patch new file mode 100644 index 000000000000000..a6184c35101f8ff --- /dev/null +++ b/packages/cdrkit/0001-fix_cmakelists.patch @@ -0,0 +1,21 @@ +From d248d40e01e8b765215222286360fc904ba93671 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 01/13] fix_cmakelists + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 57edba6..bf224e1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,4 @@ ++cmake_minimum_required(VERSION 3.10) + PROJECT (cdrkit C) + SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit) + +-- +2.51.1 + diff --git a/packages/cdrkit/0002-remove_setuid_using.patch b/packages/cdrkit/0002-remove_setuid_using.patch new file mode 100644 index 000000000000000..99f4c26215745b4 --- /dev/null +++ b/packages/cdrkit/0002-remove_setuid_using.patch @@ -0,0 +1,35 @@ +From b4a44dff88fdb8fd2526c70d197037ec5190a7f7 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 02/13] remove_setuid_using + +--- + include/xconfig.h.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/include/xconfig.h.in b/include/xconfig.h.in +index c130600..52a49c2 100644 +--- a/include/xconfig.h.in ++++ b/include/xconfig.h.in +@@ -132,12 +132,12 @@ + #cmakedefine HAVE_MLOCKALL + /* working mlockall() is present in libc */ + #define HAVE_FLOCK 1 /* *BSD flock() is present in libc */ +-#define HAVE_SETREUID 1 /* setreuid() is present in libc */ +-#define HAVE_SETEUID 1 /* seteuid() is present in libc */ +-#define HAVE_SETUID 1 /* setuid() is present in libc */ +-#define HAVE_SETREGID 1 /* setregid() is present in libc */ +-#define HAVE_SETEGID 1 /* setegid() is present in libc */ +-#define HAVE_SETGID 1 /* setgid() is present in libc */ ++//#define HAVE_SETREUID 1 /* setreuid() is present in libc */ ++//#define HAVE_SETEUID 1 /* seteuid() is present in libc */ ++//#define HAVE_SETUID 1 /* setuid() is present in libc */ ++//#define HAVE_SETREGID 1 /* setregid() is present in libc */ ++//#define HAVE_SETEGID 1 /* setegid() is present in libc */ ++//#define HAVE_SETGID 1 /* setgid() is present in libc */ + #define HAVE_TCGETATTR 1 /* tcgetattr() is present in libc */ + #define HAVE_TCSETATTR 1 /* tcsetattr() is present in libc */ + #define HAVE_GETHOSTID 1 /* gethostid() is present in libc */ +-- +2.51.1 + diff --git a/packages/cdrkit/0003-fix_valloc_undeclared.patch b/packages/cdrkit/0003-fix_valloc_undeclared.patch new file mode 100644 index 000000000000000..06adb69d7dad011 --- /dev/null +++ b/packages/cdrkit/0003-fix_valloc_undeclared.patch @@ -0,0 +1,396 @@ +From d46029a63d6271121146d553931bded1dc7e5300 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 03/13] fix_valloc_undeclared + +--- + include/xconfig.h.in | 2 +- + libusal/scsi-aix.c | 6 +++--- + libusal/scsi-amigaos.c | 4 ++-- + libusal/scsi-apollo.c | 6 +++--- + libusal/scsi-bsd.c | 6 +++--- + libusal/scsi-hpux.c | 4 ++-- + libusal/scsi-linux-pg.c | 3 ++- + libusal/scsi-linux-sg.c | 4 ++-- + libusal/scsi-next.c | 4 ++-- + libusal/scsi-openserver.c | 4 ++-- + libusal/scsi-osf.c | 4 ++-- + libusal/scsi-remote.c | 4 ++-- + libusal/scsi-sgi.c | 4 ++-- + libusal/scsi-sun.c | 4 ++-- + libusal/scsi-unixware.c | 4 ++-- + libusal/scsi-vms.c | 4 ++-- + 16 files changed, 34 insertions(+), 33 deletions(-) + +diff --git a/include/xconfig.h.in b/include/xconfig.h.in +index 52a49c2..f92b649 100644 +--- a/include/xconfig.h.in ++++ b/include/xconfig.h.in +@@ -174,7 +174,7 @@ + #define HAVE_USLEEP 1 /* usleep() is present in libc */ + #define HAVE_FORK 1 /* fork() is present in libc */ + #define HAVE_ALLOCA 1 /* alloca() is present (else use malloc())*/ +-#define HAVE_VALLOC 1 /* valloc() is present in libc (else use malloc())*/ ++//#define HAVE_VALLOC 1 /* valloc() is present in libc (else use malloc())*/ + + /* + * Important: This must be a result from a check _before_ the Large File test +diff --git a/libusal/scsi-aix.c b/libusal/scsi-aix.c +index a7b4be6..d67a057 100644 +--- a/libusal/scsi-aix.c ++++ b/libusal/scsi-aix.c +@@ -41,7 +41,7 @@ + */ + + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -213,7 +213,7 @@ usalo_getbuf(SCSI *usalp, long amt) + { + /* assume having a modern AIX here */ + #ifdef HAVE_ALLOCA_H +- usalp->bufbase = (void *)valloc((size_t)amt); ++ usalp->bufbase = (void *)malloc((size_t)amt); + return (usalp->bufbase); + #else + void *ret; +@@ -224,7 +224,7 @@ usalo_getbuf(SCSI *usalp, long amt) + "usalo_getbuf: %ld bytes\n", amt); + } + /* +- * Damn AIX is a paged system but has no valloc() ++ * Damn AIX is a paged system but has no malloc() + */ + usalp->bufbase = ret = malloc((size_t)(amt+pagesize)); + if (ret == NULL) +diff --git a/libusal/scsi-amigaos.c b/libusal/scsi-amigaos.c +index 991a4ab..649f21c 100644 +--- a/libusal/scsi-amigaos.c ++++ b/libusal/scsi-amigaos.c +@@ -51,7 +51,7 @@ + #include + #include + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -283,7 +283,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-apollo.c b/libusal/scsi-apollo.c +index c368468..d8ddc6a 100644 +--- a/libusal/scsi-apollo.c ++++ b/libusal/scsi-apollo.c +@@ -36,7 +36,7 @@ + #include + #include + #define DomainScsiTimeout 100000 +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -124,7 +124,7 @@ usalo_open(SCSI *usalp, char *device) + /* + * Allocate the sense buffer + */ +- usallocal(usalp)->DomainSensePointer = (Uchar *)valloc((size_t) (SCG_MAX_SENSE + getpagesize())); ++ usallocal(usalp)->DomainSensePointer = (Uchar *)malloc((size_t) (SCG_MAX_SENSE + getpagesize())); + assert(status.all == 0); + /* + * Wire the sense buffer +@@ -178,7 +178,7 @@ usalo_getbuf(SCSI *usalp, long amt) + + if (usalp->debug > 1) + printf("scsi_getbuf: %ld bytes\n", amt); +- ret = valloc((size_t)amt); ++ ret = malloc((size_t)amt); + if (ret == NULL) + return (ret); + usalp->bufbase = ret; +diff --git a/libusal/scsi-bsd.c b/libusal/scsi-bsd.c +index 6e6c240..11ddf6d 100644 +--- a/libusal/scsi-bsd.c ++++ b/libusal/scsi-bsd.c +@@ -47,7 +47,7 @@ + + #undef sense + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -327,7 +327,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +@@ -801,7 +801,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-hpux.c b/libusal/scsi-hpux.c +index f7eb553..f58ccd7 100644 +--- a/libusal/scsi-hpux.c ++++ b/libusal/scsi-hpux.c +@@ -39,7 +39,7 @@ + + #undef sense + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -210,7 +210,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-linux-pg.c b/libusal/scsi-linux-pg.c +index 00edf5d..bf942e0 100644 +--- a/libusal/scsi-linux-pg.c ++++ b/libusal/scsi-linux-pg.c +@@ -45,6 +45,7 @@ + #ifdef HAVE_LINUX_PG_H + #include + #else ++#include + #include "pg.h" /* Use local version as Linux sometimes doesn't have */ + #endif /* installed. Now libusal always supports PP SCSI */ + +@@ -316,7 +317,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- ret = valloc((size_t)(amt+getpagesize())); ++ ret = malloc((size_t)(amt+getpagesize())); + if (ret == NULL) + return (ret); + usalp->bufbase = ret; +diff --git a/libusal/scsi-linux-sg.c b/libusal/scsi-linux-sg.c +index 81d33d4..d468807 100644 +--- a/libusal/scsi-linux-sg.c ++++ b/libusal/scsi-linux-sg.c +@@ -68,7 +68,7 @@ + #include + #include + #include +- ++#include + #ifndef LINUX_VERSION_CODE /* Very old kernel? */ + # define LINUX_VERSION_CODE 0 + #endif +@@ -1094,7 +1094,7 @@ usalo_getbuf(SCSI *usalp, long amt) + * copying the whole buffer contents when + * setting up the /dev/sg data structures. + */ +- ret = valloc((size_t)(amt+getpagesize())); ++ ret = malloc((size_t)(amt+getpagesize())); + if (ret == NULL) + return (ret); + usalp->bufbase = ret; +diff --git a/libusal/scsi-next.c b/libusal/scsi-next.c +index bfbe2b3..1fcf2d3 100644 +--- a/libusal/scsi-next.c ++++ b/libusal/scsi-next.c +@@ -41,7 +41,7 @@ + */ + + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -270,7 +270,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-openserver.c b/libusal/scsi-openserver.c +index d192302..f8d86e2 100644 +--- a/libusal/scsi-openserver.c ++++ b/libusal/scsi-openserver.c +@@ -40,7 +40,7 @@ + #undef sense + + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -758,7 +758,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + + return (usalp->bufbase); + } +diff --git a/libusal/scsi-osf.c b/libusal/scsi-osf.c +index 79d0708..ae75b28 100644 +--- a/libusal/scsi-osf.c ++++ b/libusal/scsi-osf.c +@@ -45,7 +45,7 @@ + #include + #include + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -256,7 +256,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-remote.c b/libusal/scsi-remote.c +index f9b40d6..7689e6a 100644 +--- a/libusal/scsi-remote.c ++++ b/libusal/scsi-remote.c +@@ -39,7 +39,7 @@ + */ + + #include +- ++#include + #if !defined(HAVE_FORK) || !defined(HAVE_SOCKETPAIR) || !defined(HAVE_DUP2) + #undef USE_RCMD_RSH + #endif +@@ -399,7 +399,7 @@ usalo_rgetbuf(usalp, amt) + return ((void *)0); + + #ifdef HAVE_VALLOC +- usalp->bufbase = (void *)valloc((size_t)amt); ++ usalp->bufbase = (void *)malloc((size_t)amt); + #else + usalp->bufbase = (void *)malloc((size_t)amt); + #endif +diff --git a/libusal/scsi-sgi.c b/libusal/scsi-sgi.c +index b19a3ae..5f3ac4c 100644 +--- a/libusal/scsi-sgi.c ++++ b/libusal/scsi-sgi.c +@@ -44,7 +44,7 @@ + */ + + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -241,7 +241,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = valloc((size_t)(amt)); ++ usalp->bufbase = malloc((size_t)(amt)); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-sun.c b/libusal/scsi-sun.c +index 9ea8da8..de5a963 100644 +--- a/libusal/scsi-sun.c ++++ b/libusal/scsi-sun.c +@@ -39,7 +39,7 @@ + */ + + #include +- ++#include + #include /* Needed for gethostid() */ + #ifdef HAVE_SUN_DKIO_H + # include +@@ -382,7 +382,7 @@ usalo_reset(SCSI *usalp, int what) + static void * + usalo_getbuf(SCSI *usalp, long amt) + { +- usalp->bufbase = (void *)valloc((size_t)amt); ++ usalp->bufbase = (void *)malloc((size_t)amt); + return (usalp->bufbase); + } + +diff --git a/libusal/scsi-unixware.c b/libusal/scsi-unixware.c +index 4a149f1..5c754eb 100644 +--- a/libusal/scsi-unixware.c ++++ b/libusal/scsi-unixware.c +@@ -45,7 +45,7 @@ + #include + #include + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -573,7 +573,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = (void *) valloc((size_t)(amt)); ++ usalp->bufbase = (void *) malloc((size_t)(amt)); + + return (usalp->bufbase); + } +diff --git a/libusal/scsi-vms.c b/libusal/scsi-vms.c +index ef29d76..bc694a2 100644 +--- a/libusal/scsi-vms.c ++++ b/libusal/scsi-vms.c +@@ -50,7 +50,7 @@ + #include + #include + #include +- ++#include + /* + * Warning: you may change this source, but if you do that + * you need to change the _usal_version and _usal_auth* string below. +@@ -348,7 +348,7 @@ usalo_getbuf(SCSI *usalp, long amt) + fprintf((FILE *)usalp->errfile, + "usalo_getbuf: %ld bytes\n", amt); + } +- usalp->bufbase = malloc((size_t)(amt)); /* XXX JS XXX valloc() ??? */ ++ usalp->bufbase = malloc((size_t)(amt)); /* XXX JS XXX malloc() ??? */ + return (usalp->bufbase); + } + +-- +2.51.1 + diff --git a/packages/cdrkit/0004-fix_rcmd.patch b/packages/cdrkit/0004-fix_rcmd.patch new file mode 100644 index 000000000000000..f2aea43fe85d5c7 --- /dev/null +++ b/packages/cdrkit/0004-fix_rcmd.patch @@ -0,0 +1,34 @@ +From 64526570f1576a44799318f55c03111cd72bb2e5 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 04/13] fix_rcmd + +--- + libusal/scsi-remote.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/libusal/scsi-remote.c b/libusal/scsi-remote.c +index 7689e6a..773e15c 100644 +--- a/libusal/scsi-remote.c ++++ b/libusal/scsi-remote.c +@@ -77,7 +77,16 @@ + + #include + #include +- ++#include // Required for EACCES ++ ++int rcmd(char **ahost, unsigned short inport, const char *luser, const char *ruser, const char *cmd, int *fd2p) { ++ // Print an error message to inform the user why this is failing. ++ fprintf(stderr, "rcmd() is not supported on this platform. Remote SCSI is disabled.\n"); ++ ++ // Set an error number and return -1 to signal failure, as the real rcmd would. ++ errno = EACCES; // Permission denied is a reasonable error. ++ return -1; ++} + #if defined(SIGDEFER) || defined(SVR4) + #define signal sigset + #endif +-- +2.51.1 + diff --git a/packages/cdrkit/0005-fix_checksum.patch b/packages/cdrkit/0005-fix_checksum.patch new file mode 100644 index 000000000000000..28dc8e7ebfe8a20 --- /dev/null +++ b/packages/cdrkit/0005-fix_checksum.patch @@ -0,0 +1,25 @@ +From ca18d5fc5b6f8343c5e2d8cf720aafe08d943346 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 05/13] fix_checksum + +--- + genisoimage/genisoimage.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c +index 46f0cb7..46998fc 100644 +--- a/genisoimage/genisoimage.c ++++ b/genisoimage/genisoimage.c +@@ -85,7 +85,7 @@ extern char *optarg; + #include + #include + #endif +- ++#include "checksum.h" + struct directory *root = NULL; + int path_ind; + +-- +2.51.1 + diff --git a/packages/cdrkit/0006-fix_md5_and_sha256.patch b/packages/cdrkit/0006-fix_md5_and_sha256.patch new file mode 100644 index 000000000000000..33e78c293e98905 --- /dev/null +++ b/packages/cdrkit/0006-fix_md5_and_sha256.patch @@ -0,0 +1,36 @@ +From fbbf585517c216ecb0479dfebae060b1486c44c6 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 06/13] fix_md5_and_sha256 + +--- + CMakeLists.txt | 1 + + genisoimage/jte.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bf224e1..c22b720 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,5 @@ + cmake_minimum_required(VERSION 3.10) + PROJECT (cdrkit C) ++add_definitions("-D__THROW=") + SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit) + +diff --git a/genisoimage/jte.c b/genisoimage/jte.c +index 0dff289..b9f6c4f 100644 +--- a/genisoimage/jte.c ++++ b/genisoimage/jte.c +@@ -35,7 +35,7 @@ + #ifdef VMS + #include "vms.h" + #endif +- ++#include "md5.h" + /* Different types used in building our state list below */ + #define JTET_FILE_MATCH 1 + #define JTET_NOMATCH 2 +-- +2.51.1 + diff --git a/packages/cdrkit/0007-remove_pthreads_for_termux.patch b/packages/cdrkit/0007-remove_pthreads_for_termux.patch new file mode 100644 index 000000000000000..6bea1da1deb9c5e --- /dev/null +++ b/packages/cdrkit/0007-remove_pthreads_for_termux.patch @@ -0,0 +1,23 @@ +From e5db68441a0e222a263d4b33505621136bc4e4e6 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 07/13] remove_pthreads_for_termux + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c22b720..7b21bde 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,6 @@ + cmake_minimum_required(VERSION 3.10) + PROJECT (cdrkit C) + add_definitions("-D__THROW=") ++add_definitions("-UTHREADED_CHECKSUMS") + SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit) + +-- +2.51.1 + diff --git a/packages/cdrkit/0008-fix_outfile_duplicate.patch b/packages/cdrkit/0008-fix_outfile_duplicate.patch new file mode 100644 index 000000000000000..edeba12c6a3bd4a --- /dev/null +++ b/packages/cdrkit/0008-fix_outfile_duplicate.patch @@ -0,0 +1,25 @@ +From 0dfb224c8f9a2a35a49f5efa66a6db1a60989975 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 08/13] fix_outfile_duplicate + +--- + genisoimage/genisoimage.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/genisoimage/genisoimage.h b/genisoimage/genisoimage.h +index bbedfb0..6f0f7d1 100644 +--- a/genisoimage/genisoimage.h ++++ b/genisoimage/genisoimage.h +@@ -376,7 +376,7 @@ extern int use_fileversion; + extern int split_SL_component; + extern int split_SL_field; + extern char *trans_tbl; +-char *outfile; ++extern char *outfile; + + #define JMAX 64 /* maximum Joliet file name length (spec) */ + #define JLONGMAX 103 /* out of spec Joliet file name length */ +-- +2.51.1 + diff --git a/packages/cdrkit/0009-add_android-shmem_lib.patch b/packages/cdrkit/0009-add_android-shmem_lib.patch new file mode 100644 index 000000000000000..ba956d603603ea8 --- /dev/null +++ b/packages/cdrkit/0009-add_android-shmem_lib.patch @@ -0,0 +1,25 @@ +From c037b9f3c90ff5dd9ae3f0a79a557dbdbf99b8c2 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:34 +0800 +Subject: [PATCH 09/13] add_android-shmem_lib + +--- + icedax/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/icedax/CMakeLists.txt b/icedax/CMakeLists.txt +index 54c2e7d..5692bca 100644 +--- a/icedax/CMakeLists.txt ++++ b/icedax/CMakeLists.txt +@@ -25,7 +25,7 @@ ENDIF (WIN32) + + LINK_DIRECTORIES(../librols ../libusal ../libparanoia) + ADD_EXECUTABLE (icedax aifc.c aiff.c base64.c icedax.c interface.c ioctl.c raw.c resample.c ringbuff.c scsi_cmds.c semshm.c setuid.c sha_func.c sndconfig.c sun.c toc.c wav.c) +-TARGET_LINK_LIBRARIES(icedax wodimstuff ${EXTRA_LIBS}) ++TARGET_LINK_LIBRARIES(icedax android-shmem wodimstuff ${EXTRA_LIBS}) + SET_TARGET_PROPERTIES(icedax PROPERTIES SKIP_BUILD_RPATH TRUE) + + INSTALL(TARGETS icedax DESTINATION bin) +-- +2.51.1 + diff --git a/packages/cdrkit/0010-remove_set-id_used.patch b/packages/cdrkit/0010-remove_set-id_used.patch new file mode 100644 index 000000000000000..7be772c0a91d858 --- /dev/null +++ b/packages/cdrkit/0010-remove_set-id_used.patch @@ -0,0 +1,101 @@ +From c30957f8eb905fa63838a6373aa6e6c88d6b230f Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:35 +0800 +Subject: [PATCH 10/13] remove_set-id_used + +--- + genisoimage/genisoimage.c | 18 +++++++++--------- + readom/readom.c | 18 +++++++++--------- + wodim/wodim.c | 18 +++++++++--------- + 3 files changed, 27 insertions(+), 27 deletions(-) + +diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c +index 46998fc..4ace060 100644 +--- a/genisoimage/genisoimage.c ++++ b/genisoimage/genisoimage.c +@@ -2660,15 +2660,15 @@ parse_input_files: + } + } + /* We don't need root privilleges anymore. */ +-#ifdef HAVE_SETREUID +- if (setreuid(-1, getuid()) < 0) +-#else +-#ifdef HAVE_SETEUID +- if (seteuid(getuid()) < 0) +-#else +- if (setuid(getuid()) < 0) +-#endif +-#endif ++//#ifdef HAVE_SETREUID ++// if (setreuid(-1, getuid()) < 0) ++//#else ++//#ifdef HAVE_SETEUID ++// if (seteuid(getuid()) < 0) ++//#else ++// if (setuid(getuid()) < 0) ++//#endif ++//#endif + #ifdef USE_LIBSCHILY + comerr("Panic cannot set back effective uid.\n"); + #else +diff --git a/readom/readom.c b/readom/readom.c +index d52fe5d..0deb93e 100644 +--- a/readom/readom.c ++++ b/readom/readom.c +@@ -442,15 +442,15 @@ main(int argc, char *argv[]) + /* + * We don't need root privilleges anymore. + */ +-#ifdef HAVE_SETREUID +- if (setreuid(-1, getuid()) < 0) +-#else +-#ifdef HAVE_SETEUID +- if (seteuid(getuid()) < 0) +-#else +- if (setuid(getuid()) < 0) +-#endif +-#endif ++//#ifdef HAVE_SETREUID ++// if (setreuid(-1, getuid()) < 0) ++//#else ++//#ifdef HAVE_SETEUID ++// if (seteuid(getuid()) < 0) ++//#else ++// if (setuid(getuid()) < 0) ++//#endif ++//#endif + comerr("Panic cannot set back effective uid.\n"); + + /* code to use SCG */ +diff --git a/wodim/wodim.c b/wodim/wodim.c +index 7a54ccc..2e2605d 100644 +--- a/wodim/wodim.c ++++ b/wodim/wodim.c +@@ -460,15 +460,15 @@ int main(int argc, char *argv[]) + */ + if (geteuid() != getuid()) { /* AIX does not like to do this */ + /* If we are not root */ +-#ifdef HAVE_SETREUID +- if (setreuid(-1, getuid()) < 0) +-#else +-#ifdef HAVE_SETEUID +- if (seteuid(getuid()) < 0) +-#else +- if (setuid(getuid()) < 0) +-#endif +-#endif ++//#ifdef HAVE_SETREUID ++// if (setreuid(-1, getuid()) < 0) ++//#else ++//#ifdef HAVE_SETEUID ++// if (seteuid(getuid()) < 0) ++//#else ++// if (setuid(getuid()) < 0) ++//#endif ++//#endif + comerr("Panic cannot set back effective uid.\n"); + } + +-- +2.51.1 + diff --git a/packages/cdrkit/0011-fix_comerr_problem.patch b/packages/cdrkit/0011-fix_comerr_problem.patch new file mode 100644 index 000000000000000..7052cbc0a0e89e9 --- /dev/null +++ b/packages/cdrkit/0011-fix_comerr_problem.patch @@ -0,0 +1,67 @@ +From 7e466c5c0186e34cdedda1cc8a25f593028ab018 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:35 +0800 +Subject: [PATCH 11/13] fix_comerr_problem + +--- + genisoimage/genisoimage.c | 16 ++++++++-------- + readom/readom.c | 2 +- + wodim/wodim.c | 2 +- + 3 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c +index 4ace060..7675e22 100644 +--- a/genisoimage/genisoimage.c ++++ b/genisoimage/genisoimage.c +@@ -2669,14 +2669,14 @@ parse_input_files: + // if (setuid(getuid()) < 0) + //#endif + //#endif +-#ifdef USE_LIBSCHILY +- comerr("Panic cannot set back effective uid.\n"); +-#else +- { +- perror("Panic cannot set back effective uid."); +- exit(1); +- } +-#endif ++//#ifdef USE_LIBSCHILY ++// comerr("Panic cannot set back effective uid.\n"); ++//#else ++// { ++// perror("Panic cannot set back effective uid."); ++// exit(1); ++// } ++//#endif + + + #ifdef no_more_needed +diff --git a/readom/readom.c b/readom/readom.c +index 0deb93e..a71c9a3 100644 +--- a/readom/readom.c ++++ b/readom/readom.c +@@ -451,7 +451,7 @@ main(int argc, char *argv[]) + // if (setuid(getuid()) < 0) + //#endif + //#endif +- comerr("Panic cannot set back effective uid.\n"); ++// comerr("Panic cannot set back effective uid.\n"); + + /* code to use SCG */ + +diff --git a/wodim/wodim.c b/wodim/wodim.c +index 2e2605d..a41a44c 100644 +--- a/wodim/wodim.c ++++ b/wodim/wodim.c +@@ -469,7 +469,7 @@ int main(int argc, char *argv[]) + // if (setuid(getuid()) < 0) + //#endif + //#endif +- comerr("Panic cannot set back effective uid.\n"); ++// comerr("Panic cannot set back effective uid.\n"); + } + + #ifdef __linux__ +-- +2.51.1 + diff --git a/packages/cdrkit/0012-fix_building_problem.patch b/packages/cdrkit/0012-fix_building_problem.patch new file mode 100644 index 000000000000000..e4a55ed27f9579b --- /dev/null +++ b/packages/cdrkit/0012-fix_building_problem.patch @@ -0,0 +1,25 @@ +From e8f2403e39703b5126e59dac1d50aba7e39ea0b7 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:31:35 +0800 +Subject: [PATCH 12/13] fix_building_problem + +--- + CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b21bde..79c6b9a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,8 @@ + cmake_minimum_required(VERSION 3.10) + PROJECT (cdrkit C) ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_ANDROID_ARCH) ++ link_libraries(android-glob android-utimes) ++endif() + add_definitions("-D__THROW=") + add_definitions("-UTHREADED_CHECKSUMS") + SUBDIRS(include genisoimage wodim libedc libhfs_iso libparanoia icedax libusal librols libunls readom netscsid 3rd-party/dirsplit) +-- +2.51.1 + diff --git a/packages/cdrkit/0013-change_the_help_info.patch b/packages/cdrkit/0013-change_the_help_info.patch new file mode 100644 index 000000000000000..3efdefbd039085c --- /dev/null +++ b/packages/cdrkit/0013-change_the_help_info.patch @@ -0,0 +1,34 @@ +From b3cc77b14b89cd71aa420b696f067bb36f770cf7 Mon Sep 17 00:00:00 2001 +From: xingguangcuican6666 +Date: Sun, 26 Oct 2025 12:33:31 +0800 +Subject: [PATCH 13/13] change_the_help_info + +--- + genisoimage/genisoimage.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/genisoimage/genisoimage.c b/genisoimage/genisoimage.c +index 7675e22..322a35e 100644 +--- a/genisoimage/genisoimage.c ++++ b/genisoimage/genisoimage.c +@@ -1051,7 +1051,7 @@ susage(int excode) + fprintf(stderr, "Usage: %s [options] -o file directory ...\n", program_name); + fprintf(stderr, "\nUse %s -help\n", program_name); + fprintf(stderr, "to get a list of valid options.\n"); +- fprintf(stderr, "\nReport problems to debburn-devel@lists.alioth.debian.org.\n"); ++ fprintf(stderr, "\nReport problems to https://github.com/termux/termux-packages/issues\n"); + + exit(excode); + } +@@ -1137,7 +1137,7 @@ usage(int excode) + } + } + fprintf(stderr, +- "\nReport problems to debburn-devel@lists.alioth.debian.org.\n"); ++ "\nReport problems to https://github.com/termux/termux-packages/issues\n"); + exit(excode); + } + +-- +2.51.1 + diff --git a/packages/cdrkit/build.sh b/packages/cdrkit/build.sh new file mode 100644 index 000000000000000..68c803f42d3ed75 --- /dev/null +++ b/packages/cdrkit/build.sh @@ -0,0 +1,22 @@ +TERMUX_PKG_HOMEPAGE=https://salsa.debian.org/debian/cdrkit +TERMUX_PKG_DESCRIPTION="cdrkit is a command-line toolkit for creating and burning CD/DVD image files." +TERMUX_PKG_LICENSE="GPL-2.0" +TERMUX_PKG_MAINTAINER="@xingguangcuican6666" +TERMUX_PKG_VERSION="1.1.11-5" +TERMUX_PKG_SRCURL="https://salsa.debian.org/debian/cdrkit/-/archive/debian/9%251.1.11-5/cdrkit-debian-9%25$TERMUX_PKG_VERSION.tar.gz" +TERMUX_PKG_SHA256=cd1781f29f8a98a3364727a242d9f243c695c563bc1cc072c548bb31349ca12f +TERMUX_PKG_DEPENDS="libandroid-glob, libandroid-shmem, libandroid-support, libandroid-utimes, libbz2, libcap, libiconv, zlib" +TERMUX_PKG_BUILD_IN_SRC=true +TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" +-DBITFIELDS_HTOL:STRING=0 +-DNET_TRANSPORT:BOOL=OFF +-DTHREADED_CHECKSUMS:BOOL=OFF +-DHAVE_VALLOC:BOOL=OFF +-DHAVE_SETUID:BOOL=OFF +-DHAVE_SETEUID:BOOL=OFF +-DHAVE_SETREUID:BOOL=OFF +" + +termux_step_pre_configure() { + export LDFLAGS="$LDFLAGS -landroid-glob -landroid-utimes" +}