649 points · by g0xA52A2A · 7y ago · 144 comments
If those repos are inaccessable for any reason, I have a bunch of hardware that's very hard to do anything useful with.
I know there are such things as apt-caches and squid caches and stuff, but I could really use thing that goes through every apt-get I've ever done and the top 50,000 packages on github and stuffs 'em all onto an SD card and shows me how to use them from my commandline.
OP mentions this as a future direction for the project, but I think it's one of the most important.
squid-deb-proxy can do most of this - it fetches and locally caches lists and packages. Clients install squid-deb-proxy-client which uses multicast-DNS to discover the local proxy.
Packages are fetched and cached by the proxy first time they're requested and thereafter served locally (subject to lifetime/space etc. squid configuration).
There are ways to pre-populate the cache but you're always going to have situations where package updates have to pull from remote archives.
apt-mirror is designed for a similar purpose. It allows creating a sub-set or entire mirror of one or more upstream archives.
Clients can then be pointed at the local mirror which could be on the same host or LAN.
Generally, 'packages' on github will be source-code only so you'd need a quite complex build server, or at least per-package specific links in your local cache rules for pre-built binaries.
https://blog.thelifeofkenneth.com/2018/01/off-grid-raspbian-...
One solution is to do it once only: grab the base image, install all the packages you need, and then make an image of it so you don't start from scratch again next time.
No.
What I want is something closer to Kiwix already on an SD card so even if everything is down, I can read about something I've never been interested in before. But for software.
Will those who receive this bother to connect it to networks? Should I even enable network/GUI for those who want to tinker easily? How should the password be handled?
I'm considering two extremes:
1. A raspbian lite headless system with all unnecessary peripherals disabled and no network features.
2. A full installation, GUI and all with HDMI and network enabled so it's easy for people to play with it if they want.
I'm leaning towards 2 because I think it would be nice to have a clock that auto updates leap seconds and the tzdata db. If I go for 1, that opens up the possibility of using a raspi zero (non-W) for a real BOM and power savings.
As for the password: I'm thinking of having something short and simple other than "raspberry" that the user can/should change. This seems like standard practice with many enterprise systems.
Easily arguable that RPi isn't made with such use cases in mind. I'm all in favor of removing unnecessary bloat if only a small percentage of user base is ever going use it, especially when the software is readily available.
>If those repos are inaccessable for any reason, I have a bunch of hardware that's very hard to do anything useful with.
How so? They are just Linux boxes, you can just download the source code and compile the binaries you need. Pre-built packages are not necessary for functional OS.
What about dependencies? If you have the internet access required to download the source code I'd say you'd be better off just using the repos.
a) define your entire system state and dependencies in a single, declarative file
b) prebake an image based on this file
It's all done and ready, available now, no hacking around required.
But a bigger question for the ergonomics of NixOS: Are NixOS and Nix prebuilding for ARM now?
None of them provide native, single-source-of-truth declarative configuration that is easy to reason about, pure, and guaranteed to deliver sane results every time (vs. something managed via a classic CM system). Oh, also one that it symmetrical to the way the distribution itself is built and managed.
> But a bigger question for the ergonomics of NixOS: Are NixOS and Nix prebuilding for ARM now?
Yes. https://nixos.wiki/wiki/NixOS_on_ARM/Raspberry_Pi
Ports to other ARM devices are also very easy.
The issue with NixOS for me was probably quality control. When I did an update and instead of fetching the files from the binary cache it starts to build stuff on its own, I could be reasonably sure that some build error happens. Coupled with sparse documentation, I was very often at a loss at how to fix it and just had to remove the package for a while and try again a couple of days later.
Another point is NixOSes path mangling... Do we really need that? Can we not try to use namespaces and OverlayFS etc. to let each process assume it has a normal FHS file-hierachy while in real its 'root' is cobbled together from multiple package installation directories? Instead of patching the paths of every package, letting the kernel do the path calculations seems to be less intrusive.
(B) is probably accomplished with any OS.
As to caching, I tried setting one up and found out a few things.
I originally tried apt-cacher-ng:
https://www.unix-ag.uni-kl.de/~bloch/acng/
but had trouble (can't remember exactly what) and muddled through polipo instad.
I found out:
- it was a lot easier and faster than copying cached packages around
- when doing "apt-get update; apt-get upgrade" the cache really sped up multi-machine updates. The first machine was slow, the rest were fast.
- By far, the majority of cache traffic was for updates to base stuff. foo-1.2, foo-1.2.1 foo-1.2.2, etc.
- second was prerequisites for packages I needed.
- the few specialized packages I used were not updated as frequently.
Want to have an offline copy of software on Windows? Go download all of the installers from their respective sites. Want it to constantly update - that's gonna be about 100 lines of Python code. And better make sure they're the "offline" installers, not those idiotic stubs that just dl the latest version for a server. Also don't forget about all of the 20 different VC++ runtimes that are sometimes not packaged in the installer.
I have a feeling it would be even harder on macOS.
(all of this is of course ignoring the legal issues of distributing those files - which is generally not an issue on Linux)
All software is most definitely not in one repo. If it were, people wouldn't have to use PPAs or compile from source and deal with all the problems those things cause.
> better make sure they're the "offline" installers, not those idiotic stubs that just dl the latest version for a server
Oh, you mean the ones that aren't just acting like apt.
> I have a feeling it would be even harder on macOS.
Depends, but MacOS software that uses Application Bundles should be fine. Even a lot of Windows software works fine if you just copy the installer contents to a directory. Self-contained application directories (or single files) are an old as dirt concept that Linux communities never got behind, preferring instead to use overly complicated schemes like package management that come with a bunch of their own problems. So many, in fact, that people are now often distributing applications in Docker images.
Which OS handles this better, in your opinion?
I've built most of the base repository of Arch Linux on my RPi4 without cross compiling. I'm buying a few more so that I can go 'full Gentoo' and pretty much rebuild the world.
Have a recording of a container booting from a rebuilt userland: https://asciinema.org/a/283303
It might feel like the ARM packages are somehow special but really only the blobby bits like the RPi firmware is. Everything else is just your bog standard armv7/aarch64 ELF.
So yeah, back up a GCC binary or bootstrap, I guess? I can probably email you a tmux binary in a pinch, plus I have a full local mirror of the repo for the apocalypse? :P
They help you maintain a stable software stack over time. And generate a fully contained software image that can be flashed without needing the internet afterwards. (All downloads happen during compilation)
I'm pretty severely on the noob end of the scale when it comes to software, so I don't know if maintaining a new distro for myself would make sense, since all the tutorials I'm following assume I have Raspbian and all its built-ins available to me.
But maybe in the post-apocalypse, some hero with a prebuilt Rasp-yocto will rescue all our useless boards.
Personally I find it almost magical that I can install and update almost any software I need with a short command.
Imagine that you can build your rootfs is a docker container and export it to IMG
I also cannot begin to understand how can a <body> tag's class definition can take 4400 bytes. In what kind of situation do we need to apply 146 CSS classes to the <body> tag ?
Since it's due to the squarespace, I wouldn't really characterize this as "third-party" javascript per se, but I agree it's annoying the page needs javascript to even render. Boo on squarespace.
If you don't want to enable all third-party scripts, try uMatrix (https://chrome.google.com/webstore/detail/umatrix/ogfcmafjal...). It has very fine-grained control over what assets you allow from where (it's why I knew offhand this was squarespace). A warning though: it's got a bit of a learning curve, and depending on how restrictive you want things, you will probably end up spending a fair amount of time un-breaking the internet.
Needing third-party scripts isn't necessarily evil in my mind though--aside from squarespace-like cases where a page loads scripts from the underlying platform (squarespace, or custom domains on top of medium), the other common case I see is loading scripts straight from cdnjs or similar. Is it really evil or insecure to load jquery from cdnjs?
.site.page-loading { opacity: 0 }
I used the developer tools in Firefox to disable that one and the page was instantly viewable without JavaScript.That's right, the site uses CSS to hide all the content and then presumably reenables it somewhere in the gobs of JS, maybe after its loaded whatever other analytics/tracking crap there is. Absolutely vile.
Can we stop whining about how people choose to present their work and instead discuss the (in this case, really cool) work instead?
I haven't actually checked the site in question (on mobile, kinda tricky), but isn't this OK as long as a subresource integrity hash is used?
I really like that I can still use HN on this phone, but it's more and more frequent that I cannot open the links themselves.
Yup, this is why I come to Hacker News.
Thar Netgear switch will cut through your onboard battery like a bullet. You'll absolutely need a larger battery if you flip that switch on.
In the end, I just found that portable wifi solutions to be more power efficient.
If it's grounded you need very little material. The most important factor is the largest gap in the cage, which dictates the longest wavelength that is passed. Look at microwave oven meshes to see a size of gap that blocks slightly above 2.45 GHz.
It'll do very little. There is a paper authored by US army talking about various EMP protection measures. The minimum reliable protection there is a 12mm thick (half inch) mild steel container with a lead seal.
This is why if there is ever a nuclear war the vacuum tube equipment will be the only stuff that survives.
Salt in air from moisture is also a major issue. I have lost many RPi from the sea air.
After the first bike, he started putting a cover over them, but it didn't help much.
Any ideas on what might help reduce corrosion? (he doesn't have a garage, and building one isn't an option).
For some reason cars seem to be mostly OK there, it's just motorbikes that are badly affected. Obviously the parts that can be painted, the parts that aren't stainless steel, are paintee.
This guy shows that a box of aluminum foil drops EM by at least 40 dBm. Chicken wire is more like 20.
My intuition would be that the lid doesn't seal that good as it is. For long-term storage that's easily fixed by putting the shielding on the outside and gluing it shut with copper tape. Maybe you could instead add some copper-lined magnetic flaps that close the gaps.
Caveat: I have not attained reception yet, because of obstacles.
The North America kit comes with:
- Low Noise Block Downconverter (LNB) antenna, capable of Ku-Band reception of the SES-2 satellite. Must be pointed very accurately: elevation, azimuth AND rotating for polarization
- Crappy little tripod, good enough to get started
- An acrylic laser-cut LNB collar to hold the antenna on the tripod, which I immediately snapped.
- A 1GHz arm based board with embedded software defined radio.
- An 802.11n dongle.
Here's a youtube overview of the desktop environment: https://www.youtube.com/watch?v=9TuNVC0Vw2Y&t=281s
Basically, the board receives compressed tar files in the data stream and caches them on a secondary microSD card. You access that content with various linux desktop apps served over a webdesktop.
It also receives APRS signals, which can be really handy in situations of truly catastrophic disaster.
In other words, they're shaping the perceptions for you, rather than giving you the raw data to decide for yourself.
You can view some folks online feeds[0] to get a feel for what data they let you see.
...where the high humidity and salt air of the ocean would corrode the heck out of it. The author mentions that it has air vents.
A Panasonic Toughbook would be a far better choice.
[0]: https://en.wikipedia.org/wiki/Wikipedia:Database_download
Extra its not reliant on external power, periphials, and is very water resistant and environmentally sealed (the main / only benefit over just a laptop)
Have you ever used ortholinear layouts? (I have not). I've heard they aren't as weird as you first expect, and you can get used to it fairly quickly.
The raised lettering looks nice at first but I think might be rather prone to damage; inset/engraved would be preferable.
Just looked more closely at the photo. That is a pretty unorthodox layout for a 40% keyboard! (having a number row on the default layer)
Higher res picture of the keyboard: https://images.squarespace-cdn.com/content/v1/5caa4adb92441b...
It's hard to say exactly how this one is configured, because it looks like a custom layout. The kit can be found here: https://5z6p.com/products/plaid-through-hole/
Since 1999 I've been 'printing to PDF' all the great stuff I've read on the Internet. As a result, I have an 36gigabyte archive of PDF files.
I'm going to make one of these ultimate boxes, and put my archive out in the wilderness, up a mountain, behind my hut in a deep, dry hole in the rock.
That way I'll always have something great to read when I get up the scrag. ;)
[0]. https://en.wikipedia.org/wiki/Internet_Radio_Linking_Project
At least, that’s the sfw version.