Commit Graph

1307 Commits

Author SHA1 Message Date
Natanael Copa 7d75f85847 abuild-sudo: dont require root to be member of abuild group
fixes #9984
2020-03-23 14:18:52 +00:00
TBK 714be736a7 APKBUILD.5: change 'abuild checkout' to 'abuild snapshot' 2020-03-23 14:03:44 +00:00
Leo 012a179339 use option_has instead of list_has 2020-03-23 14:00:27 +00:00
TBK 1888007c38 newapkbuild.in: Allign with CODINGSTYLE quoting 2020-03-23 13:58:59 +00:00
TBK 402b582810 apkbuild-cpan.in: add OR to license 2020-03-23 13:57:37 +00:00
A. Wilcox 93cc98930d abuild: Use $APK instead of apk
This is the only appearance of `apk` in the source.  Appears accidental.

Fixes: 41343329 ("abuild: fix dependency tracing for cross builds")
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
2020-03-23 13:55:41 +00:00
Leo ea166888bb Don't pollute stderr with rmdir messages that are ignored 2020-03-23 13:53:54 +00:00
Leo 2151c7af80 warn when directories found that hold shell completions.
This will warn then paths for certain shells that have completions are
found and tell the user to add a subpackage for it.

In a future date we also want to warn the user to move certain
directories where packages have completions to those directories so our
default_ functions can move them without problems
2020-03-23 13:20:05 +00:00
Drew DeVault 77922d5c41 .editorconfig: add Makefile rules 2020-03-23 13:16:01 +00:00
Leo 1bf7e588df move usr/lib/glade/modules and usr/share/glade/catalogs to -dev by default. 2020-03-23 13:14:16 +00:00
Leo d4c670bc44 Add support for the SUDO variable
This can be used to pick another tool to elevate privileges.
2020-03-23 13:09:15 +00:00
Rasmus Thomsen 69fc8b8fc1 newapkbuild: use 'plain' buildtype for meson and 'None' buildtype for CMake
This way Meson and CMake will use the C{,PP,XX}FLAGS we've set in
`/etc/abuild.conf`. Without this change CMake and meson will overwrite
our CFLAGS with custom flags. Most importantly, they prefer -O1/-O2 over
our -Os.

See also: https://lists.alpinelinux.org/~alpine/devel/%3C2896c13070c508a49cbaa72c8fb7f34ea947358b.camel%40cogitri.dev%3E
2020-02-21 18:01:48 +01:00
Wictor Lund 6d741ffba8 abuild.in: in snapshot(), fix recursive calls
- Call "$abuild_path" instead of plain "abuild"
- Pass $forceroot as done elsewhere
2020-02-16 23:46:58 +01:00
Leo af0c88e6ab set CARGO_HOME to $SRCDEST/cargo
CARGO_HOME tells cargo where to store installed dependencies, save it to
a directory in $SRCDEST so we don't need to download all dependencies
again when compiling a rust package.
2020-02-16 23:30:17 +01:00
Leo e125a76489 newapkbuild: do out-of-source CMake builds by default
It is recommended by upstream CMake (it will warn when you do in-source
builds) to keep generated files away from the source.
2020-02-16 19:05:42 +01:00
Sören Tempel d0828c0655 abuild: include $pkgname in temporary rootbld directory
This makes it easier to figure out to which build the directory belongs
to. Occasionally, I have many failed abuild rootblds in my /var/tmp and
including the $pkgname in the directory would help me associating the
directories with failed builds I recently executed.
2020-02-16 12:34:58 +01:00
Timo Teräs bad781082d abuild: use stat instead of df to figure filesystem type
Fixes the error:
  df: .: can't find mount point

When running abuild inside a chroot when the root file system
mountpoint information is not necessarily directly available.
2020-02-08 12:51:10 +02:00
Timo Teräs c9d3df08b3 functions.sh: exclusively use apk --print-arch to detect build arch
Originally "gcc -dumpmachine" was used to detect build gcc triplet.
However, abuild does not depend on gcc or build-base (but installs
it if needed to build) so gcc might not be there. Additionally
abuild-sign can be used standalone, and does not have gcc dependency.

Using ${CC:-gcc} is problematic in cross-compile, as CC might be
already set for the cross-compiler and would result giving the target
host triplet.

It was deemed simplest to use "apk --print-arch" exclusively to detect
the builder host type, or specify CBUILD manually. If there is need
to use abuild/abuild-sign on non-Alpine hosts withou apk, we can
later add fallback that uses "uname -m" to detect the architecture
and guess Alpine CBUILD from it.

Fixes #9974
Fixes: 5adf47c1 "functions.sh: use apk --print-arch for CARCH if gcc is missing"
Fixes: 95cd15c0 "functions.sh: dont die if gcc is missing"
2020-02-07 23:14:23 +02:00
Leo 57185172c5 fix typo in sample for pre and post install 2020-02-05 17:27:26 +01:00
Natanael Copa 5adf47c168 functions.sh: use apk --print-arch for CARCH if gcc is missing 2020-01-31 09:47:44 +00:00
kpcyrd 4f5b0a14bd abuild: explicitly sort apk content 2020-01-30 10:41:06 +00:00
kpcyrd 660f793d6d abuild: set fixed atime and ctime in tar 2020-01-30 10:41:06 +00:00
Leo d5826968b7 abuild.in: add default bashcomp, zshcomp and fishcomp functions 2020-01-28 08:57:40 +00:00
Sören Tempel d5f4982a9a abuild-keygen: make size of private key configurable
Previously, a key size of 2048 bits was hardcoded. While this is still
the default, it can now be changed. Additionally, the default key size
might be changed to 4096 in the future.
2019-12-23 15:12:14 +01:00
Natanael Copa 0d3dc71833 ==== release 3.5.0 ==== 2019-12-19 15:17:57 +00:00
Natanael Copa 478d4e9452 ==== release 3.5.0_rc3 ==== 2019-12-18 12:36:19 +00:00
Natanael Copa ec96c604e9 abuild: fix building without git
fixes #9981
2019-12-05 08:32:30 +00:00
Natanael Copa bb0324e398 abuild: fix applying patches from https
fix patches such as https://dev.alpinelinux.org/archive/domoticz/openzwave-1.6.patch

previously it would only work with the filenamename.patch::$url syntax
2019-11-28 12:46:12 +00:00
Natanael Copa 0745179c4f ==== release 3.5.0_rc2 ==== 2019-11-26 18:42:46 +00:00
Natanael Copa 80a2e6f8cf abuild: set SOURCE_DATE_EPOCH from rootpkg 2019-11-26 18:41:32 +00:00
Sören Tempel 918b7b1920 abuild: Fix abuild rootbld
Without this change abuild rootbld would fail with:

	touch: invalid date '@'

Because SOURCE_DATE_EPOCH wasn't set when abuild rootbld was used. This
is a bug introduced in 71d9d5233b. Instead
of reverting the aforementioned commit move the SOURCE_DATE_EPOCH
initialization to a custom function and also call it from the abuild
rootbld function.

Fixes #9978
2019-11-14 10:36:33 +01:00
Natanael Copa 51d9e3bcb9 Revert "abuild: make built package reproducible"
The introduction of the --pax-options seems to confuse apk and resulted
in `BAD archive' errors.

This reverts commit f04a2ee34b.
2019-11-07 20:46:36 +00:00
Natanael Copa 95cd15c025 functions.sh: dont die if gcc is missing
abuild-sign does not use gcc.

fixes #9974
2019-11-07 16:02:47 +00:00
Natanael Copa 21dcfb1f21 ==== release 3.5.0_rc1 ==== 2019-11-07 15:39:35 +00:00
Natanael Copa d8cfcd5dc9 abuild: detect /bin/sh dependency even if shebang has spaces
fixes !7
2019-11-07 15:39:35 +00:00
Fredrik Gustafsson 6d321050e5 Change permissions for sudo to 4555
Currently the permissions for abuild-sudo is set to 4111, this make it
impossible to move the sudo file after it has being created. Moving
the sudo file is needed by yocto when creating an apk-package of abuild.
The sudo binary in debian stretch since if debian does it, it can't be bad.

Signed-off-by: Fredrik Gustafsson <fredrigu@axis.com>
2019-11-07 15:39:35 +00:00
Bart Ribbers 2162348a9a Allow round brackets in the license variable 2019-11-07 15:39:35 +00:00
Natanael Copa 71d9d5233b abuild: get the git commit date only when needed
getting the commit date can be timeconsuming so only do it once we need
it. We also re-use the ABUILD_LAST_COMMIT to speed up the operation.
2019-11-07 14:40:55 +00:00
Natanael Copa 114c0cf287 abuild: rename global last_commit to ABUILD_LAST_COMMIT
rename the global variable to upppercase.
2019-11-07 14:40:55 +00:00
Natanael Copa 1cfbdf688c abuild: fix git_* functions
Add -- to explicitly separate out the file path.

Let git_last_commit_epoch take an option with the hash.
2019-11-07 14:40:55 +00:00
Natanael Copa f04a2ee34b abuild: make built package reproducible
Flags to make the tarball reproducible is taken from here:
http://h2.jaguarpaw.co.uk/posts/reproducible-tar/
2019-11-07 13:24:43 +00:00
Natanael Copa 672032a4be abuild-sign: dont set timestamp in gzip
This improves reproducibility of builds
2019-11-07 13:23:36 +00:00
Natanael Copa b80a27b86a abuild-sign: use pigz if available
This is similar to what we do in abuild. It improves performance on
multicore machines.
2019-11-07 13:21:45 +00:00
Natanael Copa 5b34b696d4 abuild: set SOURCE_DATE_EPOCH to last commit date by default
set datestamps to be used in the built packages to date of commit. This
makes it much easier to have reproducible builds.
2019-11-07 12:06:24 +00:00
Natanael Copa 918cba2a77 make: install depends as virtual 2019-11-07 12:02:24 +00:00
Richard Mortier b3dcf19ef7 make: add `depends` target
Signed-off-by: Richard Mortier <mort@cantab.net>
2019-11-07 12:01:13 +00:00
Natanael Copa c486b3b4f3 allow override sharedir for testing
Aloow overrid sharedir with global ABUILD_SHAREDIR so we test the local
functions.sh instead of a system installed functions.sh
2019-11-07 11:42:23 +00:00
Natanael Copa f3dc428ea0 rename datadir -> sharedir
abuild uses datadir as local variable in various functions. Rename the
global datadir to sharedir to avoid confusion.
2019-11-07 11:42:23 +00:00
Natanael Copa 43fb2c012e add basic tests using bats 2019-11-07 11:32:37 +00:00
Jakub Jirutka a8f564287e newapkbuild: simplify source URL derived from GitHub URL
GitHub allows to reference https://github.com/<user>/<proj>/archive/<ver>.tar.gz
also as https://github.com/<user>/<proj>/archive/<ver>/<anything>.tar.gz.
2019-10-27 20:35:10 +01:00