libera/#devuan/ Monday, 2023-12-04

unclouded_`su - $username --command='stty -a'` shows "speed 38400 baud; rows 55; columns 119; line = 0;" (i.e. the correct terminal size)00:00
rwpFor me in screen on daedalus with screen 4.9.0-4 my TERM is set to "screen".00:01
rwpAlso the shell usually sets LINES and COLUMNS from the tty driver (after a SIGWINCH signal window change) and that can override.00:03
rwpLook at "echo $LINES $COLUMNS" to see what the shell thinks the size is set to.00:03
unclouded_Hmm.  Using TERM=screen, `su - $username --command='echo $TERM' shows "screen" but echo $COLUMNS with `su` is blank00:03
rwpAnd verify that those are NOT exported.  Try "printenv LINES COLUMNS" and it should not print anything since the variables are not exported.00:03
unclouded_(unset)00:03
rwpBash?  Or a different shell?00:04
rwpI am just asking all of these questions so I can understand what is and what is not.  Both are important.00:04
unclouded_$SHELL=/bin/bash00:04
unclouded_So it is good that COLUMNS is unset when I do `su - $username...`?00:05
rwpYes.  Environment variables are static.  If it is set then it will freeze the override at that size.00:05
rwpWhen terminal emulators are resized the tty driver sends a SIGWINCH to the process group.  Things that need to react to the size change then react and change size.00:06
rwpI think most programs query the tty driver for the size (reported from stty -a) and then react appropriately.  Bash sets the internal variables LINES and COLUMNS for its own use.  But don't export them.00:07
unclouded_OK, that makes sense.  I'm not resizing the terminal emulator though, it just seems that mutt uses 80x25 when I run it with "su --command" but not if I "su - $username" first and *then* run mutt00:08
unclouded_but is COLUMS set when a shell starts?00:08
unclouded_(as well)00:08
rwpYes.  When the shell starts up it sets the internal variables LINES and COLUMNS.  And many programs accept those as overrides.  Look at dpkg for example.00:09
unclouded_When I "su" first, I notice that $COLUMNS is set for the new shell00:10
unclouded_If I "su --command=mutt", is no new shell involved, so $COLUMNS would be unset?00:10
unclouded_As well as showing 80x25, ^Z doesn't work when mutt is launched this way, so I can't even background to see what variables are set00:11
rwpmutt should be reading the terminal size from the tty driver the same as other curses/slang programs.00:12
unclouded_It definitely accepts the override like you said: `su - $username --command='COLUMNS=119 mutt...` uses the full width00:12
rwpI was asking questions about LINES and COLUMNS because you said they were incorrect for you.  Therefore I was looking at the things that override the correct value.00:13
rwpBut you also said TERM was screen.xterm-256color too.  I don't know how that happened either.  I don't see that here.00:13
unclouded_Sorry, I misled.  They are either unset, or correct, depending on whether "su --command"  is used00:13
rwpAlso the man page for screen describes in the TERM section that it sets it to "screen" and other things but does not mention screen.xterm-256color making me think that is a local override on your side of things somewhere.00:15
unclouded_What is a bit strange, is that this was OK on beowulf and chimaera00:15
unclouded_Hmm, ok.  I'll have a look for that.  I don't remember messing with $TERM at all, except querying it in bashrc.local00:16
rwpIt looks okay to me on daedalus too though.00:16
unclouded_mutt is ok for me if I "su - $username" first to a new shell and then run mutt, just not if I "su - $username --command='mutt..."00:17
unclouded_after I reboot, I like screen to start up all the mutts from .screenrc00:18
rwpI am pretty sure there will be a difference between "su - user" followed by "mutt" over "su - user -c mutt" because the first allows the shell to act as a login shell and load the full environment and the second one will do something different.00:19
rwpI was trying to remember but a month ago someone had reported a problem with btop++ in screen that produced garbled characters.00:20
unclouded_makes sense.  Although `su - $username --command='bash -c "mutt ..."'` also presents as 80x2500:20
rwpI would also test using vi or emacs (pick your favorite editor) to verify that it isn't something in mutt but something outside of it.00:21
unclouded_OK, will do.  I just thought of strace to see if mutt really is running "stty -a"00:22
rwpIt won't be running stty -a but probably ioctl(0, TCGETS, struct address)00:23
unclouded_Interesting.  2700 lines of trace, but no trace of "stty".  Doesn't look like mutt is running stty00:23
blockheadwould guess LANG=C btop++ would be a workaround to prevent oddball characters?00:23
unclouded_OK, I see the "TCGETS" stuff00:23
rwpblockhead, Actually no!  That made it worse.  I had to force en_US.UTF-8 in my case to get it to start.  If LANG=C then it complains and fails to start.00:24
blockhead thought this was off-topic. sorry00:24
blockheadoh, weird00:24
rwpAnd normally I would have had en_US.UTF-8 set but I had spun up a VM specifically to test it and it was mostly unconfigured.  If LANG is not set then things default to C/POSIX.00:24
rwpWe are on topic here with a technical debug session of screen and window size.  It's not off-topic.00:25
unclouded_Not sure how to interpret the ioctl call.  It returns 0.  There's only the one call with 0 as the first parameter, the rest are with 100:26
rwpunclouded_, Another thing I would try is that I would test in a completely clean default empty environment.  Either by creating a new user and logging in there for the test or by moving all of my personal dot files out of the way.  Just for testing this.  Since often we have done something there that we have long forgotten about.00:26
unclouded_I hear that.  I've forgotten a great many things.00:27
rwpThe ioctl call will return data in one of the variable structures.  It will be hard to interpret.  If you are using strace then try "strace -v -e ioctl" on it.  The -v will give more data about the structure.00:28
rwpFor example "strace -v -e ioctl stty -a" will give a nice short bit of output with the flags in hex.00:29
unclouded_Unfortunately, running mutt as a newly created user results in the same issue00:29
rwpWeird!00:29
rwpDo things improve if you resize the window?00:29
rwpResizing the window will send a SIGWINCH to the process group and that should trigger them to re-read window sizes and to react to it.00:30
rwpThat has sometimes caused things to reset to a working size when they originally started off incorrectly sized.00:30
unclouded_No, sadly not.  The one thing that is weird is that I'm running i3, so I can't really resize, but full-screen and back resizes the mutts that were started after "su -"00:32
unclouded_and not the one that is stuck at 80x2500:32
unclouded_It must be receiving SIGWINCH I guess and then doing the same incorrect thing that it did at startup00:32
rwpHmm...  I was able to reproduce your behavior here.  And I really did not expect that!00:33
unclouded_So `su - $username --command='mutt ...` gives you 80x25 too?00:34
rwpI think the problem is that when using su with --command=mutt that the tty device is left owned by the original user and cannot be accessed by mutt.00:34
rwpTry this:  su - $username --command=/bin/bash00:35
rwpThat will give you a shell.  It will complain that it can't set up job control, due to the tty problem.  Then look at the tty.00:35
unclouded_Nicely done: "cannot set terminal process group (-1): Inappropriate ioctl for device"00:35
rwp"tty" returns something like /dev/pts/20 or something.  "ls -ld $(tty)" and it will show that it is owned by root in my case and I cannot read it.00:35
unclouded_"crw--w---- 1 root tty 136, 10 Dec  4 12:36 /dev/pts/10"00:36
rwpBecause mutt run like that cannot read the tty it means that the ioctl() calls (stty -a) cannot get the actual terminal size.  Therefore it can only fall back to 80x25 for the TERM type.00:36
unclouded_I don't think my user is in the tty group though00:36
rwpIt should not be in the tty group.  Don't "fix" things that way. :-)00:36
unclouded_OK, won't :-)00:37
unclouded_Just for fun, I did "chmod 666 `tty`" and tried to run mutt with su and it still showed 80x25 though00:39
rwpAt least we are at the root cause of the problem.  Off the top of my head I don't immiedately know the solution.  And I must go and start work on fixing dinner in a moment.00:39
rwpAre you opposed to using sudo?  I tried it with sudo and I get a new pty device.  Which solves the problem.00:39
unclouded_OK.  Thanks for pointing me in the right direction, and for teaching some commands that I didn't know before00:39
rwpTry: sudo -i -u username mutt00:39
unclouded_OMG that works.  I guess it will work from .screenrc too!00:41
rwpThe key point there is that it plumbs in a different tty device.  A tty device that then you the switched to user then owns.00:42
unclouded_That is some deep knowledge.  I mostly don't have to think about ttys00:44
rwpExperience and treachery will always triumph over youth and enthusiasm! :-)00:44
unclouded_Excellent, I'm keeping that quote! :D00:45
rwpThat's one I created too.  You can attribute that one to me.  --Bob Proulx00:45
rwpI hate to mention this but I remember when SIGWINCH was added to the kernel.  It was a HUGE deal!  Before then resizing terminals had to be set up manually.  PITA!00:45
unclouded_OK, awesome.  Using sudo does indeed work from .screenrc00:46
unclouded_Even if I don't resize my terminal much because it's i3 and it's in the left-hand half of the screen, I really appreciate SIGWINCH when changing termnal fonts!00:47
rwpI use i3 as well.  But even tiling window managers must resize things.  As things are split left-right or top-bottom.  As windows are stacked or tabbed.00:48
rwpI most often used stacked windows.  Which means that one line is consumed for the window title bar every time I stack another terminal.00:48
rwpAnd in tmux (I used screen for years and years but am using tmux these days, try it you will convert too) then every time I split a pane then that resizes too.00:49
unclouded_Yes, that one gets me.  When another window opens in the LHS then the terminal changes size.00:49
unclouded_Thanks, I'll check out tmux00:50
rwpVery happy to hear that we got to the root cause of your problem and got a workaround.  With that my job here is done.  Time for me to go fix dinner! :-)00:51
unclouded_Like Ben Kenobi: My work here is done :)00:51
mason'/wl01:04
u-amarsh04had an obscure problem with the side-effect of not seeing a shell at boot-up: had manually put one firmware file in /lib/firmware/radeon, and firmware was moved to /usr/lib/firmware/radeon EXCEPT the file I manually added (for an old card no longer in use). HOWEVER, the old /lib/firmware/radeon directory was used by update-initramfs and old initramfs, and the firmware for the current gpu wasn't there02:35
chomwitti noticed that somme mirrors dont have a devuan/debian folder . Does that make them slower ?07:32
brocashelmchomwitt: which mirrors? could you link them here so onefang can check?07:37
chomwittsure one moment07:38
brocashelmmaybe create a paste url and link it here07:39
onefangDamn, I have to do some work now?07:39
brocashelm:(07:39
chomwitthttp://mirror.koddos.net/devuan/07:39
chomwittbrocashelm, what did you mean by ' create a paste url' ?07:41
brocashelmchomwitt: i meant by using a paste site like paste.debian.net or dpaste.org07:41
brocashelmdepending on how many you found07:42
chomwitthttp://deb.devuan.nz/07:42
onefangKoddos isn't one of the fastest, but not one of the slowest.07:42
brocashelmmakes it easier to refer to07:42
onefangAh there's a list?07:42
onefangGenerally there's two reasons for having a /devuan.  One is that they might mirror more than one distro.  If they also mirror Debian ,then they server both sorts of packages.07:43
chomwittno i dont have a list! i just bumbed onto one and i was under the impression that is not mandatory to include a part of the debian repe07:43
chomwitts/repe/repo07:43
onefangAnother is coz they have both packages and files mirrored, with the ISO files on /devuan-cd.07:44
onefangNothing to do with speed.07:44
onefangOddly koddos has Devuan, but not Debian.  It has other distros and stuff though.07:46
chomwittin a Package's Filename  i see  pool/DEVUAN/main/pathtoFoo.deb but in a repository i see DEVUAN_ARCHIVE_ROOT/devuan/pool/main/pathtoFoo.deb  . Is that due to a rewrite rule in the www server ?10:08
chomwittalso another queston. Where  DEVUAN_ARCHIVE_ROOT/devuan/dists is used ?  I mean if the usual is to put in sources.list deb http://deb.devuan.org/merged10:11
chomwittor  DEVUAN_ARCHIVE_ROOT/devuan/dists is used an an input to amrpolla to make the merged repo ?10:12
rrqtry search on 'debian repository structure'10:56
chomwittok rrq . i am on it.11:07
al1r4dhow is going all?11:15
u-amarsh04Am I allowed to express my "told you so" opinion that /usr merge would break things in strange and wondrous ways during transition?14:54
gnu_srs1Did you see that Debian now use foul play with usrmerge:, see #1056980 and #813:15:00
gnu_srs1netcat-traditional: Binary files moved to /usr/bin but the postinst script keeps /bin making it un-installable.15:00
u-amarsh04yes, that's my report15:03
hagbardMy quick and dirty workaround for netcat-traditional was a hardlink for the affected file.15:04
u-amarsh04gnu_srs1 if they were consistent, it wouldn't be so bad, but designing something to deliberately break on a non merged system...?15:07
gnu_srs1Does not changing the postinst file work?15:07
gnu_srs1Time to fork that package in Devuan :(15:08
u-amarsh04that's why I reported the bug15:12
u-amarsh04(in Devuan as #813, quoting Debian #1056980)15:12
fsmithredBetter to get it fixed upstream than to fork it.15:13
gnu_srs1fsmithred: Flagged as wontfix in Debian bug  #1056980 :(15:18
fsmithredwtf?15:19
gnu_srs1I built netcat on a Hurd box and changed the postinst path to /usr/bin. Installed nicely :)15:21
u-amarsh04the /usr merge unintended consequences: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=105739916:51
djph"unintended"16:53
DashiePie"nothing is sacred, everything is permitted"16:59
masonu-amarsh04: What's video output, measured against the immense good of laying things out more like Solaris?17:41
u-amarsh04I haven't used Solaris since 2002?17:42
rwpMy search fu is failing me.  Every so often I find this in my Devuan syslog "sshd[5326]: pam_elogind(sshd:session): Failed to release session: Interrupted system call".20:52
rwpThough I do find other people asking the same question.  https://askubuntu.com/questions/1150195/ssh-failed-to-release-session20:52
rwpAnyone know what causes this?  I am about to add it to my logcheck filter ignore as unresolved and unknown noise.  But I would rather fix it if it is something that can be fixed.20:52
masonrwp: I believe that's a systemd-specific issue, as OpenSSH doesn't depend on systemd-logind itself. I'm guessing it's a bug somewhere in elogind, but I only have the guess.20:56
gnarfacecan't say i've seen that happen here20:56
rwpNo systemd on my system!20:56
masonrwp: elogind, a rose by any other name20:56
gnarfacethough i'm not using elogind either, so that could have something to do with it20:56
rwpI'll give you the rose analogy mason.20:57
gnarfacerwp: you sure it's not something mundane like closing a terminal without disconnecting the ssh client first?20:57
rwpThis system is running libvirt and libvirt dependencies pulled in elogind.20:57
masonrwp: There's some discussion of it here: https://github.com/systemd/systemd/issues/1881720:58
rwpOMG!  If I "apt-get purge -s elogind" it will let me do it without removing libvirt!  I guess that was a previous release version dependency and no longer needed.  My machines are all upgrades from older versions.20:59
mason\o/20:59
rwpThis is what the purge action looks like.  I don't need anything that is being removed.  https://paste.debian.net/plain/130017421:00
rwpThat's my action plan now!  But I will want to reboot after doing it to make sure all is well and I want to wait on that reboot.  I'll do it later.21:00
masonrwp: You might find that accessing libvirt without polkit leads to some excitement if you're not root. Not sure if seatd would work there.21:01
masonIf you only access it as root, you're likely fine.21:01
rwpThis machine has one purpose and that is to host VMs for me.  I only ever interact with it as root.21:01
rwpBut I will keep that in mind for another system which has XFCE on it and does interact from the user DE.21:02
rwpThanks for the second brain on this!21:03
rwpI guess I should say that I am not sure consolekit which is pulled in to replace elogind will really be significantly better.  But it will be different.  WCGW?21:08
masonheh21:08
rwpI purged elogind, installed consolekit, rebooted, and all is well.  I'll see how that goes.  I need to upgrade that system anyway at some point.21:19
masonCool.21:24
rwpLooking at things a little bit more I might possibly have been better off by simply disabling PAM in sshd_config as I don't need it.  That would have avoided elogind and the associated bugs but left elogind for use by libvirt.22:01
plumpandaI need advice on how to narrow down a problem I'm having. I'm on devuan testing (excalibur) and most, but not all, of my DV cameras don't connect via firewire correctly. I normally use dvgrab to record from camera to disk and that is failing ("no camera exists"). One of my cameras works as intended with this exact same workflow, and on a devuan stable live USB all cameras work as expected. I also tried booting testing into the old 6.1 kernel I still had22:57
plumpandain grub just in case, and it did not work there either. As far as I know dvgrab and the other firewire components have not been updated in eons, so I'm not sure why it's broken.22:57
plumpandaOnly other difference is I see it detect the device in dmesg twice, but it's not clear if it's failing, just that it creates the device again (so probably something failing before dvgrab has a chance to touch it??)22:59
plumpandaoh, it works as root. Well shoot. What would be in charge of setting the permissions on the device when it's configured?23:09
plumpanda(this may also be some quirk going from a live boot to a normal install)23:10
plasma41plumpanda: maybe polkit- and/or eudev-related?23:10
plumpandaPossibly, I'll have to dig and look. I've never had to configure anything in the past, hopefully I can lift a config from an old install (of a non devuan OS)23:12
plumpandafwiw I'm just running sysvinit, haven't changed that from out of the box.23:14
plasma41That shouldn't^TM make a difference.23:17
gnarfaceplumpanda: it's udev/eudev that handles permissions on device creation23:19
al1r4dErrors were encountered while processing:23:22
al1r4d netcat-traditional23:22
al1r4dE: Sub-process /usr/bin/dpkg returned an error code (1)23:22
al1r4dWhat happened?23:22
gnu_srs1al1r4d: Scroll up: (15:01:05) gnu_srs1: Did you see that Debian now use foul play with usrmerge:, see #1056980 and #813:23:24
gnu_srs1(15:01:05) gnu_srs1: netcat-traditional: Binary files moved to /usr/bin but the postinst script keeps /bin making it un-installable.23:24
al1r4dhmm23:26
al1r4dOk, i will hold the package23:33
plumpandagnarface, sounds like I'm writing a rule for it then. Thank you23:38
gnarfaceplumpanda: you might not need to. if the group ownership isn't set to root anyway, you might be able to just add yourself to that group safely23:40
gnarfacelike, if the group is already the "video" group, you probably want to be in the video group anyway23:41
plumpandaIt's (/dev/fw1) not getting any group permissions right now23:41
plumpandabut I've never had to mess with udev before so this might be a lack of understanding on my part23:41
gnarfaceit might be an accidental regression, you are on testing, after all23:42
plumpandaunrelated to that: where did /sbin/mount.nfs go? D:23:42
gnarfaceuh, not sure. maybe in the package "nfs-common"23:43
gnarfaceyou could try apt-file search but if it's a symlink created by postinst script it might not show up23:43
plumpandaThat's installed, and has been. I've had a network mount that was working fine. Today after rebooting for testing it won't mount and sure enough that file is missing23:43
gnarfaceworth a try maybe though23:44
gnarfacealso, see if "mount -t nfs" still works23:44
plumpandaConfirmed that it's supposed to just point to /sbin/mount.nfs per apt-file. The file is also present on my other devuan testing system, weirdly. Which is also up to date, or at least I did apt upgrade on it earlier today23:47
plumpandaand nfs-common is still installed23:48
plumpandalooks like nfs-common updated "1:2.6.4-2 amd64 [upgradable from: 1:2.6.3-3]"23:54

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!