Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #1

Open
denizbaba0 opened this issue Dec 1, 2023 · 0 comments
Open

Documentation #1

denizbaba0 opened this issue Dec 1, 2023 · 0 comments
Assignees

Comments

@denizbaba0
Copy link
Contributor

GENE Package Manager

GENE (GENEric package manager) is a package manager management system.

What is the term "Package Manager Manager"?

I like to call it package 2xmanager. GENE targets general popular package managers
(See Supported Package Manager) by wrapping the binaries
directly from your system shell. So GENE can do anything you will do by hand.

Manifest

Package managers are not standardized which can be a problem when you are installing
or even searching the package you want. Maybe you were able to find it for X package manager
but not yours. At least I have been facing this issue some time (especially when installing C libraries)

There are several problems that GENE tries to resolve:

  • Package manager's installation system differ by one to another. Standardizing small commands will help users to adapt other package managers easily.
  • Package names are not standardized which is a major problem on general system package managers that requires time and effort to get resolved.

TL;DR

Here is a quick representation on how does GENE manage and standardize package managers

Every machine that runs GENE should include a config file containing the information about the system
and optionally a configuration.

# $XDG_CONFIG_HOME/gene/gene.toml
# Example GENE configuration
[system]
backends = [
    "apt",
]

To install a package using GENE, you have to declare them first (Direct installation is present on Appendix I)
As an example I will write the build scripts for my project Vimacs.

Note

the syntax is just the same.
It's merged with your system configuration before
GENE starts installing the packages.

# $VIMACS/gene.toml
[system]
deps = [
    "tuir",
    "mapscii",
    "weechat",
    "neovim-nightly",
    # ...
]

inside $VIMACS/ (where the project's gene.toml exists) run:

gene install

and gene will start to install everything present on gene.toml as it should.

Plugin Support

One of the GENE's most powerful feature is It's plugin system.
Because everything is written in rust, installing a plugin requires recompilation of GENE
(Or maybe It'll be in lua to make it easier to maintain the plugin system and usability)

The plugin specific standards are not planned yet (Also this feature will be added later on development)

Note

All of these are but nothing thoughts.
They are not implemented yet.

What are the benefits of the "plugin system" for a package 2xmanager?

Installing packages are boring. They do the same thing everytime! (That's the good-case btw.)
There are a lot of functionality that you could inject into your package manager using just by using
custom scripts.

Plugin Installation

Installing a plugin manager is super simple. Just put it on you system.plugins as shown below:

# $XDG_CONFIG_HOME/gene.toml
plugins = [
    "binder",
]

[plug.binder.config] # Plugin specific configuration
backend = "git"
verbose = true
prettify = false
ban = [
    "pip",
    "npm",
]

Then running any gene command from shell will trigger plugin installation process.
You can just type gene to just install it.

Here are some example plugin ideas that I've come with.

Binder

After installing a dependency from a registry you have the ability to wrap it using language aware binding generators (e.g cbindgen)
To address potential project-specific errors that may occur this plugin takes an interactive approach to resolve issues related to non-standardization
problems with the help of your assistance.

Virtualized

This plugin adds functionality to install packages to your virtual machines. (Or maybe servers over SSH)

Delete-Config

This plugin adds functionality to remove related configuration when you delete a package.

Prettified

This plugin wraps GENE with a TUI and adds theming options.

Hooker

Hook your scripts into GENE processes.

Visualize

Visualize your package installation including where the package has got developed,
the development time etc. in an ASCII flavoured UI.

Supported Package Managers

Note

GENE Project is in planning stage.

Similar Projects

  • whohas - A system utility to search from general package registries.

  • pacaptr - pacman-like syntax for all package managers

  • bedrock linux's package manager manager - also known as pmm

    Bedrock linux's package manager manager is one of the closest projects
    to GENE. But has a major drawback: It's also meant to get used as a 
    package manager of an unpopular linux distribution, bedrock linux, 
    that drastically limits It's potential.
    

Appendix

Appendix I

This feature is heavily discouraged as It's harder to maintain your system packages.

gene -f install <package>
gene -f remove <package>
@orhnk orhnk self-assigned this Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants