summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-08-09arch-nspawn should not take pacman cache from hostBrian Bidulock1-1/+1
Previously, arch-nspawn was using the hosts' pacman cache in the chroot even when the chroot was set up with a different cache by mkarchroot, unless specified with the -c flag. Problem is that makechrootpkg passes no -C, -M nor -c flags to arch-nspawn, so all values must be obtained from the working directory. This change take the cache directories from the pacman.conf specified with the -C option unless the -c option was given (as is the case when the chroot is set up with mkarchroot), and, when neither -C nor -c is given (as is the case when invoked by makechrootpkg), the cache directory is taken from the pacman.conf in the working directory. This wasn't such an issue when i686 was mainline, however, which building packages in a chroot against archlinux32 on an x86_64 platform, the cache of the host should _never_ be used. Rebased by eschwartz on top of cachedir reworking. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09arch-nspawn: don't delete the guest gpg configurationEli Schwartz1-1/+2
It's important to ensure the guest has up to date data because updating a chroot after quite some time can potentially rely on updated archlinux-keyring, something which the host machine either kept up to date on or manually fixed, but it kills automation to mess around with chroot configs like that. Alternatively, signed packages added with -I need to work, and we assume the host is configured to accept these. That is *not* a good reason to completely nuke whatever is in the guest, though. A guest might have been manually configured to accept keys which aren't accepted by the host; one example of this happening in practice, is archlinux32 when building 32-bit packages from an archlinux host. The right solution is to append to, rather thna overwrite, the chrooted guest's pacman keyring. To do this, we will use gpg's native facility to dump the keyring from one GNUPGHOME and import it into another. We'd use pacman-key's --import option directly, but this doesn't support passing custom options like --import-options import-local-sigs Finally use pacman-key's native facility to import the trust status from the host. While we are at it, fix a bug where we didn't respect the host's pacman.conf settings for the GpgDir. While it isn't wildly likely a user will choose to customize this, it is a valid and supported use case and we must think about this ourselves. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09fixup commit "arch-nspawn: get all mirrors from host"Eli Schwartz1-1/+0
In commit d9b73504484da7e185dc590ef13d5f31942f6051, a line was deleted that had a shellcheck ignore marker, but the marker itself was left in (and had nothing to do). So, remove it. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09mkarchroot: don't create a broken chroot by defaultEli Schwartz1-1/+1
It's incorrect to make pacman completely useless inside the chroot by starting off with no pacman keyring. Assuming that the only consumers of a new chroot will be arch-nspawn (which copies over the hostconf) is bad design, and furthermore makes it impossible to fix other issues in arch-nspawn itself. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09makechrootpkg: load makepkg.conf variables correctlyEli Schwartz1-1/+1
Since makepkg.conf is a bash-compatible configuration file, it must be sourced. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09Makefile: don't inject DESTDIR into the pkgdatadirEli Schwartz1-1/+1
In commit 46c4def0733a78ce08702d188e3e1a141fb07316, we added support for nonstandard PREFIX installations, but DESTDIR was and is never supposed to be a part of that. While DESTDIR isn't terribly likely to be used during `make all` invocations, that's no reason to break horribly if it is used for some reason. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-08-09Migrate pacman.conf CacheDir parsing to pacman-confEli Schwartz2-15/+14
And while we're at it, make this more consistent. Currently we unnecessarily support only one -c /path/to/cachedir option. This requires slightly more thorough handling in mkarchroot to ensure all custom cachedirs are passed on to arch-nspawn. Rework to simply forward all arguments to arch-nspawn (minus final arguments used for pacman -Sy packagelist). Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2019-06-13offload-build: disable shellcheck false-positive for shell-escapeLevente Polyak1-0/+1
2019-06-12doc: add manpage for the new offload-build toolEli Schwartz via arch-projects2-0/+53
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-06-12Add new tool: offload-buildEli Schwartz via arch-projects2-0/+108
This tool is useful for running makechrootpkg on a remote build server, and is by default hooked up to send a PKGBUILD and initiate a build on our shiny new build server "dragon". Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-06-12Revert "makechrootpkg: sync_chroot: Make more general."Eli Schwartz via arch-projects2-27/+13
This reverts commit 6d1992909cc46e293027ff488ae2632047603e66. It has never worked. In commit c86823a2d4a4152c71faa1c3bab227756232996f it was noted that it compared the device numbers for [[ $1 = $1 ]] which was a useless check and always returned true, for *any* btrfs filesystem. Now that the function is corrected to compare [[ $1 = $2 ]] the check is still useless, but this time because it always returns false -- btrfs subvolumes on the same filesystem do *not* share device numbers. So let's go back to the original working implementation that only matters in terms of makechrootpkg, and just checks if makechrootpkg's root working directory is btrfs (in which case we know it will be a subvolume because mkarchroot will create it that way). This restores our special support for the btrfs filesystem. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-04-20fix whitespace/indentation errorsErich Eckner3-3/+3
Some lines are indented by spaces, while adjacent lines are indentet by tabs. We should use tabs on both. Signed-off-by: Erich Eckner <git@eckner.net>
2019-04-20is_same_fs() in lib/archroot.sh should use $1 and $2, not $1 and $1Erich Eckner1-1/+1
The old behaviour would always evaluate to true - this is certainly not what that function should do. Signed-off-by: Erich Eckner <git@eckner.net>
2019-03-29Version 2019032920190329Levente Polyak1-1/+1
2019-03-29readme: fix faulty whitespace in release commandsLevente Polyak1-1/+1
2019-03-29make: fix faulty install targetsLevente Polyak1-3/+3
This fixes a regression introduced in eeb1c0e59ee8a5f7be4a6742ba6689af54e9ac7d
2019-03-28fix up sogrep manpage to correspond with current sogrep commandEli Schwartz via arch-projects1-2/+8
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-03-28add sogrep commandEli Schwartz via arch-projects1-25/+76
This is the new and improved, canonical sogrep command, now with a valid license. The previous version of sogrep had several issues and inefficiencies, and ultimately wasn't really the finished project I wanted it to be. Due to a mistake in communication, I was totally unaware it was in the process of being merged at all, nor that there was a licensing issue, or I would have recommended waiting for both further improvements, and a declaration of license intent; nevertheless, here it is now, and I formally give this over into the GPLv2+ domain. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-03-28sogrep: don't be templated when it is not templatedEli Schwartz via arch-projects3-4/+6
Partition the Makefile targets to only clean configured files, and make the configured files be a subset of the bin programs. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-03-25Create a general READMEJelle van der Waa1-0/+24
Introduce a README which describes where to send patches and how to release a new version of devtools. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-25makechrootpkg: keep *DEST, MAKEFLAGS & PACKAGERMatt Robinson1-1/+1
If makechrootpkg is called as non-root, the {SRC,SRCPKG,PKG,LOG}DEST, MAKEFLAGS and PACKAGER environment variables are lost in the call to check_root(). Add these to the passed keepenv list so that they are preserved instead.
2019-03-25arch-nspawn: get all mirrors from hostChristian Hesse1-6/+8
Now that pacconf gives us all mirrors we can use them, instead of just the first one. Signed-off-by: Christian Hesse <mail@eworm.de>
2019-03-17sogrep: remove duplicate sogrepJelle van der Waa2-98/+1
The rename of sogrep to sogrep.in failed to remove sogrep and adding it to .gitignore. Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
2019-03-16doc: Add myself as maintainerJelle van der Waa1-0/+1
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-16sogrep: rename to sogrep.in so make clean worksJelle van der Waa2-0/+98
make clean removes all .in converted files to a file without .in which in the make clean step is removed. So running make clean will remove sogrep since it's specified as BINPROGS. In the future this steps should be removed for sogrep since it is a standalone script. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-16find-libdeps: fix indentation in caseJelle van der Waa1-1/+1
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-16doc: add man pages for find-{libdeps,libprovides}Jelle van der Waa3-7/+33
Add a simple man page for find-libdeps and find-libprovides. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-13doc: add Environment variables section to sogrepJelle van der Waa1-0/+11
Add a section about environment variables which influence sogrep's behaviour. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-13doc: add man page for mkarchrootJelle van der Waa2-1/+48
2019-03-13crossrepomove: do not set svn propsetJelle van der Waa1-1/+0
svn propset's where determined to be non-reproducible and therefore where removed from svn. Don't introduce them when moving packages between repos. Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-13Add sogrepSven-Hendrik Haase4-3/+134
This is from Eli's dotfiles after he'd cleaned it up but never actually went ahead and made this PR. I figure it's time to add it.
2019-02-24remove arch rm as it's not really usefulJelle van der Waa4-23/+1
archrm is a not much more fancy rm -rf and therefore not really useful to ship.
2019-02-09conf: sync makepkg.conf with latest version from pacman packageLevente Polyak1-12/+11
2019-01-22ci: adding travis support for basic checkLevente Polyak1-0/+28
2019-01-22find-libdeps: in functions use return instead of continue to abortLevente Polyak1-1/+1
Even if continue would work, it does exactly the same as a return in the way this function is being used.
2019-01-22remove empty tree if "--verifysource" failedErich Eckner1-7/+3
makechrootpkg's download_sources() leaves a stray directory if "makepkg --verifysource" failed. We use "setup_workdir" instead of "mktemp -d", because this ensures the correct garbage collection. Signed-off-by: Erich Eckner <git@eckner.net>
2019-01-22Expand check_root keepenv variablesMorten Linderud1-1/+1
Les us source makepkg.conf settings from the environemnt. This also includes `GNUPGHOME` which is present in `makechrootpkg`, but not included in archbuild. Signed-off-by: Morten Linderud <foxboron@archlinux.org>
2018-09-09doc: add find-libprovides man pageJelle van der Waa1-0/+24
2018-09-09doc: Add checkpkg man pageJelle van der Waa2-1/+29
2018-09-09doc: Add lddd man pageJelle van der Waa5-2/+111
2018-05-31Version 2018053120180531Jan Alexander Steffens (heftig)1-1/+1
2018-05-31makechrootpkg: whitelist return code 14 from makepkgEli Schwartz via arch-projects1-0/+7
makepkg 5.1 implements error codes, and 14 means that installing the packages after they were built has failed. We don't care about this error and would like makechrootpkg to succeed regardless, e.g. for split packages that are mutually exclusive. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2018-05-29update makefile for current versionAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-16Do not assume the makechrootpkg user's groupname is the same as the username20180528Eli Schwartz1-1/+1
chown support "$user:$group" but also "$user:" which infers $group rather than leaving it as root. This looks up the group name in cases where the default group is e.g. "users" and users do not get their own unique groups.
2018-05-13Proper fix for pacman-git returning file urls from the cacheEli Schwartz1-1/+2
It is much nicer to use a proper configuration parser to retrieve the primary mirror, rather than clever hacks using undocumented APIs, especially when their behavior as used then breaks in later releases. Fortunately, pacutils exists now and pacconf handles this quite elegantly. It has since been moved to pacman-git proper. Check if pacman-conf from a new enough version of pacman exists and fallback on pacconf from pacutils.
2018-05-13Revert "arch-nspawn: Work around pacman master returning file-URLs from the ↵Eli Schwartz1-1/+1
cache" This reverts commit eb6b0e3f11279b6512b1469ff042d2982eaaeef4. This never worked, as pacman-git returns file urls from the cache anyway and pacman stable doesn't have any problem at all. Having useless code which makes people think the issue is solved when it really isn't, is bloat, so remove it.
2018-05-13makechrootpkg: Do not copy the user keyring into the chroot.Eli Schwartz1-6/+1
Since commit 75fdff1811a0487f82c75b2e260da905102b4eea we no longer run integrity checks inside the chroot anyway, so this is no longer needed and will never be used.
2018-05-12makechrootpkg: add /etc/shadow entry for builduserEvangelos Foutras1-1/+2
Without it, sudo 1.8.23 will return an error: sudo: PAM account management error: Authentication service cannot retrieve authentication info
2018-03-24makechrootpkg: fix verifysource with pacman-gitEli Schwartz1-1/+1
In pacman-git commit d8717a6a9666ec80c8645d190d6f9c7ab73084ac makepkg started checking that the setuid/setgid bit could be removed on the $BUILDDIR in order to prevent this propagating to the packages themselves. Unfortunately, this requires the temporary builddir used during the --verifysource stage of makepkg, to be owned by $makepkg_user which was not the case as it is created as root using mktemp (and given world rwx in addition to the restricted deletion bit.) Obviously makepkg cannot chmod a directory that it does not own. Fix this by making $makepkg_user the owner of that directory, as should have been the case all along. (Giving world rwx is illogical on general principle. The fact that this is a workaround for makepkg demanding these directories be writable even when they are not going to be used for the makepkg options in question, is not justification for being careless.) Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2018-03-24makechrootpkg: respect GNUPGHOMEEmiel Wiedijk1-2/+3
Previously, makechrootpkg hardcoded ~/.gnupg. Therefore, if a user uses a custom GPG home directory, the siganture checking would fail. Now makechrootpkg uses $GNUPGHOME, with a fallback to ~/.gnupg. Signed-off-by: Emiel Wiedijk <me@aimileus.nl>