Skip to content
Snippets Groups Projects
  1. Dec 13, 2022
  2. Dec 12, 2022
    • Allan McRae's avatar
      libmakepkg: fix compatibility with bash-5.2 patsub_replacement · 0e938f18
      Allan McRae authored
      
      Bash-5.2 introduced the patsub_replacement shell option, which is enabled
      by default.  Apparently is it supposed to handle a sed-like idiom, but
      what it does achieve is making any substitution involving a "&" requiring
      special care.
      
      For makepkg's DLAGENTS, we replace "%o" and "%u" if present.  Any "&" in
      the replacement fields triggers patsub_replacement unless quoted.  This is
      particularly important for the URL field.
      
      Add relevant quotes to avoid issues.
      
      Signed-off-by: default avatarAllan McRae <allan@archlinux.org>
      0e938f18
  3. Dec 04, 2022
  4. Nov 08, 2022
  5. Nov 07, 2022
  6. Oct 15, 2022
    • Andrew Gregory's avatar
      set bash env variables before running scripts · da68447e
      Andrew Gregory authored
      Bash sources user configuration files under a number of conditions that
      can cause issues with scripts when bash is used as the scriptlet shell.
      
      Bash assumes it's being run under rsh/ssh if stdin is connected to a
      socket and sources the user bashrc unless the environment variable
      $SHLVL is >= 2.  Commit 6a4c6a02
      switched from pipes to sockets when communicating with child processes
      to work around SIGPIPE issues.  Normally $SHLVL would be inherited from
      the shell running pacman, but operations involving scriptlets are
      generally run with sudo which does not let the $SHLVL variable through
      unless specifically configured to.
      
      Similarly $BASH_ENV can cause bash to source user-specified configuration
      files if set.
      
      https://lists.gnu.org/archive/html/help-bash/2022-02/msg00082.html
      
      
      
      Note: the list discussion and bash source all reference SHLVL >= 2, this
      is the SHLVL value *after* bash has incremented it on startup.  Setting
      it to 1 in pacman is sufficient to disable the unwanted behavior.
      
      Signed-off-by: default avatarAndrew Gregory <andrew.gregory.8@gmail.com>
      da68447e
  7. Oct 09, 2022
  8. Oct 08, 2022
  9. Oct 02, 2022
  10. Sep 26, 2022
  11. Sep 07, 2022
  12. Aug 04, 2022
  13. Aug 02, 2022
  14. Jul 29, 2022
    • solo turn's avatar
      makepkg: Add GITFLAGS environmental variable to customise checkout · e017a597
      solo turn authored and Allan McRae's avatar Allan McRae committed
      The default flag used to clone a git repository when using makepkg
      is "--mirror". However, when working with huge repositories, the use
      of different flags during cloning can allow an faster checkout. For
      example, using "--filter=blob:none" allows for small checkouts, at
      the expense of requiring downloads during the build stage if anything
      but the HEAD commit is used for the build. In addition, this example
      would serve as a replacement for the often requested (but broken)
      addition of --depth=1.
      
      Add support for the environment variable GITFLAG to pass flags for
      the git clone command. Note that this overrides the default rather
      than adding to it in order to prevent incompatibilities.
      e017a597
    • Daan De Meyer's avatar
      Add --keyringdir meson option to configure the keyring directory · 79bd5121
      Daan De Meyer authored and Allan McRae's avatar Allan McRae committed
      On Debian, keyrings are stored in /usr/share/keyrings. To support
      this, let's add a new --keyringdir option that allows configuring
      the directory under datarootdir where the keyrings should be
      imported from. We default to 'pacman/keyrings' for backwards
      compatibility.
      79bd5121
  15. Jul 28, 2022
  16. Jul 22, 2022
    • Chris Down's avatar
      util: Flush cursor state to stdout before removing signal handler · ff7c6c8e
      Chris Down authored and Allan McRae's avatar Allan McRae committed
      
      It's possible that the cursor does not reappear after pressing ^C during
      shutdown. In my case, I noticed this when pressing ^C after getting
      results from `pacman -F` -- this can reasonably reliably be triggered by
      issuing a file query and pressing ^C shortly after results are shown.
      
      There are two reasons for this issue:
      
      1. The graceful SIGINT handler is removed at the start of cleanup(), but
         the window from entering cleanup() to reaching exit() is non trivial.
         The main offender is FREELIST(pm_targets), which on my T14s takes
         >0.1s to execute. This means that if you are unlucky enough to press
         ^C while there, the cursor isn't coming back, because we haven't
         issued any command to show the cursor again yet, and the userspace
         signal handler is already blown away.
      2. Moving console_cursor_show() to earlier in cleanup() only half solves
         the issue. While it's fine not to flush after _hiding_ the cursor,
         since it will at least make itself apparent before any other text
         reaches the screen, _showing_ the cursor must be followed by flushing
         stdout, because once the graceful SIGINT handler is gone, if you
         press ^C, no flush will be triggered (and thus there will be no
         cursor).
      
      This fixes the issue by always starting out by showing the cursor again
      at cleanup() time. This means that no matter where we get caught at ^C,
      we will not end up leaving the terminal without its beloved ensign.
      
      Signed-off-by: default avatarChris Down <chris@chrisdown.name>
      Signed-off-by: default avatarAllan McRae <allan@archlinux.org>
      ff7c6c8e
  17. Jul 21, 2022
Loading