View previous topic :: View next topic |
Author |
Message |
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1331 Location: sweden
|
Posted: Tue Mar 26, 2019 8:55 pm Post subject: ebuild help ACCESS DENIED:(solved) |
|
|
hi all
i am updating my old compiz-9999.ebuild and getting ACCESS VIOLATION.
Code: |
-- Installing: /etc/compizconfig/config.conf
* ACCESS DENIED: unlink: /etc/compizconfig/config.conf
* ACCESS DENIED: open_wr: /etc/compizconfig/config.conf
* ACCESS DENIED: unlink: /etc/compizconfig/config.conf
* ACCESS DENIED: fopen_wr: /etc/compizconfig/config.conf
CMake Error at compizconfig/libcompizconfig/config/cmake_install.cmake:49 (file):
file INSTALL cannot copy file
"/var/tmp/portage/x11-wm/compiz-9999/work/~compiz-team/compiz/9999/compizconfig/libcompizconfig/config/config.conf"
to "/etc/compizconfig/config.conf".
Call Stack (most recent call first):
compizconfig/libcompizconfig/cmake_install.cmake:54 (include)
compizconfig/cmake_install.cmake:42 (include)
cmake_install.cmake:89 (include)
make: *** [Makefile:128: install] Error 1
* ERROR: x11-wm/compiz-9999::masters-gentoo failed (install phase):
* emake failed
*
* If you need support, post the output of `emerge --info '=x11-wm/compiz-9999::masters-gentoo'`,
* the complete build log and the output of `emerge -pqv '=x11-wm/compiz-9999::masters-gentoo'`.
* The complete build log is located at '/var/tmp/portage/x11-wm/compiz-9999/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/x11-wm/compiz-9999/temp/environment'.
* Working directory: '/var/tmp/portage/x11-wm/compiz-9999/work/build'
* S: '/var/tmp/portage/x11-wm/compiz-9999/work/~compiz-team/compiz/9999'
* --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
* LOG FILE: "/var/log/sandbox/sandbox-4.log"
*
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line
F: unlink
S: deny
P: /etc/compizconfig/config.conf
A: /etc/compizconfig/config.conf
R: /etc/compizconfig/config.conf
C: /usr/bin/cmake -P cmake_install.cmake
F: open_wr
S: deny
P: /etc/compizconfig/config.conf
A: /etc/compizconfig/config.conf
R: /etc/compizconfig/config.conf
C: /usr/bin/cmake -P cmake_install.cmake
F: unlink
S: deny
P: /etc/compizconfig/config.conf
A: /etc/compizconfig/config.conf
R: /etc/compizconfig/config.conf
C: /usr/bin/cmake -P cmake_install.cmake
F: fopen_wr
S: deny
P: /etc/compizconfig/config.conf
A: /etc/compizconfig/config.conf
R: /etc/compizconfig/config.conf
C: /usr/bin/cmake -P cmake_install.cmake
* -------------------------------------------------------------------------------- |
any help would be good.
regards hedmo
Last edited by hedmo on Mon Apr 08, 2019 6:17 pm; edited 1 time in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31268 Location: here
|
Posted: Tue Mar 26, 2019 9:23 pm Post subject: |
|
|
You should patch compizconfig/libcompizconfig/config/cmake_install.cmake because it tries to install config.conf file outside sandbox.
You should basically change destination to ${ED}/etc/compizconfig/config.conf _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Juippisi Developer
Joined: 30 Sep 2005 Posts: 753 Location: /home
|
Posted: Wed Mar 27, 2019 6:17 am Post subject: |
|
|
Or manually install it with 'insinto' and 'doins'. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31268 Location: here
|
Posted: Wed Mar 27, 2019 6:47 am Post subject: |
|
|
Juippisi wrote: | Or manually install it with 'insinto' and 'doins'. |
In any case he should patch cmake file for skip configuration file installation _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1331 Location: sweden
|
Posted: Wed Mar 27, 2019 7:53 pm Post subject: |
|
|
fedeliallalinea wrote: | You should patch compizconfig/libcompizconfig/config/cmake_install.cmake because it tries to install config.conf file outside sandbox.
You should basically change destination to ${ED}/etc/compizconfig/config.conf |
fedeliallalinea.I dont have compizconfig/libcompizconfig/config/cmake_install.cmake but compizconfig/libcompizconfig/config/CMakeLists.txt.
and made that file like this:
Code: |
set (_config_file
config.conf)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config_test
${CMAKE_CURRENT_BINARY_DIR}/compiz-1/compizconfig/config)
install (FILES ${_config_file} DESTINATION ${ED}/etc/compizconfig/config.conf)
|
but it did not work .
Code: |
* ACCESS DENIED: mkdir: /etc/compizconfig
CMake Error at compizconfig/libcompizconfig/config/cmake_install.cmake:49 (file):
file cannot create directory: /etc/compizconfig/config.conf. Maybe need
administrative privileges.
Call Stack (most recent call first):
compizconfig/libcompizconfig/cmake_install.cmake:54 (include)
compizconfig/cmake_install.cmake:42 (include)
cmake_install.cmake:89 (include)
|
regards hedmo |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1331 Location: sweden
|
Posted: Sat Mar 30, 2019 9:32 am Post subject: |
|
|
i manage to get it to work with edit the ebuild with :
Code: |
src_install() {
pushd "${CMAKE_BUILD_DIR}"
for i in `find . -type f -name "cmake_install.cmake"`;do
sed -e "s|/etc|${D}/etc|g" -i "${i}" || die "sed failed"
done
emake install
popd
}
|
regards hedmo |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31268 Location: here
|
Posted: Sat Mar 30, 2019 12:27 pm Post subject: |
|
|
Usually changing source file is done in src_prepare function. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22657
|
Posted: Sat Mar 30, 2019 3:56 pm Post subject: |
|
|
hedmo wrote: | Code: | for i in `find . -type f -name "cmake_install.cmake"`;do
sed -e "s|/etc|${D}/etc|g" -i "${i}" || die "sed failed"
done
emake install
popd
} |
|
Code: | find . -type f -name cmake_install.cmake -print0 | xargs -0 sed -i -e 's|/etc|${DESTDIR}/etc|g'
emake install DESTDIR="$D" | This edits all the files in one pass, handles files with unusual names, and handles unusual characters in $D by deferring its expansion into the CMake file. |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1331 Location: sweden
|
Posted: Sat Mar 30, 2019 6:57 pm Post subject: |
|
|
this is the ebuild that have been updated from 2008:
Code: |
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
GIT_ECLASS="git-2"
EGIT_REPO_URI="https://github.com/hedmo/compiz"
inherit cmake-utils eutils ${GIT_ECLASS} gnome2-utils toolchain-funcs
KEYWORDS="*"
S="${WORKDIR}/~compiz-team/${PN}/${PV}"
DESCRIPTION="OpenGL window and compositing manager"
HOMEPAGE="http://www.compiz.org/"
LICENSE="GPL-2 LGPL-2.1 MIT"
SLOT="0.9"
IUSE="+cairo debug dbus fuse gnome gtk +svg test"
COMMONDEPEND="
dev-libs/boost
dev-libs/glib:2
dev-cpp/glibmm
dev-libs/libxml2
dev-libs/libxslt
dev-python/pyrex
dev-libs/protobuf
media-libs/libpng
x11-base/xorg-server
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXinerama
x11-libs/libICE
x11-libs/libSM
x11-libs/startup-notification
virtual/opengl
virtual/glu
cairo? ( x11-libs/cairo[X] )
fuse? ( sys-fs/fuse )
gtk? (
>=x11-libs/gtk+-2.18.0
>=x11-libs/libwnck-2.19.4
x11-libs/pango
gnome? (
gnome-base/gnome-desktop
gnome-base/gconf
)
)
svg? (
gnome-base/librsvg:2
x11-libs/cairo
)
dbus? ( sys-apps/dbus )"
DEPEND="${COMMONDEPEND}
app-admin/chrpath
virtual/pkgconfig
test? (
dev-cpp/gtest
dev-cpp/gmock
)"
RDEPEND="${COMMONDEPEND}
dev-python/pygtk
x11-apps/mesa-progs
x11-apps/xvinfo
x11-themes/hicolor-icon-theme"
# TODO:
# - Remove automagic dependency for coverage report generation tools
# - Fix Xig-0 automagic resolving('CMake Warning at tests/integration/xig/CMakeLists.txt:30 (message): Xig not found, you will not be able to run X Server integration tests')
# - Check proper compilation with missing gettext/intltool
# - CFLAGS are NOT respected, this needs to be fixed
# - Default decorator exec command in ccsm is bad
# - Check all dependencies once more
# - Check CMakeFiles.txt this subdirectories :
# cmake - ?
# src
# compizconfig
# plugins
# tests - ?
pkg_pretend() {
if [[ ${MERGE_TYPE} != binary ]]; then
[[ $(gcc-major-version) -lt 4 ]] || \
( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ]] ) \
&& die "Sorry, but gcc 4.6 or higher is required."
fi
}
src_prepare() {
echo "gtk/gnome/compiz-wm.desktop.in" >> "${S}/po/POTFILES.skip"
echo "metadata/core.xml.in" >> "${S}/po/POTFILES.skip"
# Fix wrong path for icons
sed -i 's:DataDir = "@prefix@/share":DataDir = "/usr/share":' compizconfig/ccsm/ccm/Constants.py.in
cmake-utils_src_prepare
}
src_configure() {
BUILD_DIR=${WORKDIR}/build
local mycmakeargs=(
"$(cmake-utils_use_use gnome GCONF)"
"$(cmake-utils_use_use gnome GNOME)"
"$(cmake-utils_use_use gnome GSETTINGS)"
"$(cmake-utils_use_use gtk GTK)"
"$(cmake-utils_use test COMPIZ_BUILD_TESTING)"
"-DCMAKE_INSTALL_PREFIX=/usr"
"-DCMAKE_C_FLAGS=$(usex debug '-DDEBUG -ggdb' '')"
"-DCMAKE_CXX_FLAGS=$(usex debug '-DDEBUG -ggdb' '')"
"-DCOMPIZ_DEFAULT_PLUGINS=ccp"
"-DCOMPIZ_DISABLE_SCHEMAS_INSTALL=ON"
"-DCOMPIZ_PACKAGING_ENABLED=ON"
"-HAVE_WNCK_WINDOW_HAS_NAME=1"
"-Wno-dev=ON"
)
cmake-utils_src_configure
}
src_install() {
pushd "${CMAKE_BUILD_DIR}"
# Fix paths to avoid sandbox access violation
# 'emake DESTDIR=${D} install' does not work with compiz cmake files!
for i in `find . -type f -name "cmake_install.cmake"`;do
sed -e "s|/usr|${D}/usr|g" -i "${i}" || die "sed failed"
sed -e "s|/etc|${D}/etc|g" -i "${i}" || die "sed failed"
done
emake install
popd
}
pkg_preinst() {
use gnome && gnome2_gconf_savelist
}
pkg_postinst() {
use gnome && gnome2_gconf_install
if use dbus; then
ewarn "The dbus plugin is known to crash compiz in this version. Disable"
ewarn "it if you experience crashes when plugins are enabled/disabled."
fi
}
pkg_prerm() {
use gnome && gnome2_gconf_uninstall
}
|
sorry if i am doing things wrong but i am not good at this stuff. |
|
Back to top |
|
|
|