Commit Graph

864 Commits

Author SHA1 Message Date
Erich Eckner 321e998020
fix whitespace/indentation errors
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-20 17:58:55 +02:00
Erich Eckner c86823a2d4
is_same_fs() in lib/archroot.sh should use $1 and $2, not $1 and $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-04-20 17:55:31 +02:00
Levente Polyak a49f55cbed
Version 20190329 2019-03-29 21:40:28 +01:00
Levente Polyak 5c016c38f2
readme: fix faulty whitespace in release commands 2019-03-29 21:40:28 +01:00
Levente Polyak 1d4a60874b
make: fix faulty install targets
This fixes a regression introduced in eeb1c0e59e
2019-03-29 21:40:28 +01:00
Eli Schwartz via arch-projects b66ce081e7
fix up sogrep manpage to correspond with current sogrep command
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2019-03-28 21:17:55 +01:00
Eli Schwartz via arch-projects 1ab9b34c4c
add sogrep command
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-28 21:17:55 +01:00
Eli Schwartz via arch-projects ebba5a5885
sogrep: don't be templated when it is not templated
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-28 21:17:50 +01:00
Jelle van der Waa c9b6f58f8e
Create a general README
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-25 23:32:16 +01:00
Matt Robinson 155798b8b1
makechrootpkg: keep *DEST, MAKEFLAGS & PACKAGER
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-25 23:32:13 +01:00
Christian Hesse d9b7350448
arch-nspawn: get all mirrors from host
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-25 23:32:04 +01:00
Jelle van der Waa 6645701cb1 sogrep: remove duplicate sogrep
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-17 14:51:19 +01:00
Jelle van der Waa 657497c91a doc: Add myself as maintainer
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-16 18:35:21 +01:00
Jelle van der Waa 90bb423304 sogrep: rename to sogrep.in so make clean works
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-16 18:29:56 +01:00
Jelle van der Waa 23f248ccfb find-libdeps: fix indentation in case
Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-16 18:27:13 +01:00
Jelle van der Waa eeb1c0e59e doc: add man pages for find-{libdeps,libprovides}
Add a simple man page for find-libdeps and find-libprovides.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-16 18:25:55 +01:00
Jelle van der Waa 936ff8da2f doc: add Environment variables section to sogrep
Add a section about environment variables which influence sogrep's
behaviour.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2019-03-13 22:17:35 +01:00
Jelle van der Waa d123fee8ec doc: add man page for mkarchroot 2019-03-13 22:13:51 +01:00
Jelle van der Waa 4a532e38e7 crossrepomove: do not set svn propset
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-13 22:06:00 +01:00
Sven-Hendrik Haase f61421a3f5 Add sogrep
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-03-13 09:16:32 +01:00
Jelle van der Waa 26b2ffc665 remove arch rm as it's not really useful
archrm is a not much more fancy rm -rf and therefore not really useful
to ship.
2019-02-24 13:37:37 +01:00
Levente Polyak 62306018f2
conf: sync makepkg.conf with latest version from pacman package 2019-02-09 14:27:31 +01:00
Levente Polyak 65b50dac40
ci: adding travis support for basic check 2019-01-22 03:33:53 +01:00
Levente Polyak 799376904d
find-libdeps: in functions use return instead of continue to abort
Even if continue would work, it does exactly the same as a return
in the way this function is being used.
2019-01-22 03:32:50 +01:00
Erich Eckner 8310abb348
remove empty tree if "--verifysource" failed
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-22 01:44:40 +01:00
Morten Linderud 7b09525003
Expand check_root keepenv variables
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>
2019-01-22 01:29:06 +01:00
Jelle van der Waa e9102b2ad8
doc: add find-libprovides man page 2018-09-09 21:02:45 +02:00
Jelle van der Waa 99969c67a9
doc: Add checkpkg man page 2018-09-09 21:02:44 +02:00
Jelle van der Waa 05c81038e5
doc: Add lddd man page 2018-09-09 21:02:43 +02:00
Jan Alexander Steffens (heftig) 6364b3c9b9
Version 20180531 2018-05-31 16:05:49 +02:00
Eli Schwartz via arch-projects 98ff92f467
makechrootpkg: whitelist return code 14 from makepkg
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-31 16:03:13 +02:00
Allan McRae e414173f89 update makefile for current version
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-29 10:42:47 +10:00
Eli Schwartz 7fcf847bc3 Do not assume the makechrootpkg user's groupname is the same as the username
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-16 10:37:55 -04:00
Eli Schwartz 5b3c14454a Proper fix for pacman-git returning file urls from the cache
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-13 09:16:20 -04:00
Eli Schwartz 4408bb2a15 Revert "arch-nspawn: Work around pacman master returning file-URLs from the cache"
This reverts commit eb6b0e3f11.

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-13 09:16:20 -04:00
Eli Schwartz 509c00ea23 makechrootpkg: Do not copy the user keyring into the chroot.
Since commit 75fdff1811 we no longer run
integrity checks inside the chroot anyway, so this is no longer needed
and will never be used.
2018-05-13 09:16:20 -04:00
Evangelos Foutras 5713cd629c makechrootpkg: add /etc/shadow entry for builduser
Without it, sudo 1.8.23 will return an error:

    sudo: PAM account management error: Authentication
    service cannot retrieve authentication info
2018-05-12 11:52:18 +03:00
Eli Schwartz 40f0179a5e makechrootpkg: fix verifysource with pacman-git
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-24 20:54:24 +01:00
Emiel Wiedijk ffb5003fda makechrootpkg: respect GNUPGHOME
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>
2018-03-24 20:54:17 +01:00
Bartłomiej Piotrowski ab3368f061 Remove corepkg symlink
While still possible with 'commitpkg core', there is a chance it will
prevent accidental pushes straight to [core].
2018-03-24 20:35:09 +01:00
Bartłomiej Piotrowski 38c7a391b0 makechrootpkg: make sure that makepkg.conf is always parsed as text 2018-01-21 14:18:43 +01:00
Luke Shumaker 75ad2aca57 makechrootpkg: Adjust to work properly with `set -e`
This worked properly until eab5aba.
2018-01-21 14:16:10 +01:00
Luke Shumaker aee72cae32 lib/common.sh: Adjust to work properly with `set -u`
Support for working with `set -u` was broken by 94160d6.  Egg on my
face; I'm the one who wants `set -u` support, and I'm the author of
that commit!

libmakepkg does not work with `set -u`; but mostly because of the include
guards!  So we just need to temporarily disable `set -u` (nounset) while
loading libmakepkg.  Instead of introducing a new variable, just store the
initial nounset status in _INCLUDE_COMMON_SH; rather than a useless
fixed-string "true".

While we're at it, disable POSIX-mode (just in case we're running as "sh"
instead of "bash"), since libmakepkg uses bash-isms that won't parse in
POSIX mode.
2018-01-21 14:16:10 +01:00
Luke Shumaker 5ab8f8430a arch-nspawn: Remove pointless $(echo ...) subshell 2018-01-21 14:16:10 +01:00
Luke Shumaker c9e287e845 arch-nspawn: make sure that makepkg.conf is always parsed as text
https://lists.parabola.nu/pipermail/dev/2017-June/005576.html
2018-01-21 14:16:10 +01:00
Eli Schwartz 48b2f8dcc4 makechrootpkg: Fix anti-pattern when checking for enabled features
Don't use error-prone logic e.g.
foo=true; if $foo ...

This completely fails to act as expected when the variable is unset
because of unrelated bugs.

While this merely causes the default behavior to be "false" rather than
"true" in such cases, it is better to fail to enable explicitly
requested behavior (which will be noticed by the user) than to simply
upgrade to this behavior for free (which may not seem to have any
obvious cause).

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2018-01-21 14:16:10 +01:00
Eli Schwartz 3b725b5843 makechrootpkg: Fix unconditionally running namcap
Fixes regression in 2fd5931a8c

$run_namcap will always be set to ""
`if $not_a_var; then ...; fi` is always truthful when $not_a_var is
unset or equal to "" and the `then` clause will always be run.

I'm not sure why global state variables need to be cloned locally for
their sole explicit purpose.

But for now this patch implements the minimum necessary work to properly
pass the "do I want namcap" variable into prepare_chroot() according to
the current logic flow.
Note that I have still not thorougly tested makechrootpkg.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
2018-01-21 14:16:10 +01:00
Evangelos Foutras 7a3c508501 Revert "makechrootpkg: Reopen console to assign the CTTY"
This reverts commit ddd508efc0.

The underlying bug (FS#56529) was fixed in glibc 2.26-9.
2017-12-27 23:33:45 +02:00
Eli Schwartz eab5aba9b0 Support reproducible builds
Recent development versions of makepkg support reproducible builds
through the environment variable SOURCE_DATE_EPOCH. Pass this variable
through makechrootpkg to makepkg when available.

Also initialize SOURCE_DATE_EPOCH whenever running archbuild to enforce
reproducible builds for repository packages.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2017-11-22 16:35:25 +01:00
Bartłomiej Piotrowski 2a308821b3 Version 20171108 2017-11-08 14:23:26 +01:00