Commit Graph

146 Commits

Author SHA1 Message Date
T. Joseph Carter 3e69bf5ae7 Replace a2cSource with top_src
Just for consistency with what I'm doing elsewhere.
2018-09-06 13:36:51 -07:00
T. Joseph Carter 7ee6c4bad6 Merge branch 'master' of https://github.com/RasppleII/a2cloud 2018-06-24 23:29:15 -07:00
T. Joseph Carter 55c53b9c10 Clarify license on script files
As noted, Ivan has agreed to allow these scripts to be relicensed under
CC0.  We have one file under LGPL (a unit file we lifted wholesake from
systemd) and the ADTPro wrapper which I'm pretty sure Ivan wrote, but if
he didn't we need to fix its license to be the same as ADTPro.

Either way, to the best of my knowledge, this resolves the question of
how things are licensed explicitly.  (Closes #21)
2018-06-24 21:48:42 -07:00
T. Joseph Carter 123a592f61 Move the install confirmation to install.sh
Kept one in ivan.sh because that's currently useful.
2018-05-10 10:26:18 -07:00
T. Joseph Carter 38d2808d9a Move install_archive_tools to install.sh
Installing archive tools now happens before ivan.sh.  This actually
means that installing archive tools happens before you're asked if you
want to continue.  That'll be the next thing I work on I think.
2018-05-10 10:26:18 -07:00
T. Joseph Carter f7e46cb167 We don't use at, don't bother installing it 2018-05-10 08:55:14 -07:00
T. Joseph Carter 3e961cd4b5 Clean up gsport-setup a little
We don't do unar picopkgs anymore.  We probably shouldn't even compile
it actually.  The reason why we do is because I don't want to give up on
the idea that a2cloud may run on macOS at some point—but I'm as likely
to just depend on Homebrew for that on the Mac.

Why Homebrew?  Well, I don't like its installation still (same reason I
don't like ours.  Running a command off a website is unwise.  And of
course people do stuff like that all the time, but Homebrew encourages
it and shouldn't!  So again, why Homebrew?

With fink, you build everything from source, but you inherit the Debian
library dependency hell nonetheless. MacPorts solves the dependency hell
and is very robust, but it's also pretty (subjectively) unfriendly to
new users who don't grok UNIX or even know where to find the M to RTFM.

So we come to brew.  It's pretty lightweight, it feels modern.  It's
distributed so that you need not be part of the in-crowd to work with
it, and its Cellar approach provides makes maintenance easy.  When I
first looked at it, it'd been around for years but it had never really
caught on.  Lots of things were not there or just really outdated and
unloved.  I'm glad to say that's changed and the project feels more
mature now.
2018-05-10 07:28:38 -07:00
T. Joseph Carter 6602f8491c Replace ttytter with oysttyer in aliases
We can probably do better with the aliases, but I really think what we
want is a wrapper script that enables readline, ansi, and 280 character
tweets.  An update to oysttyer could remove the need for settings
changes for 280.
2018-05-10 05:17:52 -07:00
T. Joseph Carter 0ae0ce519d Use the new install_java script in ivan.sh 2018-05-08 08:30:27 -07:00
T. Joseph Carter f6555c024c Move show version code to its own script
…why?  Because show_changes will become the "do you want to install
this?" confirmation at some point.  That's not what it does now, it just
shows you the version for now.  But eventually it will tell you the
version you have installed, compare to the version you are going to
install, show you the changes between here and there, and ask you if you
actually want to proceed with installation.  When that happens it'll be
appropriate to rename the script, but for now it's a placeholder.
2018-05-07 01:49:43 -07:00
T. Joseph Carter 42ac9cc6ef installEmulators question is now gone.
What ivan.sh does now is a lot of fairly complicated shtuff that is
going to get harder to extract from here on out.

set versions/directories
find a2cSource
ID system
set Pi/computer (me/fullme)
detect systemd or not (the way RPF does it)
report installed/available version
parse argv
prompt for installation
skip a whole lot of questions
try to change your password
update package lists
install udev trigger
install random scripts like cppo and aliases
install motd
disable virtualbox screen blanking
write the version
install avahi
install at (why?)
install xdg-utils (less useful than it used to be at present)
install ADTPro:
	check for java or free space to install it
	install X11/LXDE
	set boot to command line via systemd/grub (why here?)
	install java
	remove adtpro if it's old
	install adtpro if needed
	install applecommander
	install modified adtpro.sh
	if adtpro was updated, install new a2cloud disk images
	install rxtx
	install xvfb
	make netatalk share a2cloud disk images if that's installed
	make samba share a2cloud disk images if that's installed
	install shell scripts for controlling adtpro, vsd
	install acmd, mkpo, dos2pro
	WHEW!
install xrdp
install the serial port handler script
create udev rules for usb-serial
install serial port login on the Pi (doesn't currently check for rpi)
install serial scripts: baud, term, usbgetty
install systemd service or modify inittab for serial console
call install_comm_tools
call install_emulators
call install_archive_tools
Create .desktop files for ADTPro and LXterminal
Decide whether we need to make/update a2cloud disks
If we do:
	See if we need to update it
	If we do and have most of what we need:
		Extract files and add them where they go
	If we're not going to make disks from scratch:
		Extract files elsewhere and add them where they go
	Otherwise:
		Kill adtpro if running
		Download a2cloud disk images if we can
		If we cannot:
			Get an 800k .po named A2CLOUD
			delete files we'll replace
			Download GSOS 6.0.1 disk 3 for its BASIC.SYSTEM
			Grab STARTUP.BAS and add that
			Grab VEDRIVE and add that
			Grab Apple System Utilities and add that
			Grab ProTERM and add that
			Patch ProTERM for IIc printer port
			Add ProTERM macros
			Download Z-Link and add that
			Download ShrinkIt and add that
			Download DSK2FILE and add that
			Add Apple System Utilities (check above)
			Download Filer and add
			Add ADTPro client
			Add VSDRIVE
			Create 140k image and add the basics
			make vsd files symlinks if they're not already
			create a2cloud.hdv compatibility symlink
If we need to make a new blank image:
	make it
set up the a2cloud-setup command
decide what to do about rebooting, restarting, starting, whatever.

Okay, the first thing to do here seems to probably be moving the
installation of Java out.  If we can just call "make sure java is
installed" from ivan.sh, we can from install_archive_tools too and pull
acmd and the other Ivan-written archiver scripts into that file.

I think at some point we need a "go download this" tool.  We often don't
waste a lot of effort on this for random programs, but we have for stuff
that comes from eg Apple or archive.org or … let's just not duplicate
that code anymore.

Making a2cloud disks is a high priority for its own file.  It's also a
bit of a jumbled mess right now, installing things in somewhat jumbled
order.  Let's be clear where we get our ProDOS, where we get our
BASIC.SYSTEM, and then handle things in stages.

How we install ProTERM etc should be compared with how it's done in
a2server at some point.  It's not hte same to install it to a directory
as it is to a disk image (or is it?)  Reducing effort could pay off
later in that regard.

We'll see how this pans out and where it leaves us with ivan.sh.
There's also a lot of bugs left to fix compiling things like nulib on
buster and we'd like to be able to start pulling AppleCommander and
mabye ADTPro as well out of GitHub revisions we trust…  That sort of
thing.
2018-05-06 03:45:39 -07:00
T. Joseph Carter 099f5b3f44 Move .desktop file creation to install_emulators
I don't like how this is done, but I don't like any part of how the
emulators are handled right now.  At least the mess is in the right spot
now, save for the thing that conditionally execs a login shell to make
sure gsport groups take effect at the end.  That whole restart thing is
also a mess I haven't thought about yet.
2018-05-06 03:42:05 -07:00
T. Joseph Carter 602b4f5fba First pass moving emus out of ivan.sh
The install for both LinApple and GSPort is still kind of a mess.  In
LinApple's case that's mostly upstream (tinu.) and GSPort is a
combination of multiple clusterf—it's gonna take some doing.  :)

At some point in the very near future GSPlus will replace GSPort and
that'll clean up some of it.
2018-05-05 13:31:00 -07:00
T. Joseph Carter 2aa5e92c78 Extend the inversion of downloadBinaries
We don't actually download any picopkg files in install_comm_tools
anymore—oysttyer was the only one and we just always pull that from git
and the Readline module from CPAN now.  (In buster we'll only need the
CPAN module if Debian doesn't package it.)

Really the only picopkgs which are optional to download are gsport,
linapple, and nulib.  And since none of those exist at the moment, you
don't even really have much of an "option" about them either.  Yeah, I
know, I'm working on it.
2018-05-05 13:20:13 -07:00
T. Joseph Carter c260ff9d74 Invert downloadBinaries logic to noPicoPkg
We need to conditionally pass -c to other scripts if we don't want
picopkg downloads.  That's totally fine, but that's easier to do in bash
if something is set vs. unset.  If set you can use :+, so that's
desirable.
2018-05-05 13:14:43 -07:00
T. Joseph Carter 639c86b96f Don't try to delete the setup script. 2018-05-02 00:02:44 -07:00
T. Joseph Carter 8b5149fe52 Interim refactoring of comm tools complete
Like with archive tools before it, comm tools have been split out of
ivan.sh now to someplace we can hopefully work on them.  Unlike the
archive tools, however, this was not a simple copy out the code block
and patch the script to run independently of the big script.  Here's
what was done:

ADDED

 - lftp, a powerful ftp client, command-line based but much more
   friendly than standard ftp because it operates in binary mode by
   default, has bookmarks, can handle ftp:// URLs, has useful batching
   and mirroring commands, and can directly read things like readme
   files on the server in the client.  Also tab completion.
 - mc, Midnight Commander, a full-screen file manager reminiscent of
   Norton Commander.  This isn't a comm tool per se, but it's well loved
   by a lot of people and it can connect to ftp clients and access them
   the same way you would any other directory in mc.

CHANGED

 - For oysttyer, we no longer use a locally-installed perl readline
   module.  Debian packages this, so we'll use this.  That means we no
   longer need/want the locally installed version, so we try to clean up
   after ourselves.
 - Rewrote the oysttyer installation process to be hopefully more
   robust overall.

REMOVED
 - cftp.  This program is barely alpha-quality proof of concept.  It's
   buggy, it's unreliable, it's undocumented, and it is of no use when
   it crashes (and it will) and leaves your terminal in a broken state
   you don't know how to fix.  There's nothing "comfortable" about that,
   even for new users.  If you need your ftp client to work with arrow
   keys, I recommend connecting to your ftp server with lynx.  Like most
   web browsers predating OS-integration, it includes a decent-enough
   (non-persistent-connection) ftp client which generates a very basic
   directory listing webpage for you.  It works; cftp doesn't.
2018-04-30 18:36:25 -07:00
T. Joseph Carter d30c9eb409 No longer ask to install archive tools
For quite some time now, and since before this codebase came to github,
if you didn't say yes to all, things broke.  So we've assumed yes to all
is required since about 2015 or so.  Let's make that official as we work
here.
2018-04-26 13:57:39 -07:00
T. Joseph Carter 8831ee59a4 Make install_archive_tools behave
Now install_archive_tools creates its own temp directories for
installation.  Nulib2 doesn't build for me on sid/buster though, we're
going to need a patch I think.  We may as well patch it at that point
for building libnufx as a shared lib while we're at it.  I really don't
want another project right now.  :(  This is why we don't get releases
out.
2018-04-23 11:03:17 -07:00
T. Joseph Carter 1301e430ce Move archiver installation to separate script
The archiver installation was a pretty simple, isolated chunk of code,
and thus easily pulled into its own script with minimal external
dependencies.

I made few changes, so the new script isn't very tidy unless it's run
from ivan.sh.  It should create temp directories for anything it
downloads and clean up after itself when it's finished, but for now it
assumes ivan.sh is doing that.  Mostly that's to keep the intellectual
diff small from the code in ivan.sh to the script.

I'll clean this up in an upcoming commit.  Feel free to offer PRs that
do this kind of thing to other easily isolated (or not so easily
isolated) chunks.  Once ivan.sh is split apart into nice logical pieces,
it will be a lot easier to test and fix individual pieces independent of
the whole.  That's something we can't even say for a2server yet.
2018-04-23 07:38:30 -07:00
T. Joseph Carter 744210338c Fix unar error introduced in 30ccb87
I'd removed debianMajor and the like in the last commit, but I missed
one instance of it being used: To install the unar package on jessie and
greater systems.  Well, jessie is now oldstable and wheezy is so
obsolete you're not even recommended to upgrade from it.  Nowadays, we
should just be installing the package.

We ought to check for it in /usr/local and see if we can determine if
its an old version and remove it, probably.  If someone else would like
to tackle that, feel free.
2018-04-23 05:49:45 -07:00
T. Joseph Carter 30ccb87cd8 Use system_ident, fix picopkg names
Cherry-picked the system_ident script from the refactor branch.  This
sets ras2_os and ras2_arch in a way that would be more useful for
selecting a filename from among arch-specific alternatives.  It's less
good for identifying a Pi vs. desktop Debian or anything else, so I've
kept around the isRpi variable for now.

May revisit the variables in system_ident later on if it really would be
useful to have ras2_os not include the release codename.  For now
though, this is fine.  If nothing else this will encourage me to do more
to get rid of the specific checks for the Pi.  The major places the
check seems to be used at the moment are:

1. Text output
2. Determining which version of java to install
3. Whether to spew out the USB lower/upper udev rules
4. How to compile GSport

The question of which java to install is easily answered: The one you
have available.  Currently we're calling for java8 on RPi and ORACLE
java7 on Debian.  That doesn't actually make sense.  On Debian we'd
probably want to use openjdk, and the only reason to use Oracle's JDK on
Raspbian is because you might already have it installed.  I'm inclined
to suggest that we should check if you have RPF's Oracle java installed,
and if you don't install openjdk—unless someone can give me a good
reason to use the JDK from those evil bastards at Oracle who believe
that implementing a standard library compatible with theirs from
published specs is somehow a Copyright infringement…  Needless to say I
have a bias against evil/stupid companies.

GSport should literally use $ras2_arch if that once we have it replaced
with GSplus.  That just leaves the udev rules and flavor text.  I think
the problem will solve itself in time.
2018-04-22 18:56:28 -07:00
T. Joseph Carter 2b9cd2c95d Remove Apple 2 Pi dead code, won't be reusing it 2018-04-22 18:19:03 -07:00
T. Joseph Carter a3d67123cc Removed a2cScriptURL and renmaed .txt from scripts
Replaced downloading scripts and files from a2cScriptURL with
installation from the source tree.  This obsoletes a2cScriptURL, so it's
been removed.

It made sense to remove the .txt from the script names since I was
rewriting the lines that use them anyway.
2018-04-22 14:44:27 -07:00
T. Joseph Carter 4bee0fee5a a2cDevel -> a2cSource, remove conditionals
Renamed a2cDevel to the now more descriptive a2cSource and remove
conditionals to download individual files as part of the old web
install, since we don't do it that way anymore.
2018-04-22 13:58:21 -07:00
T. Joseph Carter 6fb6a068e2 ivan.sh now properly requires a2cSource to be set
Now a2cloud matches a2server in requiring that ivan.sh be run from a
source tree.  That'll always be true when running the installation using
the approved methods, including the web install upgrade.
2018-04-22 13:54:15 -07:00
T. Joseph Carter eb6ace7850 Remove a2cCmpInstalled, it's obsolete
We aren't actually using a2cCmpInstalled, and we shouldn't start.  If we
need this functionality, look at RasppleII/a2server 2b52ad8 for the
right way to do it.
2018-04-22 13:46:33 -07:00
T. Joseph Carter a12c3ccbcf Fix typo in a2chat script
Fixes #36, thanks @TrogdorsArm for burninating this one!
2018-04-22 08:05:59 -07:00
T. Joseph Carter f156fcb6af Make sure unzip is installed for undoit
Fixes #33.
2018-04-20 15:17:31 -07:00
T. Joseph Carter 32a599c93d Add new setup.txt
This is a minor edit to the upgrade/index.txt in a2server, removing the
human-readable changelog display because a2cloud never really kept a
file like that.
2018-04-12 00:57:08 -07:00
T. Joseph Carter f9e0861005 install.sh, setup.txt->ivan.sh, bump version
Do not put this hash into production without the following one!

As with a2server, I've written a new setup.txt that downloads the entire
a2cloud source tree for installation, which allows the monolithic script
to be broken up into smaller pieces without worrying about that breaking
the web install—but it's not included in this revision so that git can
keep track of the rename of setup.txt to ivan.sh.

Despite the fact there is no 2.0.0 release yet, 1.9 is already so close
that it doesn't give Ivan any breathing room for any patches he wants to
make, so my intention is to skip major version 2 entirely other than for
this transition.  The final release will be given the 3.0.0 version
number.
2018-04-12 00:44:11 -07:00
T. Joseph Carter 491226e721 Remove raspbian-update, update aliases
@IvanExpert removed the raspbian-update call in setup as part of the
jessie compatibility commit, and the script's gone away in A2SERVER as
well.  Also removed the other upgrade-handling aliases and the thin
wrapper for raspi-config.
2016-12-09 09:26:53 -08:00
T. Joseph Carter 37e833f8a8 setup: Remove / on a2c*URL 2016-11-21 17:56:23 -08:00
T. Joseph Carter 313e478ed9 gsport-setup: repace binaryURL 2016-11-21 17:54:02 -08:00
T. Joseph Carter d58da9307a setup.txt: Replace scriptURL/binaryURL mechanism
The binaryURL and scriptURL mechanisms sadly don't work properly, and
using it in the first place was kind of a workaround for allowing others
besides Ivan to work on the scripts while we transitioned to doing
things in a way that lent itself to community development.

Here we are over a year later and the scripts are just now undergoing a
rewrite to make them not dependent upon Ivan's webserver.  The mechanism
intended to facilitate that is getting in the way.  It still exists in
some other scripts, but I'm purging it as I go.
2016-11-20 23:17:47 -08:00
T. Joseph Carter 55485fc50c Preemptively add version compare function 2016-10-29 02:20:51 -07:00
T. Joseph Carter 49fa865ec5 Add beta run-local support for development
This is similar to what's already done in A2SERVER, but there's both
more and less of it.  Fewer scripts run during the installation phase
(generally just setup), but there's a lot more tools and pieces that are
downloaded.

This is complicated somewhat by the single setup script making it hard
to work on just one piece at a time.  We'll begin addressing that soon.
2016-10-29 02:13:25 -07:00
T. Joseph Carter 11f239d730 Merge setup.txt changelog with changelog.txt 2016-10-29 00:47:37 -07:00
T. Joseph Carter 51d825a2b6 Fix indentation and remove dead code 2016-10-28 08:10:53 -07:00
T. Joseph Carter 1824c4aa43 Re-indent scripts (tabs) 2016-10-25 11:36:40 -07:00
T. Joseph Carter 78d247a0ef *.txt: Trailing whitespace removal 2016-07-29 10:35:44 -07:00
Ivan X 40b55a599e fix motd, and icon creation error messages in setup 2016-07-23 06:59:22 -05:00
Ivan X 83a40d7af6 make "baud" command compatible with systemd 2016-07-23 06:10:15 -05:00
Ivan X 5ad310b567 changed install tag from master to current 2016-07-21 09:48:38 -05:00
Ivan X 4a90902dc8 removed usblogin-off and usblogin-on commands from aliases 2016-07-21 09:37:01 -05:00
Ivan X 2550d3556c Jessie compatibility; KansasFest 2016 (fc1); KEGS and Apple II Pi removed 2016-07-21 07:40:22 -05:00
Ivan X 045f971e9c more gsport launcher script fixes 2016-07-21 05:45:53 -05:00
Ivan X 944a25e50c fixed broken echo statement in a2chat 2016-07-21 01:44:19 -05:00
Ivan X 43bcf19c5b cppo current with A2SERVER; gsport launch script updates for Jessie 2016-07-20 21:38:10 -05:00
Ivan X c794e646de USB shell login and ADTPro server daemon support for Jessie 2016-07-17 21:44:21 -04:00