jaeger changed the topic of #crux to: CRUX 3.7 | Homepage: https://crux.nu/ | Ports: https://crux.nu/portdb/ https://crux.ninja/portdb/ | Logs: https://libera.irclog.whitequark.org/crux/
tilman has quit [Ping timeout: 255 seconds]
tilman has joined #crux
tek_ has quit [Quit: Lost terminal]
groovy2shoes has quit [Remote host closed the connection]
groovy2shoes has joined #crux
ivandi has joined #crux
ukky has quit [Quit: Testing...]
ukky has joined #crux
<ukky> Is there a shell script version of /ets/ports/drivers/rsync ? I need to change it but don't know Perl
<ukky> s/ets/etc
<cruxbot> [contrib.git/3.7]: python3-rpds-py: updated to version 0.10.2
<cruxbot> [contrib.git/3.7]: go: updated to version 1.21.1
<cruxbot> [contrib.git/3.7]: docker: updated to version 24.0.6
lavaball has joined #crux
samsep10l has joined #crux
<samsep10l> farkuhar: hi, I finish to test your latest patch on your prt-get source and works well
<r0ni> sooo are .la files a yay or nay on keeping in pkgs?
<SiFuh> No, unless it is absolutely necessary. Off the top of my head, I think the lua port needed to keep them
lavaball has quit [Ping timeout: 246 seconds]
<SiFuh> Hmm it wasn't lua.
<r0ni> well just looking thru /usr/lib it sure dont seem like many, if any, pkgs from core/opt/xorg remove them
<SiFuh> I removed them from VLC but not from aircrack-ng
<r0ni> should be part pf pkgmk like gzipping man pages, wiping .la files
<SiFuh> Could say that about removing README files but what about programs that actually access their README inside the program? You'd end up with a file not found error
<r0ni> well sure, just thinking outloud, maybe an option to keep .la files would exist like the .nostrip idea
<r0ni> guess that's better than just rm them all.. ;)
<SiFuh> Paragraph 5 about ImageMagick
<farkuhar> r0ni: the graphicsmagick executables don't work if you delete the *.la files more deeply nested than /usr/lib. In the graphicsmagick port I restricted the find command to -maxdepth 1 so that the binaries would work.
<r0ni> ya i know about imagemagick, i always assumed it was just imagemagicks specific files it needs
<r0ni> I just hear some say dump em, but what I see and what I hear certainly appear to be different things. For the record, I like reading them, always fascinated me for some reason
<SiFuh> Not by me
<SiFuh> 07:02 <SiFuh> No, unless it is absolutely necessary. Off the top of my head, I think the lua port needed to keep them
<SiFuh> How about this. If your port doesn't require them, then get rid of them.
<farkuhar> ukky here's a quick-and-dirty translation of the rsync driver for you: http://ix.io/4FNS
disapper3nce has joined #crux
disapper3nce has quit [Client Quit]
lavaball has joined #crux
<farkuhar> ukky: after fixing a few bugs I came up with this one instead http://ix.io/4FOs
<farkuhar> publish early and publish often, that's how I roll. Anyway, bash didn't like looping over the keys of an associative array with the same variable previously used in a read command, so I refactored to dispense with the array.
<farkuhar> SiFuh: didn't work for a fresh checkout, or for an update of an existing collection?
<cruxbot> [opt.git/3.7]: nodejs: 20.6.0 -> 20.6.1
<cruxbot> [contrib.git/3.7]: python3-tox: 4.11.2 -> 4.11.3
<cruxbot> [contrib.git/3.7]: gitui: 0.24.2 -> 0.24.3
<SiFuh> farkuhar: heh, http://ix.io/4FOy
<farkuhar> SiFuh: heh, it became more verbose after I swapped out the Perl idiom of testing hash keys and replaced it with grep -q -F -f. Even with the quiet flag, grep still spits garbage on stderr, so maybe it would be better to append 2>/dev/null
<farkuhar> http://sprunge.us/VYr6QU <- Heh, grep is happier when the arguments are passed in the right order. Maybe this one will work for ukky
<farkuhar> Beats me why ukky wasn't interested in learning just enough Perl to implement the desired changes in the driver we already have. Translating Perl to bash is a good way to fry my sleep-deprived brain even more.
<SiFuh> There is one that annoys me when it complains about grep -E
<SiFuh> I haven't seen anyone mention it yet or even fix it
<SiFuh> Perl isn't difficult. I did the basic course
<SiFuh> And I have not written anything since in Perl. ;-)
<farkuhar> Whoops, missed another accidental reversal of grep args. Here's the amended version for ukky: http://sprunge.us/6Tbqyu
<farkuhar> SiFuh: what's the annoyance about grep -E?
<SiFuh> I don't know. I will make note of it when it happens again. It happens so much I just ignore it mostly
<cruxbot> [opt.git/3.7]: mutt: update to 2.2.12
<cruxbot> [opt.git/3.7]: poppler: remove JPXStream.h from footprint to fix build errors if openjpeg2 is installed
<cruxbot> [opt.git/3.7]: qemu: enable slirp, add missing keymap patch
<farkuhar> SiFuh: after all that, I'm dying to know which behaviour of the rsync ports driver ukky wanted to change.
<SiFuh> farkuhar: Actually me as well.
DaViruz has quit [Ping timeout: 248 seconds]
<cruxbot> [core.git/3.7]: vim: update to 9.0.1888
stoffepojken has quit [Quit: ZNC 1.8.2 - https://znc.in]
stoffepojken has joined #crux
DaViruz has joined #crux
<cruxbot> [opt.git/3.7]: qpdfview: fix build -> s/qmake-qt6/qmake6, fix dependencies
<cruxbot> [opt.git/3.7]: gvim: update to 9.0.1888
stoffepojken has quit [Client Quit]
stoffepojken has joined #crux
stoffepojken has quit [Client Quit]
stoffepojken has joined #crux
<SiFuh> farkuhar: Ahh, that grep -E nonsense. I think I remember where it comes from. My shell script that I use for git and uses a few of the commands for verify and make signature files before pushing.
<SiFuh> Unfortunately I can't test it right now because the build server is not connected to the network.
<ukky> farkuhar: SiFuh: Thank you for the effort. I will test latest version, http://sprunge.us/6Tbqyu, and report.
<SiFuh> ukky: No me. Just farkuhar
<ukky> Over the years had too many languages to learn. Now I stick only to those I like.
<ukky> SiFuh: You too, as you were testing and forcing farkuhar to make it flawless
<SiFuh> I was teasing
<SiFuh> A good old tease can make or break a day :-P
<ukky> Still, you were running 'sh -x' in your mind
<SiFuh> Actually I admire one thing the most and was the most notable to me. The way farkuhar defined the interpreter
<SiFuh> He used /usr/bin/env ;-)
<ukky> Many script in Gentoo have that line, I was surprised to see it in farkuhar's script too.
<SiFuh> Although using '#!/bin/bash' may seem easy I prefer '#!/usr/bin/env bash' because it makes the script more useable across different systems. Not all systems have a /usr/bin/bash. OpenBSD for example has /usr/local/bin/bash
<SiFuh> ukky: Pretty much all my scripts are that way as well.
<ukky> Exactly.
<SiFuh> I am not a tab or 4 space guy though. Mine re double spaces
<ukky> My company forces to use 4 tabs for all commits, no commits can be made with tabs, unless it is Makefile :-)
<SiFuh> 4 spaces?
samsep10l has quit [Quit: leaving]
<ukky> So, I am used to 4 spaces, 2 spaces for Cmake files. But I personally like hard tabs
<SiFuh> farkuhar: https://www.shellcheck.net/ <-- post your script in there, and check out your huge list of bad forms ;-)
<SiFuh> Bash changed to 2 spaces a few years back
samsep10l has joined #crux
<SiFuh> I had a difficult script to write a few years back and the channel #bash helped out a lot. They also recommended using shell check
<ukky> Will be back in 2-3 hours ...
<farkuhar> SiFuh: no need to use a web form, we have shellcheck-bin in our repos.
<SiFuh> Any good?
<farkuhar> shellcheck-bin gives the same output as the web form, but dumps it straight into the terminal. If your terminal emulator is url-aware, you can easily click any of the urls to get further explanation.
<SiFuh> Last time I tried installing it, it didn't work. But I didn't know shellcheck-bin existed
<farkuhar> I think if you try to build from source, you need a Haskell compiler. But I haven't played around with Haskell enough to justify installing a compiler for it.
stoffepojken has quit [Quit: ZNC 1.8.2 - https://znc.in]
stoffepojken has joined #crux
<farkuhar> ukky warned about the slowdown from implementing pkgutils in bash, mostly when reading a 100k-line text file. My bash translation of the rsync driver suffers a similar fate, because the Perl idiom of testing hash lookups was too finicky for bash to handle.
stoffepojken has quit [Read error: Connection reset by peer]
<farkuhar> I'll keep trying to make it work with bash associative arrays, because that would speed up immensely the final stage of cleanup.
stoffepojken has joined #crux
<farkuhar> Another advantage the Perl script has during cleanup: because the script is compiled by Perl before executing anything, it's possible to do a chroot into a directory that lacks bin/bash. But a bash script interpreted line-by-line as it gets executed cannot do such a chroot.
stoffepojken has quit [Client Quit]
stoffepojken has joined #crux
stoffepojken has quit [Client Quit]
stoffepojken has joined #crux
<farkuhar> shellcheck gave me the missing clue as to why one of the associative arrays was not getting populated correctly. Apparently all the changes were local to a subshell, due to the use of a pipe. To get the desired result it should be a process substitution instead: https://dpaste.com/CWT9AME27
<farkuhar> and this version shouldn't suffer the slowdown of repeatedly running grep on the list of checkouts. This draft is a more faithful translation of the original Perl.
<SiFuh> farkuhar: you are talking about that A && B does not mean C thing I glanced at?
<SiFuh> Hmm, seems you never touched that section. ^-- SC2015 (info): Note that A && B || C is not if-then-else. C may run when A is true.
<farkuhar> SiFuh: I was talking about something else, but you're correct anyway, there's still a logic error at line 34.
<farkuhar> what's supposed to happen is: exit the loop if [ "${nc:0:5}" = "MOTD:" ] || [ "${nc:43}" = "." ] , but bash doesn't make it easy to put that on one line, so it should be expanded to if-A-or-B-then-C.
<farkuhar> s/exit/move on to the next item in/
<farkuhar> that's another advantage of using Perl; these kinds of constructs are easier to code in a way that resembles natural language. You can use parentheses to clarify your meaning, without worrying about spawning a subshell whose effects are invisible to the parent shell.
<SiFuh> This
<SiFuh> After you finish that rsync driver, then there is the pkgutils waiting for you ;-)
<SiFuh> Don't you hate it when you whip together a small simple script then it evolves into something that costs a lot of time and you are never satisified until it is as perfect as possible?
<farkuhar> pkgutils next? Why bother, when emmett1 already has the closest equivalent?
<SiFuh> Wonder if he has an rsync driver ;-)
<ukky> farkuhar: I changed Perl driver and it works. If you see that bash script is too slow, I'd like to adjust Perl driver.
<ukky> chroot should go in my Perl script, as I run 'ports -u' as non-root.
<farkuhar> ukky: I've got some speed improvements in the bash script by now, but if you're satisfied with the Perl implementation then keep using it.
<farkuhar> ukky: what exactly did you need to modify in the original rsync driver, anyway?
<ukky> I am fine with using Perl, just need 'if [ `id -u` = 0 ]; then chroot; cd / ; else cd $ports_dir; fi'
<farkuhar> well /usr/bin/ports is just a bash script, and stenur filed a ticket asking for the [ `id -u` = 0 ] test to be removed. He received a few suggestions, some of which might obviate the need to change the rsync driver in your use-case.
stoffepojken has quit [Quit: ZNC 1.8.2 - https://znc.in]
stoffepojken has joined #crux
<ukky> I modified /usr/bin/ports to run only as 'pkgmk' user when '-u' option is provided
<ukky> So, all collection drivers are running as 'pkgmk' user and cannot do 'chroot' in Perl script
<farkuhar> stenur has a complicated setup involving Linux namespaces, where the `id -u` command is not guaranteed to return the actual uid of the process owner. So any workaround that applies to his use-case might also be of interest to you.
<ukky> `id -u` also does not work for fakeroot user, I need to scan environment too
<farkuhar> for what it's worth, https://dpaste.com/56WHN3LWC is more verbose in spelling out the logical tests, but the lack of concision is a small price to pay for getting the loop to do the right thing.
<farkuhar> I would run a speed comparison to see how it fares against the Perl version, but at this point I don't have any outdated repos to work with :-)
<ukky> I might recover old ports directory from a system where I tested my first CRUX installation :-) It was 6 months ago, so should be pretty old
<farkuhar> Yeah, 6 months of updates should be a good stress test to highlight the difference in speed.
<farkuhar> speaking of old, it's been 12+ months since stenur's ticket got closed. My, how time flies! https://crux.nu/bugs/index.php?do=details&task_id=1852
<SiFuh> I use to enjoy reading stenur's conversations
<farkuhar> He still posts to the mailing list, though.
<SiFuh> I barely read the mailing list. I consider it just disorganized spam.
<SiFuh> Is the mailing list the CRUX digest?
<SiFuh> Because I mean the CRUX digest
<farkuhar> These days the mailing list hardly gets anything besides the automatic notifications when a commit starts with [notify]. It used to be a lot more active 15+ years ago.
<SiFuh> I find it a pain to read because it is just a plain font mess. Who is replying to whom? Why is the next a completely different topic as I scroll down and so on.
<farkuhar> I guess it would look disorganized if you chose to receive messages in digest form. The option to receive individual messages is what you should select, if you want something more friendly to your threading MUA.
<SiFuh> To lazy to type in my 4096 character password to change the settings. Haha
<farkuhar> Your password is 4096 characters and you're not using a password manager to paste it in?
<ukky> farkuhar: do timestamps matter for port files?
frinnst has quit [Server closed connection]
frinnst has joined #crux
<SiFuh> farkuhar: I use gorilla actually
<SiFuh> And I access gorilla with a hardware key
<farkuhar> ukky: you mean are they updated when syncing with the upstream repo? It might depends on the driver you use, but I haven't investigated too closely.
<farkuhar> iirc the httpup driver only compares MD5 hashes, and if they're the same then the timestamps might not get synced.
<SiFuh> farkuhar: Probably faster for me to type the 4096 character password than to insert the key, open the program, unlock it with the key, find the folder, the login, then copy it ;-)
<ukky> no, I mean does rsync (Perl or Bash) driver use timestamps in any way? Should I preserve them for the test?
<farkuhar> ukky: it probably won't matter. Both Perl and Bash are using the same rsync command under the hood.
samsep10l has quit [Quit: leaving]
<ukky> farkuhar: Performance stats: 'real 0m19.266s Bash' vs 'real 0m17.977s Perl'
<ukky> No slowdown
<SiFuh> 1.289 heh
<farkuhar> ukky: thanks for testing
<ukky> farkuhar: should I compare the result between Perl and Bash?
<farkuhar> isn't that what you just reported?
<ukky> I mean list of files/dirs and their content
<SiFuh> Do it la!
<farkuhar> ukky: yeah, probably should, just to be thorough about it.
<ukky> will do
<farkuhar> SiFuh: you were wise to take your personal email address out of your ports collection. I just got my first spam message at the email address I've been using for CRUX stuff.
<SiFuh> take your personal email address out of <-- NEVER GAVE IT ;-)
<SiFuh> I think the only one with my email is deepthought
<farkuhar> well, now it's no longer really an email address, it's just telling the users to contact you in here.
<SiFuh> And the CRUX digest
<SiFuh> farkuhar: Point exactly.
<farkuhar> Hmm, but if you ever post to the mailing list, then the archives on the web can be harvested to get your address.
<SiFuh> I would never consider it
<farkuhar> What's the point of subscribing to a list that you would never consider posting to?
<SiFuh> To read
<farkuhar> But you could do that just by browsing the web archives. Website is a friendlier interface than the digest format, which you complained about above.
<SiFuh> Blame beerman, he suggested I do it
<farkuhar> Are you also going to blame beerman for your choice of the digest format (versus individual messages)?
<SiFuh> After which, I didn't see the point to bother de-registering.
<SiFuh> No...
<SiFuh> Blame beerman != I am blaming him. It means you blame him.
<farkuhar> Anyway, you probably saw in #crux-devel that beerman is not impressed at the updated Flyspray instance, on the matter of spamming the logs (which is different from spam to our email addresses).
<SiFuh> I breifly scrolled through it, yes.
<SiFuh> briefly*
<SiFuh> But he is usually not impressed with something on a weekly basis. Can't blame him though.
<farkuhar> So to do my part in the fight against log spam, I'll sign out and enjoy the rest of the day afk. You and ukky can finish the comparison between bash and perl drivers for ports.
farkuhar has left #crux [#crux]
<SiFuh> Hahaha
<ukky> I am 3 minutes late, so when farkuhar gets back: http://ix.io/4FQh
<SiFuh> ukky: I was looking at the #crux-devel channel about PAM
<ukky> No differences in port collections between Perl and Bash, so I might keep Bash version for now, until I modify Perl to avoid 'chroot'
<SiFuh> Around 19:57
<ukky> SiFuh: I saw discussion about PAM in #crux-devel
<SiFuh> I don't see the point of PAM to be honest. Just bloated
<SiFuh> It should be moved out of core to be honest
<ukky> Me too, but I don't like to express my opinion what should stay and what should go
<ukky> My current 3 CRUX systems are running without PAM and without 'udev'
<ukky> udev is not cut out yet, but daemon is not running
<SiFuh> I think core should contain ONLY the essetials and PAM is not essential. That is my opinion ;-)
<ukky> If devs prefer to have it for some reason, I'm fine. It doesn't take long to uninstall PAM.
<cruxbot> [contrib.git/3.7]: i3status-rust: 0.32.1 -> 0.32.2
<cruxbot> [opt.git/3.7]: gnuplot: add missing patch
lavaball has quit [Remote host closed the connection]
remiliascarlet has quit [Quit: remiliascarlet]
ivandi has quit [Quit: WeeChat 4.0.4]
ivandi has joined #crux
<SiFuh> Installed the new back seat in the back of the Land Cruiser
<ukky> I'd install second safety belt for back seat, just to be on a safe side
<SiFuh> I am pretty strict with how seats are attached. I found a bolt missing. So I took the rear seat out. Safety first. I don't care seat belts but I do care actualy seats. My friend was saying that his friends will bring their own seats. Then we were laughing about how they will choose those plastic seats.
<SiFuh> Anyway, the particualr bolt OEM from Japan, arrived after 4 months, via Estonia. So I installed the seat back in today. You can see it folded up in front of me.
braewoods has quit [Remote host closed the connection]
<SiFuh> The main reason I am very strict about this is my father's best friend was killed in a car my father custom built. My father blames the bolt choice. I know it wasn't the bolt choice. It was the damned sofa he replaced the bench seat at the front of the car with. But still, it weighs so heavily on his conscious, I will not do the same.
<SiFuh> conscience*
<ukky> Cannot get this Perl statement working: if (($> eq 0) and ((not exists $ENV{FAKED_MODE}) or (exists $ENV{FAKED_MODE} && $ENV{FAKED_MODE} ne 'unknown-is-real')))
braewoods has joined #crux
<ukky> Ah, $ENV is empty
<SiFuh> no idea. You didn't paste enough info :-P
<ukky> I also tried to add 'use Env', didn't help
<SiFuh> I though env only lists variables and there is no variable named ENV
<ukky> My objective is to avoid 'chroot' when 'ports -u' is running as non-root user.
lavaball has joined #crux
DaViruz has quit [Ping timeout: 255 seconds]
DaViruz has joined #crux
<cruxbot> [contrib.git/3.7]: pandoc-bin: 3.1.7 -> 3.1.8
<cruxbot> [contrib.git/3.7]: libportal: 0.7 -> 0.7.1
<cruxbot> [contrib.git/3.7]: php-redis: -> 5.3.7
<cruxbot> [contrib.git/3.7]: php-redis: 5.3.7 -> 6.0.0
DaViruz has quit [Ping timeout: 240 seconds]
<SiFuh> Don't care what idiots say, ants are actually stupid.
<SiFuh> They are freaking unorganized and useless with spacial surroundings
<SiFuh> I easily tricked them to take poison over sugar granules and still they manage to choke the entrance, all piled upon each other trying to force their bit of poison into a hole.
DaViruz has joined #crux
brian|lfs has quit [Ping timeout: 258 seconds]
lavaball has quit [Remote host closed the connection]
leah2 has quit [Ping timeout: 260 seconds]
leah2 has joined #crux