Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Andrew Udvare
On 8/31/18 11:31 AM, Mick wrote:
> Hi All,
>
> Would anyone have *recent* experience of installing and running Gentoo
plus
> Kodi on the above?  It has a Pentium-M with Apple's 32bit EFI.


It also has a GeForce Go 7300 which is still supported. 304.137 of the
proprietary driver is still in the tree. From what I can tell you will
be better off with the proprietary driver over Nouveau.

I question if it can handle running Kodi. Maybe you would want to use
something else for video playback/media management?

You definitely would want to cross-compile everything for this machine
on a modern system, with minimal dependencies since you only have 512 MB
of RAM to work with. You can set Kodi to start with xinitrc or you can
have something like SDDM show Kodi as an option.

Nouveau may work for you other than hardware acceleration of video
decoding. Maybe that CPU can handle 480P MPEG-2 and non-HD XviD but
almost certainly not x264 or HEVC (I doubt the OpenGL renderer can help
here). If you are willing to convert files and use lower resolutions
then this may be acceptable.

https://nouveau.freedesktop.org/wiki/VideoAcceleration/

Conflicting information here as Nvidia says there are no VDPAU features
supported by this graphics card.
http://us.download.nvidia.com/XFree86/Linux-x86/304.137/README/supportedchips.html




signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Gentoo on Apple TV 1

2018-08-31 Thread Andrew Udvare
On 8/31/18 11:31 AM, Mick wrote:
> Hi All,
> 
> Would anyone have *recent* experience of installing and running Gentoo plus 
> Kodi on the above?  It has a Pentium-M with Apple's 32bit EFI.

Not exactly the same but I've tried converting old systems into usable
ones with Gentoo involved.

The Apple TV also has a GeForce Go 7300 which is still supported but
barely. 304.137 of the proprietary driver is still in the tree for the
time being. From what I can tell you will be better off with the
proprietary driver over Nouveau.

I question if it can handle running modern Kodi. Maybe you would want to
use something else for video playback/media management?

You definitely would want to cross-compile everything for this machine
on a modern system, with minimal dependencies since you only have 512 MB
of RAM to work with. You can set Kodi to start with xinitrc or you can
have something like SDDM show Kodi as an option.

Nouveau may work for you other than hardware acceleration of video
decoding. Maybe that CPU can handle 480P MPEG-2 and non-HD XviD but
almost certainly not x264 or HEVC (I doubt the OpenGL renderer can help
here). If you are willing to convert files and use lower resolutions
then this may be acceptable. You would still be able to have 6 channel
output via the HDMI or optical output.

Conflicting information here as Nvidia says there are no VDPAU features
supported by this graphics card.
http://us.download.nvidia.com/XFree86/Linux-x86/304.137/README/supportedchips.html
vs https://nouveau.freedesktop.org/wiki/VideoAcceleration/

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] [OFF-TOPIC] Best bios type thingy to boot a computer

2018-08-31 Thread Andrew Udvare
On 8/31/18 10:46 AM, Andrew Lowe wrote:
> Hi all,

>   This is not to start a flame war, I just want to do some reading,
> wikipedia pages, for self interest on how a BIOS could have/should have
> been done. I'm thinking of how DECStations, Alpha's SPARCs etc etc
> booted up.

Try

https://en.wikipedia.org/wiki/Booting#Boot_sequence
https://github.com/coreos/grub/tree/2.02-coreos/grub-core/boot/i386/pc
https://github.com/torvalds/linux/blob/master/arch/x86/boot/main.c#L135

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] KDE reboot not preserving running applications

2018-08-28 Thread Andrew Udvare


> On 2018-08-28, at 18:24, Daniel Frey  wrote:
> 
> On 08/28/18 02:57, Peter Humphrey wrote:
>> Hello list,
>> 
>> After a reboot I get "Too many clients" from the remote krells, the local 
>> krell is absent (and if I restart it it comes up in the centre of the 
>> screen) and Firefox attempts to run two instances. I have to pkill the lot 
>> and start them again.
>> 
>> If I stop these programs before rebooting, all is well when I restart them 
>> later, so I suspect the KDE/plasma setup is the guilty party.
>> 
>> I've reinstalled the complete system on bare silicon, created new accounts 
>> for myself, and anything else I can think of, just to be sure that I have 
>> nothing untoward hanging about.
>> 
>> Is anyone else having this problem?

Was it ever perfect? I have given up on relying on this feature especially 
since Chromium does not even launch after logging in again (has not happened in 
a long time). I just have keyboard shortcuts set up to get things back to how I 
want them (tiled in various ways, like 50% width, 25% width/height 
top-left/bottom-left/..., etc).

-- 
Andrew


[gentoo-user] Re: Valgrind not seeing debug symbols

2018-08-20 Thread Andrew Udvare



> On Aug 19, 2018, at 12:21, Andrew Udvare  wrote:
> 
> Hi all,
> 
> I have this project https://github.com/Tatsh/gcrud and it uses a very
> standard build process with CMake, but for some reason Valgrind never
> sees the debug symbols.

I created a basic Gentoo machine with a Vagrant box and set up a mini 
environment to test if it is just my machine. The symbols show up on the 
Vagrant box. It could be a bad version of Valgrind on my end but I haven’t 
compared the environments. My main system has something wrong.

 — 
Andrew


[gentoo-user] Valgrind not seeing debug symbols

2018-08-19 Thread Andrew Udvare
Hi all,

I have this project https://github.com/Tatsh/gcrud and it uses a very
standard build process with CMake, but for some reason Valgrind never
sees the debug symbols.

The debug symbols are definitely there as GDB can see them, but I have
not been able to figure out why Valgrind can't. I have the latest
version of Valgrind which supports compressed debug symbols.

I even created an ebuild to see if Portage does the magic I need:

https://github.com/Tatsh/tatsh-overlay/blob/master/app-portage/gcrud/gcrud-.ebuild

Portage does not generate the debug symbols file I expect to see.

In all cases I am building with -ggdb. I have FEATURES="splitdebug
compressdebug" and still no debug symbols:

$ valgrind -v --leak-check=full gcrud
...
==16662== 1,120,873 bytes in 16,784 blocks are definitely lost in loss
record 41 of 41
==16662==at 0x4C30D6F: realloc (vg_replace_malloc.c:785)
==16662==by 0x5266BA5: __vasprintf_chk (vasprintf_chk.c:88)
==16662==by 0x4ECA438: vasprintf (stdio2.h:210)
==16662==by 0x4ECA438: g_vasprintf (gprintf.c:316)
==16662==by 0x4EA482C: g_strdup_vprintf (gstrfuncs.c:514)
==16662==by 0x4EA48F0: g_strdup_printf (gstrfuncs.c:540)
==16662==by 0x10AB1A: ??? (in /usr/bin/gcrud)
==16662==by 0x10C5B9: ??? (in /usr/bin/gcrud)
==16662==
==16662== LEAK SUMMARY:
==16662==definitely lost: 1,919,735 bytes in 30,221 blocks

I can tell it's a call to g_strdup_printf() but I sure would like to
know what line number since there are a few times it's called.

I also tried the same build process but with Clang. Tried -gdwarf-4/5
and -Og -ggdb. I also don't understand why other libraries are working fine.

Appreciate any help. Thanks

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


[gentoo-user] kdevelop broken (llvm slot issue)

2018-08-19 Thread Andrew Udvare
On 19/08/18 11:21, Alexander Puchmayr wrote:
> 
> This issue is covered by bug https://bugs.gentoo.org/651658, which is open 
> since March 2018 and no progress since also March 2018.
> 
> It seems as if multiple slots of llvm cause the problems. mesa pulls in llvm:
> 5, while other programs pull in llvm:6 (via clang:6)
> 
> Does anyone have an idea how to get a working kdevelop again?

I think you have to not have multiple LLVM/Clang installations,
unfortunately. That's what the bug indicates.

I am not having issues with KDevelop with Clang support and I have
everything on the latest version:

LLVM 6.0.1-r1
Clang 6.0.1
KDevelop 5.2.3 gdbui hex plasma qmake welcomepage
kDevelop-php 5.2.3
kdevelop-python 5.2.3

I would just ensure everything is built against one version of
Clang/LLVM and get rid of the other versions from the machine.

If you really don't need the Clang features (if you are using KDevelop
for non-C/C++), you can disable it at runtime:

/usr/bin/env KDEV_DISABLE_PLUGINS=kdevclangsupport kdevelop %u

I have this is in my menu because KDevelop gets dumb with QML JS vs
JavaScript for me, making KDevelop nearly impossible to use with Node projec

-- 
Andrew





signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] kdevelop broken (llvm slot issue)

2018-08-19 Thread Andrew Udvare
On 19/08/18 11:21, Alexander Puchmayr wrote:
> 
> This issue is covered by bug https://bugs.gentoo.org/651658, which is open 
> since March 2018 and no progress since also March 2018.
> 
> It seems as if multiple slots of llvm cause the problems. mesa pulls in llvm:
> 5, while other programs pull in llvm:6 (via clang:6)
> 
> Does anyone have an idea how to get a working kdevelop again?

I think you have to not have multiple LLVM/Clang installations,
unfortunately. That's what the bug indicates.

I am not having issues with KDevelop with Clang support and I have
everything on the latest version:

LLVM 6.0.1-r1 libffi ncurses
Clang 6.0.1 +static-analyzer LLVM_TARGETS="AMDGPU BPF NVPTX X86"
KDevelop 5.2.3 gdbui hex plasma qmake welcomepage
kDevelop-php 5.2.3
kdevelop-python 5.2.3
Mesa 18.* classic dri3 egl gallium gbm gles2 llvm wayland

Most of the above are defaults.

I would just ensure everything is built against one version of
Clang/LLVM and get rid of the other versions from the machine.

If you really don't need the Clang features (if you are using KDevelop
for non-C/C++), you can disable it at runtime:

/usr/bin/env KDEV_DISABLE_PLUGINS=kdevclangsupport kdevelop %u

You have to kill all KDevelop instances completely for this to work.

I have this is in my menu because KDevelop gets dumb with QML JS vs
JavaScript for me, making KDevelop nearly impossible to use with Node
projects.

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Replacement for gcruft: gcrud

2018-08-16 Thread Andrew Udvare



> On 2018-08-16, at 14:22, james  wrote:
> 
> Yes, but, it'll be  while for me. Offer and automated clean up option,
> and I have dozens of systems to test.

I'll figure out the kind of tests I want to run sometime soon.
> 
> 
> GLEP 64 was on the path to systematically solve what you you are doing
> after the fact::
> 
> https://wiki.gentoo.org/wiki/GLEP:64
> 
> More refs for your convenience
> 
> http://asic-linux.com.mx/~izto/checkinstall/
> 
> http://gittup.org/tup/
> ("It will automatically clean-up old files.")

Thanks for pointing these out.

It is really tempting to support macOS like tup does, although SIP and the 
restored snapshot on boot kind of makes it unnecessary. And also the idea of 
using a newly created FS to see changes is interesting.

A new GLEP to systematically delete extraneous files could be to restore a 
non-user generated snapshot on boot just like iOS/macOS, but the problem is 
that we don't always use the same filesystem or mount configurations. Another 
way would be to use xattr but again the issue is compatibility.

-- 
Andrew


Re: [gentoo-user] Replacement for gcruft: gcrud

2018-08-16 Thread Andrew Udvare



> On 2018-08-16, at 16:09, Corentin “Nado” Pazdera  wrote:
> 
> Hi,
> 
> So I tested it, and I was surprised how many /etc files weren't put into 
> whitelist.
> Actually, most of /etc shouldn't be suggested for deletion if the packages 
> are still installed.

Thanks for testing! Really appreciate it.

The whitelist is the biggest work in progress right now. Most of what it lists 
from /etc for me is /etc/config-archive which AFAIK is not managed by Portage 
at all although Portage will place old files there? I don't use the feature 
because my /etc is controlled by Git. The stuff listed in /var/ is pretty 
accurate as there's a lot of old website cruft and this computer does not serve 
anything like that anymore.

> 
> Portage stuff like repositories could be whitelisted in a dynamic manner, or 
> at least bing able to
> tell what directorie(s) are used to store them.

The idea is to move to everything in the whitelist.c file to a declarative (no 
code unless you count RE) configuration file. I have not decided on a format 
but I am leaning towards INI-style because GLib2 has a parser for that 
built-in. The config file will specify exact paths, RE, and globs. There will 
be a default dynamic list generated at runtime based on what packages you have 
installed (as gcruft had this feature).

> I also caught some wrongly listed files because of the multilib system with 
> /lib symlink.
> For example, dhcpcd declared /lib/dhcpcd/dhcpcd-hooks, thus the realpath 
> /lib64/dhcpcd/dhcpcd-hooks
> was listed in the removal suggestion. This should be fixed with profile 17.1

The /lib vs /lib64 issue will be resolved in a later version. I think I need to 
use lstat() everywhere instead of stat(), or I can call realpath() prior to 
storing values in the set. This file should be whitelisted, but only if you 
have dhcpcd installed (I've long since moved to dhcpd).

I am trying to my best to give zero false positives, so you plan to have 
something like `% gcrud | ... | xargs rm -fR`.

> 
> The log is so huge at the moment it is useless for me :/
> 
> % wc -l out.log
> 461575 out.log

Any thoughts on how to simplify analysis?

-- 
Andrew


[gentoo-user] Replacement for gcruft: gcrud

2018-08-16 Thread Andrew Udvare
gcruft seems to have died off (https://www.google.com/search?q=gcruft
only returns ebuild results). I was using it quite a lot and wrote many
exception files. It's gone now with no way for my or anyone else's
ebuild to get the original source. I did preserve it though, here:
https://gitlab.com/Tatsh/gcruft

I wrote a replacement in C named gcrud. It only needs GLib2 installed to
work. It's much faster than gcruft ever was. The code is here:

https://gitlab.com/Tatsh/gcrud
https://github.com/Tatsh/gcrud

I am placing preference in GitLab for issues and merge requests, but I
will accept PRs from GitHub.

The whitelist https://gitlab.com/Tatsh/gcrud/blob/master/whitelist.c is
currently hard-coded and limited but the results are satisfactory for
now in my use cases.

Type use case:

sudo ./gcrud | sort -u > out.log

Examine out.log for things you can delete. There are absolutely zero
calls to delete files from the machine in my code and never will be any
kind of automation support.

If anyone tries it out I certainly would like to see your output and get
some bug reports or suggestions. The main feature planned is reading
from a configuration file for exact file paths and regexs.

--
Andrew



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] cann figure out this conflict

2018-08-03 Thread Andrew Udvare



> On 2018-08-03, at 23:22, John Covici  wrote:
> 
> Hi.  I seem to be having a blocker which involves pulseaudio, but from
> the portage output, I cannot figure out what the conflict is.  I
> masked off >=media-sound/pulseaudio-12.2 and this is what I got, same
> thing happens if its unmasked.  I am using unstable gentoo updated
> today.
> 
> 
> * Error: The above package list contains packages which cannot be^M
>  * installed at the same time on the same system.^M
>  ^M
>(media-sound/pulseaudio-12.0-r2:0/0::gentoo, installed) pulled in
>  * by^M
>> =media-sound/pulseaudio-2[glib] required by
>  * (gnome-base/gnome-control-center-3.24.4:2/2::gentoo, ebuild
>  * scheduled for merge)^M
>> =media-sound/pulseaudio-3[glib] required by
>  * (media-sound/pavucontrol-3.0:0/0::gentoo, installed)^M
>  media-sound/pulseaudio required by
>  * (www-client/firefox-61.0-r1:0/0::gentoo, installed)^M
>  media-sound/pulseaudio required by
>  * (media-video/mplayer-1.3.0-r5:0/0::gentoo, installed)^M
>> =media-sound/pulseaudio-2 required by
>  * (gnome-base/gnome-settings-daemon-3.24.4:0/0::gentoo, installed)^M
>> =media-sound/pulseaudio-12.0-r1[glib] required by
>  * (media-sound/paprefs-0.9.11_pre20180621:0/0::gentoo, installed)^M
>  ^M
>(media-sound/apulse-0.1.12:0/0::gentoo, ebuild scheduled for
>  * merge) pulled in by^M
>  media-sound/apulse required by @selected

Try uninstalling the items that need pulseaudio-2[glib] (find replacements):

emerge --depclean -av gnome-base/gnome-control-center 
gnome-base/gnome-settings-daemon

(Or use -C and you can clean dependencies later)

Then run emerge again.

You cannot mask >=pulseaudio-3 because it's long gone out of the tree.

-- 
Andrew


Re: [gentoo-user] LibreOffice and openldap

2018-07-25 Thread Andrew Udvare
On 07/25/2018 06:34 AM, Andrew Udvare wrote:
> 
> 
>> On 2018-07-25, at 04:41, Neil Bothwick  wrote:
>>
>> Those are all kdepim packages, I run KDE without KMail and the only
>> package that depends on openldap is LO.
> 
> Figured out the patch. I have attached it. It does not fix the ebuild, but it 
> does make LibreOffice build without the LDAP plugin. This makes it possible 
> to have optional LDAP support.
> 
> In the -bin package I think it would be possible to remove this dependency by 
> removing the ldapbe2 files and fixing any generated plugin registry data.
> 
> Andrew
> 

Pull request here: https://github.com/gentoo/gentoo/pull/9351



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] LibreOffice and openldap

2018-07-25 Thread Andrew Udvare


> On 2018-07-25, at 04:41, Neil Bothwick  wrote:
> 
> Those are all kdepim packages, I run KDE without KMail and the only
> package that depends on openldap is LO.

Figured out the patch. I have attached it. It does not fix the ebuild, but it 
does make LibreOffice build without the LDAP plugin. This makes it possible to 
have optional LDAP support.

In the -bin package I think it would be possible to remove this dependency by 
removing the ldapbe2 files and fixing any generated plugin registry data.

Andrew



no-ldapbe2.patch
Description: Binary data


Re: [gentoo-user] LibreOffice and openldap

2018-07-25 Thread Andrew Udvare



> On 2018-07-25, at 04:41, Neil Bothwick  wrote:
> 
> Those are all kdepim packages, I run KDE without KMail and the only
> package that depends on openldap is LO.


Same here. I have global USE "-ldap -openldap" (shouldn't the latter be fixed 
in dev-libs/cyrus-sasl ?). There is no way to avoid OpenLDAP when LibreOffice 
is installed. On my system this is the only package calling for it.

app-office/libreoffice-6.0.5.2-r1 (net-nds/openldap)

I did find that LibreOffice has one file that needs it:

 $ readelf -d /usr/lib64/libreoffice/program/libldapbe2lo.so

Dynamic section at offset 0xed10 contains 35 entries:
  TagType Name/Value
 0x0001 (NEEDED) Shared library: [libldap-2.4.so.2]

This stands for LDAP backend (2), a plugin that does that. Seems to be loaded 
on demand at runtime (using the component registry), and otherwise should be 
removable but that would need a patch. Maybe it's just to remove this line 
prior to building?

https://github.com/LibreOffice/core/blob/5a74884e7da4c497c4ea714bf84d62b55ed82cfe/Repository.mk#L395

Andrew


Re: [gentoo-user] scanner problem

2018-07-18 Thread Andrew Udvare



> On 2018-07-18, at 04:16, Philip Webb  wrote:
> 
> (3) I can scan without problems using Mint Xfce (on another partition),
> so it's not a hardware problem.
> 
> (4) 'lsusb' lists "Bus 001 Device 004: ID 0418: 013b Seiko Epson Corp".
> 
> (5) the 'epkowa' driver is the latest version : a download from
> 'support.epson.net/linux/en/iscan.php?model=perfection-v550=1.0.1'
> gets the same compressed files as are already installed (same sizes).
> 
> (6) the output from 'strace' is at
> http://chass.utoronto.ca/~purslow/test/xsane-trace.d1 .

I think you should look at the /etc/sane.d/epkowa.conf file and make 
modifications if necessary. You should compare it to the Mint partition. And 
you should do the same for other configuration files like /etc/sane.d/dll.conf.

> 
> (9) Vuescan is a possible alternative : does anyone have experience ?

You want this to work with SANE because major apps like GIMP only support SANE 
IIRC.

Andrew




Re: [gentoo-user] Multilib help

2018-07-04 Thread Andrew Udvare



> On 2018-07-04, at 01:51, Zoltán Kócsi  wrote:
> 
> My problem is that I've installed a multilib-enabled 64-bit system and
> realised that /usr/lib32 and /usr/lib64 are vastly of different. There
> are around 2200 dynamic and some 130 static libs in lib64 while there
> are around 300 dynamic and 15 static libs in lib32. That is, about 85%
> of libraries exist in 64-bit version only.

This is normal.
> 
> Consequently, pretty much any 32-bit binary fails to launch due to
> missing libraries. Which is most unfortunate as I have quite a few
> of such binaries from EDA tools to productivity tools to games.

If your (presumably closed source) apps are old enough to not have 64-bit 
builds available, then they may be too old for Portage to be useful for this. 
You would be better off building the old version open source libs in 32-bit and 
set up a prefix to run everything from with things like LD_LIBRARY_PATH set.

> 
> I would much appreciate if someone would explain how to tell the system
> to build a 32-bit version of *every* library it installs (and have
> already installed) so that 32-bit binaries could run (and could also be
> built against those libs, actually).

There's no such feature (yet). You can set up a chroot for a 32-bit system and 
run things from there.

https://wiki.gentoo.org/wiki/Project:AMD64/32-bit_Chroot_Guide

If most of your apps are 32-bit then you are almost better off running a native 
32-bit system, especially for games.

You can also use the chroot for building, but then copy the libraries you need 
(and only the ones you need) to a path outside of the chroot. Then you can set 
LD_LIBRARY_PATH to that path and run the binary. This will work for most apps 
including games. I prefer this way because then I don't have to remember to set 
up the chroot, nor do I have to do anything as root once this is set up. This 
is how I ran PCSX2 prior to it running natively on x86-64.

Otherwise, if graphics performance is not an issue, use a 32-bit Linux within a 
VM.

Andrew




Re: [gentoo-user] Any utility to forcibly freeze or swap out a specific pid?

2018-07-01 Thread Andrew Udvare
On Sun, Jul 1, 2018 at 9:16 PM Walter Dnes  wrote:
>
>   There are some programs that I would much rather keep open, versus
> shutting down and restarting all over again.  But keeping them all open
> uses resources, especially on a 10-year-old CORE2 with 3 gigabytes of
> RAM (The thing refuses to die).  Is there a way to forcibly swap out or
> freeze a specific PID, until I need to get back to it again?
>

kill -s SIGSTOP 

to resume:

kill -s SIGCONT 

man kill
man 7 signal

YMMV on what processes will actually work properly after a SIGCONT. If
anything a process does is not re-entrant, then you could have very
unpredictable things happen including corruption of data.

Andrew



Re: [gentoo-user] nodejs emerge fails

2018-06-26 Thread Andrew Udvare


> On 2018-06-26, at 16:18, Jack  wrote:
> 
> On 2018.06.26 15:44, Christoph Böhmwalder wrote:
>> On Tue, Jun 26, 2018 at 03:15:09PM -0400, Andrew Udvare wrote:
>> > It should not be accessing this location in any case. What is the 
>> > environment like? What does env show? emerge --config output?
>> >
>> > It would almost seem like you have $HOME set to /home/christoph while 
>> > Portage is running (as root).
>> The only thing that stands out about `env` is that XDG_CONFIG_HOME is set to 
>> /home/christoph/.config (running as root). I'm not sure if it's supposed to 
>> be this way, but I didn't find anything in my dotfiles that would suggest 
>> that I'm overwriting it.
> That's a normal setting for you.  The problem is that when you did sudo or su 
> to run emerge, it simply stayed in the environment, causing this problem.  
> When you su or sudo to run emerge (or just log in directly as root) you need 
> to be sure to do so in a way that cleans out your environment.  I keep 
> thinking to file a bug to request emerge to sanitize the environment, or at 
> least add an option to make it do so.  I often forget to use them, but I 
> created scripts (cleanemerge and cleanebuild) to do that for me.

I had a similar issue with BC_ENV_ARGS being set while running Portage. If you 
have this set, some packages (I forget which) that use bc will try to read your 
.bcrc file and they will most likely fail. The scripts I used to use would 
unset this variable before calling emerge.

I wrote Pezu ( https://github.com/Tatsh/pezu ) as a replacement for said 
scripts. It isolates the environment automatically since everything is run with 
the Subprocess module in Python (which does not inherit the environment by 
default). I run into less issues this way.

Andrew


Re: [gentoo-user] nodejs emerge fails

2018-06-26 Thread Andrew Udvare



> On 2018-06-26, at 15:44, Christoph Böhmwalder  
> wrote:
> 
> On Tue, Jun 26, 2018 at 03:15:09PM -0400, Andrew Udvare wrote:
>> It should not be accessing this location in any case. What is the 
>> environment like? What does env show? emerge --config output?
>> 
>> It would almost seem like you have $HOME set to /home/christoph while 
>> Portage is running (as root).
> 
> The only thing that stands out about `env` is that XDG_CONFIG_HOME is set to
> /home/christoph/.config (running as root). I'm not sure if it's supposed
> to be this way, but I didn't find anything in my dotfiles that would
> suggest that I'm overwriting it.

Use `su -` to become root so the environment you are coming from gets ignored. 
I actually have su aliased to `su -` because I rarely need the opposite 
functionality. Otherwise just `unset XDG_CONFIG_HOME` and other things that 
reference your user when you become root.

You should only have these, if any at all:

# env | fgrep XDG
XDG_DATA_DIRS=/usr/local/share:/usr/share
XDG_CONFIG_DIRS=/etc/xdg

What it would seems to be is that npm uses configstore 
https://www.npmjs.com/package/configstore and since it sees XDG_CONFIG_HOME is 
set and is a real path it tries to write a file to there. It falls back to 
tmpdir otherwise which would be writable by Portage.

https://github.com/yeoman/configstore/blob/master/index.js#L11
https://github.com/yeoman/configstore/blob/master/index.js#L32

> 
> $HOME points to /root.
> 
> I'm not sure what you mean by "emerge --config output"? Running
> `emerge --config` just gives:

Sorry I meant `emerge --info`.

Andrew


Re: [gentoo-user] nodejs emerge fails

2018-06-26 Thread Andrew Udvare


> On 2018-06-26, at 10:47, Christoph Böhmwalder  
> wrote:
> 
> Hi,
> 
> Lately I've been getting the following error while trying to emerge
> nodejs:
> 
 
> * Failed to set XATTR_PAX markings -me 
> /var/tmp/portage/net-libs/nodejs-8.11.1/image/usr/bin/node.

This might be cause for concern. This does not look like it should fail.

> * ACCESS DENIED:  open_wr:  
> /home/christoph/.config/configstore/update-notifier-npm.json.331767419
> * ACCESS DENIED:  unlink:   
> /home/christoph/.config/configstore/update-notifier-npm.JSON.331767419

It should not be accessing this location in any case. What is the environment 
like? What does env show? emerge --config output?

It would almost seem like you have $HOME set to /home/christoph while Portage 
is running (as root).

Andrew




Re: [gentoo-user] default CONFIG_PROTECT behavior

2018-06-17 Thread Andrew Udvare
On 06/17/2018 12:17 PM, Ian Zimmerman wrote:
> What happens to files within the scope of CONFIG_PROTECT if I don't
> execute dispatch-conf or any similar thingy?  I have found the confusion
> the latter tool generates completely unsurmountable.

I think the side-by-side merger is very easy for small changes. Most of
the time I press z because I don't need the new changes.

> What I'd prefer is the debian behavior: the package supplied config file
> is simply saved under a mangled name (*.dpkg-dist alongside the real
> file on debian) and I'm left to merge the changes at my convenience,
> with my preferred tools.

You are free to do that. The files are named alongside the real files,
and they start with '._cfg'. Before I knew about dispatch-conf,
sometimes I would do:

for i in ._cfg*; do mv "$i" "${i/._cfg}"; done

> 
> So that's my question in a nutshell: after emerge but before
> dispatch-conf, where are the new versions of config files?
> 

find /etc/ -iname '._cfg*'

Or what dispatch-conf does:

find /etc -iname '._cfg_*' ! -name '.*~' ! -iname '.*.bak' -print

-- 
Andrew



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] iproute2 reference

2018-06-10 Thread Andrew Udvare
On 06/10/2018 12:58 PM, Grant Taylor wrote:
> It helps if I actually add the foot note.
> 
> On 06/10/2018 10:38 AM, Grant Taylor wrote:
>> I will say that you'll likely need other systems [1] to test things
>> like tunnels to / between.
> 
> [1] You can easily have one machine be multiple systems via Network
> Namespaces.
> 
> I routinely use Network Namespaces to mess with networking in my
> virtualization lab.  Think of Network Namespaces as micro TCP/IP stacks
> in the Linux kernel.  Each can be configured completely independent of
> the others.

Is it possible to have a VPN clent set up in one of these namespaces and
route certain traffic through it from the main stack?



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] iproute2 reference

2018-06-10 Thread Andrew Udvare


> On 2018-06-10, at 09:15, Peter Humphrey  wrote:
> 
> Hello list,
> 
> I'm trying to learn how to use the "ip" command to manage routing on one of 
> my 
> boxes, which has two Ethernet interfaces.

If you're using systemd, you can set it up with systemd.network in 
/etc/systemd/network. I do this on my router. However I was unable to get my 
IPv6 6rd tunnel working this way. For IPv4 DHCP or static it works fine.

https://www.freedesktop.org/software/systemd/man/systemd.network.html
https://wiki.archlinux.org/index.php/Systemd-networkd#Configuration_examples

> 
> Can anyone recommend suitable reading material? I don't mind paying for a 
> book, provided that it's reasonably up to date and won't bury me in a morass 
> of bit patterns, OSI transport layers and so on. Just the stuff that a 
> network 
> admin would need.

man ip (relatively minimal, but not as minimal as ip --help)

https://www.cyberciti.biz/faq/linux-ip-command-examples-usage-syntax/ is in my 
bookmarks

https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf

bash-completion comes with ip command support.

My script to set up my IPv6 6rd tunnel on my router:

ip tunnel del sit-6rd
ip tunnel add sit-6rd mode sit local "$IPV4_ADDR" ttl 64 dev enp1s0f0
ip tunnel 6rd dev sit-6rd 6rd-prefix 2602::/24

ip link set sit-6rd mtu 1480
ip link set sit-6rd up

ip -6 addr add "$IPV6_ADDR" dev sit-6rd
ip -6 route add 2000::/3 via "::$IPV4_BR_ADDR"
ip -6 route add default via "::$IPV4_BR_ADDR"

Andrew


Re: [gentoo-user] NFS and user IDs

2018-06-09 Thread Andrew Udvare


> On 2018-06-09, at 00:42, Ian Zimmerman  wrote:
> 
> Is there _any_ way around the need to keep the user IDs matched on NFS
> clients and servers?

I checked and there is no way. It is recommended UID/GID be synced regularly on 
all client machines.

NFSv4 requires user names and group names be synced. IDs do not have to match, 
which makes syncing easier.

You should be controlling IDs/names from a central location and syncing as part 
of a deployment system, and not allowing client machine users to make 
modifications to those files.

Andrew


Re: [gentoo-user] Menu font size in LibreOffice

2018-06-04 Thread Andrew Udvare



> On Jun 4, 2018, at 12:53, Peter Humphrey  wrote:
> 
> I think Libre Office is a GTK application? In that case, you want Appearance 
> > 
> Aplication Style > Gnome Application Style, then Select a GTK3 Theme and Font.

It can be built with or without gtk/gtk2/kde USE flags. I use KDE but I don’t 
build with such flags because I think it makes the UI look silly. I think this 
makes UNO use the Gtk+ styles and I’ve never noticed the menu font size as 
different from other apps.


Andrew


Re: [gentoo-user] Where the Plasma shutdown menu option gone?

2018-05-30 Thread Andrew Udvare



> On 2018-05-30, at 06:54, Mick  wrote:
> 
> I wouldn't think the user ever interfered with these settings from what would 
> have been the defaults.  What would have changed to remove the permissions 
> this user have had?  Where can I check this?

These sort of surprises is why I have $HOME under Git control (with a very long 
.gitignore).

Andrew


Re: [gentoo-user] semi OT: Displayport

2018-05-29 Thread Andrew Udvare



> On 2018-05-29, at 22:03, Bill Kenworthy  wrote:
> 
> Can anyone suggest a way to detect when the displayport adapter is
> plugged in?
> 

The event is provided by the driver(s) and if there is no event at all then you 
have to use a script that loops forever querying to see if something has 
changed. You could try grep'ing `xquery -q` every few seconds.

This post says there might be something in /proc to track:

https://unix.stackexchange.com/questions/13746/how-can-i-detect-when-a-monitor-is-plugged-in-or-unplugged

Andrew


Re: [gentoo-user] Where the Plasma shutdown menu option gone?

2018-05-29 Thread Andrew Udvare



> On 2018-05-29, at 18:40, Mick  wrote:
> 
> It seems the shutdown, suspend, et al options are gone from the plasma 
> desktop 
> after an update at the end of the week.  The user still has the option to 
> logout and then use the sddm menu to shutdown, but other options have 
> disappeared from the the plasma menu.
> 
> 

Also not having this issue. I restarted SDDM yesterday and my system is fully 
up-to-date.

Andrew


Re: [gentoo-user] crossdev arm-unknown-linux-gnu failed

2018-05-26 Thread Andrew Udvare


> On 2018-05-26, at 23:32, Andrew Udvare <audv...@gmail.com> wrote:
> 
> You probably mean to use another triple name. The last part is the C library, 
> so you probably mean:
> 
> arm-unknown-Linux-glibc

That is:

arm-unknown-linux-glic

It is case-sensitive.

---
Andrew



Re: [gentoo-user] crossdev arm-unknown-linux-gnu failed

2018-05-26 Thread Andrew Udvare


> On 2018-05-26, at 23:06, tu...@posteo.de wrote:
> 
> Hi,
> 
> too feed a STM32F103C8T6 MCU (Core-M3) with some code to execute,
> I want a compiler. For that I did a 
> 
>crossdev arm-unknown-linux-gnu
> 
> . That one failed to build (gcc, binytils seem to be ok).
> 
> Unfortunately I did not really understand, what the great concerto
> of logfiles (attached) are want to tell me. On the internet I found
> an older thread of a person who seems (?) to have similiar problems
> with the same target compiler, but no solution there was.
> 
> I am running Gentoo linux on a AMD Phenom(tm) II X6 1090T Processor.
> This is a 64 bit system. The system is updated regularly.
> 
> I would be very happy, if someone, who better understand the topic,
> could help me to get this thing running -- thank you very much in
> advance for any help!


I see in your log:

Configuration arm-unknown-linux-gnu not supported

You probably mean to use another triple name. The last part is the C library, 
so you probably mean:

arm-unknown-Linux-glibc

---
Andrew



Re: [gentoo-user] Annoying mapping of some keys

2018-05-21 Thread Andrew Udvare

> On 2018-05-21, at 19:38, Damo Brisbane  wrote:
> 
> Under X, xmodmap perhaps?

I use this to map caps lock to escape in my ~/.xprofile (which gets sourced 
somewhere in my ~/.bash_profile if DISPLAY is set):

xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'

(Also it unsets caps lock if it was on.)

This way I don’t have to rely on my DE’s way of doing this. Any X client will 
have this set, even remote ones.

Andrew


Re: [gentoo-user] OT: Extracting year from data, but honour empty lines

2018-05-11 Thread Andrew Udvare


> On May 11, 2018, at 7:16 PM, Daniel Frey  wrote:
> 
> Hi all,
> 
> I am trying to do something relatively simple and I've had something
> working in the past, but my brain just doesn't want to work today.
> 
> I have a text file with the following (this is just a subset of about
> 2500 dates, and I don't want to edit these all by hand if I can avoid it):
> 
> --- START ---
> December 2, 1994
> March 27, 1992
> June 4, 1994
> 1993
> January 11, 1992
> January 3, 1995
> 
> 
> March 12, 1993
> July 12, 1991
> May 17, 1991
> August 7, 1992
> December 23, 1994
> March 27, 1992
> March 1995
> --- END —

While loop in Bash? This is slower but it will do it:

while IFS=$’\n’ read -r line; do
  if [ -z “$line” ]; then echo; fi
  grep -o '\([0-9]\{4\}\)’ <<< “$line”
done < input_file

I would consider using a human date string parsing library in another language, 
such as Python’s datetime where you can specify the formats, loop to check for 
any and if nothing matches output a blank line.

Andrew


<    1   2