[gentoo-user] Purpose of bashcomp_alias in bash-completion-r1.eclass?

2014-11-30 Thread Florian Gamböck

Good day!

Before reporting a bug I wanted to hear other opinions on that: In 
bash-completion-r1.eclass, what is the true purpose of bashcomp_alias? 
For now I only see error messages when trying to eselect bashcomp 
enable two aliases of the same script because of the same linkname. 
What benefit could one gain in aliasing their completion script to 
differnet names?


In fact I find this confusing and highly contradicting, because you 
obviously can enable only one alias at the same time, but actually with 
enabling one you automatically enable all the others, since they are 
symlinks. Then why even bothering with those aliases? (Actual example: 
app-text/calibre-1.48-r1, which installs 14 or so aliases to the exact 
same completion script.)


--
Flo



Re: [gentoo-user] Re: Purpose of bashcomp_alias in bash-completion-r1.eclass?

2014-11-30 Thread Florian Gamböck

Am 30.11.2014 um 16:27 schrieb James:

[gentoo-dev] [news item review] bash-completion-2.1-r90, version 2
circa 11/10/14.


Thank you, that was really worth reading.

I'm not completely convinced yet, but it may be a starting point for 
further investigations.


--
Flo



Re: [gentoo-user] eix-update, run from root, failed to write database file

2015-01-05 Thread Florian Gamböck

Am 05.01.2015 um 11:54 schrieb Gevisz:

After today's world update, the eix-update command, run under root,
failed to open the database file '/var/cache/eix/portage.eix' for writing.

Nevertheless, the same command, run with ordinary user privileges, completed 
without error.


Obviously, while updating, the priviliges are dropped to another user 
(root shouldn't be overused anyway). In this case, they are most likely 
dropped to user portage. Try changing the owner and group of the cache 
to portage.


$ ls -al /var/cache/eix/portage.eix
-rw-rw-r-- 1 portage portage 12302936 Dec 19 16:45 
/var/cache/eix/portage.eix


Greetings
--Flo



Re: [gentoo-user] Radeon driver - blank console

2015-01-05 Thread Florian Gamböck

Am 05.01.2015 um 14:42 schrieb Helmut Jarausch:

Which (framebuffer?) kernel parameters have to set?


Try compiling CONFIG_DRM_RADEON as module and do not enable any frame 
buffers, especially not CONFIG_FB_RADEON, as absurd as it sounds.


This should take care of your invisible virtual terminal.

Greetings
--Flo



Re: [gentoo-user] cron - once a month during week days

2015-02-05 Thread Florian Gamböck

Hi Joseph!

Am 05.02.2015 um 20:19 schrieb Joseph:

I have a cron tab entry:
8 12 1-7 * 1 rsync ...


From `man 5 crontab`:

Note: The day of a command's execution can be specified by two fields — 
day of month, and day of week.  If both fields are restricted (ie, 
aren't  *),  the  command will be run when _either_ field matches the 
current time.  For example, ``30 4 1,15 * 5'' would cause a command to 
be run at 4:30 am on the 1st and 15th of each month, plus every Friday.


That means, in your case, that your rsync will run every day from the 
first to the seventh of each month, plus every Monday.


Greetings
--Flo



Re: [gentoo-user] masking asterisk 11

2015-04-20 Thread Florian Gamböck

Hi Joseph,

I don't see any lower version of asterisk-11 in the tree, so if you 
don't have an overlay that specifically provides the version you are 
looking for, portage has no other choice than to select the masked one. 
And it infact DOES take your mask into account, note the # in the 
emerge output, it just can't figure out an alternative for you.


Greetings
--Flo



Re: [gentoo-user] stable java virtuals require unstable java packages

2015-04-20 Thread Florian Gamböck

Am 21.04.2015 um 07:42 schrieb Alan McKinnon:
It's either a bug in virtual/jdk-1.7 ebuild or more likely, stable 
request for icedtead-bin-7 is lagging behind.


You are right, the stable request is still going on: 
https://bugs.gentoo.org/show_bug.cgi?id=546902


Obviously the virtual got stableized a bit too fast.



Re: [gentoo-user] Re: repos.conf

2015-06-25 Thread Florian Gamböck

Am 25.06.2015 um 17:55 schrieb James:

Ah. You are my new hero, dude!


I'm glad I could help. :-)


All that googling and news items; I guess I missed this doc...


Actually there was a quite longish news item about that. New portage 
plug-in sync system from 2015-02-02. There was also a link to the said 
Wiki page.


Perhaps you also want to re-read this one, in case you missed it.

Best wishes,
--Flo



Re: [gentoo-user] repos.conf

2015-06-25 Thread Florian Gamböck

Hi James,

Am 24.06.2015 um 05:12 schrieb James:

So is there a tool/interface where I type something like
'layman -a java' and it writes out the file to
/etc/portage/repos.conf/new.conf


You should take a look at 
https://wiki.gentoo.org/wiki/Project:Portage/Sync#layman-updater_Method.


TLDR: Install (as in accept keyword) a newer version of Layman (at 
least 2.2.16), add the sync-plugin-portage USE-Flag, and maybe double 
check your /etc/layman/layman.cfg so it uses repos.conf.


What layman then does, is creating a dedicated 
/etc/portage/repos.conf/layman.conf, in which it automatically adds and 
removes overlays you add/remove via the usual layman commands. So in 
fact quite similar as the behavior with layman's make.conf, just with 
the new repos.conf.


HTH and best wishes,
--Flo



Re: [gentoo-user] LINGUAS issue

2015-11-12 Thread Florian Gamböck
Hi Francisco,

On 2015-11-12 15:20, Francisco Ares wrote:
> Is there a way for specifying particular "LINGUAS" for individual
> packages?

Sure there is. In fact, "LINGUAS=pt_BR" is just syntactical sugar for
"USE=linguas_pt_BR". So for your specific case with tesseract, you would add a
line to packages.use, saying:

app-text/tesseract linguas_pt

Hope that helps!

--Flo



Re: [gentoo-user] Re: Anyone else having a problem with bash?

2015-07-08 Thread Florian Gamböck

Am 08.07.2015 um 09:00 schrieb Alan McKinnon:

On 08/07/2015 07:00, Anton Shumskyi wrote:

Same for me, but it appears only after I'm canceling some job on
terminal with CTRL+C, maybe in 10% of total cases. I thought that was
some side-effect of switching env back, but because job is terminated in
a bad way haven't considered that as a bug.


Same here.

I always get this effect shortly after a Ctrl-key combination, not sure
which one but it's one of the grouping on the left of the keyboard
surrounding S


I can replicate it 100% when I ssh to another machine and immediately 
interrupt it with Ctrl-C.


I hadn't considered this a bug, but after reading this thread I can 
confirm that it also happens randomly with other commands. Not sure if 
there is always interruption involved, though ...


Perhaps some problem with forking / spawning a subshell and returning to 
the status quo after a non-zero exit code?


Regards,
--Flo



Re: [gentoo-user] Re: Anyone else having a problem with bash?

2015-07-08 Thread Florian Gamböck

Hi Stephan,

Am 08.07.2015 um 11:28 schrieb Stephan Müller:
As you can replicate it reliable, did you test it in Bourne shell? 
Maybe its not related to bash at all?


$ echo $SHELL
/bin/bash

$ bash --version | head -n1
GNU bash, Version 4.3.33(1)-release (x86_64-pc-linux-gnu)

If I use /bin/sh (or to be accurate: /bin/bash --posix, since it is a 
symlink) then I do NOT run into the issue.


--Flo



Re: [gentoo-user] Re: Anyone else having a problem with bash?

2015-07-08 Thread Florian Gamböck

Hi Jörg,

Am 08.07.2015 um 12:13 schrieb Joerg Schilling:

Sorry for asking, but does Gentoo include the Bourne Shell?


$ readlink /bin/sh
bash

I guess this means no ...

If you like to do, the latest portable Bourne Shell is in: 
http://sourceforge.net/projects/schilytools/files/schily-2015-07-07.tar.bz2


I downloaded and compiled your archive.

$ echo $0
./sh/OBJ/x86_64-linux-cc/sh
$ $0 --version
sh (Schily Bourne Shell) version 2015/06/27 a+ (x86_64-unknown-linux-gnu)

Copyright (C) 1984-1989 ATT
Copyright (C) 1989-2009 Sun Microsystems
Copyright (C) 1982-2015 Joerg Schilling


Now I cannot reproduce the no-echo issue, at least with my ssh method. 
But as I said, I also couldn't do it with `bash --posix`. So this seems 
somehow related. The non-POSIX Bash seems to trigger something and 
doesn't reset it under certain circumstances.


--Flo



Re: [gentoo-user] Re: Anyone else having a problem with bash?

2015-07-08 Thread Florian Gamböck

Am 08.07.2015 um 15:10 schrieb Todd Goodman:

I haven't looked for that specifically in the ssh source code though.

And it sounds like it's happening to people even without interrupting
programs so it's unlikely the cause of all the problems.


I didn't say that SSH is the cause to that, I just said I can reproduce 
the issue with SSH. And since this didn't happen back in bash-4.2_p53, I 
doubt that SSH has to do something with it directly, but rather some 
change that happened between bash-4.2_p53 and bash-4.3_p33-r2.


--Flo



Re: [gentoo-user] Re: Anyone else having a problem with bash?

2015-07-08 Thread Florian Gamböck

Am 08.07.2015 um 02:48 schrieb walt:
Next time this happens I'll include the output of stty -a. 


Since I just hit this bug I will do it for you if you don't mind. ;-)

I somehow managed to reproduce this issue by typing `ssh 
myothermachine`, hitting Enter, and immediately hitting Ctrl-C. 
Phenomenon is the same as described here.


`stty -a` before the incident:

speed 38400 baud; rows 26; columns 190; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 
= M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; 
werase = ^W; lnext = ^V; flush = ^O;

min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon 
-ixoff -iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 
vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop 
-echoprt echoctl echoke


`stty -a` immediately after the incident, typed blindly into the terminal:

speed 38400 baud; rows 26; columns 190; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 
= M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; 
werase = ^W; lnext = undef; flush = ^O;

min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon 
-ixoff -iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 
vt0 ff0
isig -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop 
-echoprt echoctl echoke


After a small `diff`, the following changes have been made:
lnext from ^V to undef; icrnl, icanon, and echo from on to off (they 
all got prefixed with a -).


Any ideas what can cause this behavior?

Regards,
--Flo



Re: [gentoo-user] keeping grub 1

2015-08-25 Thread Florian Gamböck

Hi James!

Am 25.08.2015 um 20:44 schrieb James:

If I just unmerge grub and emerge grub-static, is that the
best way to prevent grub-2 from ever being installed?


If you want to keep your good old sys-boot/grub:0, just put exactly that 
into your world file, including with the slot-version (the :0 at the 
end). At least in the main portage tree, grub-2 uses slot 2, whereas 
grub-1 stays in slot 0.


Alternatively you could put something like =sys-boot/grub-2 or even 
sys-boot/grub:2 into package.mask.


HTH,
--Flo



[gentoo-user] Dynamically change PORTAGE_TMPDIR via bashrc?

2015-09-26 Thread Florian Gamböck
(This is my third E-Mail and I hope this time it gets through. Sorry to the
sysadmins if I caused you trouble with my rejected mails, I'm still trying to
get used to Mutt.)

Greetings,

let me quickly explain my setup: I use BTRFS snapshots and chroot to create
binaries of upgradeable packages with emerge. When I have some spare time, I
just need to install these binaries on my "real" system. While compiling, I
set PORTAGE_TMPDIR to a tmpfs mounted directory. When installing on my real
system afterwards, I set PORTAGE_TMPDIR to a "normal" directory on my hard
drive, since I won't gain anything from extracting a package to RAM, just to
immediately copy the contents back to the hard drive.

Now here is the tricky part: Since I do the compiling on temporary snapshots,
I tend to kill emerge and delete the snapshot, when I'm in a hurry and have to
shutdown my workstation. (PKGDIR of course is bind mounted to outside the
snapshot, so I won't lose the already finished packages.) When I later
"resume" my upgrade, there are several binary packages and several others that
still need to be compiled. With PORTAGE_TMPDIR still set to tmpfs, my RAM gets
cluttered with already compiled files from the binaries that may as well stay
on the hard disk.

Now, instead of simply changing my workflow (like for example not deleting the
snapshot prematurely in the first place ...) I want to have some fun and
wondered if there might be a possibility to change PORTAGE_TMPDIR dynamically,
based on wether I want to install a tbz2 or compile sources.

So far I've tried in package.env: "*/* merge_type.${MERGE_TYPE}.conf". But
this just gives me errors like "merge_type..conf not found", so obviously I
can't use such variables here. I guess, those tricks can just be played in
/etc/portage/bashrc. But when I try to change PORTAGE_TMPDIR in bashrc
(EBUILD_PHASE doesn't matter, problem occurs regardless), I always get errors
like "PORTAGE_TMPDIR is a read-only variable".

Now, before I try some crazy stunts like bind-mounting $D and $ED on "preinst"
and cleaning up in "postinst", I wanted to know if some of you guys did
similar experiments and/or have some advice that you could share with me.

Regards,
--Flo



Re: [gentoo-user] Dynamically change PORTAGE_TMPDIR via bashrc?

2015-09-27 Thread Florian Gamböck
Hi James,

thank you for your reply.

On Sat, Sep 26, 2015 at 02:08:19PM +, James wrote:
> I have been following 'bcache' as an interesting addition to complex
> compiling scenarios. I'm not certain how it will help your 'wild ideas',
> but it is worth a look, imho

Yes, I have also heard of bcachefs, but unless I am terribly mistaken, it
doesn't offer me anything to solve my actual problem, which is "setting
portage environment variables according to MERGE_TYPE".

I am aware that my setup might not be ideal and that approaches like bcachefs
might help me creating a better compile-install-workflow. But for now -- just
for the fun of it -- let's assume that the underlying basis is fixed and all
that is left is finding a way to dynamically change variables like
PORTAGE_TMPDIR.

That could also be used for scenarios like "if the package needs to be
compiled, then use every single machine in the local network as a distcc
server; if there is already a tbz2 file for the given package, then just
install it without searching for potential servers".

Portage's bashrc can be a powerful script for several use-cases, but at the
moment I am quite sad that I can't change environment variables in there.

So, any other ideas?

Regards,
--Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-21 Thread Florian Gamböck

On 2017-04-19 12:17, Mick wrote:

On Wednesday 19 Apr 2017 12:46:09 Florian Gamböck wrote:

On 2017-04-18 20:41, Mick wrote:
Assuming you have access to your home's router, you can configure on 
it a static IP address for the MAC address of the Raspi.


That's what I've been doing in the past, but my Cisco router had 
problems with that. It tried to give away addresses I have 
specifically reserved and it ended up cutting the connections and 
refusing to let new machines connect as long as there was a conflict.


Hmm ... I never had this experience with Cisco IOS.  It may be worth 
updating the router and WAP firmware in case this was due to a bug. 
The router should never allocate IP addresses from its reserved IP 
address table, although it will not be able to stop PCs using these 
addresses themselves if they were manually configured so.


I got this pre-configured router from my internet provider and I have 
*very* limited access to the configuration. I have no telnet and no ssh, 
as far as I can tell. For example, when I want to change my wifi 
configuration, I have to do that online on my provider's website, which 
obviously triggers some kind of over-the-air update to my router. After 
an automatic restart, the new (readonly) configuration shows up on my 
router.


However, I *do* have access to the LAN configuration, including DHCP 
range and the like. And yes, you are right, if I reserve addresses, the 
router *should* not give these addresses away to other machines. I 
shouted at the router and telling her that, but she wouldn't listen.


And if it is really a problem with the clients, then multiple Linux 
machines, multiple Android devices, Sony's PlayStation 4, and a lonely 
Windows laptop all share the same bug, namely wanting to have the same 
IP address via DHCP and failing to obtain another one.


If I don't reserve addresses from DHCP range and use statically 
configured addresses outside the range with some computers, then there 
is no problem with DHCP and the other machines that connect.


So I take this fact as my baseline and work from there.

Besides, I like having configuration files on my computers, which I 
can exchange and adjust as I like, without the need to click through 
heavily overloaded router configuration WebApps.


If it is a Cisco running IOS there should be SSH access to run CLI 
commands for it.  If however it is a Cisco-branded cheap appliance, 
then it would probably not have any relationship with IOS, but it may 
be able to run OpenWRT or equivalent on its SoC.


No SSH, no possibility to replace the firmware, no other way to connect 
to the internet. Sorry.


Have a look at the documentation provided by netifrc, it is well 
commented with detailed examples:


less /usr/share/doc/netifrc-0.5.1/net.example.bz2


I did multiple times, but obviously this specific syntax didn't reach my 
mind. Thanks again!


--
Kind regards

Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-21 Thread Florian Gamböck

Hi Neil!

On 2017-04-19 12:00, Neil Bothwick wrote:

On Wed, 19 Apr 2017 12:46:09 +0200, Florian Gamböck wrote:

On 2017-04-18 20:41, Mick wrote:
Assuming you have access to your home's router, you can configure on 
it a static IP address for the MAC address of the Raspi.  The home 
router will not allocate any such reserved IP address to any other 
device, but reserve it for the Raspi's MAC address.


That's what I've been doing in the past, but my Cisco router had 
problems with that. It tried to give away addresses I have 
specifically reserved and it ended up cutting the connections and 
refusing to let new machines connect as long as there was a conflict.


You should allocate static addresses from outside of the DHCP reserved 
range. For example, set the DHCP range to 192.168.1.100-200 then 
allocate static addresses from below there.


That's what I've been doing until now, which is why I originally started 
this thread.


What Mick meant was configuring the router, so it reserves IP addresses 
for specified MAC addresses. These "almost" static addresses have to be 
taken from within the DHCP range, because it is actually the DHCP server 
that provides them. I used routers in the past which worked perfectly 
with this setup, but somehow the machines I have to use nowadays don't 
like anything wich is not plain old DHCP.


Besides, I like having configuration files on my computers, which I 
can exchange and adjust as I like, without the need to click through 
heavily overloaded router configuration WebApps.


If you have an always on computer on your network, I would recommend 
trying dnsmasq. It has a DHCP server and means you can do all your 
network configuration in the one place, with simple text config files.


This sounds really promising, thank you for this tip! And also thank you 
Peter and Paul for your feedback!


I will put it on my ToDo list and consider it the next time I'm about to 
kick my router! ;-)


--
Kind regards

Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-21 Thread Florian Gamböck

On 2017-04-19 12:46, Florian Gamböck wrote:

On 2017-04-18 20:41, Mick wrote:

(...)

Something like this should work:

# Define the gateway you want to configure 
gateways_eth0="192.168.0.254,AA:BB:CC:DD:EE:FF,192.168.0.10"


# Define the default route for gateway 192.168.0.254 
routes_192168000254_AABBCCDDEEFF="default via 192.168.0.254"


# Define the IP and netmask when using gateway 192.168.0.254 
config_192168000254_AABBCCDDEEFF="192.168.0.10/24"


# Define the DNS servers to use with gateway 
dns_servers_192168000254_AABBCCDDEEFF="192.168.0.254"


# Then you need to add a line for all other routers the Raspi may 
connect to: fallback_eth0="dhcp"


(...)


(...)

I'll try it the next days and report back afterwards!


That was really a great advice, a big thank you again! It works as 
expected.


Just a few notes for future reference:

config_eth0="arping" was necessary for this module to load and for the 
gateways_* variables to be parsed.


I needed to emerge net-misc/iputils with "arping" USE flag. The 
net-analyzer/arping package is *not* sufficient, because it doesn't work 
with the spoofing address in the gateway variable.


Another side-note: If I am connected to another network, so DHCP is 
used, and I change networks, as in "lose connection from the network and 
re-connecting with my home network", then the above configs are *not* 
used, DHCP is used. But this might be a bug in netifrc or a missing hook 
in my configs. I'll look more into it and start another thread or even a 
bug report if I'm not able to solve it.


--
Kind regards

Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-21 Thread Florian Gamböck

On 2017-04-21 13:39, Neil Bothwick wrote:
I was referring to the situation where you use the DHCP server to give 
out pseudo-static addresses. I have always used addresses outside of, 
but in the same subnet as, the reserved range. The reserved range just 
tells the DHCP server which addresses to use in the absence of any 
other specifications.


I guess my router doesn't work this way. If I want to reserve an address 
outside the DHCP range, then it says "Cannot reserve address outside of 
DHCP range".


--
Kind regards

Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-21 Thread Florian Gamböck

Hi Peter!

On 2017-04-21 13:53, Peter Humphrey wrote:
Have you considered spending a little money, ditching the router and 
substituting one that you can control? Reasonably capable routers 
aren't expensive.


Yes, I have considered this. But this is a router by my internet 
provider, especially configured to work at my place. It uses optical 
fibers instead of RJ11. I don't even have dial-in or log-in data, since 
it was already pre-configured.


I guess I cannot simply "ditch" the router. But yes, if I am out of 
options, I could always buy another router, connect it to my main router 
and just use this new one for connecting my devices.


But I also want to think about situations, where I need static IP 
addresses and I cannot access the router configuration. For example, if 
I need to configure a certain embedded device, which is only accessible 
via an IP in another subnet, then I could dedicate a NIC for the sole 
purpose to receive a static IP in this particular subnet, but only if I 
am connected in my home network.


I prefer general solutions over quickfixes which just work for one 
particular case.


But nevertheless, thanks for your suggestion!

--
Kind regards

Flo



[gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-18 Thread Florian Gamböck

Hello!

In my wireless home network I use a static IP for my machine. The 
regarding line in /etc/conf.d/net reads as follows (let's assume that my 
SSID is in fact "MySSID"):


   config_MySSID="192.168.0.10/24"

Is there a possibility to configure this IP not only for this specific 
SSID, but also for a specific MAC address of my wireless card? I only 
want my "main" wireless card to have this static IP, if another card 
goes up and connects with the same SSID, it should be configured via 
DHCP.


I tried the following:

   config_MySSID="dhcp"
   config_001122334455="192.168.0.10/24"

I also changed the order of those two lines, but the SSID based config 
seems to "win" regardless. Also, if this config would actually work, 
then I would have this static IP in every network I change (this is not 
desireable). So I need a logical AND with those two variables, like so:


   config_MySSID="dhcp"
   config_001122334455_MySSID="192.168.0.10/24"

This would mean the following: Connect to MySSID via DHCP, except when 
using the interface with the MAC address 001122334455, which should get 
a static IP.


Not to mention that I indeed tried this last one, but it didn't work 
either.


So, what are your thoughts? Is this possible via netifrc?

--
Kind regards

Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-18 Thread Florian Gamböck

Hi Mick,

thank you for your response!

On 2017-04-18 16:41, Mick wrote:
I had to read this message twice and I am not yet sure I understand 
correctly what it is you are trying to achieve.


Do you want whichever NIC of your PC connects first to a specific SSID 
to always obtain IP 192.168.0.10/24 and any NIC which connects second 
to use DHCP?


Not necessarily the first NIC, but the NIC with a specific MAC address, 
say 001122334455.


But now that you mention it, as long as one NIC gets the static IP (but 
only for the specified SSID) and all the others will be handled by DHCP, 
I don't care which one of the NICs is statically addressed.


Sorry for not being able to describe it well.

What I am trying to achieve: I have a Raspberry Pi as a server, without 
monitor, without keyboard. Just a Raspi and a Wifi stick. I want the 
Raspi to use DHCP when I take it with me and power it on at my 
workplace. Thanks to Avahi I don't need to know the IP address it gets 
at my workplace.


When I am at home, there are reasons why I can't rely on Avahi (Android 
Phones for example that do not have the possibility to resolve 
raspi.local). So I want it to have a static IP at home. Now, if for 
whatever reason I lose the connection to Raspi -- for example once my 
router at home freaked out and wouldn't let Raspi connect with a static 
IP -- I want to have the possibility to plug another Wifi stick into 
Raspi which then gets connected via DHCP, so I can at least connect to 
it.


As I see it, I can't use config_001122334455, because I would not be 
able to connect at my workplace anymore (different network properties). 
I now use config_MySSID to get a static address at home, but what about 
a second Wifi stick being connected? It would use the same config and 
end up getting the same IP address that didn't work with the first 
stick.


In general, it would be intersting to logically combine the 
configuration via SSID with the configuration via MAC. I can also think 
of a scenario where I have two wifi networks and two wifi sticks, each 
one getting a static IP on their connected network. But if I take the 
Raspi into another network, I would want NIC_1 to be DHCPed and NIC_2 to 
be nulled.


I hope I could help you to better understand what I am trying to achieve 
and what my current problem is. If possible I want to solve it via pure 
netifrc, but I would also be happy if someone said that it isn't 
possible at all via netifrc, so I can stop researching in this direction 
and think of something different.


--
Kind regards

Flo



Re: [gentoo-user] netifrc, configure by SSID and MAC simultaneously?

2017-04-19 Thread Florian Gamböck

On 2017-04-18 20:41, Mick wrote:
I can think of at least two ways you can attempt to achieve what you 
want.


1. Set the Raspi to use DHCP only

Assuming you have access to your home's router, you can configure on 
it a static IP address for the MAC address of the Raspi.  The home 
router will not allocate any such reserved IP address to any other 
device, but reserve it for the Raspi's MAC address.


At work the Raspi will obtain a random IP address from the work's 
router as expected.  This is by far the simplest option.


The line you need in /etc/conf.d/net of the Raspi will look like this:

config_eth0="dhcp"

(Change eth0 above for the name of Raspi's wireless interface).


That's what I've been doing in the past, but my Cisco router had 
problems with that. It tried to give away addresses I have specifically 
reserved and it ended up cutting the connections and refusing to let new 
machines connect as long as there was a conflict.


Besides, I like having configuration files on my computers, which I can 
exchange and adjust as I like, without the need to click through heavily 
overloaded router configuration WebApps.



2. Configure the Raspi to selectively set itself a static IP address

In this option you will set up in the Raspi's /etc/conf.d/net a static 
IP address 192.168.0.10/24, when the gateway matches the wireless MAC 
address of the home router.  For any other gateway the Raspi will fall 
back to using dhcp.


Something like this should work:

# Define the gateway you want to configure 
gateways_eth0="192.168.0.254,AA:BB:CC:DD:EE:FF,192.168.0.10"


# Define the default route for gateway 192.168.0.254 
routes_192168000254_AABBCCDDEEFF="default via 192.168.0.254"


# Define the IP and netmask when using gateway 192.168.0.254 
config_192168000254_AABBCCDDEEFF="192.168.0.10/24"


# Define the DNS servers to use with gateway 
dns_servers_192168000254_AABBCCDDEEFF="192.168.0.254"


# Then you need to add a line for all other routers the Raspi may 
connect to: fallback_eth0="dhcp"



NOTES
=
192168000254 is the syntax used to represent an IP address for the 
home router of 192.168.0.254


AABBCCDDEEFF is the syntax used to represent a MAC address for the 
home router of AA:BB:CC:DD:EE:FF


If your Raspi wireless NIC is not eth0, please adjust the fallback 
directive above accordingly.


You may need to duplicate the above for any other NICs your Raspi may 
be end up with, for which you would want to configure a static IP 
address.


Huh, neat. This looks indeed like it could be exactly what I was looking 
for.


Thank you very much, I didn't know about this syntax!

I'll try it the next days and report back afterwards!

--
Kind regards

Flo



Re: [gentoo-user] firefox-bin -ProfileManager %U

2018-01-18 Thread Florian Gamböck

Hi!

On 2018-01-18 09:15, the...@sys-concept.com wrote:
On my new system I'm suing "firefox-bin-57.0.4" using: firefox-bin 
-ProfileManager %U


When I start firefox first time the profile manager pops up, I can 
select a profile; but when I try to start again (different profile) 
when I click on firefox it start again with the same profile I'm 
already running.


This is intended behavior, to use an already running instance. If you 
want to start a new instance, try using:


firefox-bin --ProfileManager --new-instance %U

For more information about command line options, see also:

firefox-bin --help

--
Regards

Flo



Re: [gentoo-user] Haskell hell

2018-10-05 Thread Florian Gamböck

Hi Klaus,

On 2018-10-05 07:55, Klaus Ethgen wrote:
Currently I suffer from the bad haskell hell. I need the current 
git-annex that is only available in the haskell overlay.


(...)

Isn't there a way to escape the haskell dependency hell? Is there a 
clean way to compile and use haskell stuff? That is a real nightmare.


first of all, let me tell you that I am not a Haskell expert and the 
following is only based on my personal experience.


I had similar problems with using pandoc, which also guides me in the 
"Haskell hell", as you call it. However, since I added 'dev-haskell/*' 
into my package.keywords, I have not experienced anything problematic 
anymore.


As for rebuilds and preserved libs, sometimes (rarely) after big updates 
I get segmentation faults and the like with Haskell packages. Since I 
have "buildpkg" in my FEATURES, I can do the following: Remove the 
complete dev-haskell folder in my bin-package directory, plus maybe the 
packages, that depend on them, so app-text/pandoc or dev-vcs/git-annex. 
And then I recompile every package, that does not have a binary package 
present. This way, even if some packages fail because of OOM or the 
like, I can just continue where I left off, because the succeeded 
ebuilds created binary packages.


I have never used haskell-updater, I never needed to.

So, to summarize:

-   dev-haskell/* to package.keywords
-   use buildpkg when compiling/upgrading haskell

Disclaimer: Your experience MAY vary. ;-)

--
Regards

Flo



Re: [gentoo-user] When did "emerge --search" start returning packages that don't match?

2018-09-18 Thread Florian Gamböck

Hi Grant,

On 2018-09-17 20:10, Grant Edwards wrote:
I recently noticed that "emerge --search" stopped working correctly. 
It now returns all sorts of packages that don't match the search 
sting:


$ emerge --search wxpython | grep '^[^\t ]'

[ Results for search key : wxpython ]
Searching...
*  dev-lang/python
*  dev-python/bpython
*  dev-python/ipython
*  dev-python/pythong [ Masked ]
*  dev-python/twython
*  dev-python/vpython [ Masked ]
*  dev-python/wxpython
[ Applications found : 7 ]

Why is it returning packges that don't match what I'm searching for?

Shouldn't only the last of the ones shown above be returned?


the culprit is --fuzzy-search. The manual states: "This option is 
enabled by default".


Try the following:

$ emerge --fuzzy-search=n --search wxpython | grep '^[^\t ]'
[ Results for search key : wxpython ]
Searching...
*  dev-python/wxpython
[ Applications found : 1 ]

I don't use --search (eix is my friend), but if you are certain that 
this behavior is new to you, then this new default must be introduced 
only recently.


--
Kind regards

Flo



Re: [gentoo-user] [OT] Dropping file from....the commandline?

2019-03-15 Thread Florian Gamböck

Hi Meino!

On 2019-03-09 11:36, tu...@posteo.de wrote:

How can I drop files from the commandline into Meshroom?


Have you tried using:

   meshroom_photogrammetry --input INPUT_IMAGES_FOLDER \
   --output OUTPUT_FOLDER

It is described on the GitHub page: 
https://github.com/alicevision/meshroom#start-meshroom


It is also included in the binary package.

DISCLAIMER: I haven't ever used Meshroom, except for the last few 
minutes, out of pure curiosity. Sadly I do not have a CUDA capable card, 
Meshroom won't start computing anything without it.


--
Kind regards

Flo



Re: [gentoo-user] Curious about order that emerge -u builds/installs

2021-06-04 Thread Florian Gamböck

Hi Grant,

On 2021-06-02 15:22, Grant Edwards wrote:
The order of package bilds often seems to be quite different after the 
interruption than it was the first time -- often X is a fair ways down 
the list.


Why is that?


it might possibly be related to hash randomization. I experienced a 
similar "problem" during work some time ago, where I couldn't reliably 
compare a set of values with a predefined list, without sorting it 
first.


You can try the following Bash script to demonstrate the effects of hash 
randomization in Python:


for _ in {1..5}; do python -c "print(set(['a', 'b', 'c']))"; done

Chances are high that you will get five completely differently sorted 
sets.


Since Portage is programmed in Python, it might be the same effect here, 
the packages are built up in a set or a dictionary and are therfore 
affected by the random seed.


More information and pointers on this topic can be found in the Python 
documentation: https://docs.python.org/3/using/cmdline.html#cmdoption-r


--
Regards and all the best

Flo



Re: [gentoo-user] Off topic: - imagemagic command line, strange behaviour

2024-01-03 Thread Florian Gamböck

On 2023-12-28 19:46, the...@sys-concept.com wrote:

@echo off
cd "C:\Users\Server\Desktop\"
magick convert -density 300 document.pdf -fuzz 45% -fill white +opaque black 
converted_document.pdf
pause


Just a wild guess without looking too deep into it: Might the "%" be a 
special character in a Batch file, being interpreted as some sort of 
variable? Can you escape it, maybe putting the whole "45%" in quotes?


Kind regards

FloGa



[gentoo-user] Sending HUP to OpenVPN after WiFi reconnect in Mesh

2024-01-03 Thread Florian Gamböck

Dearest collective knowledge of gentoo-user,

I'm using netifrc with wpa_supplicant (no custom settings in netifrc) 
for accessing a FRITZ!Box network at my parents house. They have some 
WiFi repeaters set up, connected via AVM's Meshing capabilities.


Also, I am using OpenVPN to connect to VPN servers from ProtonVPN.

From time to time, I would see this in the syslog:


Jan  3 16:37:01 georgi kernel: wlp0s20f3: disconnect from AP 04:b4:fe:b3:3f:71 
for new auth to 3c:a6:2f:ed:5b:1b
Jan  3 16:37:01 georgi kernel: wlp0s20f3: authenticate with 3c:a6:2f:ed:5b:1b
Jan  3 16:37:01 georgi kernel: wlp0s20f3: 80 MHz not supported, disabling VHT
Jan  3 16:37:01 georgi kernel: wlp0s20f3: send auth to 3c:a6:2f:ed:5b:1b (try 
1/3)
Jan  3 16:37:01 georgi kernel: wlp0s20f3: authenticated
Jan  3 16:37:01 georgi kernel: wlp0s20f3: associate with 3c:a6:2f:ed:5b:1b (try 
1/3)
Jan  3 16:37:01 georgi kernel: wlp0s20f3: RX ReassocResp from 3c:a6:2f:ed:5b:1b 
(capab=0x1431 status=0 aid=9)
Jan  3 16:37:01 georgi kernel: wlp0s20f3: associated
Jan  3 16:37:38 georgi kernel: wlp0s20f3: disconnect from AP 3c:a6:2f:ed:5b:1b 
for new auth to 04:b4:fe:b3:3f:71
Jan  3 16:37:39 georgi kernel: wlp0s20f3: authenticate with 04:b4:fe:b3:3f:71
Jan  3 16:37:39 georgi kernel: wlp0s20f3: 80 MHz not supported, disabling VHT
Jan  3 16:37:39 georgi kernel: wlp0s20f3: send auth to 04:b4:fe:b3:3f:71 (try 
1/3)
Jan  3 16:37:39 georgi kernel: wlp0s20f3: send auth to 04:b4:fe:b3:3f:71 (try 
2/3)
Jan  3 16:37:39 georgi kernel: wlp0s20f3: authenticated
Jan  3 16:37:39 georgi kernel: wlp0s20f3: associate with 04:b4:fe:b3:3f:71 (try 
1/3)
Jan  3 16:37:39 georgi kernel: wlp0s20f3: RX ReassocResp from 04:b4:fe:b3:3f:71 
(capab=0x1431 status=0 aid=3)
Jan  3 16:37:39 georgi kernel: wlp0s20f3: associated


This happens even without setting "bgscan" or similar in 
wpa_supplicant.conf, so I highly suspect, this is the magic of a Mesh 
WiFi to pass me to a more fitting AP in the same network from time to 
time. All fine so far, I don't lose WiFi connection, so this seems 
normal to me.


What bugs me however is, that OpenVPN loses connection to the VPN server 
after such an AP change and is not able to reconnect automatically 
again.



Dec 31 19:06:08 georgi openvpn[14956]: [node-ch-11.protonvpn.net] Inactivity 
timeout (--ping-restart), restarting
Dec 31 19:06:08 georgi openvpn[14956]: /etc/openvpn/down.sh proton0 1500 0 
10.96.0.39 255.255.0.0 restart
Dec 31 19:06:08 georgi openvpn[14956]: SIGUSR1[soft,ping-restart] received, 
process restarting
Dec 31 19:06:09 georgi openvpn[14956]: NOTE: the current --script-security 
setting may allow this configuration to call user-defined scripts
Dec 31 19:06:09 georgi openvpn[14956]: TCP/UDP: Preserving recently used remote 
address: [AF_INET]138.199.6.178:1194
Dec 31 19:06:09 georgi openvpn[14956]: NOTE: setsockopt TCP_NODELAY=1 failed
Dec 31 19:06:09 georgi openvpn[14956]: UDPv4 link local: (not bound)
Dec 31 19:06:09 georgi openvpn[14956]: UDPv4 link remote: 
[AF_INET]138.199.6.178:1194
Dec 31 19:06:29 georgi openvpn[14956]: Server poll timeout, restarting
Dec 31 19:06:29 georgi openvpn[14956]: /etc/openvpn/down.sh proton0 1500 0 
10.96.0.39 255.255.0.0 restart
Dec 31 19:06:29 georgi openvpn[14956]: SIGUSR1[soft,server_poll] received, 
process restarting
Dec 31 19:06:29 georgi openvpn[14956]: NOTE: the current --script-security 
setting may allow this configuration to call user-defined scripts
Dec 31 19:06:29 georgi openvpn[14956]: TCP/UDP: Preserving recently used remote 
address: [AF_INET]138.199.6.179:51820
Dec 31 19:06:29 georgi openvpn[14956]: NOTE: setsockopt TCP_NODELAY=1 failed
Dec 31 19:06:29 georgi openvpn[14956]: UDPv4 link local: (not bound)
Dec 31 19:06:29 georgi openvpn[14956]: UDPv4 link remote: 
[AF_INET]138.199.6.179:51820


The lines from 19:06:29 are repeated every 20 seconds 
(server-poll-timeout 20), with varying IP addresses, so it seems to 
cycle infinitely through all servers without success.


While this is happening, I cannot access the internet. I suspect, this 
is because of the "persist-tun" setting in the OpenVPN config, but I 
don't want to remove it because I'd rather have no internet at all than 
having suddenly internet without VPN ("kill switch").


I can manually "repair" this situation by sending SIGHUP to OpenVPN, 
which causes a hard reconnect.


Now, with this background information, I need your help to come up with 
a strategy to survive an automatic Mesh WiFi reconnect, without the need 
of manually restarting OpenVPN all the time.


-   Might there be a problem with my OpenVPN config? I'm mostly using 
the default config that can be downloaded from ProtonVPN, with some 
additional "route" statements to make VPN unfriendly websites happy, and 
I renamed the device name to have proper logs (see code block directly 
below this bullet point). Has anyone a similar setup and did some 
adjustments to make it work properly?



dev proton0
dev-type tun


-   If there is nothing wrong 

Re: [gentoo-user] Sending HUP to OpenVPN after WiFi reconnect in Mesh

2024-01-03 Thread Florian Gamböck

Hi Hoël,

thanks for your response!

On 2024-01-03 18:11, Hoël Bézier wrote:
I’ve encountered the same issue as you. I fixed it by removing the 
persist-tun option from my configuration file.


The way I understand this configuration option, is that OpenVPN allows 
itself to destroy and recreate tun interfaces if needed. I’m not sure 
whether it means you may end up on the internet without going through 
your VPN.


I tried again to remove the "persist-tun" option, and indeed I can now 
reconnect also via SIGUSR1 without problems. Also all traffic is blocked 
/ dropped while waiting for the server timeout, so at least I'm not left 
open in the wild without VPN.


I’d be very interested if anyone had further information on that 
matter, whether they would contredict my claims or support them.


Yes, even though USR1 works now without falling back to no-VPN routing, 
if someone can give a little more insight if removing "persist-tun" is 
the way to go here would be nice!


So at least one of the issues is "solved" for now, but the main problem 
still remains: How can I properly detect Mesh roaming and react timely 
to send HUP or USR1 to OpenVPN?


I'm still thinking about some sort of wpa_supplicant "hook" mechanism 
for these roaming events, but I cannot find something like this in the 
docs ...


Kind regards

FloGa