Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629134 - x11-misc/tint2/tint2-0.14.6.ebuild:/etc/xdg/tint2/tint2rc installed outside the prefix
Summary: x11-misc/tint2/tint2-0.14.6.ebuild:/etc/xdg/tint2/tint2rc installed outside t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-28 04:29 UTC by tastu teche
Modified: 2017-08-30 09:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
install( FILES themes/tint2rc DESTINATION $ENV{EPREFIX}/etc/xdg/tint2 ) (0.14.6-eprefix-etc-xdg.patch,645 bytes, patch)
2017-08-28 04:29 UTC, tastu teche
Details | Diff
ebuild with 0.14.6-eprefix-etc-xdg.patch added (tint2-0.14.6.ebuild,1.30 KB, text/plain)
2017-08-28 04:33 UTC, tastu teche
Details
0.14.6-sysconfdir-xdg.patch (0.14.6-sysconfdir-xdg.patch,655 bytes, patch)
2017-08-28 12:02 UTC, tastu teche
Details | Diff
tint2-0.14.6.ebuild with 0.14.6-sysconfdir-xdg.patch added (tint2-0.14.6.ebuild,1.35 KB, text/plain)
2017-08-28 12:06 UTC, tastu teche
Details
tint2-0.14.6.ebuild with 0.14.6-sysconfdir-xdg.patch added (tint2-0.14.6.ebuild,1.30 KB, text/plain)
2017-08-28 14:18 UTC, tastu teche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tastu teche 2017-08-28 04:29:48 UTC
Created attachment 490940 [details, diff]
install( FILES themes/tint2rc DESTINATION $ENV{EPREFIX}/etc/xdg/tint2 )

* QA Notice: the following files are outside of the prefix:
 * /etc
 * /etc/xdg
 * /etc/xdg/tint2
 * /etc/xdg/tint2/tint2rc
 * ERROR: x11-misc/tint2-0.14.6::gentoo failed:
 *   Aborting due to QA concerns: there are files installed outside the prefix
 * 
 * Call stack:
 *   misc-functions.sh, line 603:  Called install_qa_check
 *   misc-functions.sh, line 217:  Called source 'install_symlink_html_docs'
 *            05prefix, line 114:  Called install_qa_check_prefix
 *            05prefix, line  27:  Called die
 * The specific snippet of code:
 *   			die "Aborting due to QA concerns: there are files installed outside the prefix"
 * 
 * If you need support, post the output of `emerge --info '=x11-misc/tint2-0.14.6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-misc/tint2-0.14.6::gentoo'`.
 * The complete build log is located at '/r/a/p/var/tmp/portage/x11-misc/tint2-0.14.6/temp/build.log'.
 * The ebuild environment file is located at '/r/a/p/var/tmp/portage/x11-misc/tint2-0.14.6/temp/environment'.
 * Working directory: '/r/a/p/var/tmp/portage/x11-misc/tint2-0.14.6/image/r/a/p'
 * S: '/r/a/p/var/tmp/portage/x11-misc/tint2-0.14.6/work/tint2-0.14.6'
!!! post install failed; exiting.

solution:

install( FILES themes/tint2rc DESTINATION /etc/xdg/tint2 )
should  be changed to:
install( FILES themes/tint2rc DESTINATION $ENV{EPREFIX}/etc/xdg/tint2 )
in CMakeLists.txt.
Comment 1 tastu teche 2017-08-28 04:33:44 UTC
Created attachment 490942 [details]
ebuild with 0.14.6-eprefix-etc-xdg.patch added

PATCHES=(
	"${FILESDIR}/${PV}-eprefix-etc-xdg.patch"
)
Comment 2 Fabian Groffen gentoo-dev 2017-08-28 08:39:05 UTC
I think you uploaded the ebuild as patch?

Just a wild guess, does adding

 -Detcdir="${EPREFIX}/etc/xdg/tint2"

to mycmakeargs work?
Comment 3 tastu teche 2017-08-28 11:59:12 UTC
as you suggested,your solution is better:
(1)install( FILES themes/tint2rc DESTINATION /etc/xdg/tint2 )
should be changed to:
install( FILES themes/tint2rc DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/xdg/tint2 ) 
(2)add below line to mycmakeargs in ebuild:	
		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"



0.14.6-sysconfdir-xdg.patch

tint2-0.14.6.ebuild
--- /r/a/p/usr/portage/x11-misc/tint2/tint2-0.14.6.ebuild
+++ /r/a/p/usr/local/portage/x11-misc/tint2/tint2-0.14.6.ebuild
@@ -31,8 +31,15 @@
 "
 RDEPEND="${DEPEND}"
 
+
+ PATCHES=(
+	"${FILESDIR}/${PV}-sysconfdir-xdg.patch"
+ )
+
+
 src_configure() {
 	local mycmakeargs=(
+		-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
 		-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
 		-DENABLE_BATTERY="$(usex battery)"
 		-DENABLE_TINT2CONF="$(usex tint2conf)"
Comment 4 tastu teche 2017-08-28 12:02:52 UTC
Created attachment 490966 [details, diff]
0.14.6-sysconfdir-xdg.patch
Comment 5 tastu teche 2017-08-28 12:06:19 UTC
Created attachment 490968 [details]
tint2-0.14.6.ebuild with 0.14.6-sysconfdir-xdg.patch added
Comment 6 Fabian Groffen gentoo-dev 2017-08-28 13:55:19 UTC
with that change (which makes sense) do you really need the -DCMAKE_INSTALL_SYSCONFDIR in the ebuild?  I would expect it to work without setting it explicitly.
Comment 7 tastu teche 2017-08-28 14:17:14 UTC
you are right.it does not need the -DCMAKE_INSTALL_SYSCONFDIR in the ebuild.  it does work without setting it explicitly.

fllowing change made in the ebuild tested,passed.

--- /r/a/p/usr/portage/x11-misc/tint2/tint2-0.14.6.ebuild
+++ /r/a/p/usr/local/portage/x11-misc/tint2/tint2-0.14.6.ebuild
@@ -31,6 +31,12 @@
 "
 RDEPEND="${DEPEND}"
 
+
+ PATCHES=(
+	"${FILESDIR}/${PV}-sysconfdir-xdg.patch"
+ )
+
+
 src_configure() {
 	local mycmakeargs=(
 		-Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
Comment 8 tastu teche 2017-08-28 14:18:40 UTC
Created attachment 490988 [details]
tint2-0.14.6.ebuild with 0.14.6-sysconfdir-xdg.patch added
Comment 9 Fabian Groffen gentoo-dev 2017-08-28 15:35:41 UTC
@amkyna: how you you feel about tastu's patch?  Would you be ok to add it?
Comment 10 Amy Liffey gentoo-dev 2017-08-28 16:11:06 UTC
(In reply to Fabian Groffen from comment #9)
> @amkyna: how you you feel about tastu's patch?  Would you be ok to add it?

I will commit it after testing.
Comment 11 Amy Liffey gentoo-dev 2017-08-28 16:22:28 UTC
commit b4892d73b5d0c05d5127e90acb2d6b246b6f42e3
Author: Amy Liffey <amynka@gentoo.org>
Date:   Mon Aug 28 18:20:03 2017 +0200

    x11-misc/tint2: fix tint2rc for prefix bug #629134
    
    Submitted-by: tastu teche <tastuteche@yahoo.com>


Should be done. Thank you all :)
Comment 12 Chris Mayo 2017-08-29 18:13:00 UTC
I don't think the commit is quite right.
Raised bug 629312.
Comment 13 Fabian Groffen gentoo-dev 2017-08-30 07:04:28 UTC
@tastu: can you check if the latest version of the ebuild installs properly in $EPREFIX/etc/xdg/tint2 for you?
Comment 14 tastu teche 2017-08-30 08:01:39 UTC
i did:
(1)eix-sync
ebuild /r/a/p/usr/portage/x11-misc/tint2/tint2-0.14.6-r2.ebuild install
found .../image/r/a/p/usr/etc/xdg/tint2/tint2rc which is diff from
      .../image/r/a/p/etc/xdg/tint2/tint2rc
(2)if you changed
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/xdg/tint2
to
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/xdg/tint2
on purpose,then I can confirm the bug is fixed.
(3)if you changed it by mistake,then it should be fixed.
Comment 15 tastu teche 2017-08-30 08:12:41 UTC
Right now,I do not know 
$EPREFIX/etc/xdg/tint2 
and $EPREFIX/usr/etc/xdg/tint2,
which one is truely right for the tint2 .
Maybe I should check the tint2 source code.
Comment 16 Fabian Groffen gentoo-dev 2017-08-30 08:15:43 UTC
/usr/etc is bogus, the latest patch with FULL_SYSCONFDIR should result in $EPREFIX/etc/xdg
Comment 17 tastu teche 2017-08-30 08:52:55 UTC
# Result Variables
# ^^^^^^^^^^^^^^^^
#
# Inclusion of this module defines the following variables:
#
# ``CMAKE_INSTALL_<dir>``
#
#   Destination for files of a given type.  This value may be passed to
#   the ``DESTINATION`` options of :command:`install` commands for the
#   corresponding file type.
#
# ``CMAKE_INSTALL_FULL_<dir>``
#
#   The absolute path generated from the corresponding ``CMAKE_INSTALL_<dir>``
#   value.  If the value is not already an absolute path, an absolute path
#   is constructed typically by prepending the value of the
#   :variable:`CMAKE_INSTALL_PREFIX` variable.  However, there are some
#   `special cases`_ as documented below.
#
# where ``<dir>`` is one of:
https://github.com/Kitware/CMake/blob/master/Modules/GNUInstallDirs.cmake

Maybe there is a bug when GNUInstallDirs.cmake running in ${EROOT} ${EROOT}/usr
,result in CMAKE_INSTALL_FULL_<dir> 's value diff from CMAKE_INSTALL_<dir>'s value
Comment 18 tastu teche 2017-08-30 09:04:49 UTC
in macro(GNUInstallDirs_get_absolute_install_dir absvar var):
those:
if (NOT "${${var}}" MATCHES "^usr/")
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*")
should be
if (NOT "${${var}}" MATCHES "^/r/a/p/usr/")
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/r/a/p/usr/?$")
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/r/a/p/opt/.*")
when EROOT is /r/a/p?