Re: [gentoo-dev] cmake-utils.eclass: two improvements
Folks, disregard my previous msg on this thread, it was supposed to go somewhere else. William signature.asc Description: Digital signature
Re: [gentoo-dev] cmake-utils.eclass: two improvements
All, as I have always said, my views can evolve with civil discussion, and there has been some good feedback on this. I also got a suggestion for handling network file systems that would mean we wouldn't have to keep track of the specific clients needed to mount network file systems; we could let the distros tell us what the network file system types are and which services should be started to support them. Look at the new-netmount branch for that. Basically it would be a series of files in a directory which would have the name of a filesystem type as their file name, then inside each file, the name of the service that supports them. The point of debate I suppose is the dependency type that should be used for these. On the branch it is use, which requires you to add the appropriate service to the runlevel netmount is in, but some want it to be want once it is implemented. Also, I want to talk more about netmount and localmount failing. If netmount and localmount are set up to fail if one of the file systems they mount fails (which is what other init systems out there do), the sys admin can control whether the mount -a command cares about the status of specific file systems by adding nofail to the mount options in fstab. By default it would care, but if you add nofail to the mount options, you would affectively tell mount -a to not be concerned about whether the mount succeeds or not. Thoughts? William signature.asc Description: Digital signature
Re: [gentoo-dev] cmake-utils.eclass: two improvements
On Sun, 26 Jul 2015 17:54:52 +0600 Vadim A. Misbakh-Soloviov wrote: > It is bad way to just disable RPATH in eclass without any "buttons" to enable > it back. Moreover, it is bad to disable it even with such "buttons". THe > right > way would be to detect if portage instance calling eclass is in PREFIX and > depends on that — keep it or disable. This is exactly what proposed patch is doing: it checks if EPREFIX is empty, and only in such case disables RPATH, otherwise it is enabled. Best regards, Andrew Savchenko pgpxWsTSTMmsD.pgp Description: PGP signature
Re: [gentoo-dev] cmake-utils.eclass: two improvements
It is bad way to just disable RPATH in eclass without any "buttons" to enable it back. Moreover, it is bad to disable it even with such "buttons". THe right way would be to detect if portage instance calling eclass is in PREFIX and depends on that — keep it or disable. -- Best regards, mva signature.asc Description: This is a digitally signed message part.
[gentoo-dev] cmake-utils.eclass: two improvements
Hello all, I propose two improvements to cmake-utils eclass: 1. Set default documentation directory cmake allows to specify default docs installation directory (analogue of --docdir for configure script), but cmake-utils.eclass does nothing in this regard and many ebuilds in tree contain the same duplicated code: -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF} I propose to add this to the eclass, thus ebuilds can be simplified. See attached patch. 2. Disable rpath for non-prefix builds cmake allows to disable RPATH linking (enabled by default), this leads to insecure rpath warning during install phase checks, logs show that build directory (-Wl,-rpath /var/tmp/portage/...) is added to linker options. Many ebuilds fix this by adding one of the following or similar options: -DCMAKE_SKIP_RPATH=ON -DENABLE_RPATH=OFF -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF I propose to add this functionality to the eclass, thus ebuilds can be simplified. See attached patch. Comments? Best regards, Andrew Savchenko --- cmake-utils.eclass.orig 2015-02-18 09:31:10.0 +0300 +++ cmake-utils.eclass 2015-07-26 02:14:38.335700364 +0300 @@ -562,6 +562,7 @@ -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_USER_MAKE_RULES_OVERRIDE="${build_rules}" -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" + -DCMAKE_INSTALL_DOCDIR="/usr/share/doc/${PF}" "${MYCMAKEARGS}" ) --- cmake-utils.eclass.orig 2015-02-18 09:31:10.0 +0300 +++ cmake-utils.eclass 2015-07-26 02:19:25.807736804 +0300 @@ -569,6 +570,10 @@ cmakeargs+=( -C "${CMAKE_EXTRA_CACHE_FILE}" ) fi + if [[ -z ${EPREFIX} ]]; then + cmakeargs+=( -DCMAKE_SKIP_RPATH=ON ) + fi + pushd "${BUILD_DIR}" > /dev/null debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: mycmakeargs is ${mycmakeargs_local[*]}" echo "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" pgpypCz87YB16.pgp Description: PGP signature