summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-13Revert "arch-nspawn: Hack to give the inner process a controlling terminal"Jan Alexander Steffens (heftig)
Whoops, this will of course mess with nspawn arguments passed to arch-nspawn.
2017-09-13arch-nspawn: Hack to give the inner process a controlling terminalJan Alexander Steffens (heftig)
This was lost at some point.
2017-09-12arch-nspawn: Pass --as-pid2Jan Alexander Steffens (heftig)
As not all commands we run are capable of reaping processes correctly. For example, pacman is not.
2017-09-11Version 2017091120170911Sébastien Luttringer
2017-09-11arch-nspawn: Force PATH to be the Arch defaultSébastien Luttringer
systemd-nspawn use a default environ PATH value of: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Since filesystem 2017.08, this is no more overrided by /etc/profile to the Arch default: PATH=/usr/local/sbin:/usr/local/bin:/usr/bin
2017-08-24makechrootpkg: Also look for -e as --noextractJan Alexander Steffens (heftig)
2017-08-24makechrootpkg: Prevent removing build dir when --noextract specifiedMartchus
2017-08-24arch-nspawn: Add --keep-unit to prevent scope conflictsJan Alexander Steffens (heftig)
2017-08-13Version 2017081320170813Jan Alexander Steffens (heftig)
2017-07-13makechrootpkg: Skip integrity checks inside the chrootJan Alexander Steffens (heftig)
We've already done these during download_sources().
2017-07-13makechrootpkg: Use long args for makepkgJan Alexander Steffens (heftig)
Slightly more verbose, but also more understandable.
2017-07-13makechrootpkg: 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-05Merge branch 'lukeshu/rebase/master'libretools-20170705Luke Shumaker
2017-07-05arch-nspawn: make sure that makepkg.conf is always parsed as textLuke Shumaker
https://lists.parabola.nu/pipermail/dev/2017-June/005576.html
2017-07-05common.sh: Add a find_cached_srcpackage counterpart to find_cached_packageLuke Shumaker
2017-07-05makechrootpkg: Also build --allsource packages.Luke Shumaker
It also sets SRCEXT="-$pkgarch$SRCEXT", so that two runs of makechrootpkg on different architectures don't overwrite eachothers source packages.
2017-07-05mkarchroot: Use librelib rather than PATH to find arch-nspawn.Luke Shumaker
2017-07-05lib/common.sh: Discourage use in favor of libremessages.Luke Shumaker
2017-07-05checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text.Luke Shumaker
2017-07-05lib/common.sh: Internationalize.Luke Shumaker
2017-07-05makechrootpkg, arch-nspawn: Force-enable local '/repo/' repository.Luke Shumaker
The change in arch-nspawn is subtle: This was the source of "infamous" "it fails every other time" bug that took me over a year to solve. <https://labs.parabola.nu/issues/435> By having a repository of local packages (rather than simply running `pacman -U`), we are inviting pacman to cache them in `/var/cache/pacman/pkg`. Besides being needless disk writes, this actually causes a real issue. If the package gets rebuilt, pacman will balk, as the file no longer matches the cached signature. So, how do we prevent pacman from caching these local packages? Simple: include the directory they are already in in the pacman.conf:CacheDir list. This will prevent pacman from copying the files to one of the other cache directories.
2017-07-05arch-nspawn: add a table of CARCH/setarch overridesLuke Shumaker
The table is just armv7h->armv7l for now.
2017-07-05makechrootpkg: _chrootbuild: Split into _chroot{prepare,build}.Luke Shumaker
2017-07-05arch-nspawn: Message style: two spaces after a periodLuke Shumaker
This affects both the usage() text, and the error message if the `/.arch-chroot` version doesn't match. The latter is the one that I really care about, and motivates this change. On Parabola, the `arch-nspawn` program isn't in PATH, it's somewhere under `/usr/lib/`, and gets called as a helper to user-facing programs; and the error message is displayed directly to the user. These programs consistently put two spaces after a period when printing a message to the terminal.
2017-07-05Merge branch 'lukeshu/rebase/master'Luke Shumaker
2017-07-05archrelease: Whitespace adjustmentJan Alexander Steffens (heftig)
2017-07-05archrelease: sync the repos directory before commiting changesLaurent Carlier via arch-projects
2017-07-05makechrootpkg: 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-05Add `# 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-05Make 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-05Quote 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-05Make 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-05Makefile: Add a simple 'check' target that runs shellcheckLuke Shumaker
2017-07-05makechrootpkg: 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-05Makefile: 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-05Makefile: 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-05makechroot: 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-05lib/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-05makechrootpkg: 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-05makechrootpkg: 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-05makechrootpkg: 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-05arch-nspawn: make sure that makepkg.conf is always parsed as textLuke Shumaker
https://lists.parabola.nu/pipermail/dev/2017-June/005576.html
2017-07-04Sync makepkg.conf files with pacman 5.0.2-2Bartłomiej Piotrowski
2017-05-12Merge branch 'lukeshu/to-upstream/never'libretools-20170512Luke Shumaker
2017-05-12common.sh: Add a find_cached_srcpackage counterpart to find_cached_packageLuke Shumaker
2017-05-12makechrootpkg: Also build --allsource packages.Luke Shumaker
It also sets SRCEXT="-$pkgarch$SRCEXT", so that two runs of makechrootpkg on different architectures don't overwrite eachothers source packages.
2017-05-12mkarchroot: Use librelib rather than PATH to find arch-nspawn.Luke Shumaker
2017-05-12lib/common.sh: Discourage use in favor of libremessages.Luke Shumaker
2017-05-12checkpkg, find-libdeps, finddeps, lddd: Use libremessages to add help text.Luke Shumaker
2017-05-12lib/common.sh: Internationalize.Luke Shumaker