Commit Graph

1144 Commits

Author SHA1 Message Date
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
Sören Tempel 17cb68e9fb abuild-rmtemp: Do not follow symbolic links
Symbolic links might point to files outside of the chroot and
thus might delete files outside the chroot. This allows deletion
of arbitrary directories on the host from a malicious APKBUILD.

Following hard links shouldn't be a problem since hard links (usually)
cannot refer to directories and since remove(3) removes the link, not
the file it points to it shouldn't cause a problem.

I noticed this because alpine-baselayout creates /var/run as a symlink
to /run. Therefore causing /run to be deleted on the host when using
abuild-rmtemp which in turn causes a bunch of software to no longer
function properly (including OpenRC).
2018-10-11 17:46:45 +02:00
Natanael Copa 70f52b9b80 ==== release 3.3.0_pre1 ==== 2018-10-03 12:58:27 +00:00
Natanael Copa 324a57592e abuild: run build actions via runpart
So we make sure chdir $builddir happens when it should.
2018-10-03 12:46:18 +00:00
Natanael Copa 0bf61ee06a abuild: do not run check in fakeroot by default
Only run check in fakeroot if options="checkroot" is set. This makes
options="!checkroot" the default.

I expect most checks work as non-root, and if a testsuite requires root,
it will likely fail in fakeroot too. Fakeroot has also shown lower
performance for parallel builds.
2018-10-03 12:37:08 +00:00
Natanael Copa 3379e67551 abuild: print version of built package early
instead of printing abuild version, print package version. This is to
avoid confuse the abuild version with the package version.
2018-10-03 12:16:07 +00:00
Natanael Copa 2fe29d5829 abuild: chdir to $builddir if it exists
chdir to $builddir before running prepare, build, package or check.
2018-10-03 12:06:13 +00:00
Natanael Copa 4e455979e0 abuild: fix regression. run build
fix regression introduced in def219994d
2018-10-03 12:06:13 +00:00
Natanael Copa def219994d abuild: require package() function
make a missing function for package() a hard error.

this means we never run build in fakeroot.
2018-10-03 11:21:15 +00:00
Sören Tempel 015f0f69a8 checkapk: remove temporary dir on SIGINT and exit 2018-10-03 10:52:13 +00:00
Natanael Copa 51830efbb5 newapkbuild: fix checksums to be last in ABPKUILD
ref https://github.com/alpinelinux/abuild/pull/42
2018-10-03 10:50:25 +00:00
Natanael Copa 1cbc853155 abuild: fix checksum update
Fix case where 1) checksum is a single line and 2) there is a variable
under the checksum that should be kept. For example:

  sha512sum="...."
  keepthis="..."

Previously the `keepthis` variable would have been removed.

ref https://github.com/alpinelinux/abuild/pull/41
2018-10-03 10:34:58 +00:00