Commit Graph

1275 Commits

Author SHA1 Message Date
tcely
59c1c4a97a abuild-fetch: when http:// was used, ignore https:// problems 2019-07-17 12:02:13 +00:00
tcely
7bd32679b3 abuild-fetch: add -k (insecure as in curl) option 2019-07-17 12:02:13 +00:00
Natanael Copa
b7fd57f681 newapkbuild: make python packages only depend on setuptools
They normally don't need the python3-dev.
2019-07-17 12:00:57 +00:00
Russ
bffe0efc06 newapkbuild: add py3-setuptools to python apkbuild
Seeing as the default python build/check/package apkbuild functions call `setup.py` and that relies on `py3-setuptools`, perhaps it should be added to the makedepends.

Inspiration from https://github.com/alpinelinux/aports/pull/7641#pullrequestreview-234326397
2019-07-17 12:00:11 +00:00
Leo
68a054e274 make default_static depend on depends_static
keeps it in line with other default_ functions.
2019-07-17 11:58:21 +00:00
Leo
1dd4382ea1 abuild.in: make is_x_package functions reliant on being given a name 2019-07-17 09:27:45 +00:00
Leo
f6bcaee895 Fix condition check for adding static libraries to -dev package.
This was the wrong way, we only want to add the static library to the
-dev package when there isn't a -static package.
2019-07-08 11:28:38 +00:00
Max Rees
297de93aef abuild-sudo: don't allow --keys-dir
Not allowing --allow-untrusted is obviously a good idea, but it can be
trivially bypassed if --keys-dir is allowed:

$ abuild-apk add foo-1-r0.apk
ERROR: foo-1-r0.apk: UNTRUSTED signature
$ abuild-apk --allow-untrusted add foo-1-r0.apk
abuild-apk: --allow-untrusted: not allowed option
$ cp -rp /etc/apk/keys /tmp/keys
$ cp untrusted.pub /tmp/keys
$ abuild-apk --keys-dir /tmp/keys add foo-1-r0.apk
(1/1) Installing foo (1-r0)
OK: 4319 MiB in 806 packages

If both --allow-untrusted and --keys-dir are not allowed, then it should
no longer be possible for an unprivileged member of the abuild group to
add an untrusted package.

$ abuild-apk --keys-dir /tmp/keys add foo-1-r0.apk
abuild-apk: --keys-dir: not allowed option
2019-06-20 11:36:40 +02:00
Natanael Copa
0b3f983772 ==== release 3.4.0 ==== 2019-06-14 12:13:23 +00:00
Natanael Copa
c26cc11905 ==== release 3.4.0_rc5 ==== 2019-06-12 12:33:07 +00:00
Timothy Legge
00beae32aa apkbuild-cpan.in: add OR to licenses to indicate perl_5 GPL or artistic is a choice 2019-06-12 12:28:42 +00:00
Oliver Smith
7a9683a07b abuild usage fix: fetch does not verify sources
Replace text in usage description of fetch that claims to verify sources
with a suggestion to use 'abuild fetch verify', which will actually
verify them.

'abuild fetch' alone will not verify sources, as it only executes the
fetch() function.
2019-06-12 12:27:14 +00:00
Keith Maxwell
40e6e9995b APKBUILD.5: match install_if example to abuild.in
This change makes the example in the description of install_if in the
APKBUILD man page match abuild.in:1791.
2019-06-12 12:24:44 +00:00
Russ
2122fa7476 newapkbuild: use current directory for cmake 2019-06-12 12:21:19 +00:00
tcely
49c7560c86 newapkbuild: quote pkgname and pkgver
These are strings after all and should be quoted even if not strictly necessary because of tradition excluding spaces from package names.
2019-06-12 12:20:35 +00:00
Leo
b743186dfe newapkbuild.in: add default check() for meson packages. 2019-06-12 12:19:58 +00:00
Oliver Smith
da4aca278f Cosmetic: newapkbuild: comment for check sections
Add a '# Check sections' comment, for consistency with the equally
commented build and package sections.
2019-06-12 12:18:59 +00:00
Oliver Smith
635a699365 newapkbuild: fix empty function regression
Since the obsolete 'cd "$builddir"' statements have been removed in [1],
build(), check() and package() can generate empty functions if no build
system is specified or if there is no default for the given build
system. newapkbuild will then fail, as it tries to parse the script it
generated:

$ cd /home/pmos && newapkbuild test
/usr/bin/abuild: /home/pmos/test/APKBUILD: line 18: syntax error: unexpected "}"
$ cat test/APKBUILD
...
build() {
}
...

Fix this by placing ":" in functions that would be empty.

[1]: f83d19ce79
2019-06-12 12:18:59 +00:00
Natanael Copa
8d092443d9 ==== release 3.4.0_rc4 ==== 2019-05-03 19:01:19 +02:00
Natanael Copa
1de902f2fa abuild: fix -openrc to work with multiple subpackages
allow a single APKBUILD have multiple -openrc subpackages.
2019-05-03 18:35:44 +02:00
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