Commit Graph

304 Commits

Author SHA1 Message Date
T. Joseph Carter e499a3db46 I thought I already fixed a2serverVersion 2018-09-09 16:01:54 -07:00
T. Joseph Carter 5010a496e6 Simplify OS support checks
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.
2018-09-09 11:10:00 -07:00
T. Joseph Carter a033151c66 Merge branch 'master' of https://github.com/RasppleII/a2server 2018-09-09 10:50:49 -07:00
T. Joseph Carter f9b11b6dde Change a2sSource to top_src in subscripts 2018-09-08 19:09:15 -07:00
T. Joseph Carter 98ed939e9f Have ivan.sh get version from install.sh 2018-09-08 19:08:24 -07:00
T. Joseph Carter f1b141bd9c Move 1-storage fixup code to fixup
1-storage included a block that moved /media/A2SHARED (which was a nono
for us to use under FHS) to /srv/A2SERVER.  This has now been moved to
fixup.
2018-09-08 18:49:52 -07:00
T. Joseph Carter d71b2a4048 Merge branch 'refactor' 2018-09-07 15:07:40 -07:00
T. Joseph Carter 16e1306dbb Cleanups for consistency with a2cloud mostly
- 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.
2018-09-06 13:35:01 -07:00
T. Joseph Carter 7d3ae1d200 Stop changing people's passwords!
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!
2018-09-01 16:57:40 -07:00
T. Joseph Carter 6229dba43f Fix stupid logic error bug
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.
2018-09-01 16:03:42 -07:00
T. Joseph Carter f3ae970d37 Make creating /srv/A2SERVER more robust 2018-09-01 15:37:44 -07:00
T. Joseph Carter 33d1d058ba Dunno when I messed this up, but let's fix it 2018-04-12 00:00:37 -07:00
T. Joseph Carter c7d64f692c Merge remote-tracking branch 'origin/master' into refactor 2018-04-11 07:03:45 -07:00
T. Joseph Carter aaea9245de All scripts now run from source dir
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.
2018-04-11 06:59:48 -07:00
T. Joseph Carter 7079684744 Fix typo in 2-tools preventing help installation 2018-04-11 06:54:24 -07:00
T. Joseph Carter 5e709f0e2e Rewrote 2/3 of update/index.txt
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.
2018-04-11 06:34:52 -07:00
T. Joseph Carter e9c53fae66 Make index.txt use a2sSource convention
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.
2018-04-11 04:32:01 -07:00
T. Joseph Carter 2b52ad8429 New script compare_version
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.
2018-04-11 04:07:01 -07:00
T. Joseph Carter 9382387000 Make ivan.sh require source tree 2018-04-11 04:07:01 -07:00
T. Joseph Carter 20bf50bc98 Add new index.txt script
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.
2018-04-10 22:14:28 -07:00
T. Joseph Carter 7aae31fda7 Rename setup/index.txt to setup/ivan.sh
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.
2018-04-10 22:08:43 -07:00
T. Joseph Carter 82183ad909 Merge branch 'master' of https://github.com/RasppleII/a2server into refactor 2018-04-10 21:56:19 -07:00
T. Joseph Carter 923a86899e New update/index.txt
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.
2018-04-10 21:56:04 -07:00
T. Joseph Carter cb7b429927 Make install.sh work if run outside its path 2018-04-10 19:23:47 -07:00
T. Joseph Carter 106555bc95 Accidentally deleted a fi, fixed
And that's how I know nobody else has tried to run this yet.  :)
2018-04-10 15:26:10 -07:00
T. Joseph Carter 099eccd9da Pass args to install.sh on to setup/index.txt 2018-04-10 06:31:35 -07:00
T. Joseph Carter 14058b1990 Add worthless (but usable) install.sh
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.
2018-04-10 03:36:00 -07:00
T. Joseph Carter 456ed6e721 Bump version for development
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.
2018-04-10 02:59:54 -07:00
T. Joseph Carter 04974d7e03 Add an .editorconfig 2018-04-10 01:55:54 -07:00
T. Joseph Carter 45c00cb920 Merge branch 'ivanx-1.5.x'
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.
2018-04-09 18:51:26 -07:00
Ivan X 5e0feab69c support for Debian and Raspbian Stretch
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
2017-11-26 16:37:44 -05:00
Ivan X a3a7a9479d set internal version to 1.5.1; expanded version history 2017-10-29 05:21:55 -04:00
T. Joseph Carter a939111f6a Return error code when running as user 2016-12-09 14:11:54 -08:00
T. Joseph Carter 02ebf26cf2 Add CC0 1.0 Universal legal code (COPYING_CC0.txt) 2016-12-09 09:37:35 -08:00
T. Joseph Carter 14a9adf673 Remove raspi-config wrapper
Mathcing A2CLOUD.
2016-12-09 09:32:03 -08:00
T. Joseph Carter 15027e8423 Replace raspbian-update; remove -os from 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.
2016-12-09 07:20:27 -08:00
T. Joseph Carter 4cba6ff2c0 debupdate: Clean up logic a bit more 2016-12-08 21:53:00 -08:00
T. Joseph Carter 23a8d1ca0d debupdate: Remove stupid Echo function
Dunno what I had in mind for that exactly.  Eventual support for
gettext?  I dunno.  It's not necessary, doesn't work real well, and
generally ... no.
2016-12-08 21:31:15 -08:00
T. Joseph Carter a263603985 New script debupdate
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.
2016-12-07 18:20:28 -08:00
T. Joseph Carter 8eabd3768d a2serverrc: Remove devel environment vars
These shouldn't have ever been set (that's why they have defaults
everywhere they're used).  Besides that, they've gone away now.
2016-12-07 07:14:08 -08:00
T. Joseph Carter 3cd48ab4b3 scripts/a2server-*.txt: Use new URLs 2016-12-07 07:09:37 -08:00
T. Joseph Carter a4ab0c3d26 setup/index.txt: Use new URLs 2016-12-07 05:54:40 -08:00
T. Joseph Carter ce2ac0d02d update/index.txt: Use new URLs 2016-12-07 04:22:45 -08:00
T. Joseph Carter 080242d969 Add replacement for binaryURL/scriptURL 2016-12-07 04:16:22 -08:00
T. Joseph Carter af9ebdc4da Quote URLs passed to wget 2016-12-07 04:08:39 -08:00
T. Joseph Carter a7ff9544bc Remove a2server-update/a2server-setup aliases
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.
2016-12-07 03:37:33 -08:00
T. Joseph Carter 0299a65e45 README.md: Remove section for developers (for now)
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.
2016-12-07 03:11:29 -08:00
T. Joseph Carter 0a893dc8fd fix.txt: No longer necessary/desired; delete
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.
2016-12-07 02:47:56 -08:00
T. Joseph Carter 95fc0ef629 Rename raspbian-update, make install script
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.
2016-11-27 03:03:03 -08:00
T. Joseph Carter e131b8de40 Make scripts run completely out of git repo 2016-10-27 13:31:00 -07:00