From 09351e78166b5e864197c4456ebae3f89dd0bed9 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 22 Jan 2019 10:09:44 +0000 Subject: gentoo resync : 22.01.2019 --- sys-fs/mhddfs/Manifest | 5 +- .../mhddfs/files/mhddfs-0.1.39-segfault-fix.patch | 207 +++++++++++++++++++++ .../files/mhddfs-respect-compiler-vars.patch | 4 +- sys-fs/mhddfs/mhddfs-0.1.39-r1.ebuild | 49 +++++ sys-fs/mhddfs/mhddfs-0.1.39.ebuild | 46 ----- 5 files changed, 261 insertions(+), 50 deletions(-) create mode 100644 sys-fs/mhddfs/files/mhddfs-0.1.39-segfault-fix.patch create mode 100644 sys-fs/mhddfs/mhddfs-0.1.39-r1.ebuild delete mode 100644 sys-fs/mhddfs/mhddfs-0.1.39.ebuild (limited to 'sys-fs/mhddfs') diff --git a/sys-fs/mhddfs/Manifest b/sys-fs/mhddfs/Manifest index c9b15b930acd..99b22e0af57d 100644 --- a/sys-fs/mhddfs/Manifest +++ b/sys-fs/mhddfs/Manifest @@ -1,4 +1,5 @@ -AUX mhddfs-respect-compiler-vars.patch 1557 BLAKE2B 132f9c9a78acc0e9e3a49a59cb3a0bffb7208abff5a442811e4c43559f4c6be80b7dc36ad9598c844e700b17ad8ea09c45591f171265a6d3bfe1f87f8c2079ea SHA512 8a52b4e4cfd2e619285a99f548374b83b85408584a4be7e7691fbc423b1ea29d482e299d4ed72027b4f571d53457d0d2b1d409f1a515157c9923a7e06bbd90b6 +AUX mhddfs-0.1.39-segfault-fix.patch 4711 BLAKE2B fc75c9e1fa8f3844feeb9d301a48aef977feeee14aadf8763c0abf9817b1a37e80c4421a9cd1b5be8f4ac9b3ed24c8cf563d1fd6d08cd70552b89ded7fb1b9d4 SHA512 4a2242c1d6344d651288c5f6c1c714d98d707b5d6b9c839f5100fd4b3476b74d681fb6502b6559959665470dfc7b00954a0781eedc461a96e972c8df1632a1fd +AUX mhddfs-respect-compiler-vars.patch 1556 BLAKE2B f032b6de368aa8c51ea743aa00a2561bc2bd29a652a4c6b34a2ce072345f2ada14995599ee5185a6ff5d06a0ca5dae2da33aa17199e2d6307ef3ff1ac8feb147 SHA512 91035e5474f333545236330ce46ee80e2c3cfed679d68588e22e9db64cb6d4af5c0019ea32972cc347e4b9f73300334f97828fae4b13c2e4de0e2b5f734246e5 DIST mhddfs_0.1.39.tar.gz 40665 BLAKE2B 5f7fa51d606985085fdb6346af5fdc6526d6f236b93a4deaad8143ac870cc3e85b5a6d9c94150567e2b34fd8ab0edaf4e0dfbf9c1cfc503f29386998bf84ed2d SHA512 cf1952e665e82a92ccfef9215d4faf78cd235566b67e6ebc3a60ab53089d9391bc41a08e6b203ad052e4a08bdd14428f2d9abe48f341aeb0c80ae1da80f83f89 -EBUILD mhddfs-0.1.39.ebuild 1034 BLAKE2B 0f5710a2a89ad8cb124d76039c195a865937d7d441f15d98b7782b54765d2d918460a897d1f01efd1bc881f9671962095d6a1dac50d2074589e76144b76807d6 SHA512 a0aeadb72340b6929083539a603319cd90f40172a8cae3f79f0ade5c4d22c8fbe88837a135a2dbb7d76c5bc648fa9dcd9032af595294e5cf40343f4bf0b9e85d +EBUILD mhddfs-0.1.39-r1.ebuild 1041 BLAKE2B 9d387333d6b4b28eaabd228b1e98d3c59e8e9755ab0b36de7ce99fd329fcfe785d8b6152e5f5f26797859a5d9238ab3dd2dca264b549e2d9e263998765664094 SHA512 251466af90085c6400b9a33c88d5940734b9c95d01706dcd7e238a534220216d29bd8bf052306b7dfe9e3f4eccecc5827681e542f2bc9c595fc0af78efa2d782 MISC metadata.xml 247 BLAKE2B 61049845c1ffb66aea9959f984983735ad8d7d9d37aab6da3a19951bbf8d67af657cacde1701da8a3dd93b0704c10430d511bea11d56bf98702950f0707436ec SHA512 96c55c2979dd6a4c4761fce9b5a0be387b11fcf197ef903d8680ae82f01a2caea93b1238bed1ac96d3eb250744e2149a507e0424ac017b4324f0806a54e72c4a diff --git a/sys-fs/mhddfs/files/mhddfs-0.1.39-segfault-fix.patch b/sys-fs/mhddfs/files/mhddfs-0.1.39-segfault-fix.patch new file mode 100644 index 000000000000..493a78396190 --- /dev/null +++ b/sys-fs/mhddfs/files/mhddfs-0.1.39-segfault-fix.patch @@ -0,0 +1,207 @@ +Patch backported from +https://github.com/vdudouyt/mhddfs-nosegfault + +Thanks to Gabor Kovari + +--- a/src/main.c 2012-06-17 16:09:56.000000000 +0200 ++++ b/src/main.c 2015-12-21 16:32:29.000000000 +0100 +@@ -33,6 +33,13 @@ + #include + #include + ++#include ++#include ++#include ++ ++#include ++#include ++ + #ifndef WITHOUT_XATTR + #include + #endif +@@ -42,7 +49,21 @@ + + #include "debug.h" + +-#include ++void save_backtrace(int sig) ++{ ++ void *array[10]; ++ size_t size; ++ ++ // get void*'s for all entries on the stack ++ size = backtrace(array, 10); ++ ++ // print out all the frames to stderr ++ fprintf(stderr, "Error: signal %d\n", sig); ++ FILE *log = fopen("/tmp/mhddfs_backtrace.log", "w"); ++ backtrace_symbols_fd(array, size, fileno(log)); ++ fclose(log); ++ exit(1); ++} + + // getattr + static int mhdd_stat(const char *file_name, struct stat *buf) +@@ -161,16 +182,13 @@ + mhdd_debug(MHDD_MSG, "mhdd_readdir: %s\n", dirname); + char **dirs = (char **) calloc(mhdd.cdirs+1, sizeof(char *)); + ++ struct stat st; ++ + typedef struct dir_item { + char *name; + struct stat *st; +- UT_hash_handle hh; + } dir_item; + +- dir_item * items_ht = NULL; +- +- +- struct stat st; + + // find all dirs + for(i = j = found = 0; id_name, prev); +- +- if (prev) { ++ if(g_hash_table_lookup(hash, de->d_name)) ++ { + continue; + } + + // add item + char *object_name = create_path(dirs[i], de->d_name); +- struct dir_item *new_item = +- calloc(1, sizeof(struct dir_item)); ++ struct dir_item *new_item = calloc(1, sizeof(struct dir_item)); + + new_item->name = strdup(de->d_name); + new_item->st = calloc(1, sizeof(struct stat)); + lstat(object_name, new_item->st); + +- HASH_ADD_KEYPTR( +- hh, +- items_ht, +- new_item->name, +- strlen(new_item->name), +- new_item +- ); ++ g_hash_table_insert(hash, new_item->name, new_item); + free(object_name); + } + + closedir(dh); + } + +- dir_item *item, *tmp; +- +- // fill list +- HASH_ITER(hh, items_ht, item, tmp) { +- if (filler(buf, item->name, item->st, 0)) +- break; +- } ++ dir_item *item; + +- // free memory +- HASH_ITER(hh, items_ht, item, tmp) { ++ gpointer key, value; ++ GHashTableIter iter; ++ g_hash_table_iter_init(&iter, hash); ++ ++ while(g_hash_table_iter_next (&iter, &key, &value)) ++ { ++ item = (dir_item*) value; ++ int result = filler(buf, item->name, item->st, 0); + free(item->name); + free(item->st); + free(item); ++ if(result) break; + } +- HASH_CLEAR(hh, items_ht); ++ ++ g_hash_table_destroy(hash); + + for (i = 0; dirs[i]; i++) + free(dirs[i]); +@@ -1008,6 +1020,19 @@ + } + #endif + ++static void limits_init() ++{ ++ struct rlimit limit; ++ limit.rlim_cur = 512000; ++ limit.rlim_max = 512000; ++ ++ if(setrlimit(RLIMIT_NOFILE, &limit) != 0) ++ { ++ perror("setrlimit() failed"); ++ exit(-1); ++ } ++} ++ + // functions links + static struct fuse_operations mhdd_oper = { + .getattr = mhdd_stat, +@@ -1048,5 +1073,7 @@ + mhdd_debug_init(); + struct fuse_args *args = parse_options(argc, argv); + flist_init(); ++ limits_init(); ++ signal(SIGSEGV, save_backtrace); + return fuse_main(args->argc, args->argv, &mhdd_oper, 0); + } +--- a/src/usage.c 2012-06-17 16:09:56.000000000 +0200 ++++ b/src/usage.c 2015-12-21 16:32:29.000000000 +0100 +@@ -25,6 +25,7 @@ + "\n" + "Multi-hdd FUSE filesystem\n" + " Copyright (C) 2008, Dmitry E. Oboukhov \n" ++ " Copyright (C) 2015, Valentin Dudouyt \n" + "\n" + "Usage:\n" + " mhddfs dir1,dir2.. mountpoint [ -o OPTIONS ]\n" +--- a/Makefile 2016-01-05 16:45:10.184105001 +0100 ++++ b/Makefile 2015-12-21 16:32:29.000000000 +0100 +@@ -22,13 +22,13 @@ + + TARGET = mhddfs + +-CFLAGS += -Wall $(shell pkg-config fuse --cflags) \ +- -DFUSE_USE_VERSION=26 -MMD ++CFLAGS = -Wall $(shell pkg-config fuse glib-2.0 --cflags) \ ++ -DFUSE_USE_VERSION=26 -MMD -g -rdynamic -O0 + ifdef WITHOUT_XATTR + CFLAGS += -DWITHOUT_XATTR + endif + +-LIBS = $(shell pkg-config fuse --libs) ++LDFLAGS = $(shell pkg-config fuse glib-2.0 --libs) + + FORTAR = src COPYING LICENSE README Makefile \ + README.ru.UTF-8 ChangeLog mhddfs.1 \ +@@ -53,7 +53,7 @@ + ifeq ($(DEBVERSION), $(VERSION)) + all: $(TARGET) + else +-all: update_version $(TARGET) ++all: $(TARGET) + endif + + update_version: + diff --git a/sys-fs/mhddfs/files/mhddfs-respect-compiler-vars.patch b/sys-fs/mhddfs/files/mhddfs-respect-compiler-vars.patch index 331bb7c23f60..0c6f24f4d1a7 100644 --- a/sys-fs/mhddfs/files/mhddfs-respect-compiler-vars.patch +++ b/sys-fs/mhddfs/files/mhddfs-respect-compiler-vars.patch @@ -1,5 +1,5 @@ ---- Makefile.orig 2012-11-19 15:25:21.665692111 +0400 -+++ Makefile 2012-11-19 15:27:08.406691288 +0400 +--- a/Makefile 2012-11-19 15:25:21.665692111 +0400 ++++ b/Makefile 2012-11-19 15:27:08.406691288 +0400 @@ -22,13 +22,13 @@ TARGET = mhddfs diff --git a/sys-fs/mhddfs/mhddfs-0.1.39-r1.ebuild b/sys-fs/mhddfs/mhddfs-0.1.39-r1.ebuild new file mode 100644 index 000000000000..f161e79fa0f9 --- /dev/null +++ b/sys-fs/mhddfs/mhddfs-0.1.39-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2019 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs + +MY_P="${PN}_${PV}" + +DESCRIPTION="Fuse multi harddrive filesystem" +HOMEPAGE="http://mhddfs.uvw.ru/ http://svn.uvw.ru/mhddfs/trunk/README" +SRC_URI="http://mhddfs.uvw.ru/downloads/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64" + +IUSE="l10n_ru suid" + +RDEPEND="sys-fs/fuse:0" +DEPEND="${RDEPEND}" + +DOCS=( ChangeLog README ) +PATCHES=( + "${FILESDIR}/${PN}-respect-compiler-vars.patch" + "${FILESDIR}/${P}-segfault-fix.patch" +) + +src_compile() { + emake CC="$(tc-getCC)" +} + +src_install() { + dobin mhddfs + doman mhddfs.1 + einstalldocs + use l10n_ru && dodoc README.ru.UTF-8 + use suid && fperms u+s /usr/bin/${PN} +} + +pkg_postinst() { + if use suid; then + ewarn + ewarn "You have chosen to install ${PN} with the binary setuid root. This" + ewarn "means that if there any undetected vulnerabilities in the binary," + ewarn "then local users may be able to gain root access on your machine." + ewarn + fi +} diff --git a/sys-fs/mhddfs/mhddfs-0.1.39.ebuild b/sys-fs/mhddfs/mhddfs-0.1.39.ebuild deleted file mode 100644 index 79fe6fb79f89..000000000000 --- a/sys-fs/mhddfs/mhddfs-0.1.39.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=4 - -inherit base eutils toolchain-funcs - -MY_P="${PN}_${PV}" - -DESCRIPTION="Fuse multi harddrive filesystem" -HOMEPAGE="http://mhddfs.uvw.ru/ http://svn.uvw.ru/mhddfs/trunk/README" -SRC_URI="http://mhddfs.uvw.ru/downloads/${MY_P}.tar.gz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="amd64" -IUSE="l10n_ru suid" - -RDEPEND=">=sys-fs/fuse-2.7.0" -DEPEND="${RDEPEND} - dev-libs/uthash" - -DOCS="ChangeLog README" -PATCHES=( "${FILESDIR}/${PN}-respect-compiler-vars.patch" ) - -src_compile() { - emake CC="$(tc-getCC)" -} - -src_install() { - dobin mhddfs - doman mhddfs.1 - dodoc ${DOCS} - use l10n_ru && dodoc README.ru.UTF-8 - use suid && fperms u+s /usr/bin/${PN} -} - -pkg_postinst() { - if use suid; then - ewarn - ewarn "You have chosen to install ${PN} with the binary setuid root. This" - ewarn "means that if there any undetected vulnerabilities in the binary," - ewarn "then local users may be able to gain root access on your machine." - ewarn - fi -} -- cgit v1.2.3