Car Package Manager
Car is the official package manager for Redrose Linux.
Getting Started
Initialize Car before using it:
commandsudo car init
This creates Car’s configuration directory and required files.
Update the package list regularly to keep your system synced with mirrors:
commandsudo car updatelist
Running this every few days ensures you always have the latest package information.
Regularly update packages:
sudo car update
Installed packages are tracked at:
directory~/etc/repro.car
Redrose Flower/Tree choice is stored in /etc/stability.conf with values either Stable or Rolling_Release.
Basic Commands
commandcar get <package> [--noconfirm]
car delete <package>
car update
car search <package>
car updatelist
car init
car get <package>— Installs a package.car delete <package>— Removes a package.car update— update system.car search <package>— Searches mirrors for available packages.car updatelist— Updates your local package list.car init— Initializes configuration directories and hooks.car list— show all installed packages.
Reinstalling Packages
Car reinstalls only when updates are available. To force reinstall a package manually, run:
commandsudo car delete <package>
sudo car get <package>
Autocorrection
Car can correct typos in package names. If a requested name doesn’t match exactly, Car installs the closest known match.
command with outputredrose% car get firfox
Note: Using firefox instead of firfox
Hooks
Hooks allow automatic actions after installation. To create one:
- Add a file to
~/.config/car/post-inst-hooks. - Define a
run(package)function inside that file.
Repositories
Repository definitions are stored in ~/etc/mirrors.car.
code:base:
install_script = https://raw.githubusercontent.com/crust-project/car-binary-storage/main/
packagelist = https://raw.githubusercontent.com/crust-project/car/main/existing-packages.txt
:end:
Each repository requires:
- A package list (text file, one package per line).
- A directory containing package installation scripts.
- A packagelist with latest versions.
Example package list:
textpackage1
package2
package3
Example package list with versions:
textpackage1=0.0.1
package2=0.0.2
package3=0.0.3
Car supports URLs and local paths (using file://), so you can create local repositories.
Example Repository Layout
treemy-repo/
my-package/
install_script
index.html
my-other-package/
install_script
index.html
versions.txt
packages.txt
Creating Packages
Every package must include an install_script. Example:
version = "0.0.1"
def beforeinst():
print("Runs before installation")
def deps():
# Optional - use the car_deps array, do not include if none, use this to install anything extra
print(":: No dependencies required")
def build():
# Optional
print(":: No build required")
def install():
pass
def postinst():
pass
Function overview:
- –
beforeinst()– Runs before installation begins. State the license here. - –
deps()– Handles package dependencies (optional). - –
build()– Builds the package if necessary (optional). - –
install()– Installs the package files. - –
postinst()– Executes after installation completes.
Additional package variables:
- –
version– Package version (required). - –
description– Short description of the package. - –
trusted– Trust level (can only be set by the repository owner):- –
True– EU FOSS - –
Maybe– OSS - –
False– Proprietary
- –
- –
outdated– Indicates if the package is outdated:- –
True– Outdated - –
False– Up to date
- –
- –
car_depsandpacman_deps– Arrays of dependencies. Include only if applicable.- –
car_depsare installed automatically.
- –
- –
maintainer– List of maintainers. Example:maintainer = [ {"Name": "Example Maintainer", "email": "example@example.com", "nick": "example"} ] - –
DoNotWriteVersion = True– Optional; if set, the version will not be written torepro.car.
Local Packages
Making a local package is very simple, almost identical to making a standard one. Make a folder, create install_script.py (not install_script) and zip it. Use the zip format. For example the file can be called package.car.zip. .car is required.Submitting Packages
- Fork
car-binary-storageon GitHub. - Create a new directory for your package and add your
install_script. - Follow naming conventions (
-bin,-git,-stable). - Submit a pull request.
Our documentation is open source. You can help by contributing.