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

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:

  1. Add a file to ~/.config/car/post-inst-hooks.
  2. 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:

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:

Additional package variables:

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

  1. Fork car-binary-storage on GitHub.
  2. Create a new directory for your package and add your install_script.
  3. Follow naming conventions (-bin, -git, -stable).
  4. Submit a pull request.
If we do not accept your package, you can make a local package first and use that before we accept it.

← Back to Docs Home

Our documentation is open source. You can help by contributing.