Re: [gentoo-user] How to use github source in ebuild?

2017-04-08 Thread mgcyung
Nils Freydank  writes:

> You need special variables provided by an git eclass. Newest is git-r3.eclass 
> which you can find in /eclass/.
>
> General docs are in devmanual.gentoo.org (which is mostly up-to-date).
>
> Here is an example in my overlay (inside the portage tree are several others, 
> too):
>
> https://git.holgersson.xyz/holgersson-overlay/tree/games-fps/urbanterror/
> urbanterror-.ebuild
>
> HTH,
> Nils

It works. Thanks for your guide and example.



Re: [gentoo-user] How to copy a file into '/etc' in ebuild?

2017-04-08 Thread mgcyung
netfab  writes:

> Le 08/04/17 à 16:23, mgcyung a tapoté :
>> I am new to ebuild writing. And I want to copy a file into
>> diretory /etc in src_install of a ebuild. Which function should I use?
>> 
>
> Maybe insinto/doins.
>
>   
> https://devmanual.gentoo.org/function-reference/install-functions/index.html

It works. Thanks a lot.



[gentoo-user] Re: Something eats my memory - please help

2017-04-08 Thread Kai Krakow
Am Sat, 8 Apr 2017 23:55:29 +0200
schrieb Alan McKinnon :

> > Adding up all terms except 'tot' I get 5.6G where are the remaining
> > 2G? And why is  shmem 0.85G - I have even seen a value of 4G for
> > shmem although all tempfs filesystems
> > were nearly empty.  
> 
> Lots of things use shared memory. All you know here is that something
> is using lots of it

Shared memory is not tmpfs. If many processes load the same .so file,
that memory is accounted for as shared memory: it's only mapped once
into memory. Well, with PIC/PIE that is not necessarily true as the
dynamic linker is patching the files (better speaking: the mapped
memory pages) during load, so some parts become unshared, unless you are
using prelink which should eliminate that factor to a great degree.
Shared memory also includes what is allocated as shmem file descriptors
(which in turn goes into tmpfs files, hence you thinking tmpfs is
shmem).

I think something is creating memory mapped files on your filesystem -
it could explain why you're missing 2G of memory.

If you don't use prelinking, 0.85G shmem looks perfectly normal to me.
I have around half of it with a full-blown but fully prelinked system.

-- 
Regards,
Kai

Replies to list-only preferred.




[gentoo-user] Re: Something eats my memory - please help

2017-04-08 Thread Kai Krakow
Am Sat, 08 Apr 2017 21:33:20 +0200
schrieb Helmut Jarausch :

> Hi,
> 
> since a few days my system eats up memory, uses SWAP space and gets  
> slow.
> It might depend on xorg-server, but I don't know why.
> 
> On a nearly idle system (except xorg-server and some XTerms) I have
>   MEM | tot 7.5G  | free2.9G  | cache   1.2G  | buff  114.6M
> | slab  498.0M |  shmem 848.3M |  vmbal   0.0M |  hptot   0.0M
> 
> (My system has 8G memory installed)
> 
> Adding up all terms except 'tot' I get 5.6G where are the remaining
> 2G? And why is  shmem 0.85G - I have even seen a value of 4G for
> shmem although all tempfs filesystems
> were nearly empty.
> 
> When I stop the X-server I get
> 
> MEM |  tot 7.5G |  free6.9G  | cache 387.4M  |  buff  118.4M
> | slab   72.0M  |  shmem   1.4M |  vmbal   0.0M  | hptot   0.0M  |
> 
> 
> I haven't seen this in the last 10 years!
> 
> I'm running kernel 4.11.0-rc5 but I doubt it has to do with the
> kernel since the values without a running  xorg-server  are for the
> same kernel.
> 
> Has anybody seen something similar?

It would be interesting to see the memory usage of the running
processes. Start top and press Shift+M (and maybe press "c" also to
see the complete command line) and watch the memory usage. When you
start experiencing slowdowns, have a look at top again.

For me, it was a runaway upower process some months ago. I'm using
systemd, so I fixed it easily with the following drop-in:

$ cat /etc/systemd/system/upower.service.d/99memory.conf
[Service]
MemoryLimit=512M

Upower now is limited to 512M of RAM (tho, it can still occupy swap
instead). That means, due to the resource limit RAM no longer filled up
but swap did. But that was meaningless performance-wise (I have 16G RAM
and 64G swap).

Maybe you can also "fix" it in a similar way by jailing misbehaving
processes into a limited amount of RAM with cgroups. Swap will still be
used but not for running/interactive processes so it won't become slow.

Strange enough: The moment I did this, the process stopped misbehaving.

Cgroups also support controlling swap usage but it comes at the cost of
additional memory usage (and probably also performance overhead), so I
only activated the RAM controller. And I started to add some safety
limits to other services, too. They now also dump their
never-needed-again junk straight into swap if any memory allocation
bugs would hit me.

-- 
Regards,
Kai

Replies to list-only preferred.




Re: [gentoo-user] Something eats my memory - please help

2017-04-08 Thread Walter Dnes
On Sat, Apr 08, 2017 at 09:33:20PM +0200, Helmut Jarausch wrote
> Hi,
> 
> since a few days my system eats up memory, uses SWAP space and gets  
> slow.  It might depend on xorg-server, but I don't know why.
> 
> On a nearly idle system (except xorg-server and some XTerms) I have
>   MEM | tot 7.5G  | free2.9G  | cache   1.2G  | buff  114.6M |   
> slab  498.0M |  shmem 848.3M |  vmbal   0.0M |  hptot   0.0M
> 
> (My system has 8G memory installed)

  Run "top -c" from the commandline (xterm or true text console), and
take a look at the "%CPU" and "%MEM" columns.  Is there anything that
looks bad?  You may have to wait for a day or two for the guilty app to
chew up memory, to catch it.

> When I stop the X-server I get
> 
> MEM |  tot 7.5G |  free6.9G  | cache 387.4M  |  buff  118.4M |   
> slab   72.0M  |  shmem   1.4M |  vmbal   0.0M  | hptot   0.0M  |

  When you shut down X, you also shut down all gui applications,
including whatever is eating memory, so that's not going to help pin
down the culprit.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] bitcoin-qt, openssl and the bindist USE flag

2017-04-08 Thread Daniel Frey
On 04/08/2017 02:57 PM, Alan McKinnon wrote:
> On 08/04/2017 20:16, Francesco Turco wrote:
>> I'm trying to globally enable the "bindist" USE flag on my system
> 
> Why on $DEITY's green earth would you even think of doing that?
> 
> Dont. Just ... don't. I don;t know what you are trying to accomplish
> doing that, but it can't end well.
> 
> Set that flag in package.use for the packages where you want it to be set.
> 

I'm pretty sure when I installed gentoo on my new laptop back in January
the bindist flag was set in make.conf (in the stage3 tarball.) I didn't
notice until after I compiled everything that some things were weird and
had to remove it and recompile a bunch of heavy packages.

Dan



Re: [gentoo-user] bitcoin-qt, openssl and the bindist USE flag

2017-04-08 Thread Rich Freeman
On Sat, Apr 8, 2017 at 5:57 PM, Alan McKinnon  wrote:
> On 08/04/2017 20:16, Francesco Turco wrote:
>> I'm trying to globally enable the "bindist" USE flag on my system
>
> Why on $DEITY's green earth would you even think of doing that?
>
> Dont. Just ... don't. I don;t know what you are trying to accomplish
> doing that, but it can't end well.
>
> Set that flag in package.use for the packages where you want it to be set.
>

There are valid reasons to want to set that flag globally.  Maybe you
want something you can legally distribute.

However, you do need to accept that there are tradeoffs.  Some
packages will have features disabled, and other packages will simply
be impossible to use.  You can certainly get a working box with
USE=-bindist (our stage3s are built that way).  The more you want
something resembling a conventional desktop the more you're going to
have to be willing to compromise on this one.

Don't like it?  Well, unfortunately you're going to have to
re-implement some fairly basic stuff, and even then you could run into
patent encumbrances that are going to be really painful to work
around.

Gentoo is just the messenger here.  It isn't like we're the ones
preventing you from redistributing stuff.  We don't care if you ignore
us.  Others might care more.

-- 
Rich



Re: [gentoo-user] bitcoin-qt, openssl and the bindist USE flag

2017-04-08 Thread Alan McKinnon
On 08/04/2017 20:16, Francesco Turco wrote:
> I'm trying to globally enable the "bindist" USE flag on my system

Why on $DEITY's green earth would you even think of doing that?

Dont. Just ... don't. I don;t know what you are trying to accomplish
doing that, but it can't end well.

Set that flag in package.use for the packages where you want it to be set.

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Something eats my memory - please help

2017-04-08 Thread Alan McKinnon
On 08/04/2017 21:33, Helmut Jarausch wrote:
> Hi,
> 
> since a few days my system eats up memory, uses SWAP space and gets slow.
> It might depend on xorg-server, but I don't know why.
> 
> On a nearly idle system (except xorg-server and some XTerms) I have
>  MEM | tot 7.5G  | free2.9G  | cache   1.2G  | buff  114.6M | 
> slab  498.0M |  shmem 848.3M |  vmbal   0.0M |  hptot   0.0M
> 
> (My system has 8G memory installed)
> 
> Adding up all terms except 'tot' I get 5.6G where are the remaining 2G?
> And why is  shmem 0.85G - I have even seen a value of 4G for shmem
> although all tempfs filesystems
> were nearly empty.

Lots of things use shared memory. All you know here is that something is
using lots of it

> 
> When I stop the X-server I get
> 
> MEM |  tot 7.5G |  free6.9G  | cache 387.4M  |  buff  118.4M | 
> slab   72.0M  |  shmem   1.4M |  vmbal   0.0M  | hptot   0.0M  |

When you stop the X-server you also stop all the X-clients, so of course
all the memory the culprit is using gets released. This is expected

> 
> 
> I haven't seen this in the last 10 years!

well, you are seeing it now 

> 
> I'm running kernel 4.11.0-rc5 but I doubt it has to do with the kernel
> since the values without a running  xorg-server  are for the same kernel.
> 
> Has anybody seen something similar?

Yes. You have something allocating gobs and gobs of memory for itself.
Most likely, some recently updated package has a memory leak and it
grows and grows till it consumes all memory, then the system swaps, then
it falls over, then all your kitty cats died.

You haven't done much useful to track it down. Find the process that is
really using memory. A very quick easy first step is to run top and sort
on the memory columns (just take the left-most memory-related column
with a big bag of salt, it doesn't show what people usually think). Then
correlate that with packages you recently updated.


-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] Something eats my memory - please help

2017-04-08 Thread Helmut Jarausch

Hi,

since a few days my system eats up memory, uses SWAP space and gets  
slow.

It might depend on xorg-server, but I don't know why.

On a nearly idle system (except xorg-server and some XTerms) I have
 MEM | tot 7.5G  | free2.9G  | cache   1.2G  | buff  114.6M |   
slab  498.0M |  shmem 848.3M |  vmbal   0.0M |  hptot   0.0M


(My system has 8G memory installed)

Adding up all terms except 'tot' I get 5.6G where are the remaining 2G?
And why is  shmem 0.85G - I have even seen a value of 4G for shmem  
although all tempfs filesystems

were nearly empty.

When I stop the X-server I get

MEM |  tot 7.5G |  free6.9G  | cache 387.4M  |  buff  118.4M |   
slab   72.0M  |  shmem   1.4M |  vmbal   0.0M  | hptot   0.0M  |



I haven't seen this in the last 10 years!

I'm running kernel 4.11.0-rc5 but I doubt it has to do with the kernel  
since the values without a running  xorg-server  are for the same  
kernel.


Has anybody seen something similar?

Many thanks for a hint,
Helmut



Re: [gentoo-user] bitcoin-qt, openssl and the bindist USE flag

2017-04-08 Thread Mick
On Saturday 08 Apr 2017 20:16:02 Francesco Turco wrote:
> I'm trying to globally enable the "bindist" USE flag on my system, but it
> seems net-p2p/bitcoin-qt wants -bindist:
> 
> ### BEGIN ###
> 
> # USE="bindist" emerge -uDNav @world --with-bdeps=y
> 
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> [ebuild   R] dev-libs/openssl-1.0.2k::gentoo  USE="asm bindist*
> tls-heartbeat zlib -gmp -kerberos -rfc3779 -sctp -sslv2 -sslv3 -static-libs
> {-test} -vanilla" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB
> [ebuild   R] media-libs/freetype-2.7.1-r2:2::gentoo  USE="X adobe-cff
> bindist* bzip2 cleartype_hinting png -debug -doc -fontforge -harfbuzz
> -infinality -static-libs -utils" ABI_X86="(64) -32 (-x32)" 0 KiB
> [ebuild   R] net-misc/openssh-7.5_p1-r1::gentoo  USE="X bindist* hpn
> pam pie ssl -X509 -audit -debug -kerberos -ldap -ldns -libedit -libressl
> -livecd -sctp (-selinux) -skey -ssh1 -static {-test}" 0 KiB
> [ebuild   R] dev-qt/qtnetwork-5.7.1:5/5.7::gentoo  USE="bindist* ssl
> -connman -debug -libproxy -networkmanager {-test}" 0 KiB
> [ebuild   R] media-libs/mesa-17.0.3::gentoo  USE="bindist* classic dri3
> egl gallium gbm nptl -d3d9 -debug -gles1 -gles2 -llvm -opencl -openmax
> -osmesa -pax_kernel -pic (-selinux) -vaapi -valgrind -vdpau -vulkan
> -wayland -xa -xvmc" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="i915 intel
> (-freedreno) -i965 -imx -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi
> (-vc4) (-vivante) -vmware" 0 KiB
> [ebuild   R] dev-qt/qtwebengine-5.7.1-r1:5/5.7::gentoo  USE="alsa
> bindist* system-ffmpeg system-icu widgets -debug -geolocation -pax_kernel
> -pulseaudio {-test}" 0 KiB
> 
> Total: 6 packages (6 reinstalls), Size of downloads: 0 KiB
> 
> !!! Multiple package instances within a single package slot have been
> pulled
> !!! into the dependency graph, resulting in a slot conflict:
> 
> dev-libs/openssl:0
> 
>   (dev-libs/openssl-1.0.2k:0/0::gentoo, ebuild scheduled for merge) pulled
> in by
> dev-libs/openssl:0[bindist=] required by
> (dev-qt/qtnetwork-5.7.1:5/5.7::gentoo, ebuild scheduled for merge)
>
> 
> >=dev-libs/openssl-1.0.1:0=[bindist=] required by
> 
> (net-misc/openssh-7.5_p1-r1:0/0::gentoo, ebuild scheduled for merge)
> 
> 
> 
> 
>   (dev-libs/openssl-1.0.2k:0/0::gentoo, installed) pulled in by
> dev-libs/openssl:0[-bindist] required by
> (net-p2p/bitcoin-qt-0.14.0:0/0::bitcoin, installed)
>
> 
> 
> 
> It might be possible to solve this slot collision
> by applying all of the following changes:
>- net-misc/openssh-7.5_p1-r1 (Change USE: -bindist)
>- dev-qt/qtnetwork-5.7.1 (Change USE: -bindist)
>- dev-libs/openssl-1.0.2k (Change USE: -bindist)
> 
> # USE="bindist" emerge openssl bitcoin-qt
> Calculating dependencies... done!
> [ebuild   R] dev-libs/openssl-1.0.2k
> [ebuild   R   #] net-p2p/bitcoin-qt-0.14.0
> 
> The following USE changes are necessary to proceed:
>  (see "package.use" in the portage(5) man page for more details)
> # required by net-p2p/bitcoin-qt-0.14.0::bitcoin[-libressl]
> # required by bitcoin-qt (argument)
> 
> >=dev-libs/openssl-1.0.2k -bindist
> 
> Use --autounmask-write to write changes to config files (honoring
> CONFIG_PROTECT). Carefully examine the list of proposed changes,
> paying special attention to mask or keyword changes that may expose
> experimental or unstable packages.
> 
> ### END ###dev-qt/qtnetwork
> 
> The point is I can't find any reference to the bindist USE flag in the
> bitcoin-qt ebuild:
> 
> $ grep bindist $(equery which bitcoin-qt)
> $ # returns nothing

It seems to be dev-qt/qtnetwork causing this.


> Is there any particular reason for bitcoin-qt not accepting a freely
> redistributable openssl package?
> 
> Should I switch to libressl instead? I tried to do that some months ago,
> and it didn't end well...
> 
> What do you suggest?
> 
> Thanks.

Did you try setting USE="-bindist" and then emerging the three packages 
suggested by portage above?

net-misc/openssh
dev-qt/qtnetwork
dev-libs/openssl

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] bitcoin-qt, openssl and the bindist USE flag

2017-04-08 Thread Francesco Turco
I'm trying to globally enable the "bindist" USE flag on my system, but it 
seems net-p2p/bitcoin-qt wants -bindist:


### BEGIN ###

# USE="bindist" emerge -uDNav @world --with-bdeps=y

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R] dev-libs/openssl-1.0.2k::gentoo  USE="asm bindist* 
tls-heartbeat zlib -gmp -kerberos -rfc3779 -sctp -sslv2 -sslv3 -static-libs 
{-test} -vanilla" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="(sse2)" 0 KiB
[ebuild   R] media-libs/freetype-2.7.1-r2:2::gentoo  USE="X adobe-cff 
bindist* bzip2 cleartype_hinting png -debug -doc -fontforge -harfbuzz 
-infinality -static-libs -utils" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R] net-misc/openssh-7.5_p1-r1::gentoo  USE="X bindist* hpn 
pam pie ssl -X509 -audit -debug -kerberos -ldap -ldns -libedit -libressl 
-livecd -sctp (-selinux) -skey -ssh1 -static {-test}" 0 KiB
[ebuild   R] dev-qt/qtnetwork-5.7.1:5/5.7::gentoo  USE="bindist* ssl 
-connman -debug -libproxy -networkmanager {-test}" 0 KiB
[ebuild   R] media-libs/mesa-17.0.3::gentoo  USE="bindist* classic dri3 
egl gallium gbm nptl -d3d9 -debug -gles1 -gles2 -llvm -opencl -openmax 
-osmesa -pax_kernel -pic (-selinux) -vaapi -valgrind -vdpau -vulkan 
-wayland -xa -xvmc" ABI_X86="(64) -32 (-x32)" VIDEO_CARDS="i915 intel 
(-freedreno) -i965 -imx -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi 
(-vc4) (-vivante) -vmware" 0 KiB
[ebuild   R] dev-qt/qtwebengine-5.7.1-r1:5/5.7::gentoo  USE="alsa 
bindist* system-ffmpeg system-icu widgets -debug -geolocation -pax_kernel 
-pulseaudio {-test}" 0 KiB


Total: 6 packages (6 reinstalls), Size of downloads: 0 KiB

!!! Multiple package instances within a single package slot have been 
pulled

!!! into the dependency graph, resulting in a slot conflict:

dev-libs/openssl:0

 (dev-libs/openssl-1.0.2k:0/0::gentoo, ebuild scheduled for merge) pulled 
in by
   dev-libs/openssl:0[bindist=] required by 
(dev-qt/qtnetwork-5.7.1:5/5.7::gentoo, ebuild scheduled for merge)
   
  
   >=dev-libs/openssl-1.0.1:0=[bindist=] required by 
(net-misc/openssh-7.5_p1-r1:0/0::gentoo, ebuild scheduled for merge)
   
   
 


 (dev-libs/openssl-1.0.2k:0/0::gentoo, installed) pulled in by
   dev-libs/openssl:0[-bindist] required by 
(net-p2p/bitcoin-qt-0.14.0:0/0::bitcoin, installed)
   
   



It might be possible to solve this slot collision
by applying all of the following changes:
  - net-misc/openssh-7.5_p1-r1 (Change USE: -bindist)
  - dev-qt/qtnetwork-5.7.1 (Change USE: -bindist)
  - dev-libs/openssl-1.0.2k (Change USE: -bindist)

# USE="bindist" emerge openssl bitcoin-qt
Calculating dependencies... done!
[ebuild   R] dev-libs/openssl-1.0.2k 
[ebuild   R   #] net-p2p/bitcoin-qt-0.14.0 


The following USE changes are necessary to proceed:
(see "package.use" in the portage(5) man page for more details)
# required by net-p2p/bitcoin-qt-0.14.0::bitcoin[-libressl]
# required by bitcoin-qt (argument)

=dev-libs/openssl-1.0.2k -bindist


Use --autounmask-write to write changes to config files (honoring
CONFIG_PROTECT). Carefully examine the list of proposed changes,
paying special attention to mask or keyword changes that may expose
experimental or unstable packages.

### END ###

The point is I can't find any reference to the bindist USE flag in the 
bitcoin-qt ebuild:


$ grep bindist $(equery which bitcoin-qt)
$ # returns nothing

Is there any particular reason for bitcoin-qt not accepting a freely 
redistributable openssl package?


Should I switch to libressl instead? I tried to do that some months ago, 
and it didn't end well...


What do you suggest?

Thanks.

--
https://www.fturco.net/



Re: [gentoo-user] How to use github source in ebuild?

2017-04-08 Thread Nils Freydank
You need special variables provided by an git eclass. Newest is git-r3.eclass 
which you can find in /eclass/.

General docs are in devmanual.gentoo.org (which is mostly up-to-date).

Here is an example in my overlay (inside the portage tree are several others, 
too):

https://git.holgersson.xyz/holgersson-overlay/tree/games-fps/urbanterror/
urbanterror-.ebuild

HTH,
Nils

-- 
GPG fingerprint: '00EF D31F 1B60 D5DB ADB8  31C1 C0EC E696 0E54 475B'
Nils Freydank

signature.asc
Description: This is a digitally signed message part.


[gentoo-user] How to use github source in ebuild?

2017-04-08 Thread mgcyung

I am new to ebuild writing. And I want to write a ebuild with the
sources from github. If there is a 'git' protocal support in SRC_URI or
other method?

Best wishes
---
mgcyung



Re: [gentoo-user] How to copy a file into '/etc' in ebuild?

2017-04-08 Thread netfab
Le 08/04/17 à 16:23, mgcyung a tapoté :
> I am new to ebuild writing. And I want to copy a file into
> diretory /etc in src_install of a ebuild. Which function should I use?
> 

Maybe insinto/doins.


https://devmanual.gentoo.org/function-reference/install-functions/index.html



[gentoo-user] How to copy a file into '/etc' in ebuild?

2017-04-08 Thread mgcyung

I am new to ebuild writing. And I want to copy a file into diretory /etc
in src_install of a ebuild. Which function should I use?

Best wishes
---
mgcyung