IRC Logs for #crux Saturday, 2019-04-20

*** obarun has joined #crux00:11
*** tilman_ has joined #crux00:58
*** SovietPony has joined #crux01:50
*** xor29ah has quit IRC02:23
*** xor29ah has joined #crux02:25
*** _________mavric6 has quit IRC02:35
*** _________mavric6 has joined #crux02:36
*** xor29ah has quit IRC02:41
*** xor29ah has joined #crux02:43
*** abenz has quit IRC08:22
*** abenz has joined #crux08:42
*** abenz_ has joined #crux08:44
*** abenz has quit IRC08:47
*** abenz_ has quit IRC09:11
*** abenz_ has joined #crux09:24
*** crash_ has joined #crux12:08
*** obarun has quit IRC12:43
*** JanC has quit IRC14:03
*** JanC has joined #crux14:09
*** stenur has joined #crux16:26
*** vsteve has joined #crux16:31
vstevehey folks,  what sets the $PATH variable at boot time, prior to login?16:33
stenur/etc/login.defs, see login.defs(5)16:34
vstevehuh....I tried that but I'll give it another shot16:35
vstevethanks16:35
stenurwell, i guess noone; use absolute paths, and then builtin Unix defaults16:36
vsteveyeah, no go on login.defs16:37
vstevejust rebooted, no change, which makes me wonder what that file is even for...16:38
vstevesomething must define PATH at boot time though...otherwise tons of stuff would break16:38
stenursysvinit as PID number one16:39
stenuryeah: http://git.savannah.nongnu.org/cgit/sysvinit.git/tree/src/init.h16:39
stenur/sbin:/usr/sbin/:/bin/:/usr/bin16:40
vsteveoh holy crap...it's baked in16:40
vsteveok, thanks for that16:40
vstevealright, absolute paths it is16:40
stenurHm. init is PID number one, what comes before it?16:42
vstevewhat's zero?  no idea16:42
vstevedr.google says it's the system idle process16:43
vstevewhich I guess makes a certain degree of sense16:44
vstevevariable wise I guess some things can be passed as boot flags16:44
vstevebut when init got invoked I would assume something like PATH would get over written....maybe16:45
TimB_vsteve: which shell do you use? maybe it reads /etc/profile?16:52
vsteveTimB_  bash16:54
vsteveit's ok though, where my executables are is trivial16:54
john_cephalopodavsteve: When you are using bash, you can use .bashrc and .bash_profile to set $PATH16:56
john_cephalopodaexport PATH=/bin:/sbin:/usr/bin:/usr/sbin/16:56
vstevejohn_c : those only set it after boot/login time16:56
john_cephalopodavsteve: It's best to create one and make the other one a symlink to the first one.16:56
john_cephalopodaHmm, yeah, if you need PATH for system services, then it's an issue.16:57
vsteveI think the sysvinit header is where I'd have to go to get my desired behavior, recompiling init isn't on my bucket list yet16:57
vsteveit's all good, absolute paths are fine by me16:57
john_cephalopodavsteve: You could maybe also make a script at /etc/rc.d/vars that sets up all the system variables.16:57
vsteveI could indeed, and that's more than acceptable for my purposes16:58
john_cephalopodaThen you add "vars" to rc.conf -> SERVICES and it should do :)16:58
vstevecorrect, I've done that before and it's worked well, I just casually wonder if there was a way to get more....basic16:58
vstevewondered*16:59
vstevebut now I know :)16:59
vstevemy issue now is the unending rats nest that is iptables configuration16:59
vstevethere are many things in life I am not, network guy is near the top of that list17:04
stenurjohn_cephalopoda: /etc/rc.conf, of course!  But i thought, is that truly inherited by services, PATH is an environment variable17:07
stenurvsteve: the documentation is terrible, but, except for (dynamic) tables with lots of members, once you have it17:09
stenurvsteve: it is quite easy, in a shell script, with helper functions17:10
stenurvsteve: i have enter_table(), change_chain(), add_rule()17:11
stenurWhat i really do not get right is tc stuff17:11
stenurSome things just do not work out on firewall, it just cannot know17:12
stenurLike limiting download rate after a burst, or whatever17:13
stenurBut that is bla.  I made my way and carry that script ever since, just adjust it once in a while17:15
stenurIn fact the same on clients and server, with if [ -z "$SERVER" ] all along ;)17:15
vstevewell, I'm trying to put together a transparent firewall, after googling around I found several lines like:  iptables -A FORWARD -m physdev --physdev-in enp2s0 --physdev-out enp3s0 -j ACCEPT17:18
vstevebut that gets "Couldn't find match 'physdev'"17:18
vsteveI'm using the bleeding edge latest version of iptables, so I wondered if they changed that feature?17:19
jaegerDoes your kernel support the physdev match extension?17:19
vsteveit should but how would I know for sure?17:20
jaegerCheck the config17:20
vstevewell yeah17:20
jaegerfor example:17:20
jaeger$ zgrep PHYSDEV /proc/config.gz17:20
jaegerCONFIG_NETFILTER_XT_MATCH_PHYSDEV=y17:20
vsteveahhhh17:20
*** onodera has joined #crux17:20
vstevewell how about that17:21
vstevesurely enough, not set17:21
vsteveI thought I had turned everything on as to avoid this17:21
john_cephalopodastenur: Oh, right, not quite sure.17:21
vstevelooks like the menuconfig option is buried under Network packet filtering framework (Netfilter) -> IP set support17:27
vstevethanks jaeger, as always a life saver17:28
jaegerwelcome :)17:35
axgood evening17:42
axtraps: simple-scan[2055] trap int3 ip:7f950d044ff1 sp:7ffc0610a9e0 error:0 in libglib-2.0.so.0.5800.3[7f950cff2000+119000]17:44
axnews about it please ?17:44
*** stenur has left #crux ()17:44
*** stenur has joined #crux17:48
jaegerheyo.... haven't run into that one. what is simple-scan?17:50
pedjaI guess this https://gitlab.gnome.org/GNOME/simple-scan17:53
axI brought the missing driver added to the rules and everything works perfectly, but the application in question goes to dump17:53
axyeh it's17:54
jaegersorry, no idea there17:57
pedjarebuild glib and simple-scan, perhaps?18:03
pedjaax, does the application crash or just fills the dmesg with that?18:06
vstevedid you compile with any special options?18:19
vstevebasically what pedjas suggesting, it may be worth rebuilding an underlaying library before proceeding18:20
vstevehey jaeger, it appears my kernel is haunted18:43
vsteveso I look at the .config for my kernel I -just- built and installed, the .config showed CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y18:43
vstevebut when I zgrep the same line out of /proc/config.gz it shows up as not set18:44
vsteveI went in and make mrproper'd it and rebuilt from nothing, installed that kernel...and still the running kernel shows that's unset while the config I literally just compiled against shows it set to y18:45
*** jamtoast has quit IRC18:46
vsteveI'm rebuilding with a bunch of netfilter options as modular....sometimes things work better/differently as modules *shrug*19:17
jaegerMy only guess is you missed copying the new kernel to the right place or didn't run lilo (if you use lilo)19:20
vsteveI've found I don't -always- need to rerun lilo, but perhaps that's poor practice19:32
vstevein either event, rebuilding a ton of that stuff as modular.....it's working now19:33
vsteve*shrugging intensifies*19:33
vsteveto your point, I did run lilo this time so maybe that was the magic bullet...but why would the bootloader impact what functions work after login?19:34
john_cephalopodavsteve: Does "uname -a" give you a correct build time?19:36
vstevejohn : yes19:40
vstevebut now it's working so....I'd have to go back and break my kernel to see what was going onj19:41
vstevewhich may be worth doing later on19:42
vsteveiptables just took my rule list without error, so I'm good for now19:46
vstevethanks as always folks, i'm out for now19:46
*** vsteve has quit IRC19:51
*** kujira has joined #crux19:54
kujirasup crux ? if i chsh for root to dash, will it break buildscripts and ports ?19:56
SitriNo, that only changes the interactive shell that gets used19:58
kujirasweet, thx.. ive had that question for forever.. ha19:58
SitriThe she-bang of each script determines what interpreter gets used19:59
kujirawould a symlink /bin/sh to dash kill everything ?19:59
john_cephalopodakujira: I believe that is actually default.19:59
SitriIt is on my system20:00
john_cephalopodakujira: Try this:  ls -l /bin/sh20:00
kujirait is symlinkd to dash, i guess i never looked, ha20:00
kujirai thought i had, i thought it was bash, i was wrong.. haha20:00
john_cephalopodaI symlinked it to bash, had issues with one single build script that said that it wanted sh although it needed bash.20:01
SitriMost systems have abandoned bash as sh long ago20:01
SitriThat was the main goal of dash20:01
kujirai just use dash and ive been getting into ksh, i grew up with bash, but never knew it as a language..20:02
kujirawhen i read a script and dont understand it, i assume it bash stuff.. haha..20:02
kujirathx everyone20:03
Sitrichsh to dash is kind of pointless unless you absolutely hate the usability improvements bash gives20:04
kujiraidk what bash's improvements are tbh, never tried to script in it and i forego tab completion..20:06
SitriBash gives you command history20:07
SitriAlso since readline is built-in you get all the command editing stuff20:07
kujirai dont use command history either, ive been using dash as my main shell for years20:08
kujirait makes me type more, i figure it a healthy decision..20:08
kujirai like typing :D20:08
SitriI like DRY20:09
kujiracool20:09
Sitri(Donot Repeat Yourself)20:09
kujiraive been sitting in a shell for a week, got a date tonight, gonna go shave about it.. :D20:11
kujirathx everyone for entertaining my question, that really i didnt need to ask, haha..20:12
stenurI am all for mksh, it is still <30% of the size of bash, but has it all.  Not as comfortable on the command line, but still much better than dash.20:20
stenurActually i use so few of what the shell language is capable of...20:20
*** obarun has joined #crux20:21
stenur(Ok, not all of bash.  But coprocesses, arrays, and much more)20:21
kujirai used to use mksh, but ive actually grown pretty comfy in dash20:26
AnselmoI typically use mksh for interactive shell, try to use a different one for scripting on different machines20:26
SitriI used to do a ton of bash scripting20:27
stenurIf you can!20:27
SitriBut started learning xs20:27
SitriI think I might end up with xs as my main shell20:27
Anselmodont think Ive ever used xs20:27
SitriI should try es first though20:27
Sitrihttps://github.com/TieDyedDevil/XS20:28
SitriDescendant of rc20:28
Anselmooh!20:28
Anselmointeresting20:28
SitriMain thing that cought my eye: functions can return functions20:28
SitriIE: closures20:28
Anselmohehe interesting20:28
SitriIt's... got a ton of rough patches though, I think I'm going to end up forking it to make it less painful20:29
Anselmoheh20:29
Sitri(I spoke with the current maintainer, he's not interested in adding more primitives)20:29
SitriThere's also elvish that looks fairly interesting, but I'm at the point where I think I'm best off just making my own shell20:30
Anselmommm20:31
kujiraSitri: xs looks cool, ive never heard of it before20:31
Sitri; printf [; cal = `` \n cal; for l $cal(3 ...) { line = <={%split \  $l}; printf [%s], <={%flatten , $line} }; echo null]20:32
Sitri[[1,2,3,4,5,6],[7,8,9,10,11,12,13],[14,15,16,17,18,19,20],[21,22,23,24,25,26,27],[28,29,30],[],null]20:32
Sitri^ Example of xs, generating some JSON (which I make manually)20:32
Anselmohmmm20:34
SitriIt does some stuff really well, but string processing it is absolutely horrid at.  You'll want to convert the string to a list, which it has a bunch of primitives to manipulate, then flatten the list.20:35
SitriIt also only supports non-nested lists.  Which doesn't seem too horrible, until you realize how function arguments are handled (you can't pass two lists to a single function)20:35
SitriAlso while read loops are non-trivial D:20:36
AnselmoI suppose the question is always just,what you actually need to do20:37
Anselmoand which shell makes that easy :P20:37
SitriYeah, I find I end up wanting to do a bunch of processing in the shell, and no shell really makes that painless20:38
SitriI could do stuff in an actual scripting language, but then calling sub-processes with pipe-lines becomes painful20:40
*** xor29ah has quit IRC20:40
SitriMaybe if I had a nice way to inline a scripting language...20:40
SitriWhile still letting it work with a pipeline20:41
Anselmoah, heh20:42
Anselmowhen I want to use many processes usually I just use like, dtach or whatever20:42
Anselmoor do you mean more complicated things that might define variables that you need to feed directly elsewhere ?20:42
SitriThat is orthagonal to what I'm doing20:42
kujirayou just threw down orthagonal.. you asshat20:45
AnselmoI mean, its a different thing, I suppose I dont particularly often use the shell for much that requires extensive scripting, outside of like, selecting and filtering streams, I'm curious what quite youre uses are20:48
SitriYeah, I'm trying to think of one where it's a good example20:49
SitriI basically have a ton of really small scripts20:49
Anselmohmmm20:51
SitriAh fairly good one: I have a script that generates a report by reading a text file, and looking at what directories and files exist in the working directory, then ssh'es it out with a descriptive name so I can mail it to the client.  The text file is processed (in bash currently) into a .tex file fragment that I cat together to form a full document, run pdflatex on and then have a working PDF20:57
SitriI could probably move the text processing part into another language, but ATM it's part of a bash script20:59
Anselmohmmkay21:02
*** kujira has quit IRC21:03
*** xor29ah has joined #crux21:11
*** obarun has quit IRC22:01
*** onodera has quit IRC22:13
*** xor29ah has quit IRC22:40
*** xor29ah has joined #crux22:41
*** xor29ah has quit IRC22:48
*** xor29ah has joined #crux22:52
*** john_cephalopoda has quit IRC23:12
*** john_cephalopoda has joined #crux23:26
*** stenur has quit IRC23:32

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!