Giter Site home page Giter Site logo

aurutils / aurutils Goto Github PK

View Code? Open in Web Editor NEW
938.0 32.0 91.0 4.03 MB

Helper tools for the AUR.

License: ISC License

Shell 44.11% Makefile 0.89% Emacs Lisp 0.06% Roff 31.17% Awk 1.70% Dockerfile 0.48% Perl 21.59%
aur pacman archlinux repository-utilities aur-helper aurutils aur-packages

aurutils's Introduction

license aur

SYNOPSIS

aurutils is a collection of scripts to automate usage of the Arch User Repository, with different tasks such as package searching, update checks, or computing dependencies kept separate.

The chosen approach for managing packages is local pacman repositories, rather than foreign (installed by pacman -U) packages.

INSTALLATION

Install one of the following packages:

Upgrade notices are posted to the Arch forums. (RSS)

USAGE

Documentation is included as man pages with groff typesetting. They provide a general overview of the various utilities with several examples. Detailed instructions on how to set up a local repository can be found in the section CREATING A LOCAL REPOSITORY of the aur(1) man page.

TROUBLESHOOTING

See ISSUE_TEMPLATE.md. For informal discussion, see the #aurutils channel on Libera Chat.

aurutils's People

Contributors

abouvier avatar aladw avatar alfunx avatar aramirezverbio avatar ashymad avatar celti avatar claui avatar codefiles avatar cybershadow avatar dhouck avatar diabonas avatar e5ten avatar earnestly avatar fichtefoll avatar foxboron avatar jebrosen avatar jusw85 avatar lucki avatar maximbaz avatar morganamilo avatar nickray avatar nl6720 avatar null-git avatar rafasc avatar runical avatar tomeon avatar vannten avatar vorpalblade avatar vorph1 avatar wuestengecko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aurutils's Issues

aurclone

Script to fetch (and update?) sources with git clone. Example use: multireq ... | aurclone

Allow to exclude custom repository packages

aurbuild will use repose with a local repository. After packages are built and added, they are filtered alongside official repository packages with aurqueue. Possible workarounds:

  • Don't filter command-line arguments
  • Use pacsift --regex --repo=(core|extra|community)

aurbuild: preserve PKGDEST

Right now all the script does is check if the variable is set; it does not pass it on to makepkg, and values in /etc/makepkg.conf take priority (via source).

PKGBUILD

To track aurutils via pacman.

repofind: ensure that write permission are set in [custom] path

After enabling the [custom] repo and configured its path in pacman.conf, aursync fails because the directory hasn't be created yet:

==> ERROR: You do not have write permission to store packages in /home/remy/aur/custompkgs.
    Aborting...

You probably want to ensure the configured directory actually exists before trying to store package there, and also check its permissions.

Edit: Also, I get a warning: database file for 'custom' does not exist on the very first use. You might want to add a check to run repose in case this situation occurs.

aursearch: improve tmp file check

This construct is terrible:

tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT

# Check if tmp is not empty, as cd '' returns 0
if ! { [[ $tmp ]] && cd "$tmp"; }; then
    exit 1
fi

aursearch: PCRE support

The basic idea is to have a list of all AUR packages, and run grep -P on it. The RPC has no regex support, and a query minimum of two characters.

Possible ways to tackle this:

  • Create a giant wordlist which matches pkgname in PKGBUILD(5). Considering package names go up and beyond 60 characters, this is not feasible (66^60 entries)
  • Do as cower, and query the first two non-regex characters. Will prevent inverse searches.
  • Query all two-letter combinations, save the results to temporary files, remove duplicates, and concatenate. This can be done in parallel, and the final result cached for later queries (XDG_CACHE_HOME)

aurqueue: non-pkgbase depends

Example: libunity. Before 3ed7884, pkgbase and pkgname appeared both in the output, which was problematic for automatic building. Now pkgbase appears (here: libdbusmenu), but in the wrong order, as tsort only sees "libunity libdbusmenu-glib".

aurchain handles this by replacing pkgname entries with pkgbase.

aursearch: cache results

We already cache packages.gz (if curl -z works, at least), we could also cache info results (for the complete AUR this is about 19mb), to be parsed later. Arguments/patterns could be stored via cksum.

aurchain: split package support

Since for some reason you can query split packages via RPC, they are included in the aurchain output. aurweb includes PackageBase in JSON, so we could work with that.

aurchain: versioned dependencies

error: target not found: python-yapsy>=1.11.223
error: target not found: python2-yapsy>=1.11.223

Apparently, aurchain misses one dependency aurqueue catched.

Upstream issues

Closed

Reported

Not reported

  • expac misses support for --sysroot
  • libmakepkg message.sh misses PURPLE and CYAN
  • mkarchroot Failed to copy /etc/resolv.conf to /root/etc/resolv.conf
  • makechrootpkg rm: cannot remove '/logdest/logpipe.zJztfPcl': No such file or directory
    pacman-dev
  • makechrootpkg default makepkg options cannot be overridden (in particular --noconfirm)
  • makepkg hangs on INT (Ctrl+C, interactive) when run from a script
  • repo-add relies on hardcoded list of extensions: mimetype should suffice

aurbuild: INT traps

makepkg seems to freeze the parent when it gets INT inside an (interactive) script.

aurchain: missing dependencies

This happens when a split package with pkgbase that doesn't match a given pkgname (exactly, with grep -x) . Introduced by switching to PackageBase in #27.

Example (libunity)

{
   "ID": 273568,
   "Name": "libdbusmenu-glib",
   "PackageBaseID": 107058,
   "PackageBase": "libdbusmenu",
   "Version": "12.10.3.15.04.20150410.2-2",
   "Description": "A library for passing menus over DBus",
   "URL": "https:\/\/launchpad.net\/libdbusmenu",
   "NumVotes": 386,
   "Popularity": 18.675602999999999,
   "OutOfDate": null,
   "Maintainer": "WoefulDerelict",
   "FirstSubmitted": 1454522692,
   "LastModified": 1455036962,
   "URLPath": "\/cgit\/aur.git\/snapshot\/libdbusmenu.tar.gz",
   "Depends": [
    "glib2"
   ],
   "MakeDepends": [
    "docbook-xsl",
    "gnome-common",
    "gnome-doc-utils",
    "gobject-introspection",
    "gtk2",
    "gtk3",
    "intltool",
    "vala"
   ],
   "License": [
    "GPL3"
   ],
   "Keywords": []
  },

See also #35

aurbuild: select repo interactively

Instead of hardcoding a repo name (or specifying it manually), could pacconf parse the pacman configuration, and present a list of file:// repos ?

The choice could then be stored in XDG_CONFIG_HOME/aurbuild.

aursearch: parse JSON

There are many bash implementations to search the AUR, none ideal:

aurget: Uses a large awk filter
wrapaur: Runs an awk filter sequentially (slow)
prm: Runs jshon sequentially (slow)
packer: Uses one jshon call per argument + a big sed/paste/sort filter

We can get colors from util.sh, as with the other scripts. jq may be more straightforward here.

aurchain: sequential curl usage

Right now this performs badly on slow internet connections, e.g. plasma-git-meta with 22 requests can take 30+ seconds. The reason for sequential requests is that dependency trees are not visible from the RPC. bauerbill performs better here; it appears to use a "seen" logic to save requests.

Documentation: comments, examples

  • howto: create a local repository
  • howto: migrate foreign packages
  • add examples
  • move to .org
  • code comments
    • aurbuild
    • aurchain
    • aurqueue
    • aursift
    • aursync
    • repofind (5565e83)

See also: #76

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.