<farkuhar>
ukky: no problem. On the subject of cross-compilation and SYSROOT, I wonder if you've ever been bitten by the bug in pkgadd symlink handling (FS#15). I can imagine that bug being triggered by a symlink on a mounted volume that points to an absolute path, if you're running pkgadd with the -r option.
<farkuhar>
Since the chatter in #crux-devel is suggesting that our Flyspray instance might soon become read-only, now's your chance to take a crack at that long-standing bug and post one last comment.
<ukky>
Reproduced FS#15, weird indeed...
<farkuhar>
http://ix.io/4s0B <- This is where I left it several months ago, after a first round of investigation. I haven't revisited it since then, or even done much testing of the patched pkgadd.
<farkuhar>
It's a shame the mailing list discussion back in 2006 ended up merging the two issues that jw mentioned in the second FS comment. If they had devoted all their energies to one issue before moving on to the other, both bugs might have been squashed long ago.
<ukky>
Some bugs tend to be less annoying/important to fix, so priority to fix them drops
<ukky>
Unrelated to FS#15 nor FS#63: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
<ukky>
That means we cannot update glibc (toolchain) without updating pkgadd/pkgrm/pkginfo.
<farkuhar>
I'll take a page out of ivandi's playbook and suggest that prtcheckmissing is a better place to address FS#63. All it would take is to loop through the installed packages and compare their footprints with what's on the filesystem. You'll get false positives if you ignore the pkgmk warning about MISSING files, but splitting the prtcheckmissing output into two sections (missing versus permissions changed) should suffice.
<farkuhar>
false positives because the current source of truth, /var/lib/pkg/db, is populated by the contents of the built package. If prtcheckmissing is told to use footprints instead, then anything ignored as MISSING will be flagged, and anything ignored as NEW would not be searched for during the filesystem scan. It's a flawed solution, but it's the easiest way to make prtcheckmissing aware of the expected permissions.
<ukky>
farkuhar: here is my best patch for FS#15. Tested on Pkgfile attached to FS#15. http://ix.io/4FDS
pitillo has joined #crux
<cruxbot>
[opt.git/3.7]: gnuplot: update to 5.4.9
<cruxbot>
[opt.git/3.7]: qemu: add several optional dependencies
<cruxbot>
[core.git/3.7]: iproute2: update to 6.5.0
<farkuhar>
ukky: cheers. I look forward to testing it.
<ukky>
The patch only deals with mixed directories, regular files, and symlinks between installed packages. The issue with premissions (FS#63) is not fixed, if it is still there.
<farkuhar>
ukky: to fix the permissions issue in pkgrm itself requires a richer database than /var/lib/pkg/db. I'm working on prtcheckmissing to insert another subroutine identifying files with wrong permissions.
jue has quit [Quit: leaving]
<SiFuh>
jaeger: Today was suspension shopping. "Why you looking for new suspension?". "Check this, it bounces like a prostitutes bed". The garage just turned into a comedy festival.
ivandi has quit [Ping timeout: 245 seconds]
<SiFuh>
Spent probably 5 hours joking with them, and talking truck stuff.
<SiFuh>
It was actually pretty good for a change
lavaball has quit [Remote host closed the connection]
<farkuhar>
ukky: Here's my working prototype for prtcheckmissing. http://ix.io/4FEp Needs to be called from a symlink that ends in "perms", otherwise defaults to the original behaviour.
<SiFuh>
nice
<ukky>
farkuhar: prtcheckperms detects permission differences for me
<farkuhar>
ukky: it does for me too, but nothing too alarming found so far.
<farkuhar>
ironically I forgot to handle the special syntax that footprint uses for symlinks. Inserting $file =~ s/ ->.*$//; after chomp($file); should fix it.
<ukky>
An example what it found: The GID for /etc/cups/ is set to 'lp' by cups port. But cups-filters set it to 'root' GID. That is not important, but still, your tool detects it.
<cruxbot>
[contrib.git/3.7]: gpgme: include static library
<cruxbot>
[opt.git/3.7]: libassuan: include static library
<farkuhar>
ukky: thanks for testing. We might be lucky and get FS#63 and FS#15 both closed before Flyspray is archived as read-only.
<ukky>
When I tried LFS for the second time I used a install system, where each port file had unique UID/GID upon install, and every shared directory in a system had a sticky bit set.
<ukky>
This way other ports cannot change ownership/permissions if it is not allowed to do so.
<ukky>
IMHO, moving the resolution for FS#63 outside of pkgutils is better than changing the format of /var/lib/pkg/db
<farkuhar>
http://ix.io/4FET <- second draft, with symlinks taken into consideration
<ukky>
farkuhar: Should the script detect FS#15, i.e. /usr/var as symlink vs /usr/var/ as directory. Symlink has no trailing forward slash though in 'db' file
<ukky>
^ That was a question, not a statement.
<farkuhar>
ukky: Test it out and report back what you find.
<farkuhar>
on my system there's no conflict detected; /usr/var is exactly the symlink that the filesystem port says it should be.
<ukky>
If you install port content (Pkgfile from FS#15 attachment), the script does not detect that the live system has symlink instead of a directory. Should there be a report?
<ukky>
I think we might be overreaching...
<farkuhar>
Maybe, but it's a good habit to imagine all possible failure modes. I'll take another look at the Pkgfile attached to FS#15.
<ukky>
Test Pkgfile creates directory $PKG/usr/var/foo. There will be 'usr/var/' directory in the '.footprint'
<farkuhar>
Good point, ukky. That might trigger a false alarm with prtcheckperms in its current state.
<ukky>
idunno if we should detect this, though. KISS might be a better/proper approach here.
<farkuhar>
ukky: I agree. Having just tested the FS#15 Pkgfile with my latest prtcheckperms, there's no warning issued about usr/var/. If FS#15 is genuinely resolved by your patch, that would prove that the two problems had independent solutions all along. Merging them into one thread was an unnecessary detour for the 2006 CRUX team.
<ukky>
farkuhar: Your script does not detect differences because for 'filesystem' port, file name is 'usr/var', but for test Pkgfile file name is 'usr/var/'. i.e. two different names
tilman has quit [Ping timeout: 255 seconds]
tilman has joined #crux
dim44 has quit [Remote host closed the connection]