Coder Social home page Coder Social logo

arpm's Introduction

What?

A bunch of scripts to build packages for Arch Linux. Plus a server and CLI tool for sharing and deploying packages.

Why?

When you are running more than one server under Arch Linux you may need a shared repository with some custom packages. And this is it!

Features

  • Repeatable build in a clean container environment;
  • Build from a directory, from a tarball, fetching an URL (from AUR for instance);
  • The remote server keeps the packages database steady and solid;
  • A CLI tool which allows to run these actions on a remote server:
    • List all branches;
    • Create new branch;
    • List packages in a branch;
    • Download a package;
    • Upload packages with replacing the old ones;
    • Remove packages (branch removal is not implemented for the safety reasons);
    • Update the server (for debug and development purposes);

WARNING! The server does not support any authorization!

Requirements

For build packages:

  • /etc/makepkg.conf (copies into container);
  • /etc/pacman.conf (copies into container);
  • podman
  • sudo
  • aria2c or wget or curl

For the deploy server and CLI tool:

  • python-aiohttp
  • python-pyzstd
  • python-requests
  • python-systemd

Server setup

  1. Create an unprivileged user, arpm for instance.

  2. Create a config ~/.config/arpm.conf:

     [server]
     host=0.0.0.0
     port=32475
    

    Where host and port - address and port to listen on;

  3. Create a systemd unit:

    [Unit]
    Description=ArchLinux repository and packages server
    
    [Service]
    Type=notify
    User=arpm
    Group=arpm
    ExecStart=/usr/bin/arpm server -n /srv/archlinux/x86_64
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    

    Where /srv/archlinux/x86_64 - is the packages root directory.

  4. Run the server:

    systemctl enable --now arpm

CLI tool usage

  1. Create a config ~/.config/arpm.conf:

    [server]
    host=example.com
    port=32475
    

    Where example.com is the address of the server.

  2. Build a package:

    ./build.sh 'https://aur.archlinux.org/cgit/aur.git/snapshot/google-chrome.tar.gz'

  3. Create a new branch on server, custom for instance:

    ./arpm.py branch mk custom

  4. Upload package to the server:

    ./arpm.py pkg custom put out/*.pkg.tar.zstd

  5. Append the URL with a new branch to the /etc/pacman.conf:

    [custom]
    Server = http://example.com/archlinux/$arch/$repo
    

License

GPL.

arpm's People

Contributors

vimusov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.