summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-25makechrootpkg: Prevent removing build dir when --noextract specifiedMartchus
2017-08-25arch-nspawn: Add --keep-unit to prevent scope conflictsJan Alexander Steffens (heftig)
2017-08-14makechrootpkg.in: set correct ownership of WORKDIRv20170814archlinux32/v20170814Erich Eckner
2017-08-14Version 20170813v20170813archlinux32/v20170813Jan Alexander Steffens (heftig)
2017-07-31remove empty tree if "--verifysource" failedErich Eckner
2017-07-14makechrootpkg: Skip integrity checks inside the chrootv20170714archlinux32/v20170714Jan Alexander Steffens (heftig)
We've already done these during download_sources().
2017-07-14makechrootpkg: Use long args for makepkgJan Alexander Steffens (heftig)
Slightly more verbose, but also more understandable.
2017-07-14makechrootpkg: Move makepkg-as-root check to main()Jan Alexander Steffens (heftig)
download_sources(), while the first invocation of makepkg, is a rather odd place for this kind of guard.
2017-07-14archrelease: Whitespace adjustmentJan Alexander Steffens (heftig)
2017-07-14archrelease: sync the repos directory before commiting changesLaurent Carlier via arch-projects
2017-07-14makechrootpkg: Fix broken symlinks because of chroot SRCPKGDEST /srcpkgdestLuke Shumaker
Commit 58968cf fixed symlinks for package products in $startdir in light of the simplified chroot setup. However, a similar change needs to be made for source-package products. This was an easy omission to make because makechrootpkg does not produce source-pakcages by default.
2017-07-14Add `# shellcheck` directives to quiet shellcheck, add PKGBUILD.protoLuke Shumaker
The added PKGBUILD.proto file is so that shellcheck can know know what to expect that a PKGBUILD sets.
2017-07-14Make slightly more involved changes to make shellcheck happy.Luke Shumaker
- Use `read -r` instead of other forms of read or looping - Use arrays instead of strings with whitespaces. - In one instance, use ${var%%.*} instead of $(echo $var|cut -f. -d1)
2017-07-14Quote strings that shellcheck warns about.Luke Shumaker
These changes are all strictly "slap some double-quotes in there". Anything more than that is not included in this commit.
2017-07-14Make purely stylistic changes to make shellcheck happier.Luke Shumaker
These are purely stylistic changes that make shellcheck complain less. This does NOT include things like quoting currently unquoted variables.
2017-07-14Makefile: Add a simple 'check' target that runs shellcheckLuke Shumaker
2017-07-14makechrootpkg: Add a comment warning about a bug in "sudo -i"Luke Shumaker
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.
2017-07-14Makefile: m4_changequote([[[, ]]]) to avoid accidental quoting.Luke Shumaker
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.
2017-07-14Makefile: add .DELETE_ON_ERROR:Luke Shumaker
The absence of it was allowing an (m4-produced) syntax error in in a change I had made to be masked.
2017-07-14makechroot: download_sources: Accept makepkg_owner as an argumentLuke Shumaker
What this is really doing is fixing a conflict that I had incorrectly resolved when rebasing what became 2fd5931 onto cda9cf4. Of course, because of dynamic scoping, everything worked out, and everything worked as intended. Before cda9cf4, it was appropriate for download_sources to take src_owner as an argument, but after cda9cf4, 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.
2017-07-14lib/archroot.sh: subvolume_delete_recursive: support arbitrary recursionLuke Shumaker
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.
2017-07-14makechrootpkg: sync_chroot: Make more general.Luke Shumaker
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.
2017-07-14makechrootpkg: sync_chroot: make usage easier to understand.Luke Shumaker
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.
2017-07-14makechrootpkg: delete_chroot: Fix the is-btrfs-subvolume check.Luke Shumaker
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
2017-07-14Sync makepkg.conf files with pacman 5.0.2-2Bartłomiej Piotrowski
2017-07-07move with-build-support build to separate symlink and config filev20170707archlinux32/v20170707Erich Eckner
2017-07-06archbuild: delete "root" even if it is a mountpointErich Eckner
2017-07-04add repo build-support for i686v20170704archlinux32/v20170704Erich Eckner
2017-06-29archbuild: cross-mount cache directory, so inside it is ↵v20170629archlinux32/v20170629Erich Eckner
/var/cache/pacman/pkg and outside /var/cache/archbuild32
2017-06-27archbuild: use correct pacman config file for x86_64Erich Eckner
2017-06-27makechrootpkg: put "keyserver-options auto-key-retrieve" into gpg.conf, so ↵v20170627archlinux32/v20170627Erich Eckner
"git verify-tag" downloads missing key(s)
2017-06-27archbuild.in: clean up previous commitErich Eckner
2017-06-27archbuild.in: delete old chroot more forcefullyErich Eckner
2017-06-22remove i486 to not confuse endusers (wasn't functional)v20170622archlinux32/v20170622Erich Eckner
2017-06-22separate mirrorlist for i686 and x86_64Erich Eckner
2017-06-16bugfixes concerning $CARCH, Architecture= and --cachev20170616archlinux32/v20170616Erich Eckner
2017-06-16archbuild.in: set pacman cache dir to /var/cache/archbuild32 in case of ↵Erich Eckner
non-x86_64-build, so we do not use any-packages from x86_64 mirrors
2017-06-16archbuild.in: fix indentationErich Eckner
2017-05-29arch-nspawn: also parse our mirror layout ↵Erich Eckner
(http[s]://mirror.url/path/$arch/$repo)
2017-05-18force correct architecture in pacmanErich Eckner
2017-05-14archbuild: add --arch=$CARCH to pacman optionsv20170514archlinux32/v20170514Erich Eckner
2017-05-13enable i486, add mirror.archlinux32.org as pacman mirror for i*86v20170513archlinux32/v20170513Erich Eckner
2017-04-17makechrootpkg: Avoid having code floating around outside of a function.Luke Shumaker
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.
2017-04-09makechrootpkg: Delete chroot subvols recursively when using -TJan Alexander Steffens (heftig)
I overlooked this one. Fixes FS#53513.
2017-04-05makechrootpkg: Unindent as suggested in 2fd5931Jan Alexander Steffens (heftig)
2017-04-05mkarchroot: Don't let the environment affect pacstrap (sans proxy settings).Luke Shumaker
A previous iteration of this change (libretools commit d7dcce53396d) simply inserted `env -i` to clear the environment. However, that lead to it ignoring proxy settings, which some users had problems with: https://labs.parabola.nu/issues/487: > To fix other bugs, the pacstrap environment is blank, which also > means that the proxy settings are blank. So (in libretools commit d17d1d82349f), I changed it to use `declare -x` to inspect the environment, and create a version of it only consisting of variables ending with "_proxy" (case-insensitive). I honestly don't remember what "other bugs" prompted me to clear the environment in the first place.
2017-04-05makechrootpkg: Improve status messages.Luke Shumaker
In sync_chroot(), this makes the messages be a bit more precise with exactly which thing they are syncing where. This is based on my users expressing confusion at what is going on (especially when something is taking a long time, and they have to blame something for blocking). With these changes, I haven't gotten such confusion in a long time (but maybe my users just got used to it). In delete_chroot(), this changes "temporary copy" to "chroot copy", since in Parabola's version of the tools, the function can get called from other places, and it isn't necessarily operating on a temporary copy.
2017-04-05mkarchroot, arch-nspawn: Add an `-s` flag to inhibit `setarch`.Luke Shumaker
This allows us to run an ARM chroot on an x86 box; as the binfmt runner will set the architecture for us, and the x86 `/usr/bin/setarch` program won't know about the ARM architecture string.
2017-04-05mkarchroot, arch-nspawn: Add an `-f` flag to add files to copy.Luke Shumaker
This allows us to copy in files like `qemu-arm-static`, which is necessary for running an ARM chroot on an x86 box.
2017-04-05makechrootpkg: Adjust to have the functions work with `set -u`.Luke Shumaker
Even though main() doesn't call `set -u`; this way the functions will continue to work if copied into an environment with `set -u`, or so that we are ready if we ever want to start using `set -u`.