Commit Graph

1820 Commits

Author SHA1 Message Date
Natanael Copa 96d53109ac Revert "tests: remove 'test package' comment"
This reverts commit 35b6b30134.
2024-10-18 11:30:28 +02:00
Natanael Copa 4e2c190257 ==== release 3.14.0 ==== 2024-10-15 14:35:53 +02:00
Sertonix 6e5cb0cfc1 abuild: fix go not creating GOTMPDIR on it's own
Fixes #10156
2024-10-14 06:04:18 +00:00
Kaarle Ritvanen 706067d09a fix rootbld by adding a missing backslash
This fixes a regression in commit a7e7587758.
2024-10-13 18:20:11 +03:00
Kaarle Ritvanen a1c8cae8da add mailmap 2024-10-13 18:14:39 +03:00
Natanael Copa 74cfbbbcf4 test: add test for -libs subpackage 2024-10-10 19:36:14 +02:00
Sertonix 47ca28b3c9 abuild: fix default_libs 2024-10-10 19:25:34 +02:00
Natanael Copa ce2ba1b169 ==== release 3.14.0_rc2 ==== 2024-10-10 16:35:58 +02:00
Sertonix 2733e40c62 test: increase default timeout
The CI started to fail cause of test timeout sometimes.
2024-10-10 14:35:04 +00:00
Natanael Copa 6ebe375a3e abuild: validate versioned dependencies 2024-10-10 13:41:18 +00:00
Natanael Copa ca9a11e492 tests: add test for validating depends 2024-10-10 13:41:18 +00:00
Sertonix d5591e6ccf samples: modernize and improve 2024-10-10 13:13:26 +00:00
fossdd a732ae00a1 abuild: run apk add/del with --no-interactive 2024-10-10 13:11:51 +00:00
Sertonix 1d9568b669 abuild: fix eval argument splitting and simplify
A newline starts a new command in shell scripts and eval uses the shell
grammar. Use a space instead to fix multiline repo templates.

Also avoid one subshell.
2024-10-10 14:48:33 +02:00
Pablo Correa Gómez 9c4abc561e
abuild: don't set the error on throwing a warning
Fixes da9269ba62
2024-10-10 14:20:47 +02:00
Natanael Copa fd7fa8a124 ==== release 3.14.0_rc1 ==== 2024-10-10 14:03:25 +02:00
Sertonix 186edf62a8 abuild: fix usrmerge warning with symlinks
Fixes <da9269ba62b> abuild: warn when files are installed to non-usr locations
2024-10-09 14:11:16 +00:00
Sertonix 35b6b30134 tests: remove 'test package' comment
These comments don't have any purpose. They just take up space.
2024-10-09 14:09:09 +00:00
Sertonix 34ef9de98f Prefer maintainer field instead of Maintainer comment
Fixes #10147
2024-10-09 14:09:09 +00:00
Sertonix cb4c8e40fb default.conf: move commented out options to abuild.conf 2024-10-09 14:09:09 +00:00
Sertonix 5a5df023cb abuild: remove .dummy file from empty packages 2024-10-09 12:42:10 +02:00
Sertonix 45a8c0dd79 abuild: deduplicate reproducible tarball creation 2024-10-09 12:42:10 +02:00
Sertonix 43ca11764a abuild: avoid shell splitting when packing metafiles 2024-10-09 12:39:52 +02:00
Sertonix 3fa9fda05b avoid masking exit code of shell commands
When a variables is declared (with 'local' or 'export') a failing
command is ignored[0]. Changing that so abuild should now error out
properly in more cases.

Also remove 1 pipe that could have prevented an issue recently[1] where
the 'du' command core dumped but abuild didn't error.

The other pipes were not changed for now since it may be better to use
'set -o pipefail' instead. That may require some changes with commands
like grep which use a non-zero exit code to indicate if a match was
found or similar[2].

[0]: https://www.shellcheck.net/wiki/SC2155
[1]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16005#note_395899
[2]: https://github.com/koalaman/shellcheck/issues/665
2024-10-09 10:00:07 +00:00
Sertonix b3b659a9f4 test: fix BSD-4-Clause license name 2024-10-09 09:58:53 +00:00
Sertonix d7208fa0c2 test: simplify usermerge test APKBUILD 2024-10-09 09:58:53 +00:00
Sertonix 78ae5e9386 abuild: remove origsubpackages
boost1.82 which used this variable has been removed
2024-10-08 11:30:19 +00:00
Natanael Copa cd78cd5da2 Rename sanitycheck -> validate
The term validate/validation is better than sanity/sane.
2024-10-08 11:56:47 +02:00
Bart Ribbers da9269ba62 abuild: warn when files are installed to non-usr locations
As agreed upon by the TSC:
https://gitlab.alpinelinux.org/alpine/tsc/-/blob/master/minutes/2024-08-15.md?ref_type=heads#implement-usr-merge-73
Should be changed to an error once some core packages are adjusted.
2024-10-07 20:58:53 +00:00
Sertonix 06695133c9 abuild: preserve attributes without setfattr/getfattr
The setfattr/getfattr commands were not guaranteed to be available and
abuild wouldn't properly error when they are not. That may cause some
hidden issues.

Changing the code to not need setfattr/getfattr like it is done in
default_dbg ([3ad93d9a83]) and pacman mkpkg ([pacman@88d054093c1]).

The code works by first writing the stripped output into a temporary file
and then replace the contents of the already existing file without changing
any file metadata.

[3ad93d9a83]: 3ad93d9a83
[pacman@88d054093c1]: 88d054093c
2024-10-07 20:56:49 +00:00
Hugo Osvaldo Barrera b3b42ae177 Link to buildrepo(1) in APKBUILD(5) and abuild(1)
Add a reference in the SEE ALSO section. Improves discoverability of
this tool for newcomers.

See: https://gitlab.alpinelinux.org/alpine/lua-aports/-/merge_requests/16
2024-10-07 20:53:44 +00:00
Sertonix e36e92c6f2 abuild: calculate size only based on st_size of normal files
Fixes [#10134]

[#10134]: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10134
2024-10-07 20:53:10 +00:00
Sertonix ae059fd558 abuild: drop support for md5 and sha1 checksums 2024-10-07 20:52:19 +00:00
Sertonix bf66ab6312 abuild: drop special linguas variable 2024-10-07 20:51:19 +00:00
Sertonix 18340ddd42 default.conf: reduce duplication through default.conf
By setting some environmental variables in default.conf we can reduce the
amount of duplicated code needed in APKBUILDs.
2024-10-07 20:31:45 +00:00
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