Commit Graph

1785 Commits

Author SHA1 Message Date
Tyler Amick 75a6e8e14c make: add depends for abuild-tar.static 2024-10-07 20:27:42 +00:00
Sertonix c1c233a45a abuild-tar: drop legacy checksum mechanism
This mechanism was an optional speed optimization for apk-tools which has
been replaced with a better one **before the 2.0 full release** of apk-tools.

This in combination with the fact that the code is endian dependant and
therefor is incompatible with reproducible builds seems enough reason to
remove the code.
2024-10-07 20:27:00 +00:00
Sertonix a7e7587758 abuild: use static srcdir/pkgbasedir/tmpdir in rootbld
This fixes 'abuild rootbld' failing to mount when srcdir is moved
outside of $HOME (eg. in /run). This also has the advantage of building
more reproducible even when the build path leaks into the packges (which
happens in most -dbg packages).
2024-10-07 20:10:16 +00:00
Sertonix 1131a46699 abuild: remove default CC and CXX
These variables are already set by functions.sh.
2024-10-07 20:09:13 +00:00
Dominique Martinet d9f3f05b50 checkapk: fix size difference output when multiple info matches
I rebuilt networkmanager locally and was greeted with this:
>>> Size difference for networkmanager: 16 MiB -> 2772 KiB

It turns out networkmanager-elogind provides networkmanager so apk info
will list both, and the former is much bigger so it looked like the
rebuilt package was much smaller when there was almost no difference (as
expected)

Fix by matching on exact package name for both lines; this is already
what we were doing with the local package anyway and the apk fetch
correctly picks the correct package in this case
2024-10-07 20:07:31 +00:00
Sertonix d235d5c5a4 newapkbuild: fix meson setup argument order
according to the meson documentation the arguments are
'meson setup <builddir> <srcdir>'. meson is very relaxed and allows the
wrong order but this behavior should not be endorsed by a template.
2024-10-07 20:04:40 +00:00
Sertonix dd66d17b49 abuild: fix object files detected as shared libs
dmd installs an object file that matches *.so.* so we need to check for
*.o explicitly.
2024-10-07 20:03:13 +00:00
Sertonix ac45be0c71 abuild: strip leading v from pkgconfig versions 2024-10-07 20:03:13 +00:00
Sertonix d85ea24eca abuild: remove host uid/gid from pkg
Closes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10127
2024-10-07 20:02:01 +00:00
Sertonix 0a91a31e47 abuild: kill all childs when bwrap exits
--unshare-pid is needed for --die-with-parent to work correctly.

Ref https://github.com/containers/bubblewrap/issues/529
2024-10-07 20:00:04 +00:00
Hugo Osvaldo Barrera 8eaa065f3a Add a man page for abuild.conf
For those familiar with abuild all this content is obvious. For
newcomers, the only way to figure this out is by reading abuild's
source code.
2024-10-07 19:58:50 +00:00
Hugo Osvaldo Barrera 5cae4119f9 Document some environment variables for abuild 2024-10-07 19:58:50 +00:00
Sertonix c8fb8965fc newapkbuild: add instructions when there is no check/build command 2024-10-07 19:55:23 +00:00
Willow Barraco ca9bc0a9e9 abuild: add default_nftrules helper
As proposed here:

https://gitlab.alpinelinux.org/alpine/aports/-/issues/16177
2024-10-07 19:52:15 +00:00
Dmitry Klochkov 15b9496135 abuild-fetch: try to work around an ESTALE error which occurs on NFS
This is because of the following race condition case:

  A                               B
                                |
  lockfd = open(lockfile, ...)  |
                                | unlink(lockfile)
  lockf(lockfd, F_LOCK, 0)      |

According to [1], to recover from an ESTALE error, an application must
close the file or directory where the error occurred, and reopen it so
the NFS client can resolve the pathname again and retrieve the new file
handle.

[1] https://nfs.sourceforge.net/#faq_a10
2024-10-07 19:50:19 +00:00
Sertonix 2fbfb5e700 tests: fix with changed ABUILD_USERDIR
The test suite expects ABUILD_USERDIR to be "$HOME"/.abuild but that
could be overwritten in ABUILD_CONF. So use the fixed value instead of
relying on the default.
2024-10-07 19:43:12 +00:00
Sertonix 59be83ca19 functions.sh: overwrite ABUILD_USERDIR from env
To be consistent with other variables ABUILD_USERDIR set from the
environment should be prefered over ABUILD_USERDIR set by the
ABUILD_CONF file.
2024-10-07 19:43:12 +00:00
Sertonix f8d9a6f1b5 abuild: simplify 'Entering fakeroot' message 2024-10-07 19:41:56 +00:00
Sertonix 18eeb336a2 abuild: remove CBUILDROOT check for cross_*
CBUILDROOT is guaranteed to be set by functions.sh when
CHOST != CTARGET or CBUILD != CHOST.
2024-10-07 19:41:00 +00:00
Sertonix 88fab9f624 abuild: detect precompiled lua files
Precompiled lua files aren't portable between word sizes and byte order.
2024-10-07 19:37:16 +00:00
Sertonix 2ea6d3c734 abuild: remove empty check before for loop
When the variable is empty the body of the for loop will never be run.
So the behaviour is the same without the extra check if the variable is
empty.
2024-10-07 19:35:31 +00:00
Hugo Osvaldo Barrera c3f021f2b4 abuild: add missing params flags in docs 2024-10-07 19:32:31 +00:00
Sertonix a417fd27fc abuild: update -r doc 2024-10-07 19:25:19 +00:00
Sertonix 87e8792b8c abuild: clean unused and global variables 2024-10-07 19:24:49 +00:00
Sertonix 8b1304f343 abuild: improve and test shell_escape 2024-10-07 19:22:28 +00:00
Sertonix 1b253a9210 Makefile: simplify install and fix exec permissions 2024-10-07 19:20:11 +00:00
Sertonix e236b4b854 abuild: use amove more often 2024-10-07 19:17:35 +00:00
Sertonix 98dd63bf11 abuild: improve amove
- fix multiple trailing and leading /
- continue moving after error
2024-10-07 19:17:35 +00:00
Sertonix f12f4dde1a abuild: simplify shell completion checks 2024-10-07 19:13:54 +00:00
Sertonix 76e82bfb52 abuild: add cmd:* providers for symlinks 2024-10-07 19:10:26 +00:00
Hugo Osvaldo Barrera 520641dea7 abuild: document the default command, "all"
Document the expansion of the default command. This is mostly useful for
someone wanting to run _most_ commands while omitting specific ones.
2024-10-07 19:08:33 +00:00
Dimitri John Ledkov 97feb61bee
abuild-sign: rename type variable to sigtype for clarity 2024-04-29 12:22:23 +01:00
Dimitri John Ledkov b10f1c5394
abuild: remove unused variable sign 2024-04-29 12:18:05 +01:00
Dimitri John Ledkov f4ea93f5f2
abuild-sign: add support for RSA256 signatures
Supported by apk-tools since v2.7.0 (2017).
2024-04-29 12:03:08 +01:00
Piraty a45d12d4c3
abuild-rootbld: copy SRCDEST value from host to chroot
Otherwise the default hardcoded in abuild-fetch (var/cache/distfiles) is
used.

(in the same vein as 6864df03aa)

Fixes: 1582617 ("abuild-rootbld: clear environment for bwrap container")
2024-04-26 00:24:09 +02:00
Natanael Copa 68d6aa65f4 abuild: skip /var/run in fhs check
We have many package containing directories under /var/run. Allow those
for now.

Partially reverts commit 08d2d81587 (abuild: extend fhs check)
2024-04-21 10:37:44 +02:00
Natanael Copa c48f8498e7 abuild: allow packages to install under run
I have some vauge memory that it is conveinent for Docker users that the
state dir under /run exists.

Allow this for alpine 3.20 and revisit later.
2024-04-20 08:20:18 +02:00
Natanael Copa eeca95d195 abuild: pass APORTS_BOOTSTRAP to bubblewrap 2024-04-19 23:41:45 +02:00
Natanael Copa 5023838d60 ==== release 3.13.0 ==== 2024-04-17 08:45:34 +02:00
Natanael Copa 7e7b0a5ba3 tests: increase timeout for abuild-fetch to call curl
The CI may be under load.
2024-04-17 08:40:47 +02:00
Natanael Copa 645c3c07a7 abuild: exclude provides for commans with @
the '@' characted serves as a repository separator (eg. pkg@repo) so we
should not add a cmd: provides for binaries having this character.

This avoids conflicts with for example `who` from coreutils and `who@`
from ucspi-tpc6.

fixes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10074
2024-04-17 08:35:27 +02:00
Natanael Copa e4896c01b8 test: inline bin-in-path APKBUILD
Improves readability. No functional changes
2024-04-17 08:21:40 +02:00
Sertonix 54fd3e4117 abump: preserve in-line comments after pkgver/pkgrel
Fixes [#10133]

[#10133]: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10133
2024-04-12 11:59:56 +00:00
Sertonix 855992822d abuild: update cachedir logic for rootbld
Closes [#10111]

[#10111]: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10111
2024-04-12 11:59:04 +00:00
Sertonix 7276042237 abuild: always use $APK instead of apk 2024-04-12 11:59:04 +00:00
Sertonix 6aa8fcc012 abuild: remove libc specific logic
Last use of the '!libc_*' option has been removed in [61cb57cda98].
libpthread special casing only triggers on uclibc.

[61cb57cda98]: https://git.alpinelinux.org/aports/commit/?id=61cb57cda98923032f7ff15f7a0f057bb35aae6d
2024-04-12 11:56:05 +00:00
Sertonix 20b1f47c63 abuild: fix ~ splitting pkgname and pkgver 2024-04-12 11:51:48 +00:00
Sertonix 0e325a2354 abuild: fix python3 depending on python3 2024-04-03 14:09:03 +02:00
Natanael Copa 22e17446f7 Revert "checkapk: Check how many packages depend on a previous soname"
The implementation is difficult to get right. Keep checkapk simple.
Fixes https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/229

This reverts commit acfa7d6732.
2024-03-29 12:19:20 +01:00
Sertonix 141da52d19 abuild: warn on go packages without net option 2024-03-29 11:15:43 +00:00