From d6a0e2e2675003043590bc414db899946bcb026a Mon Sep 17 00:00:00 2001 From: Alexander Bersenev Date: Sun, 21 Aug 2011 20:37:22 +0000 Subject: preparing for install --- Makefile | 1 + ebuild/app-portage/autodep/Manifest | 2 ++ ebuild/app-portage/autodep/autodep-0.1.ebuild | 31 +++++++++++++++++++++++++++ ebuild/autodep-0.1.ebuild | 27 ----------------------- src/hook_fusefs/hookfs.c | 17 +++++++-------- 5 files changed, 42 insertions(+), 36 deletions(-) create mode 100644 ebuild/app-portage/autodep/Manifest create mode 100644 ebuild/app-portage/autodep/autodep-0.1.ebuild delete mode 100644 ebuild/autodep-0.1.ebuild diff --git a/Makefile b/Makefile index 88d9363..01c92f1 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ install: mkdir -p "${DESTDIR}/usr/bin/" cp hookfs emerge_strict "${DESTDIR}/usr/bin/" + ln -s "${DESTDIR}/usr/lib/autodep/autodep" "${DESTDIR}/usr/bin/" clean: rm -f hookfs file_hook.o file_hook.so diff --git a/ebuild/app-portage/autodep/Manifest b/ebuild/app-portage/autodep/Manifest new file mode 100644 index 0000000..8220b2b --- /dev/null +++ b/ebuild/app-portage/autodep/Manifest @@ -0,0 +1,2 @@ +DIST autodep-0.1.tar.bz2 959691 RMD160 34ce8f8423d97d2f16599806c220579a65b0753a SHA1 4fe44158b9d81df43ea630d1d2f76dc8f0e9350b SHA256 ff34aaba6538c12bcd59378bf940729fbd4a115203ce97381ee6a0a1dd8974d0 +EBUILD autodep-0.1.ebuild 581 RMD160 05a90fb59f8eb36e69b399a8e0f5de4d6df1df87 SHA1 5a237eb30d35053106d07f539da47595b433659b SHA256 a7b44332fd34bfdea43b496c0712135d4ae86eab0ea80bce1c99d48c044e6710 diff --git a/ebuild/app-portage/autodep/autodep-0.1.ebuild b/ebuild/app-portage/autodep/autodep-0.1.ebuild new file mode 100644 index 0000000..9b126b6 --- /dev/null +++ b/ebuild/app-portage/autodep/autodep-0.1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +PYTHON_DEPEND="2:2.6" +RESTRICT_PYTHON_ABIS='2.4 2.5 3.*' + +inherit python + +DESCRIPTION="Auto dependency analyser for Gentoo" +HOMEPAGE="http://alexbers.dyndns.org/autodep/" +SRC_URI="http://alexbers.dyndns.org/autodep/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND="sys-fs/fuse" +RDEPEND="sys-fs/fuse + app-portage/portage-utils" + +src_compile() { + emake || die +} + +src_install() { + emake DESTDIR="${D}" install || die +} diff --git a/ebuild/autodep-0.1.ebuild b/ebuild/autodep-0.1.ebuild deleted file mode 100644 index 37ccfa7..0000000 --- a/ebuild/autodep-0.1.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3 - -PYTHON_DEPEND='2:2.6' -RESTRICT_PYTHON_ABIS='2.4 2.5 3.*' - -inherit distutils eutils - -DESCRIPTION="Auto dependency analyser for Gentoo" -HOMEPAGE="http://alexbers.dyndns.org/autodep/" -SRC_URI="http://alexbers.dyndns.org/autodep/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~x86 ~amd64" -IUSE="" - -src_compile() { - emake || die -} - -src_install() { - emake DESTDIR="${D}" install || die -} diff --git a/src/hook_fusefs/hookfs.c b/src/hook_fusefs/hookfs.c index d6371dd..0bb3ce5 100644 --- a/src/hook_fusefs/hookfs.c +++ b/src/hook_fusefs/hookfs.c @@ -486,15 +486,14 @@ static int hookfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, snprintf(fullpath,MAXPATHLEN,"%s/%s",path,d->entry->d_name); char abspath[MAXPATHLEN]; - realpath(fullpath,abspath); - - if(! is_event_allowed("stat",abspath,context->pid,stage)) { - errno=2; - log_event("stat",abspath,"DENIED",errno,stage); - } else if (filler(buf, d->entry->d_name, &st, nextoff)) { - break; - } - + if(realpath(fullpath,abspath)!=NULL) { + if(! is_event_allowed("stat",abspath,context->pid,stage)) { + errno=2; + log_event("stat",abspath,"DENIED",errno,stage); + } else if (filler(buf, d->entry->d_name, &st, nextoff)) { + break; + } + } d->entry = NULL; d->offset = nextoff; } -- cgit v1.2.3-65-gdbad