Coder Social home page Coder Social logo

jcrd / python-pkgbuilder Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 402 KB

A CLI tool and library to build pacman packages in chroots

Home Page: https://jcrd.github.io/python-pkgbuilder/

License: MIT License

Python 97.61% Shell 2.39%
pacman makepkg chroot archlinux

python-pkgbuilder's Introduction

python-pkgbuilder

python-pkgbuilder provides a library and command-line tool for building pacman packages and their dependencies in chroots.

Dependencies

Setup

Two directories are expected to exist before python-pkgbuilder is run:

  • /var/cache/pkgbuilder
  • /var/lib/pkgbuilder

They should be writable by the user running python-pkgbuilder.

This can be achieved by:

  • creating the pkgbuilder group
  • setting group ownership of the above directories to pkgbuilder
  • setting the mode of the above directories to 0775
  • adding the user to the pkgbuilder group

Command-line client

Usage

usage: pkgbuilder [-h] [-C PACMAN_CONFIG] [-M MAKEPKG_CONFIG] [-b BUILDDIR]
                  [-c CHROOTDIR] [-d PKGBUILDS] [-i] [-I] [-r REPO] [-B] [-R]
                  [-a]
                  [name [name ...]]

positional arguments:
  name                  package name

optional arguments:
  -h, --help            show this help message and exit
  -C PACMAN_CONFIG, --pacman-config PACMAN_CONFIG
                        path to pacman config file
  -M MAKEPKG_CONFIG, --makepkg-config MAKEPKG_CONFIG
                        path to makepkg config file
  -b BUILDDIR, --builddir BUILDDIR
                        path to package build directory
  -c CHROOTDIR, --chrootdir CHROOTDIR
                        path to chroot directory
  -d PKGBUILDS, --pkgbuilds PKGBUILDS
                        path to directory of local PKGBUILDs
  -i, --install         install packages
  -I, --reinstall       reinstall packages
  -r REPO, --repo REPO  install package via local repo
  -B, --rebuild         build packages even if they exists (pass twice to
                        rebuild dependencies)
  -R, --remove          remove package build directories
  -a, --aur             search for packages in the AUR only

Python module

Simplest example:

from pkgbuilder.builder import Builder

b = Builder('aurutils')
b.build()
b.install()

See the API documentation for descriptions of all functions.

License

This project is licensed under the MIT License (see LICENSE).

python-pkgbuilder's People

Contributors

jcrd avatar

Watchers

 avatar

python-pkgbuilder's Issues

Parse PKGBUILDs for `provides`

Currently, only the directory name is used to satisfy local dependencies. The local PKGBUILD directory should be scanned and the pkgbuilds parsed (using python-srcinfo) to build a mapping of pkgbuilds to provided packages.

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.