This repo contains the build for TOS (Tom OS live iso)
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
- About the Project
- Getting Started
- Usage
- Git Hooks
- Repo
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
To get a local copy up and running follow these simple steps.
You need to have an arch based distribution to build the iso and repo.
All the tools provided in the repository will download and install all necessary packages except for the following.
pacman -Syu archiso # only dependency not installed by our tools
Before building the live iso make sure you are on the latest kernel
uname -r
- Clone the repo
git clone https://github.com/ODEX-TOS/tos-live.git
You can only build the iso if you are running an arch based distribution.
Before building the iso you could add your personal repository to the pacman.conf
file located at tos-live/toslive/pacman.conf
You will see the following entry:
[tos]
SigLevel = Optional TrustAll
Server = https://repo.odex.be
This will use the official repository for tos. If you want to use your own repo change the above to
[tos]
SigLevel = Optional TrustAll
Server = file:///home/zetta/tos/repo/arch/
When using a server to serve your repository you can use the following
Change the server to point towards your instance. We have delivered a
docker and docker-compose
file so that you can serve the repository tools
Simply launch the docker-compose
file
docker-compose up --build -d
If you don't use traefik you will have to edit this file. Simply remove the labels
section and the network
section. Also add the port section mapping port 80 to port 80. If you wish to update your repository simply rsync to the docker volume.
This repository also includes the build tool to make iso's. The tool can be found under toslive/start.sh
It can be activated as followed
sudo ./start.sh -s # build the server iso
sudo ./start.sh -g # build the desktop iso
sudo ./start.sh -s -a # build the server iso with the keyboard layout to azerty
sudo ./start.sh -g -a # build the desktop iso with the keyboard layout to qwerty
# for more information use the help page
sudo ./start.sh -h
start.sh needs to be activated in the same folder or your images won't get build. You also need to be on the latest kernel for the build to succeed
Our project has the following files you need to know about:
This file contains all packages required for the operating system (for the desktop edition)
The packages listed here do not work with the aur see repo below for more info
This is the same as above but for the server edition (without a desktop)
This file is a script that will be executed during build. In this file you "prepare" the operating system for the user
Do not install packages from the aur here. It won't work
This file contains the packages that are going to be installed in the live environment. You should add an extra line if you want to install an extra package.
Do not install packages from the aur here. It won't work.
This contains the current version of our operating system. When making a pull request please update it accordingly.
This directory will contain all our iso's
This directory is an archive for our old images
The script that actually builds the iso's
This will completely build a arch based repository from scratch. If building you own repo don't forget to reference it in the pacman.conf file.
The build script has numerous options.
./build.sh -a # build all generic packages
./build.sh -f # build all fonts
./build.sh -k # build the kernel with one core
./build.sh -k 3 # build the kernel with three cores
./build.sh -u # copy over all detected iso's in the toslive directory over to the repo
./build.sh # interactively ask what needs to be build
This generates a html file that shows all data about tos packages.
Run this command to get a list of PKGBUILDS
that need manual intervention to be updated.
Add custom pkgbuild files that will be build and added to the repository
Build certain parts of the repository
./build.sh -a # build all common packages
./build.sh -f # build all fonts
./build.sh -k # build the kernel using one core
./build.sh -k 3 # build the kernel using 3 cores
./build.sh # interactivaly build everything
./build.sh -u # upload all build iso images
Remove duplicate packages in the repo/arch
directory
List all packages that will be added to the repo. Each line equals one package. For the construction of a line look at the comments in that file
Same as above but for fonts.
For more examples, please refer to the Documentation
If you wish to extend the repo you can do so in one of two ways.
You have the packages.conf and fonts.conf
configuration files or the BUILD
directory.
The configuration files contain a list of url's that contain valid PKGBUILD files. These files will be executed and then added to the repository.
The format of a line is as followed <url> <dir to store data> <package name regex> <optional flags>
The first element contains the url pointing to the PKGBUILD git repo.
The second element contains the directory where we will store this git repo.
The third element contains the name of the final package (that usually end in .pkg.tar.xz) but with the part that always stays the same. (without the version number)
The last part is optional and contain a flag telling the build script to exit the build if this package fails or not.
eg no-exit
flag will not stop the build if something goes wrong.
Look at repo/packages.conf
for more information.
The second way of adding packages is when there is no url where to download a PKGBUILD from.
This requires only a little bit more work.
We have a directory called repo/BUILD
containing a set of PKGBUILD's in the following format. PKGBUILD_<pkgname>
where pkgname is the name of the directory where we will perform the build.
Each PKGBUILD will generate a package which is automatically added to the repo.
By default the build script will abort if anything goes wrong.
You can also add a flag to the PKGBUILD file to denote that you don't have to abort the build in case something went wrong.
The flag is the following comment # NO_ABORT
An example of this flag is in the repo/BUILD/PKGBUILD_NVIDIA
file.
You can also add additional files required by a PKGBUILD inside the BUILD directory. They will automatically be copied into your working directory.
Setup git hooks to validate the local behaviour
Setting the commit hooks is as easy as executing the following commands from the project root:
ln -s "$PWD"/hooks/pre-commit .git/hooks/pre-commit
ln -s "$PWD"/hooks/commit-msg .git/hooks/commit-msg
ln -s "$PWD"/hooks/pre-push .git/hooks/pre-push
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Tom Meyers - tom@odex.be
Project Link: https://github.com/ODEX-TOS/tos-live