Created attachment 409790 [details, diff] Disabling writing to sudoers in setup.sh Due to nature of setup.sh script, it tries to write something outside of sandbox (e.g. directly in /etc/sudoers). This patch removes check_mk's setup.sh writes to sudoers, as portage will do all the job.
Created attachment 410512 [details] check_mk-1.2.4_p5-r1.ebuild New check_mk-1.2.4_p5-r1 ebuild
Created attachment 410514 [details, diff] check_mk-1.2.4p5-setup.sh.patch New patch for setup.sh from check_mk 1.2.4_p5
Hello, please add the new ebuild and the new patch to portage. I successfully tested the ebuild and the patch on three amd64 systems and one x86 system. @Stanislav: Thank you for make me aware of this! I didn't use your patch as i prefer to disable the call of the "create_sudo_configuration" function instead of changing multiple lines in the function itself. Kind regards, Timo
Sorry i made an mistake! Attachment #410512 [details] is NOT obsolete!
@Timo no problems :) Glad it will be useful.
On runtesting I get; Compiling with normal gcc... Fine. Typing 'make install' as root now will install into /usr/bin >>> Source compiled. >>> Test phase [not enabled]: net-analyzer/check_mk-1.2.4_p5-r1 >>> Install check_mk-1.2.4_p5-r1 into /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/ category net-analyzer chown: invalid user: ‘icinga:apache’ * ERROR: net-analyzer/check_mk-1.2.4_p5-r1::gentoo failed (install phase): * fowners failed * * If you need support, post the output of `emerge --info '=net-analyzer/check_mk-1.2.4_p5-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=net-analyzer/check_mk-1.2.4_p5-r1::gentoo'`. * The complete build log is located at '/mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/temp/build.log'. * The ebuild environment file is located at '/mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/temp/environment'. * Working directory: '/mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/work/check_mk-1.2.4p5'
(In reply to Ian Delaney from comment #6) > On runtesting I get; > > > Compiling with normal gcc... > Fine. Typing 'make install' as root now will install into /usr/bin > >>> Source compiled. > >>> Test phase [not enabled]: net-analyzer/check_mk-1.2.4_p5-r1 > > >>> Install check_mk-1.2.4_p5-r1 into /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/ category net-analyzer > chown: invalid user: ‘icinga:apache’ > * ERROR: net-analyzer/check_mk-1.2.4_p5-r1::gentoo failed (install phase): > * fowners failed > * > * If you need support, post the output of `emerge --info > '=net-analyzer/check_mk-1.2.4_p5-r1::gentoo'`, > * the complete build log and the output of `emerge -pqv > '=net-analyzer/check_mk-1.2.4_p5-r1::gentoo'`. > * The complete build log is located at > '/mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/temp/build.log'. > * The ebuild environment file is located at > '/mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/temp/ > environment'. > * Working directory: > '/mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/work/check_mk-1. > 2.4p5' I can confirm the above. I have tested the patch and ebuild and also receive the exact same outcome.
I'm presuming here you have manually added this user to your system while working the package. It needs to build / install as is, and if required it can add a user via the ebuild. See enweuser in user.eclass.
Argh. Sorry! I fixed the ebuild. It was an issue with the depend rules, as the user and or groups will be created by the dependent packages. Thanks for pointing this out!
Created attachment 411322 [details] check_mk-1.2.4_p5-r1.ebuild
# emerge -1 check_mk of this revbump succeeded. A couple of points to refine the ebuild ( || ( dev-lang/python:2.6 dev-lang/python:2.7 ) ) looks like a relic from the past. There is no py2.6 to choose from now. If you want to make this py2.7 only you could be using python-r1 eclass & PYTHON_COMPAT. The ebuilds have no python eclass inherited at all which gives me the impression there is no need for stipulating a system python version at all. It's something you can look into. So on switching to system python 3.3 or 3.4, does it fail to build? repoman full now yields dependency.unknown 3 net-analyzer/check_mk/check_mk-1.2.4_p5.ebuild: RDEPEND: dev-lang/python:2.6 IUSE="agent-only apache_status dmi_sysinfo livestatus logwatch mysql nfsexports oracle postgres smart wato xinetd zypper" -> IUSE="agent-only apache_status dmi_sysinfo livestatus logwatch mysql \ (/t space) nfsexports oracle postgres smart wato xinetd zypper" wato? ( !agent-only )" can also do with a tab space to indent wato?
Created attachment 412890 [details] check_mk-1.2.4_p5-r1.ebuild It will build, but check_mk still needs python 2.7 to run. repoman full doesn't comply about anything now. Sorry for the late answer, but i had a lot other things to do.
~/github/gentoo/net-analyzer/check_mk $ sudo ebuild check_mk-1.2.4_p5-r1.ebuild clean install yields >>> Install check_mk-1.2.4_p5-r1 into /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/ category net-analyzer >>> Completed installing check_mk-1.2.4_p5-r1 into /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/ * QA Notice: broken .png files found: * /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/usr/share/check_mk/web/htdocs/images/icons/bookcase.png: broken IDAT window length * /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/usr/share/check_mk/web/htdocs/images/icon_auditlog.png: broken IDAT window length * /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/usr/share/check_mk/web/htdocs/images/button_auditlog_lo.png: broken IDAT window length by co-incidence this issue came up in the last package I added for another user which I've added to See Also: This is fixable. The bug supplies you with the deps and the code to fix the broken .png file in source. (In reply to Timo Eissler from comment #12) > It will build, but check_mk still needs python 2.7 to run. > The use of dev-lang/python:2.7 is rather antiquated now with the python-r1 eclasses. Edit the revbumped ebuild to inherit python-r1 and set PYTHON_COMPAT to py2.7 and take out the above. The eclass also works with EAPI="5".
Created attachment 419412 [details] check_mk-1.2.4_p5-r1.ebuild I have switched to python-r1 eclass and added a fix for the broken png's- I had to add the fix for the broken png's into src_install and not into src_prepare, because the check_mk setup.sh script extracts the png's in the src_install section.
Minot points of finction & style: 1. # $Header: $ -> # $Id$ 2. Shift MY_P, MY_PV -> prior to Description (convention) 3. Shift REQUIRED_USE to follow RDEPEND (convention) 4. S="${WORKDIR}/${MY_P}" -> last thing prior to src_prepare() { (convention) On runtesting. /net-analyzer/check_mk $ sudo ebuild check_mk-1.2.4_p5-r1.ebuild clean install yields >>> Source compiled. >>> Test phase [not enabled]: net-analyzer/check_mk-1.2.4_p5-r1 >>> Install check_mk-1.2.4_p5-r1 into /mnt/gen2/TmpDir/portage/net-analyzer/check_mk-1.2.4_p5-r1/image/ category net-analyzer chown: invalid user: ‘icinga:apache’ * ERROR: net-analyzer/check_mk-1.2.4_p5-r1::gentoo failed (install phase): * fowners failed Looks familiar, like a regression of sorts.
Created attachment 420232 [details] check_mk-1.2.4_p5-r1.ebuild Next try :-) Is there anywhere a list of those conventions? I didn't find something about this sort order on devmanual.gentoo.org.
runtests fine net-analyzer/check_mk $ sudo ebuild check_mk-1.2.4_p5-r1.ebuild clean install >>> Install check_mk-1.2.4_p5-r1 into ..... >>> Completed installing check_mk-1.2.4_p5-r1 into ..... about the $Id$,https://devmanual.gentoo.org/ebuild-writing/file-format/index.html The order is mostly convention by use. Just observe other ebuilds and you'll find these are merely convention. They still function well enough, but more for the sake of uniformity with other ebuilds. commit 8e66ec9059c89757ad49935208d6f0e3703dac2b Author: Ian Delaney <idella4@gentoo.org> Date: Wed Dec 23 16:16:24 2015 +0800 net-analyzer/check_mk: revbump to vn. 1.2.4_p5-r1 tidy positioning of various vars, switched to inherit of python-r1 eclass, update install phase re the creation of users and or groups, add patch to address sudoers actions in setup.sh, thx to OP (S. Nikitin) for submitting patch disabling writing to sudoers in setup.sh, other patches and fixes supplied by proxy maintainer via the gentoo bug, fixes the bug. Gentoo bug: #5583721