Skip to content
Snippets Groups Projects
  1. Jul 05, 2017
    • Luke Shumaker's avatar
    • Luke Shumaker's avatar
      makechrootpkg: Add a comment warning about a bug in "sudo -i" · 56cace32
      Luke Shumaker authored
      The bug isn't currently triggered, but I accidentally did trigger when I
      was trying to modify the command a bit.  I figure a "caution" sign would be
      helpful to any future developers.
      56cace32
    • Luke Shumaker's avatar
      Makefile: m4_changequote([[[, ]]]) to avoid accidental quoting. · 2fdd1654
      Luke Shumaker authored
      The default m4 quote characters: `QUOTE' are troublesome, because ` is
      fairly likely to pop up in a shell script (if not for a subshell, because
      it is a useful character in comments and user-facing messages).
      
      So, this changes it to [[[QUOTE]]], as it is unlikely to see three braces
      together like that, let alone in unbalanced sets.
      2fdd1654
    • Luke Shumaker's avatar
      Makefile: add .DELETE_ON_ERROR: · 007d6fc1
      Luke Shumaker authored
      The absence of it was allowing an (m4-produced) syntax error in
      in a change I had made to be masked.
      007d6fc1
    • Luke Shumaker's avatar
      makechroot: download_sources: Accept makepkg_owner as an argument · 4f23609d
      Luke Shumaker authored
      What this is really doing is fixing a conflict that I had incorrectly
      resolved when rebasing what became 2fd5931a onto cda9cf43.  Of course,
      because of dynamic scoping, everything worked out, and everything worked as
      intended.
      
      Before cda9cf43, it was appropriate for download_sources to take src_owner
      as an argument, but after cda9cf43, it is now appropriate to take
      makepkg_user as an argument.  However, it still takes src_owner as an
      argument, but pays 0 attention to it; instead looking at makepkg_user which
      it happily inherited because of dynamic scoping.
      
      So change it to take makepkg_user as the argument.
      4f23609d
    • Luke Shumaker's avatar
      lib/archroot.sh: subvolume_delete_recursive: support arbitrary recursion · 31a800fd
      Luke Shumaker authored
      The `-xdev` flag to `find` makes it not recurse over subvolumes; so it only
      supports recursion with depth=1.  Fix this by having the function
      recursively call itself.
      31a800fd
    • Luke Shumaker's avatar
      makechrootpkg: sync_chroot: Make more general. · 6d199290
      Luke Shumaker authored
      This is inspired by the thought that went in to the delete_chroot
      is_subvolume commit.
      
      sync_chroot($chrootdir, $copydir) copies `$chrootdir/root` to `$copydir`.
      That seems a little silly; why do we care about "$chrootdir"?  Have it just
      be sync_chroot(source, destination) like every other sync/copy command.
      
      Where this becomes tricky is check to decide if we are going to use btrfs
      subvolumes or not.  We don't care if "$source/.." is on btrfs; the root
      could be a directly-mounted subvolume, but and the destination could be
      another subvolume of the same btrfs mounted somewhere else.
      
      The things we do care about are:
      
       - The source is a btrfs subvolume (so that we can snapshot it)
       - The source is on the same filesystem as the directory that the copy will
         be created in.
       - If the destination exists:
         * that it is not a mountpoint (so that we can delete and recreate it)
         * that it is a btrfs subvolume (so that we can quickly delete it)
      
      On the last point, it isn't necessary for creating the new snapshot, just
      for quick deletion.  That can be a separate check, where we use regular
      `rm` for deleting the existing copy, but use subvolume snapshots for
      creating the new one.
      6d199290
    • Luke Shumaker's avatar
      makechrootpkg: sync_chroot: make usage easier to understand. · 928744cb
      Luke Shumaker authored
      Also, shorten the "Synchronizing" message to only include the full path
      to the copy if it was specified.
      
      The capslocked variable names in the Usage comment were references to
      things in Parabola's tools, that didn't make much sense here out of
      context.
      928744cb
    • Luke Shumaker's avatar
      makechrootpkg: delete_chroot: Fix the is-btrfs-subvolume check. · 2a9b30ed
      Luke Shumaker authored
      First of all, it ran `is_btrfs "$chrootdir"` to decide if it was on
      btrfs, but $chrootdir wasn't defined locally; it just happens to work
      because $chrootdir was defined in main().  (I noticed this because in
      Parabola, it is called differently, so $chrootdir was empty).
      
      So I was tempted to just change it to `is_btrfs "$copydir"`, but if
      $copydir is just a regular directory on a btrfs filesystem, then it
      It would leave much of $copydir intact.  What we really care about is
      if $copydir is a btrfs subvolume; which we can check by combining the
      is_btrfs check with inspecting the inum of the directory.
      
      I put this combined check in lib/archroot.sh:is_subvolume.
      
      https://lists.archlinux.org/pipermail/arch-projects/2013-September/003901.html
      2a9b30ed
  2. Jul 04, 2017
  3. Apr 17, 2017
    • Luke Shumaker's avatar
      makechrootpkg: Avoid having code floating around outside of a function. · 49088b08
      Luke Shumaker authored
      This means wrapping variable initialization in init_variables(), and the
      main program routine in main().
      
      I did NOT put `shopt -s nullglob` in to a function.
      
      It make make sense to move init_variables() down into the main()
      function, instead of having it as a separate function up top (if this
      done, then the `-g` flag passed to `declare` in init_variables() can
      be dropped).  However, in interest of keeping the `diff -w` small, and
      merges/rebases simpler, this isn't done here.
      49088b08
  4. Apr 09, 2017
  5. Apr 05, 2017
  6. Mar 20, 2017
  7. Mar 07, 2017
Loading