Re: [Toybox] today in "shut up, gnu!"

2024-04-15 Thread enh via Toybox
i'd been deliberately _not_ sending you
https://www.phoronix.com/news/GNU-Coreutils-9.5-Released for fear of
winding you up :-)

On Sat, Apr 13, 2024 at 7:34 AM Rob Landley  wrote:
>
> On 4/12/24 13:24, enh via Toybox wrote:
> > ~/aosp-main-with-phones$ find external/ -name NOTICE -type l -maxdepth 2
> > find: warning: you have specified the global option -maxdepth after
> > the argument -name, but global options are not positional, i.e.,
> > -maxdepth affects tests specified before it as well as those specified
> > after it.  Please specify global options before other arguments.
> >
> > (it does do the right thing, but insists on whining first.)
>
> I've hit that too, and am big into Not Doing That. Thought I'd blogged about 
> it,
> but it could have been irc, or twitter (which I deleted when twitler bought it
> but have an archive I should probably post somewhere), or... probably too old
> for mastodon?
>
> There's a reason I get so exasperated about each new gnu/nag I stub my toe on.
> It's gone beyond isolated incident into "pattern of looking down on everyone
> else and sneering".
>
> Unix has always been a silent protagonist, without which shell scripts are a
> pain to do. If it doesn't work, they'll figure out why. Just behave 
> consistently
> (according to SOME kind of understandable logic) and let them keep the pieces.
> Sometimes there's a -v flag to activate printfs() stuck into the code, but 
> don't
> express opinions when they didn't ASK. (Put them in the man page or --help if
> it's that important.)
>
> This has ALWAYS been the unix way. There are ALWAYS corner cases, and
> deterministic behavior is not difficult to debug. The gnu/FSF never got that.
> Stallman only decamped to unix under protest, a refugee from the Jupiter
> project's collapse orphaning ITS, and he never really understood it.
>
> RMS did not INVENT the idea of cloning unix with his big announcement in 1983.
> Unix was a diverse community starting from the 1974 ACM article, let alone the
> Berkeley Software Distribution in 1975. The first full from-scratch Unix clone
> (writing their own kernel, compiler, and command line) was Coherent, which
> shipped in 1980. Paul Allen copied subdirectories and file descriptors from 
> unix
> into DOS 2.0 not long after. Minix started in 1983 and shipped in 1986, and
> Linux is 100% a descendant of Minix (developed on minix, its first filesystem
> was minix, the development discussion on comp.os.minix, he inherited 80% of 
> the
> minix community because he took patches and Tanenbaum didn't...) There's a
> famous tanenbaum-torvalds debate preserved for posterity, there is NOT a
> stallman-torvalds debate because nobody cared what stallman had to say.
>
> Nor did he invent freeware, which was the universal norm before the Apple vs
> Franklin decision in 1983 because you couldn't copyright binaries before Steve
> Jobs got the appeals court to change the law. Byte and Compute magazines had
> basic listings in the back of each issue for you to type in, decus and CP/M
> northwest had software libraries, the commodore 64 came bundled with a disk of
> Jim Butterfield's software but he didn't WORK for them: he founded the Toronto
> Pet User's Group (TPUG) and published free software with source code.
>
> But Stallman mansplained at everyone else at the top of his lungs nonstop from
> the moment he showed up, and there are all sorts of topics that can't NOT have
> an "as opposed to what stallman's saying, the truth is" section today...
>
>   https://en.wikipedia.org/wiki/Freeware
>
> Sigh, watching https://youtu.be/2gOGHdZDmEk and https://youtu.be/WWfsz5R6irs 
> and
> https://youtu.be/9RO5ZAmzjvI every time the narration talks about Pierre 
> Spray I
> get Stallman vibes. There's a broadcast version of Dunning-Kruger where you
> plausibly preach to an audience who doesn't know better, and become The Expert
> that everybody must get a quote from every time something happens in that 
> area,
> while the people actually doing the work facepalm at every third word.
>
> Rob
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


[Toybox] df not working on FreeBSD

2024-04-15 Thread Vidar Karlsen via Toybox
Hello,

df throws the following error on FreeBSD:

root@140amd64_noopts-usrports:/usr/local/toybox/bin # ./df /
df: getmntinfo: Invalid argument

A little bit of poking around shows that getmntinfo expects the second
argument (the mode) to be one of these, and not 0:

sys/sys/mount.h:
#define MNT_WAIT1   /* synchronously wait for I/O to complete */
#define MNT_NOWAIT  2   /* start all I/O, but do not wait for it */
#define MNT_LAZY3   /* push data not written by filesystem syncer */
#define MNT_SUSPEND 4   /* Suspend file system after sync */

Changing 0 to MNT_NOWAIT in portability.c makes df happy again.
diff --git a/lib/portability.c b/lib/portability.c
index 83382d1d..a677173e 100644
--- a/lib/portability.c
+++ b/lib/portability.c
@@ -65,7 +65,11 @@ struct mtab_list *xgetmountlist(char *path)
   int i, count;
 
   if (path) error_exit("xgetmountlist");
+#if defined(__FreeBSD__)
+  if ((count = getmntinfo(, MNT_NOWAIT)) == 0) perror_exit("getmntinfo");
+#else
   if ((count = getmntinfo(, 0)) == 0) perror_exit("getmntinfo");
+#endif
 
   // The "test" part of the loop is done before the first time through and
   // again after each "increment", so putting the actual load there avoids
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] Microsoft github took down the xz repo.

2024-04-15 Thread Jarno Mäkipää
On Sun, Apr 14, 2024 at 9:14 AM Oliver Webb via Toybox
 wrote:
>
> To revive a old thread with new technical info I stumbled upon:
>
> On Saturday, March 30th, 2024 at 15:58, Rob Landley  wrote:
>
> > I set up gitea for Jeff on a j-core internal server, and it was fine except 
> > it
> > used a BUNCH of memory and cpu for very vew users. Running cgi on 
> > dreamhost's
> > servers is a bother at the best of times (I don't want to worry about 
> > exploits),
> > and the available memory/CPU there is wind-up toy levels.
> >
> > My website is a bunch of static pages rsynced into place, some of which use
> > xbithack to enable a crude #include syntax, and that's about what the 
> > server can
> > handle.
>
> Going through the list of "minimal tools" on https://suckless.org/rocks/, I 
> stumbled
> upon a git frontend called stagit 
> (https://git.codemadness.org/stagit/file/README.html)
> which the suckless project uses as it's git frontend. And from looking at it, 
> works purely
> via static pages and is fairly minimal (2000 LOC in pure C with only non-libc 
> dependency being
> libgit2. One of it's "cons" is that it's "slow on repo's with 2000+ commits 
> due to diff
> generation", And then says that it takes 3s to run on a repo with 1500 
> commits). Have you considered it?
>
> The main downside of it is that it's MIT Licensed, which means if you wanted 
> to bundle it
> in with the main repo there could be be licensing kerfuffles to deal with.
>
> But to have a solution, you must have a problem. The 2 main issues I have 
> with the current git management
> are the fact there doesn't seem to be a way to clone the current repo 
> directly from landley.net (Making Microsoft
> GitHub the middleman). And the fact I can't browse the source code without 
> github or android code search acting as
> the middleman (This is a problem I've actually ran into on networks where 
> github is blocked for some utterly insane
> reason, meaning I have to go to android code search to read through the code 
> occasionally).

have you tried cloning the repo? seems to work fine to me.
$> git clone https://landley.net/toybox/git/ toybox

>
> The first of these seems near impossible to solve with _only_ static 
> webpages, since a git server is not
> a static thing. I don't know yet tho.

Git repo with read-only access over http(s) is a static thing. you
dont need dedicated git spesific server software in order to give
simple pull access. Just host your git folder with any generic
http/https server that can host folder of files and knows atleast
simple GET request.

https://dev.to/chr15m/git-hacks-self-host-a-minimal-git-repo-over-ssh-388h

so you can just serve your git folder with any http server (example
with bloated python3. httpd should work fine but needs more setup)
$>python -m http.server --directory whereever/mybare_repo.git

then clone
$>git clone http://localhost:8000/ test

> The second one seems easier though, copying or maybe symlinking stuff from 
> the source directory with "find"
> in a pipeline with bash to make a simple, browse-able tree would take 
> probably take a few dozen lines of
> at most, It could also probably just be an rsync command if you don't want to 
> worry about listing out directory
> contents.
>
> Both of these problems are remediable now, but in a year they might not be 
> (ProtonMail just said "If you
> don't sign in for a long enough time we will delete all your data" like 
> Google drive is doing, it's not
> hard to imagine Microsoft GitHub doing a similar thing with accounts they 
> locked out by their 2FA crusade)
> Rob, Are you interested in future-proofing the codebase from whatever GitHub 
> and AOSP decide to do? This is a situation
> where I'd normally create a patch and let Rob decide whether to apply it or 
> not. But since I probably shouldn't
> put the source tree inside the commit/ folder, and this operation can be done 
> with a fancy rsync invocation
> I'm not sure if writing any code is the correct solution.
>
> Thanks,
>
> -   Oliver Webb 
>
>
> ___
> Toybox mailing list
> Toybox@lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net

Jarno
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net