diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-14 11:09:11 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-14 11:09:11 +0100 |
commit | deba8115d2c2af26df42966b91ef04ff4dd79cde (patch) | |
tree | 9a48f42594e1a9e6b2020d5535a784314434d7a7 /sys-fs/fatsort | |
parent | 38423c67c8a23f6a1bc42038193182e2da3116eb (diff) |
gentoo resync : 14.05.2020
Diffstat (limited to 'sys-fs/fatsort')
-rw-r--r-- | sys-fs/fatsort/Manifest | 6 | ||||
-rw-r--r-- | sys-fs/fatsort/fatsort-1.5.0.ebuild | 6 | ||||
-rw-r--r-- | sys-fs/fatsort/fatsort-1.6.2.605.ebuild | 4 | ||||
-rw-r--r-- | sys-fs/fatsort/files/fatsort-1.5.0-gcc10.patch | 12 | ||||
-rw-r--r-- | sys-fs/fatsort/files/fatsort-1.6.2.605-gcc10.patch | 256 |
5 files changed, 281 insertions, 3 deletions
diff --git a/sys-fs/fatsort/Manifest b/sys-fs/fatsort/Manifest index 9745a11e2d6d..a573029bff16 100644 --- a/sys-fs/fatsort/Manifest +++ b/sys-fs/fatsort/Manifest @@ -1,5 +1,7 @@ +AUX fatsort-1.5.0-gcc10.patch 374 BLAKE2B 34d8079233394171cceaf174f2959bd4adb2842a65e3411aadca21c4e9008579ffb166e16d5114ca1643ebd6ccd7dcce37a57c65abf40aade986d84c96973617 SHA512 c9d2d0a9a3f2c76d3579a87d3e51228a5141392a884c3f4b9317422b310cf62b5b546f076648be8eb1521004bc7550c034ccf34d294b48663c7ca01e1dd4bac6 +AUX fatsort-1.6.2.605-gcc10.patch 7400 BLAKE2B 05d9f3bc9c0118c9505e96f2766d27b142a61252f5ad21e3c106ac7afda9a69bddc1ec1dbb9f3b170bbc10315f04db06e80000ef0eb9c601db4b5b88da82e08a SHA512 bac23d94900f48f8fd331962f617b92250ff9cfc801a688526177ef24e571e341e124a2859cbf1ff8db80d1bcbb32ee99d1c9878abcdaa78b9dd0606f5689e28 DIST fatsort-1.5.0.456.tar.xz 56100 BLAKE2B 996f144c67a2311ef9962b06e776d0a0c8897814383e50c9f48f5af0bc800159ee34c10d9f8d51dae5160844dfe9fcbc4b56bb9883cbdb0402a0ea20198fc1d6 SHA512 fe9d8108494fd64da730ec40882582fc16a89e76a5ba4e8040d03a3dbbf12c525904abe24814337713f5f1d15c72e8321b27fad69db816c073a96fbfd15ea486 DIST fatsort-1.6.2.605.tar.xz 122928 BLAKE2B 2690233828e47a4809aac14a8d64dc8d95a824bec52f787190186adbe066d5d4e6f9c6d1873fc6b809c6df6879d12154430f44d412944963bdff49e673079d12 SHA512 0d119c99c5efff4c10367152fc6efe95e2cb1c39405ca02dd25b66cc68c7420b5b28c0daca1346b7928633bac8ace2d05d731502f989d39ca5c783dcec69ccc7 -EBUILD fatsort-1.5.0.ebuild 791 BLAKE2B 1a7977e9e5ccaa82997389e928ad9c0cfa20b52cb5b832ee10a2bb230a7df565eb2ab58701312a01c69a11ad80d6dc8371ae97b62a8da89b5d74eb3e286f7c15 SHA512 ab728f5bf316680d9443ce345819062132d802bcd38c451a8efb21a761f86ceb4d1f7e217242bcce44d7580750b38a919f97b4ca7847eb37c260d32db7e09537 -EBUILD fatsort-1.6.2.605.ebuild 711 BLAKE2B 32f6849c788b83476c2388097eb14169e56b8b30381d388dc63c74cce6ac15696934f581ad6dbc397c4b0e08ea98b5cced46cac5c3cf447387b67b7d5f8b271d SHA512 f25a251ff55fedf93c2e7d81ac5416dec9c3cd66b3087bb7212e3c2f328783b08b690ca0ea56dd170936806cf198d6ac5a5883b1b1aefa8569f54ee1df042f8e +EBUILD fatsort-1.5.0.ebuild 843 BLAKE2B d92b7e2d4b4bc25ab55cbd43ea1321b07b275e56a82505d9e8628ab9e33eb90eb39eba53d9b1aa0e1fc633e426e89adb004574c1a1fa78749813b4bc98608ad7 SHA512 e47dff05c99d535a9dcfa06c2b16367b449dc683a87e1e1f8a46e8f605634c737e65ecefea2a7808fddcbd1662d32452abd933b726e2e03c2e4b6fa692af2b52 +EBUILD fatsort-1.6.2.605.ebuild 756 BLAKE2B 61bcaa758a9b6ca17a1740c4102e8e2e6b181dedea1bc31624cc03ab7958093cd576f74928c9914414767f606cc35dc6cbf015df88c1f73946746f967e892938 SHA512 76594b7789ffdf3f3f5b030f4f0ecbaae5d89dc51b9c40482396fae280cbe9c984025e0fc3142c5fdd946d3e9772f002b6b7620050129d6aad6a4aa1cf9156e4 MISC metadata.xml 738 BLAKE2B b4ae8042af9b7a74705b42322ffcfba47aa18e3cb1bee693ff2db3fecb6555d516ec9a3f4746643ef37007e9d1b44ea79d5fa0e4bc12b6ca4ba813129d208dcd SHA512 42cb5be41b29129b17ea55591d352872ccd6078705068c6899d4f1f5a5b99ab5f6809e75ee6b49bd6b536f6b66632ce9e1859f4bbad764b966d5520a8aa5a228 diff --git a/sys-fs/fatsort/fatsort-1.5.0.ebuild b/sys-fs/fatsort/fatsort-1.5.0.ebuild index 73df445b94eb..d677a51ab6d2 100644 --- a/sys-fs/fatsort/fatsort-1.5.0.ebuild +++ b/sys-fs/fatsort/fatsort-1.5.0.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -18,6 +18,10 @@ KEYWORDS="amd64 x86" S=${WORKDIR}/${MY_P} +PATCHES=( + "${FILESDIR}/${PN}-1.5.0-gcc10.patch" +) + src_prepare() { default diff --git a/sys-fs/fatsort/fatsort-1.6.2.605.ebuild b/sys-fs/fatsort/fatsort-1.6.2.605.ebuild index e80f5c53a7f4..9fefbf5330a0 100644 --- a/sys-fs/fatsort/fatsort-1.6.2.605.ebuild +++ b/sys-fs/fatsort/fatsort-1.6.2.605.ebuild @@ -13,6 +13,10 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" +PATCHES=( + "${FILESDIR}/${P}-gcc10.patch" +) + src_prepare() { default diff --git a/sys-fs/fatsort/files/fatsort-1.5.0-gcc10.patch b/sys-fs/fatsort/files/fatsort-1.5.0-gcc10.patch new file mode 100644 index 000000000000..c334793f11d1 --- /dev/null +++ b/sys-fs/fatsort/files/fatsort-1.5.0-gcc10.patch @@ -0,0 +1,12 @@ +--- a/src/options.h ++++ b/src/options.h +@@ -35,7 +35,7 @@ + extern struct sStringList *OPT_INCL_DIRS, *OPT_EXCL_DIRS, *OPT_INCL_DIRS_REC, *OPT_EXCL_DIRS_REC, *OPT_IGNORE_PREFIXES_LIST; + extern struct sRegExList *OPT_REGEX_INCL, *OPT_REGEX_EXCL; + +-char *OPT_LOCALE; ++extern char *OPT_LOCALE; + + // parses command line options + int32_t parse_options(int argc, char *argv[]); + diff --git a/sys-fs/fatsort/files/fatsort-1.6.2.605-gcc10.patch b/sys-fs/fatsort/files/fatsort-1.6.2.605-gcc10.patch new file mode 100644 index 000000000000..0446fe3e09dc --- /dev/null +++ b/sys-fs/fatsort/files/fatsort-1.6.2.605-gcc10.patch @@ -0,0 +1,256 @@ +Index: tests/Makefile +=================================================================== +--- a/tests/Makefile (revision 606) ++++ b/tests/Makefile (revision 613) +@@ -19,7 +19,7 @@ + if [ ! -f $$i/passed ]; then \ + printf "%.70s" "Test case $$i... "; \ + printf "[ \e[1;33mWAIT \e[0m]"; \ +- ${MAKE} -C $$i &>> /dev/null; \ ++ ${MAKE} -C $$i &> /dev/null; \ + ret=$$?; \ + printf "\r%.70s" "Test case $$i... "; \ + if [ $$ret -eq 0 ]; then \ +Index: CHANGES.md +=================================================================== +--- a/CHANGES.md (revision 606) ++++ b/CHANGES.md (revision 613) +@@ -1,5 +1,11 @@ + # Changelog + ++## v1.6.3 (xxx) ++* fixed support for macOS (thanks to Max for the fix) ++* declared OPT_LOCALE as extern ++* fixed uninitialized variable ++* avoided some string truncation compiler warnings ++ + ## v1.6.2 (November 29, 2019) + - FIX: multiple endianness issues with exFAT + - now using /proc/self/mounts instead of /etc/mtab to check whether filesystem is mounted +Index: src/FAT_fs.c +=================================================================== +--- a/src/FAT_fs.c (revision 606) ++++ b/src/FAT_fs.c (revision 613) +@@ -42,7 +42,7 @@ + // used to check if device is mounted + #if defined(__LINUX__) + #include <mntent.h> +-#elif defined (__BSD__) ++#elif defined (__BSD__) || defined (__OSX__) + #include <sys/ucred.h> + #include <sys/mount.h> + #endif +@@ -85,7 +85,7 @@ + + return ret; + +-#elif defined(__BSD__) ++#elif defined(__BSD__) || defined(__OSX__) + struct statfs *mntbuf; + int i, mntsize; + int32_t ret = 0; +Index: src/deviceio.c +=================================================================== +--- a/src/deviceio.c (revision 606) ++++ b/src/deviceio.c (revision 613) +@@ -24,7 +24,7 @@ + + #include "deviceio.h" + +-#if defined __LINUX__ || defined __BSD__ ++#if defined __LINUX__ || defined __BSD__ || defined __OSX__ + + #include <sys/types.h> + #include <sys/stat.h> +@@ -59,7 +59,7 @@ + #include "mallocv.h" + #include "errors.h" + +-#if defined __LINUX__ || defined __BSD__ ++#if defined __LINUX__ || defined __BSD__ || defined __OSX__ + + DEVICE *device_open(const char *path) { + +@@ -88,7 +88,7 @@ + assert(device != NULL); + assert(offset >= 0); + +-#if defined __BSD__ ++#if defined __BSD__ || defined __OSX__ + return lseek(device->fd, (off_t) offset, SEEK_SET); + #else + return lseek64(device->fd, (off64_t) offset, SEEK_SET); +Index: src/deviceio.h +=================================================================== +--- a/src/deviceio.h (revision 606) ++++ b/src/deviceio.h (revision 613) +@@ -27,7 +27,7 @@ + + #include <stdint.h> + +-#if defined __LINUX__ || defined __BSD__ ++#if defined __LINUX__ || defined __BSD__ || defined __OSX__ + + #define DIRECTORY_SEPARATOR '/' + +Index: src/fatsort.c +=================================================================== +--- a/src/fatsort.c (revision 606) ++++ b/src/fatsort.c (revision 613) +@@ -45,7 +45,7 @@ + + // program information + #define INFO_PROGRAM "fatsort" +-#define INFO_VERSION "1.6.2" ++#define INFO_VERSION "1.6.3" + #define INFO_AUTHOR "Written by Boris Leidner.\n" + #define INFO_COPYRIGHT "Copyright (C) 2004-2019 Boris Leidner.\n" + #define INFO_LICENSE "License GPLv2: GNU GPL version 2 (see LICENSE.txt)\n" \ +Index: src/sort.c +=================================================================== +--- a/src/sort.c (revision 606) ++++ b/src/sort.c (revision 613) +@@ -261,14 +261,15 @@ + + struct sExFATDirEntry de; + struct sExFATDirEntrySet *des; +- struct sExFATDirEntryList *del; ++ struct sExFATDirEntryList *del=NULL; + + char name[MAX_PATH_LEN+1]; +- char str[32]; ++ char str[31]; + char *outptr, *inptr; + uint8_t nameLength=0; + +- size_t outcount, incount, iret; ++ size_t outcount=30; ++ size_t incount, iret; + + *direntrysets=0; + +@@ -376,7 +377,7 @@ + } + outptr[0]='\0'; + +- strncat(name, str, 30); ++ strncat(name, str, 31); + + // we are done here + if (entries == expected_entries) { +@@ -512,7 +513,7 @@ + union sDirEntry de; + struct sDirEntryList *lnde; + struct sLongDirEntryList *llist; +- char tmp[MAX_PATH_LEN+1], dummy[MAX_PATH_LEN*2+1], sname[MAX_PATH_LEN+1], lname[MAX_PATH_LEN+1]; ++ char tmp[MAX_PATH_LEN+1], dummy[MAX_PATH_LEN+1], sname[MAX_PATH_LEN+1], lname[MAX_PATH_LEN+1]; + + *direntries=0; + +@@ -589,8 +590,11 @@ + return -1; + } + +- snprintf(dummy, MAX_PATH_LEN*2+1, "%s%s", tmp, lname); +- strncpy(lname, dummy, MAX_PATH_LEN); ++ strncpy(dummy, tmp, MAX_PATH_LEN); ++ dummy[MAX_PATH_LEN]='\0'; ++ strncat(dummy, lname, MAX_PATH_LEN - strlen(dummy)); ++ dummy[MAX_PATH_LEN]='\0'; ++ strncpy(lname, dummy, MAX_PATH_LEN+1); + + break; + default: +@@ -708,8 +712,8 @@ + dummy[MAX_PATH_LEN]='\0'; + strncat(dummy, lname, MAX_PATH_LEN - strlen(dummy)); + dummy[MAX_PATH_LEN]='\0'; +- strncpy(lname, dummy, MAX_PATH_LEN); +- dummy[MAX_PATH_LEN]='\0'; ++ strncpy(lname, dummy, MAX_PATH_LEN+1); ++ //dummy[MAX_PATH_LEN]='\0'; + break; + default: + myerror("Unhandled return code!"); +Index: src/options.c +=================================================================== +--- a/src/options.c (revision 606) ++++ b/src/options.c (revision 613) +@@ -55,7 +55,6 @@ + assert(stringList != NULL); + assert(stringList->str == NULL); + assert(str != NULL); +- assert(strlen((char *)str) <= MAX_PATH_LEN); + + char *newStr; + +@@ -77,14 +76,16 @@ + // copy string to new structure including missing slashes + newStr[0] = '\0'; + if (prefix) newStr[0] = DIRECTORY_SEPARATOR; +- strncat(newStr, (const char*) str, len); ++ memcpy(newStr+prefix, (const char*) str, len); + if (suffix) newStr[prefix+len] = DIRECTORY_SEPARATOR; + ++/* + if (prefix+len+suffix > MAX_PATH_LEN) { + newStr[MAX_PATH_LEN] = '\0'; + } else { + newStr[prefix+len+suffix] = '\0'; + } ++*/ + + ret = addStringToStringList(stringList, newStr); + +@@ -137,7 +138,7 @@ + parses command line options + */ + +- int8_t c; ++ int8_t c,len; + + static struct option longOpts[] = { + // name, has_arg, flag, val +@@ -315,12 +316,13 @@ + case 't' : OPT_MODIFICATION = 1; break; + case 'v' : OPT_VERSION = 1; break; + case 'L' : +- OPT_LOCALE=realloc(OPT_LOCALE, strlen(optarg)+1); ++ len=strlen(optarg); ++ OPT_LOCALE=realloc(OPT_LOCALE, len+1); + if (OPT_LOCALE == NULL) { + stderror(); + return -1; + } +- strncpy(OPT_LOCALE, optarg, strlen(optarg)+1); ++ memcpy(OPT_LOCALE, optarg, len+1); + break; + default : + myerror("Unknown option '%c'.", optopt); +Index: src/stringlist.c +=================================================================== +--- a/src/stringlist.c (revision 606) ++++ b/src/stringlist.c (revision 613) +@@ -78,8 +78,7 @@ + return -1; + } + +- strncpy(stringList->next->str, str, len); +- stringList->next->str[len] = '\0'; ++ memcpy(stringList->next->str, str, len+1); + + return 0; + +Index: src/options.h +=================================================================== +--- a/src/options.h (revision 606) ++++ b/src/options.h (revision 613) +@@ -35,7 +35,7 @@ + extern struct sStringList *OPT_INCL_DIRS, *OPT_EXCL_DIRS, *OPT_INCL_DIRS_REC, *OPT_EXCL_DIRS_REC, *OPT_IGNORE_PREFIXES_LIST; + extern struct sRegExList *OPT_REGEX_INCL, *OPT_REGEX_EXCL; + +-char *OPT_LOCALE; ++extern char *OPT_LOCALE; + + // parses command line options + int32_t parse_options(int argc, char *argv[]); |