This branch of a2server only supports jessie and above, either Raspbian
or Debian. While I was at it, I simplified the tests for what is and is
not a supported OS. If there are bad kernels or firmwares we need to
work around those should be fixes. This also means giving the user an
option to interrupt the installation if they are trying to install on a
Debian(ish) system that is too old or (more likely) too new.
At least ivan.sh is now using a2cloud's system_ident script.
- Added bash check to install.sh
- Switched to using top_src instead of a2sSource (not yet in ivan.sh
subscripts)
- Added processing of -y and -c flags to install.sh ala a2cloud
- Put the intro blurb and continue question in install.sh (didn't remove
the one from ivan.sh yet as it serves as a useful way to test things
about to be in progress and stop after them…)
- Added the fixup script, currently empty for a2server, but ohh will
that be changing!
- Added the show_changes script. It doesn't do a whole lot for a2server
just like it doesn't for a2cloud yet. To be addressed. Higher
priorities right now.
- Fixed a bug where fresh installs would say that upgrading from your
version of a2server wasn't supported anymore.
We really, really, really should not be changing people's passwords.
It's a no-no. And certainly we shouldn't be changing them to something
obvious and unsafe. So stop doing it!
We need a more robust way to detect whether netatalk is installed or
needs to be installed, the current check by a2server version isn't very
reliable anyway, assuming that netatalk will always be hand-compiled and
never upgraded. But for now at least, let's fix my idiot mistake.
Legacy code in the remaining scripts to have them run from the website
using a2sDevel detection has been purged. That doesn't mean everything
now runs locally always—that's going to require a finer pick through the
code I haven't done yet. This is a start though, and doing it found a
couple of bugs I've managed to fix already.
I really just intended to change a2sDevel to a2sSource and rewrite the
lines that used it. It became a bigger rewrite with more verbose
documentation text.
Redefining a2sSource to be the top source directory throughout, and I
just wrote this index.txt that doesn't follow that convention. Fixed
that and removed some unnecessary directory switching in the shell
script since the closest we need to get to being in a particular
directory is when we extract the tarball, and tar takes arguments for
that.
Also made the temp dir we create actually be a2sSource for simplicity.
New standalone script for comparing two #.#.# format version strings
using standard functions included with python. We also benefit from the
fact the python function is more flexible than my bash function and it
keeps the logic of a rather high-level script high-level.
This commit goes with the previous one—the commit is in two pieces so
that git can tell that this new index.txt isn't just a modification the
old one, but rather a totally new file.
This script supports being run as the installation entrypoint when
downloaded as part of the one-line web install (though it'll tell you
that you should install it the "more proper way"), but doesn't run from
inside the source tree.
The new script actually solves a race condition that could happen if
someone were installing literally while the repository was being
upgraded. You might find new versions of say a2server-5-netboot
being downloaded and run which depend on an a2server-3-sharing that
didn't get upgraded. The new index.txt will always download all of the
scripts together in a cohesive revision at once.
The only possible code version mismatch now is between index.txt and
everything else, and the only updates planned for index.txt going
forward are textual changes telling you how to download the tarball and
run the installer yourself.
Don't put this commit into production, it breaks the one-command web
install from Ivan's website!
Basically by renaming index.txt to ivan.sh we can replace that script
with something like the new update script that basically tells you not
to install a2server that way anymore. The next commit will have the new
script that does that, but git doesn't realize the new script is a
complete rewrite without at least one commit where the file changes name
but doesn't disappear to track the renamed object.
Rewrote this script—when run, upgrades will always happen from a local
tree, even if the script has to download a tree to /tmp to do it! This
maintains an upgrade path from the a2server-update in Ivan's tree, but
allow us to phase out that kind of thing because it's insecure.
This is still effectively chipping away at the old structure, but it's a
pretty sizable chip for one new script. Granted, that's because the old
update script didn't really do a whole lot. *shrug*
The next chip should do similar to the one-line installation from Ivan's
website. Once we have that, we can remove the need for scripts to
download files one at a time. That won't remove much complexity
admittedly, but it'll remove some of it and every bit helps at this
point.
If you're installing a2server out of the source directory (eventually to
become basically the way you do it), this script is going to become the
way you do that. For now it just runs setup/index.txt. As we go
through things, we'll move them out of the existing scripts and into a
more modern/modular layout.
Bumping the version to 1.9.0 so we can start working on what will become
the 2.0.0 release. No other changes here, just trying to create some
space in case Ivan does any more stuff with his branch is all.
Ivan added support to build everything on Debian/Raspbian stretch, added
some alternate URLs, and updated the "just how the hell do you install
Marinetti right now exactly?" dance.
This was more frustrating to merge than it honestly should've been and
I'm kinda responsible for some of that, but it's never gonna get easier
to maintain unless we break from the single-developer monolithic blocks.
Hopefully this will be the last time we do things this way.
suppress null byte read warnings in Bash 4.4
enable SSH server on Raspberry Pi if disabled
Internet Archive backup URL's for external downloads, where possible
compiles AppleTalk kernel if -c flag is specified, rather than downloading
better cleanup after AppleTalk kernel compile
notification if AppleTalk kernel module doesn't load
fixed download links for communication software
fixed bugs possibly preventing compile of macipgw and ciopfs
fixed minor bugs during initial setup prompts
os option (Raspbian update) removed from a2server-setup
A2SERVER's setup no longer takes the -os or os arguments (the security
paradigm shift suggests this is unnecessary and even unwise), and it's
time to actually install the debupdate script.
Still need to polish this a bit, but I think I'm happy with its
functionality. This will replace raspbian-update. It's simpler, more
transparent about what it is doing, and generally less likely to go
wrong doing what it does.
The one little bit of magic is that it bails out after an update if
there's nothing to install, mostly to avoid suggesting that you reboot
your system if there is nothing to install. Might not be worth it for
that on armv6-based Raspberry Pis.
The replacement update mechanism will be a script installed on your
system. The advantage of downloading the update mechanism before
running it is that it allows you to upgrade the upgrade mechanism.
Naturally the disadvantage is that you have to download it. Debian
systems have a mechanism for this; we'll use it.
The developer information about how you can specify the source for
scripts and binaries has been having some problems, including for
upgrades. The decision not to support upgrades from wheezy makes it
easy to stop supporting wheezy's upgrade mechanism and begin the
migration toward doing it right. Doing it right places much greater
emphasis on upgrade security and integrity.
The developer side of this was that the scripts ran themselves straight
off a web server. That's just a problem in general, and it too will be
fixed shortly.
The downloading of binary components is the last thing... The right way
to do this is follow the lead of @dschmenk and package this stuff
properly which gains us much of that upgrade integrity/security I spoke
of. That'll be a multi-step migration of its own.
This will be documented as it is implemented, but here's a heads up.
This script well predates wheezy, and we certainly won't support
upgrades from pre-wheezy at this point. Actually, I've made the
decision not even to support upgrades from wheezy in A2SERVER itself,
properly speaking. We'll see if we can write an external upgrade script
(much like this one) to help make transitions a little better, but
that's the best we're going to be able to do here.
It's understandable why you might want to pull this off a server in case
how you have to upgrade things changes for some reason, but we're moving
toward following Debian's lead on these things to the greatest extent
possible.