This project is mirrored from https://github.com/AladW/aurutils. Pull mirroring updated .
  1. 25 May, 2022 4 commits
    • Alad Wenter's avatar
      1420af6f
    • Alad Wenter's avatar
      build: sign files in $var_tmp · 38efac40
      Alad Wenter authored
      When packages are built, `gpg` is run in `$var_tmp`. This was not the
      case when packages are existing in the local repository, but their
      signatures are not. Running `gpg` in `$var_tmp` also in this case
      ensures:
      
      - the build user (--user) has write access to the signature;
      - `gpg` does not operate directly on the local repository;
      - `gpg` does not try to overwrite signatures (in case of concurrent processes).
      
      The multiple cases that need to be considered are formulated in the
      small proof below. Note that a build user still needs read access to
      packages in the local repository (implicit from `as_user repo-add`).
      
      %<---------
      let $PWD == $var_tmp, $db_root != $var_tmp,
          $p local repository path $db_root/<package>, $p_base = basename $p
      
      assumption: --sign not specified to makepkg (otherwise, $var_tmp already contains a signature)
      
      package existing, signature in local repo
      we have:
        ! -f $p_base.sig    => ! -f $p_base.sig   [preserve signature]
          -f $p.sig
        ! -f $p_base
          -f $p
      
      package existing, no signature in local repo
      we have:
        ! -f $p_base.sig    =>   -f $p_base.sig   [write new signature]
        ! -f $p.sig
        ! -f $p_base
          -f $p
      
      new package was built, basename identical to entry in local repo (--rebuild)
      we have:
        ! -f $p_base.sig    =>   -f $p_base.sig
          -f $p.sig
          -f $p_base
          -f $p
      
      new package was built, basename does not exist in local repo
      we have:
        ! -f $p_base.sig    =>   -f $p_base.sig
        ! -f $p.sig
          -f $p_base
        ! -f $p
      38efac40
    • Alad Wenter's avatar
      build: write result after moving packages to local repository · f741909c
      Alad Wenter authored
      Priorly, a path to the package as part of the local repository was
      printed. However, if aur-build failed prior to moving the package there
      (i.e. on a gpg error), then the package would still be in the temporary
      directory - giving an invalid path in the result file.
      f741909c
    • Alad Wenter's avatar
      build: canonicalize db_root · 2c45f2b9
      Alad Wenter authored
      Otherwise, if --root=. is specified and `mv` operates in `$var_tmp`,
      files are moved to themselves.
      2c45f2b9
  2. 24 May, 2022 2 commits
  3. 13 May, 2022 2 commits
  4. 12 May, 2022 3 commits
  5. 10 May, 2022 14 commits
  6. 29 Apr, 2022 1 commit
    • Alad Wenter's avatar
      sync: expose aur-build --user · 4e83f981
      Alad Wenter authored
      If the generated ninja.build contains the --user option, pointing to an
      unprivileged user, it can then be run as root (sudo env AUR_ASROOT=1
      ninja ...).
      4e83f981
  7. 28 Apr, 2022 4 commits
  8. 26 Apr, 2022 3 commits
    • Alad Wenter's avatar
      aur.in: set env path with AUR_ENV · ddd9171b
      Alad Wenter authored
      This allows to run tests without influence from the env file
      (AUR_ENV=/dev/null, i.e. for issue/714)
      ddd9171b
    • Alad Wenter's avatar
      Merge pull request #991 from AladW/search-stdin-table · 44167b06
      Alad Wenter authored
      search: add `--stdin-table`, rename `--fmt-stdin` -> `--stdin-json`
      44167b06
    • Alad Wenter's avatar
      search: add --stdin-json, --stdin-table · bf74303e
      Alad Wenter authored
      These two options replace --fmt-stdin and allow more flexibility. For
      example, the pipeline given in 1633366b
      using jq(1) can be replaced with a faster awk(1) pipeline:
      
        $ time aur pkglist --info | jq ... | aur search --stdin-json
      
        real	0m2.661s
        user	0m3.569s
        sys	0m0.283s
      
        $ time aur pkglist -- '^r-' | aur search -i --table - \
            | awk -F\\t '{ if ($8 == "-") print; }' \
            | aur search --stdin-table
      
        real	0m0.725s
        user	0m0.531s
        sys	0m0.125s
      bf74303e
  9. 25 Apr, 2022 2 commits
    • Alad Wenter's avatar
      Merge pull request #989 from AladW/search-fmt-stdin · ab4a13ee
      Alad Wenter authored
      search: add --fmt-stdin
      ab4a13ee
    • Alad Wenter's avatar
      search: add --fmt-stdin · 1633366b
      Alad Wenter authored
      When --fmt-stdin is set, JSON is taken directly from standard input,
      instead of from aur-query. This allows in particular to pipe aur-pkglist
      --info / --search output to aur-search.
      
      For example, the following pipeline returns all orphan packages whose
      name starts in 'r-':
      
       $ aur pkglist --info | jq -r '{
              "results": [.[] |
                  select(.Maintainer == null) |
                  select(.Name | test("^r-"))
              ], "type": "search", "version": 5
          }' | aur search --fmt-stdin
      
      This example originates from aurweb returning "Too many results" when
      querying an empty maintainer (orphan) search. See:
      
      archlinux/aurweb#357
      1633366b
  10. 22 Apr, 2022 4 commits
  11. 21 Apr, 2022 1 commit