Commit Graph

1355 Commits

Author SHA1 Message Date
Leo f263cb9f49 abuild.in: fix warning with gawk-5.0
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
2019-04-30 09:35:51 +00:00
Natanael Copa 0a7026a485 ==== release 3.4.0_rc3 ==== 2019-04-30 07:49:03 +00:00
Natanael Copa cf86b45836 abuild: cleanup default_dbg
Run the loop in a subshell via a pipe so we dont need a subshell for
each iteration.

Use `if ...; then` to make code slightly more readable.

Fix a whitespace before tab while at it.
2019-04-30 07:41:23 +00:00
tcely acf1fa5553 abuild: default_dbg: do not trigger trap with test failure
Resolves alpinelinux/abuild#71
2019-04-30 07:12:00 +00:00
Leo ed88353836 abuild.in: remove duplicate options_has call 2019-04-29 21:40:06 +00:00
tcely 5b163c2d58 abuild: default_dbg: eliminate side effects
- do not overwrite variables

srcdir is very important for abuild operation

- quoted various paths
- use a sub-shell to contain directory changing

Resolves alpinelinux/abuild#58
2019-04-29 20:52:23 +00:00
Natanael Copa dc41c1fc52 ==== release 3.4.0_rc2 ==== 2019-04-29 20:03:20 +00:00
Kevin Daudt 2e77e3390f abuild-clean: add option to make files writable before cleanup
Some projects might leave files which are not writable for the current
user. The cleanup process then fails and leaves files / directories
behind.

This can easily be fixed by making everything writable before removing
the files.

Add the option 'chmod-clean' which does just that.
2019-04-29 19:26:43 +00:00
tcely 1d854182dd abuild: change word choice in comment 2019-04-29 18:44:35 +00:00
Natanael Copa 30a60d4523 abuild: fix whitespace before EOL 2019-04-29 18:43:46 +00:00
Leo b849aae4b9 abuild: provide a default_static() and static() functions
- Also check for static archives and warn on lack of static subpackage
2019-04-29 18:38:22 +00:00
Ikke f83d19ce79 newapkbuild: remove obsolete cd statements
Since `$builddir` is officially supported and abuild automatically cd's to `$builddir`, it does not need to be part of the template anymore.
2019-04-29 18:34:03 +00:00
Mike Sullivan 369e7069b8 Revert "abuild: replace command -v with which to fix build issues"
This reverts commit 57f2830739.

https://github.com/alpinelinux/aports/pull/7203 fixes the original problem
2019-04-29 18:33:37 +00:00
Timothy Legge 29bf802907 apkbuild-cpan.in: Update licenses to spdx format and remove redundant directory change 2019-04-29 18:32:46 +00:00
tcely 77746a0c3d abuild-fetch: enable curl certificate verification 2019-04-29 18:31:58 +00:00
tcely d733d5e570 APKBUILD.5: sort depends_* descriptions 2019-04-29 18:30:55 +00:00
Luca Weiss 915c7d868b functions: adjust armhf triplet
From what I could find, it was changed to -musleabihf during the Alpine
3.6 release cycle but this function was never updated to reflect that
2019-04-29 18:19:25 +00:00
Natanael Copa c0dc7acee7 Revert "abuild: unset depends for subpackages"
Apparently there are many packages that does soemthing like:

subpackages="$pkgname-foo:_foo"

_foo() {
	depends="$depends something-else"
}

and thus depend on the previous behavior. We need to revert and plan
this better.

This reverts commit 8fbbffd201.
2019-04-25 12:41:22 +00:00
Sören Tempel ff4f2253c1 APKBUILD.5: document depends_* variables for -doc and -openrc 2019-04-09 18:02:00 +02:00
Sören Tempel f92353f57b abuild: add depends_libs variable to default_libs()
Other subpackage such as -dev, -doc and even -openrc allow adjusting
depends of the subpackage through such a variable. This is, for
instance, useful to remove a dependency of the origin package from the
-libs subpackage.

While at it document it in APKBUILD(5).
2019-04-09 18:01:44 +02:00
Natanael Copa e2a012cba6 ==== release 3.4.0_rc1 ==== 2019-04-05 07:11:50 +00:00
Timothy Legge 629a780b1c get and use pkgdesc from cpan api data if the module has no metadata files (returnes unknown) 2019-04-03 16:07:03 +00:00
tcely 801578a06a abuild: -openrc should not inherit depends 2019-04-03 16:06:09 +00:00
Chloe Kudryavtsev 6a6310f030 Add default_cleanup_srcdir
In some cases, a simple rm -rf is not sufficent to clean srcdir.
One such case is the new go module system, that marks everything as
read-only - thus only letting root rm -rf it without a chmod.
There is a command intended to clean them - `go clean -modcache`.
However, for that to work, GOPATH must be defined and existent.
Running chmod for all srcdir cleanups makes no sense, nor does enforcing
root, or putting global overrides just for go.

This patch allows overriding what happens on `cleanup srcdir`, by
overriding cleanup_srcdir, and allows the use of default_cleanup_srcdir.

In our go example, it might be used as such:

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}
2019-04-03 15:59:54 +00:00
Chloe Kudryavtsev 30d296ddb3 Make clean() use cleanup()
Avoid DRY issues, and increase consistency.
2019-04-03 15:57:14 +00:00
Natanael Copa 8fbbffd201 abuild: unset depends for subpackages
make sure that subpackages does not inherit main package's depends.
2019-03-21 13:42:36 +01:00
Natanael Copa 0238acc51d apkbuild-cpan: use $pkgver in source url
replace litteral version string with $pkgver in source url
2019-03-21 12:52:30 +01:00
Natanael Copa 67181962bf apkbuild-cpan: include modules that used to be part of core
we need to check if a given module currently is a part of core. Modules
which have a first_release may have been removed later, for example
Module::Build.
2019-03-21 12:28:11 +01:00
Natanael Copa 122bcd7cb2 apkbuild-cpan: remove prepare function from APKBUILD
the generation of Makefile is comparable with running configure, which
we normally do in the build() function, not in prepare.

also fix some whitespace damamge.
2019-03-21 11:34:06 +01:00
Timothy Legge ede4203749 apkbuild-cpan.in fix issue with version check 2019-03-20 17:10:15 +00:00
Timothy Legge 422199858c apkbuild-cpan.in fix issues with update, recreate, etc 2019-03-20 17:10:15 +00:00
Timothy Legge f98db143cb Many of setings should come from module not release api 2019-03-20 17:10:15 +00:00
Timothy Legge c893530293 Fix for issue with apkbuild-cpan upgrade 2019-03-20 17:10:15 +00:00
Timothy Legge 27c430cc64 Updates for metacpan 2019-03-20 17:10:15 +00:00
Robert Hencke 0126fbdffb abuild-sudo: remove unused variable
This prevents clang from issuing a warning here.
2019-03-14 15:46:11 +01:00
Natanael Copa 0b86c457f3 ==== release 3.3.1 ==== 2019-03-05 11:45:16 +00:00
Oliver Smith a54d3ba2ae abuild-tar.static: fix undefined reference errors
Link against the same libs as abuild-tar and fix the order of the CC
arguments.
2019-03-05 11:43:50 +00:00
Andrei Belov 2d2be1ca1b abuild-sign: actually catch errors while signing 2019-03-05 11:42:15 +00:00
Mike Sullivan 57f2830739 abuild: replace command -v with which to fix build issues 2019-03-05 11:28:04 +00:00
Carlo Landmeter 0a79fc62c9 Allow forcing of colored output
In some cases (ie drone ci) there is no tty available but its still
possible to display colors in the webui.
2019-02-25 23:10:16 +00:00
Natanael Copa 376ccc5bd6 abuild: add support for pkg-config prefix pcprefix
Fix issue when two -dev packages provides same pkg-config wil but with
different versions. For example libressl-dev and openssl-dev both ships
libssl.pc and libcrypto.pc, which resulted in automatic provides of
pc:libssl and pc:libcrypto.

apk would end up picking libressl-dev over openssl-dev for packages that
had automatic pc:libssl depends (for example libssl2-dev), when
openssl-dev was the one that was used during build.

To fix this we add support for a pcprefix so we can set
pcprefix="libressl:" in libressl APKBUILD which makes libressl-dev
provide pc:libressl:libssl. This is similar to what we do with
sonameprefix.

We do not yet automatically detect when the prefixed variant should be
used so for now we will have to explicitly add libressl-dev.

ref #9959
2019-02-22 13:57:08 +00:00
Natanael Copa 22753f5701 ==== release 3.3.0 ==== 2019-01-23 18:22:31 +00:00
Disassembler 9b04be2f79 abuild: replace $0 with $abuild_path, add $forceroot where missing 2019-01-10 16:08:51 +00:00
Natanael Copa 909623950f abuild: use pigz to compress control.tar.gz and manpages 2019-01-10 16:08:51 +00:00
Natanael Copa bbe4a4fdfd abuild-sign: fall back to libressl if openssl is missing
openssl binary may be missing while migrating system from libressl to
openssl. Make sure we can always sign the backage if either is there.
2019-01-10 16:08:51 +00:00
Natanael Copa 832ab44934 ==== release 3.3.0_pre2 ==== 2019-01-09 16:28:33 +01:00
Natanael Copa 13aec9a141 abuild: avoid add depends to itself
packages should never depend on themselves which does not make sense.
This may happen if main package depends on a subpackage, then the
subpackages will inherit the global depends and the subpackage ends up
depend on itself.

Fix abuild to avoid this.
2019-01-09 16:23:46 +01:00
Carlo Landmeter 2f8bbc819e abuild: fix typo 2018-12-02 19:50:28 +00:00
Tiago Ilieve 0bfe4efa99 abuild.in: add multithreaded compression
The 'Compressing data' step takes a significant amount of time when
packaging software with huge binaries, like Kubernetes. This can
certainly be shortened using multithreaded compression, like 'pigz'.
2018-11-08 10:27:47 +00:00
Timo Teräs 100202920b abuild: print build start, end date and elapsed time 2018-11-08 11:55:46 +02:00