Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558402 - sys-apps/likwid-4.0.1 version bump
Summary: sys-apps/likwid-4.0.1 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Brendan Horan
URL: https://github.com/rrze-likwid/likwid
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-08-22 08:26 UTC by Brendan Horan
Modified: 2015-11-18 09:09 UTC (History)
3 users (show)

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


Attachments
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.06 KB, text/plain)
2015-08-22 08:27 UTC, Brendan Horan
Details
likwid-4.0.1-lua-makefile.patch (likwid-4.0.1-lua-makefile.patch,454 bytes, patch)
2015-08-22 08:29 UTC, Brendan Horan
Details | Diff
likwid-4.0.1-Makefile.patch (likwid-4.0.1-Makefile.patch,2.21 KB, patch)
2015-08-22 08:30 UTC, Brendan Horan
Details | Diff
likwid-4.0.1-fix-gnustack.patch (likwid-4.0.1-fix-gnustack.patch,917 bytes, patch)
2015-08-22 08:30 UTC, Brendan Horan
Details | Diff
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.08 KB, text/plain)
2015-08-22 08:32 UTC, Brendan Horan
Details
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.07 KB, text/plain)
2015-08-22 08:34 UTC, Brendan Horan
Details
likwid-4.0.1-lua-makefile.patch (likwid-4.0.1-lua-makefile.patch,665 bytes, patch)
2015-08-24 04:48 UTC, Brendan Horan
Details | Diff
likwid-4.0.1-Makefile.patch (likwid-4.0.1-Makefile.patch,3.05 KB, patch)
2015-08-24 04:48 UTC, Brendan Horan
Details | Diff
likwid-4.0.1-config.mk.patch (likwid-4.0.1-config.mk.patch,997 bytes, patch)
2015-08-24 04:49 UTC, Brendan Horan
Details | Diff
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.12 KB, text/plain)
2015-08-24 04:58 UTC, Brendan Horan
Details
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.05 KB, text/plain)
2015-08-24 05:57 UTC, Brendan Horan
Details
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.10 KB, text/plain)
2015-08-24 07:01 UTC, Brendan Horan
Details
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.09 KB, text/plain)
2015-08-24 07:42 UTC, Brendan Horan
Details
likwid-4.0.1.ebuild (likwid-4.0.1.ebuild,2.09 KB, text/plain)
2015-08-24 07:50 UTC, Brendan Horan
Details
likwid-4.0.1-config.mk.patch (likwid-4.0.1-config.mk.patch,1.35 KB, patch)
2015-08-24 11:56 UTC, Brendan Horan
Details | Diff
Fixed library path, fixed access to daemon. (likwid-4.0.1-r1.ebuild,2.63 KB, text/plain)
2015-11-14 18:18 UTC, Libor Bukata
Details
likwid-4.0.1-r1.ebuild (likwid-4.0.1-r1.ebuild,2.63 KB, text/plain)
2015-11-14 18:20 UTC, Libor Bukata
Details
likwid-4.0.1-access-daemon.patch (likwid-4.0.1-access-daemon.patch,447 bytes, patch)
2015-11-14 18:21 UTC, Libor Bukata
Details | Diff
likwid-4.0.1-r1.ebuild.patch (likwid-4.0.1-r1.ebuild.patch,1.77 KB, patch)
2015-11-15 10:49 UTC, Libor Bukata
Details | Diff
likwid-4.0.1-r1.ebuild.patch (likwid-4.0.1-r1.ebuild.patch,1.11 KB, patch)
2015-11-17 03:33 UTC, Brendan Horan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Horan 2015-08-22 08:26:17 UTC
Upstream have released 4.0.1
* changes to ebuild needed
* changes to patches needed

Reproducible: Always

Steps to Reproduce:
bump for a new version
Comment 1 Brendan Horan 2015-08-22 08:27:45 UTC
Created attachment 409842 [details]
likwid-4.0.1.ebuild

Attaching new ebuild, not just a pure version bump, ebuild needed changes.
Comment 2 Brendan Horan 2015-08-22 08:29:12 UTC
Created attachment 409844 [details, diff]
likwid-4.0.1-lua-makefile.patch

Lua makefile patch
Comment 3 Brendan Horan 2015-08-22 08:30:06 UTC
Created attachment 409846 [details, diff]
likwid-4.0.1-Makefile.patch

Top level Makefile patches
Comment 4 Brendan Horan 2015-08-22 08:30:39 UTC
Created attachment 409850 [details, diff]
likwid-4.0.1-fix-gnustack.patch

Fix QA warnings gnu stack patch
Comment 5 Brendan Horan 2015-08-22 08:32:53 UTC
Created attachment 409852 [details]
likwid-4.0.1.ebuild

woops, fixed the SRC_URI=
Comment 6 Brendan Horan 2015-08-22 08:34:32 UTC
Created attachment 409854 [details]
likwid-4.0.1.ebuild
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2015-08-23 12:01:41 UTC
The patches might all work but they require some final touches. e.g.' there is duplication between sed statements and patches both patching the same file(s). Easier to finalise in the channel.
Comment 8 Brendan Horan 2015-08-24 04:48:04 UTC
Created attachment 410004 [details, diff]
likwid-4.0.1-lua-makefile.patch

Added comment in patch to ref upstream fix
Comment 9 Brendan Horan 2015-08-24 04:48:55 UTC
Created attachment 410006 [details, diff]
likwid-4.0.1-Makefile.patch

Removed all sed statements from ebuild for the "Makefile" section and placed into patch file.
Comment 10 Brendan Horan 2015-08-24 04:49:43 UTC
Created attachment 410008 [details, diff]
likwid-4.0.1-config.mk.patch

Added a new patch to break out all but one sed statement for "config.mk.
Comment 11 Brendan Horan 2015-08-24 04:58:47 UTC
Created attachment 410010 [details]
likwid-4.0.1.ebuild

updated ebuild with comments, new patches 
I get a repoman warning on " Malformed Id header on line: 3" not sure why.
Comment 12 Brendan Horan 2015-08-24 05:57:42 UTC
Created attachment 410012 [details]
likwid-4.0.1.ebuild
Comment 13 Brendan Horan 2015-08-24 07:01:58 UTC
Created attachment 410016 [details]
likwid-4.0.1.ebuild

Added better patch syntax, cleaned up unneeded sections and added fortran  eclass stuff.
Comment 14 Brendan Horan 2015-08-24 07:42:38 UTC
Created attachment 410018 [details]
likwid-4.0.1.ebuild
Comment 15 Brendan Horan 2015-08-24 07:50:53 UTC
Created attachment 410020 [details]
likwid-4.0.1.ebuild

fixed depends/rdeends.
Comment 16 Ian Delaney (RETIRED) gentoo-dev 2015-08-24 11:30:11 UTC
 ~/github/gentoo/sys-apps/likwid $ sudo ebuild likwid-4.0.1.ebuild clean install

yielded

>>> Completed installing likwid-4.0.1 into /mnt/gen2/TmpDir/portage/sys-apps/likwid-4.0.1/image/

Files matching a file type that is not allowed:
   usr/lib/liblikwid.so.4
   usr/lib/liblikwidpin.so.4
   usr/lib/liblikwid-hwloc.so.4
   usr/lib/liblikwid-lua.so.4
 * ERROR: sys-apps/likwid-4.0.1::gentoo failed:
 *   multilib-strict check failed!
 * 
 * Call stack:
 *   misc-functions.sh, line 592:  Called install_qa_check
 *   misc-functions.sh, line 217:  Called source 'install_symlink_html_docs'
 *   80multilib-strict, line  47:  Called multilib_strict_check
 *   80multilib-strict, line  43:  Called die
 * The specific snippet of code:
 *   		[[ ${abort} == yes ]] && die "multilib-strict check failed!"
Comment 17 Brendan Horan 2015-08-24 11:56:45 UTC
Created attachment 410052 [details, diff]
likwid-4.0.1-config.mk.patch

Set the install path to "/usr/lib64".
config.mk was hard coding this to "/usr/lib"
This application can never work on x86 cpu's so this seems fine.

Advice taken from
https://devmanual.gentoo.org/archs/amd64/index.html
Comment 18 Brendan Horan 2015-08-24 12:02:03 UTC
(In reply to Ian Delaney from comment #16)
>  ~/github/gentoo/sys-apps/likwid $ sudo ebuild likwid-4.0.1.ebuild clean
> install
> 
> yielded
> 
> >>> Completed installing likwid-4.0.1 into /mnt/gen2/TmpDir/portage/sys-apps/likwid-4.0.1/image/
> 
> Files matching a file type that is not allowed:
>    usr/lib/liblikwid.so.4
>    usr/lib/liblikwidpin.so.4
>    usr/lib/liblikwid-hwloc.so.4
>    usr/lib/liblikwid-lua.so.4
>  * ERROR: sys-apps/likwid-4.0.1::gentoo failed:
>  *   multilib-strict check failed!
>  * 
>  * Call stack:
>  *   misc-functions.sh, line 592:  Called install_qa_check
>  *   misc-functions.sh, line 217:  Called source 'install_symlink_html_docs'
>  *   80multilib-strict, line  47:  Called multilib_strict_check
>  *   80multilib-strict, line  43:  Called die
>  * The specific snippet of code:
>  *   		[[ ${abort} == yes ]] && die "multilib-strict check failed!"



I've updated the likwid-4.0.1-config.mk.patch to resolve this I hope.
Comment 19 Ian Delaney (RETIRED) gentoo-dev 2015-08-24 16:24:18 UTC
~/github/gentoo/sys-apps/likwid $ sudo ebuild likwid-4.0.1.ebuild clean  install

yielded

>>> Completed installing likwid-4.0.1 into /mnt/gen2/TmpDir/portage/sys-apps/likwid-4.0.1/image/


likwid-4.0.1-config.mk.patch needed editing with following changes;

-LIBPREFIX = $(PREFIX)/lib#NO SPACE
+LIBPREFIX = $(PREFIX)/$(get_libdir)#NO SPACE

-INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/lib#NO SPACE
+INSTALLED_LIBPREFIX = $(INSTALLED_PREFIX)/$(get_libdir)#NO SPACE

while $(PREFIX)/lib64 works, $(get_libdir) is better form.


commit 10cd91a253aeb95771eb745363414685b3a78c9a
Author: Ian Delaney <idella4@gentoo.org>
Date:   Tue Aug 25 00:22:24 2015 +0800

    sys-apps/likwid: bump; new patches supporting changes
    
    All patches by maintainer (undersys), fixes bug #558402
Comment 20 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2015-08-25 04:58:31 UTC
you too
Comment 21 Libor Bukata 2015-11-14 18:18:44 UTC
Created attachment 416976 [details]
Fixed library path, fixed access to daemon.
Comment 22 Libor Bukata 2015-11-14 18:20:32 UTC
Created attachment 416978 [details]
likwid-4.0.1-r1.ebuild
Comment 23 Libor Bukata 2015-11-14 18:21:22 UTC
Created attachment 416980 [details, diff]
likwid-4.0.1-access-daemon.patch
Comment 24 Libor Bukata 2015-11-14 18:24:43 UTC
As the $(get_libdir) is not expanded in the configuration file, it is necessary to replace it with the right value. I have fixed it in a new ebuild likwid-4.0.1-r1.ebuild. Besides that, a new patch (likwid-4.0.1-access-daemon.patch) has to be applied to enable normal users to use likwid tools because the read permission is removed from /usr/sbin/likwid-accessD file during installation. Moreover, to allow the users to access performance counters right permissions (i.e. 666) have to be set to msr devices since "setcap cap_sys_rawio=ep" is not enough, see e.g. http://icl.cs.utk.edu/projects/papi/wiki/PAPITopics:RAPL_Access for the explanation. After the package installation a message is printed to inform about msr permissions.
Comment 25 Brendan Horan 2015-11-15 07:49:23 UTC
(In reply to Libor Bukata from comment #24)
> As the $(get_libdir) is not expanded in the configuration file, it is
> necessary to replace it with the right value. I have fixed it in a new
> ebuild likwid-4.0.1-r1.ebuild. Besides that, a new patch
> (likwid-4.0.1-access-daemon.patch) has to be applied to enable normal users
> to use likwid tools because the read permission is removed from
> /usr/sbin/likwid-accessD file during installation. Moreover, to allow the
> users to access performance counters right permissions (i.e. 666) have to be
> set to msr devices since "setcap cap_sys_rawio=ep" is not enough, see e.g.
> http://icl.cs.utk.edu/projects/papi/wiki/PAPITopics:RAPL_Access for the
> explanation. After the package installation a message is printed to inform
> about msr permissions.

Hi Libor,

Thank you for the additions and your efforts.
It would be better (and preferred by most Gentoo devs) if you could supply unified diff/patch, rather then a new ebuild.

Once I have the diff/patches I will test them with the in tree ebuild and work to get the fixes into the main tree.

Thanks once again.
Comment 26 Libor Bukata 2015-11-15 10:49:53 UTC
Created attachment 417014 [details, diff]
likwid-4.0.1-r1.ebuild.patch
Comment 27 Libor Bukata 2015-11-15 10:56:58 UTC
A unified diff of the ebuild file was added. I noticed (and also fixed) that the file capabilities (cap_sys_rawio) have to be dealt in pkg_postinst. Please test a new ebuild (likwid-4.0.1-r1.ebuild.patch + likwid-4.0.1-access-daemon.patch) and let me know whether it works and whether the permissions are set correctly. Thank you for your testing.
Comment 28 Brendan Horan 2015-11-17 03:30:28 UTC
(In reply to Libor Bukata from comment #27)
> A unified diff of the ebuild file was added. I noticed (and also fixed) that
> the file capabilities (cap_sys_rawio) have to be dealt in pkg_postinst.
> Please test a new ebuild (likwid-4.0.1-r1.ebuild.patch +
> likwid-4.0.1-access-daemon.patch) and let me know whether it works and
> whether the permissions are set correctly. Thank you for your testing.

Thanks for the patch Libor.

Some quick feedback.
You don't need to use "fcaps" in the pkg_postinst(), but rather just call fcaps_pkg_postinst() this makes use of the "FILECAPS=()" array.
I have edited the pkg_postinst() section to reflect this.
See :
https://devmanual.gentoo.org/eclass-reference/fcaps.eclass/index.html


I have tested the following changes :
1) "${FILESDIR}"/${P}-access-daemon.patch
No issues. Happy to include the patch.

2) # Set the path to library directory
No issues. Happy to include the fix 

I have attached a new ebuild patch. This will be reviewed by the proxy maint project.
Comment 29 Brendan Horan 2015-11-17 03:33:05 UTC
Created attachment 417170 [details, diff]
likwid-4.0.1-r1.ebuild.patch

Adding tested patch.
This patch now needs "likwid-4.0.1-access-daemon.patch" that has previously been attached to this bug.
Comment 30 Brendan Horan 2015-11-17 03:37:55 UTC
Will try get this patch pushed with the help of proxy-maint.
Comment 31 Ian Delaney (RETIRED) gentoo-dev 2015-11-17 07:15:40 UTC
Author: Ian Delaney <idella4@gentoo.org>
Date:   Tue Nov 17 15:14:00 2015 +0800

    sys-apps/likwid: revbump to vn. 4.0.1-r1, sourced from gentoo bug
    
    Patches, ack to user Libor Bukata, final patches by proxy maintainer
    sourced from the gentoo bug used for initial version bump to likwid-4.0.1
    likwid-4.0.1-access-daemon.patch added to reset perms and set libdir
    correctly at install phase, rm broken 4.0.1 ebuild
    
    Gentoo bug: # 558402
Comment 32 Sam Jorna (wraeth) gentoo-dev 2015-11-17 08:34:13 UTC
As per request, successfully runtested clean install with no issues/concerns.
Comment 33 Libor Bukata 2015-11-18 09:09:51 UTC
Thank you all for your testing and suggestions. I have only a minor remark, according to my experiments likwid-{perfctr,bench,powermeter} tools are over-granted, it is enough to set extended capabilities (extra permissions) to likwid-accessD daemon. The tools are using this daemon only if they need extra privileges.