Okay Ivan, you can "I told you so" now. I didn't see any major gotchas
to changing the version and was SURE there'd be no reason to write the
convoluted comparison function until after everything was nicely redone
and restructured and whatnot. Fortunately I only need it in the main
script for now, and will hopefully very soon be able to just load it
from a common function file and use it where needed.
I still don't regret doing it, but all the work I had to do in order to
make sure I didn't screw it up (or rather that I fixed it after screwing
it up) are totally on me.
What's still missing from this is a version comparison mechanism. The
reason why it is missing is that we only use this in one place at the
moment, and if you have a version string that is not three digits, your
version is recent enough. This means we can save this for when there
are a common functions script to import and make the comparisons for us
without code duplication.
Ivan writes pretty dense scripts in some ways, but not others. Mostly
he likes to collapse statements to a single line and using && and || in
place of if constructs. Reduces file size and theoretically speeds
execution, but it makes community development tougher and the speed
gains are questionable.
I've begun removing multiple successive writes to a single file such as
those using tee as a means to write files as root. Clean up enough of
those and you will have a noticable performance impact, although again
there's no evidence there are enough of them here to see one.
Removed a few dead/commented code blocks and restructured a couple of
conditionals to make the no-action condition the else case.
Finally, bumped the version. This isn't all that'll go into 1.5.1 but
it's a start.
One of the reasons I held off on doing this before is that there are a
lot of complex one-line seds in here that I expect _will_ be broken by
this. More than a few of these will assume, depend on, require, and
break if specific hardcoded whitespace is not found. That's problematic
anyway--when whitespace isn't syntactic, you shouldn't do that. So it's
time to fix these anyway.
Found some checks that assumed all Debian was wheezy, and also a bunch
of use of cut assuming that there will never be a Debian version higher
than 9.0. Let's just futureproof that code right now. This closes#56
and uses the method described therein anywhere -c 1 is used now. For
the checks against -c 1-2, we still use -d . -f 1 as described in the
issue, but modify the following conditionals to test for just the
numeric, without the decimal.
self-hosted external dependency fallback; or default via A2SERVER_NO_EXTERNAL=1
a2serverrc sets default A2SERVER_SCRIPT_URL and A2SERVER_BINARY_URL
64-bit Debian precompiled binary support
support for reorganized files subdirectory
better information re unsupported OS at start of install
info about netboot at end of install
no longer deletes ~/GNUstep
install libdb5.1 and libssl1.0.0 by default instead of older versions
small tweaks and fixes regarding Debian detection, case insensitive fs, etc
updated source code path for The Unarchiver
this is internal version 1.2.8; see "release" notes about external dependencies
As Debian has gone from large to huge, actions operating on the package
database have gotten slower and slower, so it's best to do them as few
times as possible.
Here we've got the trivial optimization. A more complete optimization
requires a refactoring of code, and we're kind of in a 1.3.0 "freeze",
so let's not do that here and now.
no longer sets console login to 4800 bps, and removes commented-out console login code
no longer sets up GSFILES share, and removes it if it's empty
installs ciopfs (case insensitive file system)
converts existing A2FILES to ciopfs volume, disabling casefold:toupper
changes installed netboot GS/OS filenames to mixed case
fixes bug so user not named "pi" can use randnum authentication
removes obsolete commented code for older AppleTalk kernel install
Closes#11 and #13. As mentioned in #11, support for Ubuntu should
return in the future, but not explicitly. Rather, the core of A2SERVER
itself ashould be made to run on any OS distribution for which our
requirements are met.
The goal is that any OS-specific details should be part of OS-specific
packaging or handled by the user (editing MOTD/issue files, etc.) We
can handle those details on Debian systems because we know how to do
that when packaging for Debian. Ubuntu, Fedora, etc. packages will have
to make their own tweaks. This commit doesn't do all of that, but it
does mean there's one fewer things we need to worry about during the
transition.
Reflowed the scripts (mostly) according to vim's autoindent engine.
Also added vim modelines so that people who are familiar with them can
configure their environment for A2SERVER's conventions. Also removed
trailing whitespace from lines and files while I was at it to make git
happier about various things.
An unusual quirk of git is that it tends not to like trailing whitespace
at the end of lines, and trailing blank lines at the end of a file. It
messes with the word diffs a bit I think. Anyway, it's easily removed,
so I've removed it.
Ivan's precompiled binaries of nulib2, The Unarchiver, and netatalk for
Debian and Raspbian aren't going to be part of this repository, so I've
reverted to hardcoding Ivan's server as the source of those things.
We could perhaps download and compile nulib2 and The Unarchiver, and
we'd have to if the script doesn't recognize Debian/Raspbian. Ideally
for those systems we'd download .deb packages with full and proper
dependency tracking, but we'd still need source for use on non-Debian
systems, should we ever develop support for those. (OS X is a good
candidate for such a system?)
Added shell variable A2SERVER_SCRIPT_URL which allows you to replace
Ivan's server with another URL for development. If unset, scripts will
default to "http://appleii.ivanx.com/a2server/" as usual.
This will not allow you to use these scripts for development directly,
and in fact may have been over-zealous in removing hardcoded ivanx
links. Also, Ivan's webserver has a slightly different layout than this
repository because I haven't tried to make this an apache directory
structure full of mixed HTML, scripts, .htaccess files, etc.
This reflects Ivan Drucker's current A2SERVER scripts as of 2015-Oct-01,
version 1.24. These are unmodified and cannot be directly used yet. A
later patch will begin correcting that, but a baseline is important.