$Id: tuxgoesmorphos,v 0.2 2005/01/08 11:41:03 tokai Exp $ note: atm. this document is far from complete, its more a draft than anything else. Thanks for your understanding. Oh, and someone should proofread it too. I would appreciate any help :) -- tokai Tux goes MorphOS... ------------------------------------------------------------------------------- "Tux goes MorphOS" is a project idea to extend current existing solutions (GeeksGadgets) by providing a wide range of application ports from Linux-, BSD- and other OSes to MorphOS in a easy to install and in most parts standardized way to support developers, but also users. The final goal of the project is the availability of the most important tools and libraries from the named OSes on MorphOS in binary-, but also in source-form so they can easily be managed, installed and uninstalled by a simple portage-like system (http://www.gentoo.org/proj/en/portage/index.xml) which automatically takes care of requirements and dependencies. 0 - Contents ------------------------------------------------------------------------------- I The root of all evil or getting started I-1 MorphOS DevEnv (GeeksGadgets) I-2 Installation I-3 Directory structure I-4 Configuring the TCP/IP stack I-5 User directories I-6 Environment Variables I-7 Shells and Terminals II Tux goes MorphOS... II-1 The concept II-2 The "readme.morphos" file II-2 Installation of packages II-3 Fixing clashes and possible problems III How to use this mess? IV FAQ V Licenses VI Supporters I - The root of all evil or getting started ------------------------------------------------------------------------------- I-1 - MorphOS DevEnv (GeeksGadgets) ------------------------------------------------------------------------------- Before you can start using the "Tux goes MorphOS..." packages you'll need a properly installed GeeksGadgets (GG) environment. The MorphOS SDK contains a MorphOS native GG environment already. You can download it after a free registration from http://developer.morphosppc.com/ . Even though it's targeted at developers, it's also very useful and IMHO required for users. I-2 - Installation ------------------------------------------------------------------------------- The Installation of the MorphOS DevEnv is very easy. But I recommend to use the MUI'ified gginstaller instead of the Installer in the TOP directory, since this will allow you to customize the installation much better. After extracting mossdk_devenv.lha with: > lha x mossdk_devenv.lha ram: you'll find the gginstaller in RAM:MorphOS SDK/InstallData/DevEnv. Now create a "gg" directory somewhere. I suggest you create it directly in a root of a partition to keep paths short: > makedir work:gg Now select this path with gginstaller and press "Install", and after the process is done add: ; ; GeeksGadget Environment ; Assign GG: work:gg Execute GG:sys/s/gg-startup to S:user-startup (of course: use your own path when doing so. ;) Next, I suggest you add the following line to GG:sys/s/gg-startup: path usr:local/bin add This will make it possible to start "Tux goes MorphOS..." packages after installation from all over the place. As a last step you'll need to fix the installation slightly, as the MOS SDK contains a wrongly packed archive. Just merge all directories/files from inside GG:sed_tem/ to the top directory GG:, after that you can delete GG:sed_tem/. When done: reboot or make the GG: assign and execute GG:sys/s/gg-startup manually. That's it. :) Personally, I moved GG:ps and GG:dvi into GG:docs, but it's up to you if you want to do the same. :) If you're going to develop applications using the MorphOS API you need to install the includes from mossdk_devenv_includes.lha; just copy the os-includes/ directory directory to GG:. The other parts of the MOS SDK distribution can be installed elsewhere, since they are not required for the GeeksGadget environment and I suggest not to install them to GG:. I-3 - Directory structure ------------------------------------------------------------------------------- After the installation we should take a look into the directory structure of GG: work:gnu> ls -l total 21 drwx------ 2 nobody nogroup 1024 Jun 17 2004 apache drwx------ 2 nobody nogroup 1024 Jan 6 22:26 bin drwx------ 2 nobody nogroup 1024 Jan 6 21:47 doc drwxr-xr-x 2 nobody nogroup 1024 Jan 7 21:47 etc drwxr-xr-x 2 nobody nogroup 1024 Sep 5 2003 guide drwxr-xr-x 2 nobody nogroup 1024 Sep 22 2000 html drwxr-xr-x 2 nobody nogroup 1024 Jan 5 21:01 include drwx------ 2 nobody nogroup 1024 Jun 9 2004 includestd drwxr-xr-x 2 nobody nogroup 1024 Jan 6 22:27 info drwxr-xr-x 2 nobody nogroup 1024 Jan 5 21:00 lib drwxr-xr-x 2 nobody nogroup 1024 Jan 6 21:47 libexec drwx------ 2 nobody nogroup 1024 Jul 9 2004 local drwxr-xr-x 2 nobody nogroup 1024 Jun 21 2003 man drwx------ 2 nobody nogroup 1024 Sep 27 17:48 os-include drwx------ 2 nobody nogroup 1024 Apr 11 2003 ppc-morphos drwxr-xr-x 2 nobody nogroup 1024 Aug 22 2000 sbin drwxr-xr-x 2 nobody nogroup 1024 Jan 6 22:27 share drwx------ 2 nobody nogroup 1024 Jul 27 00:49 ssl drwx------ 2 nobody nogroup 1024 Jun 20 2003 sys drwx------ 2 nobody nogroup 1024 Jan 8 15:46 usr drwxr-xr-x 2 root root 1024 Jan 4 12:55 var If you've ever used linux you'll detect certain similarities to the root directory structure here. :) Make sure that every assing (as initialized in GG:sys/s/gg-startup) also has a directory which it points to. The MOS SDK installation skips a few (for the installation) unrequired directories, but they could be needed for some "Tux goes MorphOS" packages. If a directory does not exist then just make it. I-4 - Configuring the TCP/IP stack ------------------------------------------------------------------------------- The most "Tux goes MorphOS" apps require a properly configured TCP/IP stack, because this sets up additional environment variables and offers other neat stuff like the users database. Some apps probably won't even work w/o TCP/IP stack running (it's not common under Linux/BSD/etc. to not have none available ;). There are a few things you'll have to configure in your TCP/IP stack to make particular network/security related packages work properly. I only have MiamiDX, so I'll explain the config for it (but this should be very similiar for the other TCP/IP stacks though). First we need a root users, a root group and a user and group for yourself. Add the folowing entries to the database: database->users: username password userid groupid realname homedir shell root x 0 0 gg:home/root /bin/false tokai x 1000 1000 Christi... gg:home/tokai /bin/sh database->groups: groupname groupid users root 0 root tokai 1000 tokai nogroup 65534 Now excecute following lines in a shell; they are required to get certain servers running: echo "/bin/false" >>etc:shells echo "/bin/sh" >>etc:shells Since there is no real login system for MorphOS, you'll have to make sure you're actually logged in as your user, so add your user name ("tokai" in my example) to: miami -> TCP/IP -> "User name". When you're using miamidx then the USER environmental variable is not set automatically, so you'll have to do that manually (dunno about AmiTCP/Genesis): setenv SAVE USER tokai (attention: USER is case sensitive!) I-5 - User directories ------------------------------------------------------------------------------- You might have noticed in previous section that we configured the users with a home directory. You'll have to make them with makedir (you can use any location, but I suggest to keep them together). Many apps save settings to their homedir. On default MiamiDX is configured to use SYS: as homedir so without proper configuring, most apps will spam your SYS: with ".something" directorys or some "somethingrc" files, etc. Dunno if that would be nice. ;) I-6 - Environment Variables ------------------------------------------------------------------------------- TERM: xterm USER: tokai PATH: :/bin:/usr/bin:/usr/local/bin:/mossys/c:/c:. HOSTNAME: localhost HOST: localhost DOMAIN: .nodomain DOMAINNAME: .nodomain USERNAME: tokai HOME: gg:home/tokai REALNAME: Christian Rosentreter SOCKETCONFIG: UID=1000 GID=1000 USER=tokai DOMAIN=nodomain UMASK=022 This is an overview of releavant environment variables, most of them are automatically set by the TCP/IP stack. This way you can check if you have the proper user active. The PATH var is set by the GG:sys/s/gg-startup script and is used f.ex. by the "sh" shell to find programs (sh shell does NOT use the MorphOS search path as configure with the mossys:c/path command). I-7 - Shells and Terminals ------------------------------------------------------------------------------- I really recommend to use MUICON (http://dreamolers.meanmachine.ch/muicon), since this offers different terminal emulations. Usually "Tux goes MorphOS" packages will contain some information about which terminal settings to use (when needed). You also need to set the TERM environment variable. Usually setting it to "morphos", "xterm" or "linux" are good choices, but it depends on the app. You always can override them by e.g.: > sh -c "TERM=morphos /usr/local/bin/moon-buggy" II - Tux goes MorphOS... the Guide ------------------------------------------------------------------------------- II-1 - The concept ------------------------------------------------------------------------------- The concept is very simple: all packages which are offered follow the same guidelines and same file structure. Usually you'll get (after unpacking the lha archive of a package) the following files: package.tgz readme.morphos install.morphos and a few additional files, in most cases the licenses (e.g. "COPYING" or "LICENSE") and credits ("AUTHORS", etc.). The packages are ONLY installed to GG:usr/local/. Other directories of your GG: environment will NOT be touched. This way you can easily replace either the GG installation (e.g. if a new MOS SDK will be released) or the "Tux goes MorphOS" installation. II-2 - The "readme.morphos" file ------------------------------------------------------------------------------- One of the first things you should do (after unpacking a package) is reading the readme. It should tell you how to install the package and what requirements/ dependecies it has. The standardized header contains the following information (we use the cvs-1.12.11-morphos package as example here): package: cvs-1.12.11-morphos the name of the package description: Concurrent Versions System - source code revision control tools a short description of the purpose status: stable the status, either stable (fully functional, no bugs known) or testing (should be stable, no bugs known, but is not deeply tested yet) Generally known bugs related to the port are noted in the readme.morphos too. version: 1.12.11 the version of the package homepage: http://www.cvshome.org/ the homepage of the project, you'll usually find the sources and additional documentation there. port: Christian Rosentreter the person who made the port. If you have problems regarding the port you can contact this person. General problems with the application should be directed to the original authors. category: dev-util the category, will later be used for the portage-like system. It follows in large parts the gentoo portage system. license:    GPL-2, LGPL-2 the license under which the package is released requirements: nano-1.2.3-morphos everything listed after requirements is required to make full use of all functions of the package. You'll need to install these packages too (either before or after installing the package; order does not matter for binary releases). dependencies: krb5-1.3.6-morphos, libiconv-1.9.1-morphos, libintl-7.4.0-morphos these are the dependencies of the package. For the user it only offers information about the support libraries used to build the program. There is NO need to download them if you just want to use the executables. This information is important for developers though. Usually it means that if you want to make use of the static link libraries contained within the package (goes f.ex. for all lib#?-morphos packages) or want to rebuild the package, that you need to install these dependencies, or the build won't work. In addition to the header, the readme also contains a short intro, installation description and a short advertisment for the project. ;) II-2 - Installation of packages ------------------------------------------------------------------------------- The installation of "Tux goes MorphOS" packages is very easy, just execute the provided install.morphos script: > cd package-morphos/ > install.morphos This will merge the contents of the tgz archive with /usr/local/ and copy the archive readme and tag to /usr/local/.packages/. If you want to save harddisk space then provide the NOSTORE argument so the archive itself will not installed, but normally it's better to keep the archive. > install.morphos NOSTORE II-3 - Fixing clashes and possible problems ------------------------------------------------------------------------------- It might happen that a package is supposed to replace components that where installed before with the MOS SDK (e.g. goes for cvs or wget). In this case you can simple rename (or delete) the old version. You can always check with the "which" command which version is used to find out about possible problems: > which cvs work:gg/bin/cvs After renaming the old cvs in in "GG:bin/" to "cvs,mossdk" > which cvs work:gg/usr/local/bin/cvs Now we can make use of the new build. Easy or? :) III - "How to use this mess?" ------------------------------------------------------------------------------- Well, there's not really anything here at the moment. I just put a topic here so that I don't have broken content, you see. :) IV - FAQ ------------------------------------------------------------------------------- Well, there's not really anything here at the moment. I just put a topic here so that I don't have broken content, you see. :) V - Licenses ------------------------------------------------------------------------------- Well, there's not really anything here at the moment. I just put a topic here so that I don't have broken content, you see. :) VI - Supporters ------------------------------------------------------------------------------- Christian Rosentreter, karibu at gmx dot net Steven Vos, retivision at linuxmail dot org