Commit Graph

1655 Commits

Author SHA1 Message Date
jvoisin dd67240f01 Actually set values for libcpp hardening macros
Otherwise, it wouldn't do much…
2023-09-04 01:56:15 +02:00
sudotac 9fe0d14d7e apkbuild-pypi.in: replace given/when with if/elsif
smartmatch is deprecated in Perl 5.37.10
2023-08-30 05:50:04 +00:00
sudotac 00aa9aab12 apkbuild-pypi.in: use $() instead of backticks 2023-08-30 05:50:04 +00:00
jvoisin 65b5d578b2 Enable more hardening for libcpp
- _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS: This macro is used to enable -Wthread-safety annotations on libc++’s std::mutex and std::lock_guard.
- _LIBCPP_ENABLE_HARDENED_MODE to enable the hardened mode.
2023-08-21 13:37:35 +02:00
psykose 28b97249fa ==== release 3.11.21 ==== 2023-07-17 06:28:54 +02:00
psykose 6c20db871b checkapk: fix a mistaken grep warning
grep: warning: stray \ before -
it matches without \ anyway
2023-07-17 06:12:56 +02:00
psykose cc17a1cc79 checkapk: exit on trap signal
otherwise it cleans up but the loop keeps going and just fails until end,
just spamming the output
2023-07-11 15:38:09 +02:00
Iztok Fister Jr 617df473b0 apkbuild-cpan: fix typo 2023-07-07 22:48:12 +02:00
psykose d4b2415fb1 apkbuild-cpan: run perltidy over the source
it was a mismatch of mixed indents
2023-07-03 23:52:43 +02:00
psykose 0e555d58a7 apkbuild-cpan: port given/when to if/else
the former is deprecated syntax
2023-07-03 23:49:52 +02:00
psykose fc575e8361 abuild: fix a mistake in 0e333003df
the prefix was dropped from the check so it always says it's unregistered
no actual breakage happened as this just prints a warning
2023-07-03 04:45:13 +02:00
psykose cbca6d4f48 ==== release 3.11.20 ==== 2023-06-29 06:02:28 +02:00
psykose 21faeb7f47 checkapk: use grep instead of awk for size checking
the previous implementation had a bug that + chars needed escaping
(which was fixed), and now has another discovered but that pkgnames
could start with a number, so the /^pkg/ match matches the pkgname again
and a size comparison gives you:

>>> Size difference for 7zip: 7zip-22.01-r5 installed size: -> 7zip-23.01-r0 installed size:

using grep -F avoids any magic character expansion and works correctly
in all cases.
2023-06-29 06:00:22 +02:00
psykose 446b68359f tests: make sure move_caches tests don't fail with envs set 2023-06-26 10:33:40 +02:00
psykose 873a4b6654 ==== release 3.11.19 ==== 2023-06-26 10:31:15 +02:00
psykose df31829660 checkapk: don't objdump invalid elfs
cleans up the output a bit for things that have .so in the name
2023-06-26 10:30:49 +02:00
psykose 535afd9544 checkapk: do simple parallel
this is quite trivial and should be safe
2023-06-26 07:52:28 +02:00
psykose 5c25099d4f ==== release 3.11.18 ==== 2023-06-26 07:41:07 +02:00
psykose 9855e304c7 checkapk: ignore missing apk error
prior to the recent reworks, this error handling path was never
triggered, because the script is ran without pipefail, and it was at
the end of a | pipe | line | sort, so all it did was be ignored for 'new
apks', when the old one would fail to fetch and be missing.

since we now do hit this path on fetch failure however, it aborts the
script when a new subpackage/package is added (since the 'old apk' won't
exist), and doesn't output a diff. since before we always ignored this,
ignore the 'old apk' perhaps not existing, which gives the currently
intended behaviour.
2023-06-26 07:41:07 +02:00
psykose d451522e53 ==== release 3.11.17 ==== 2023-06-26 04:25:43 +02:00
psykose 256a249feb checkapk: but actually skip symlinks
boolean logic gets confusing..
2023-06-26 04:25:08 +02:00
psykose d51cf9c2bb ==== release 3.11.16 ==== 2023-06-26 04:23:08 +02:00
psykose fd5ec6b4fa checkapk: skip symlinks
this affected the old version too- duplicate sodiffs on symlinks are useless
2023-06-26 04:22:26 +02:00
psykose 64f2b3af4e ==== release 3.11.15 ==== 2023-06-26 04:15:06 +02:00
psykose 9af4012177 checkapk: also make sure only sofiles objdumped 2023-06-26 04:14:15 +02:00
psykose 3e5501c9fa ==== release 3.11.14 ==== 2023-06-26 03:27:35 +02:00
psykose 26118d4997 checkapk: refactor to show previous soname and decompress once and use unified context
closes #10070

previously:
>>> Size difference for gegl: 7480 KiB -> 7956 KiB
--- filelist-gegl-old	2023-06-26 02:28:40.176085274 +0200
+++ filelist-gegl	2023-06-26 02:28:40.202085952 +0200
@@ -47,12 +47,13 @@
 usr/lib/gegl-0.4/tiff-load.so
 usr/lib/gegl-0.4/tiff-save.so
 usr/lib/gegl-0.4/transformops.so
+usr/lib/gegl-0.4/vector-fill.so
 usr/lib/gegl-0.4/vector-stroke.so
 usr/lib/gegl-0.4/webp-load.so
 usr/lib/gegl-0.4/webp-save.so
 usr/lib/girepository-1.0/
 usr/lib/girepository-1.0/Gegl-0.4.typelib
 usr/lib/libgegl-0.4.so.0
-usr/lib/libgegl-0.4.so.0.443.1
+usr/lib/libgegl-0.4.so.0.445.1
 usr/lib/libgegl-npd-0.4.so
 usr/lib/libgegl-sc-0.4.so
usr/lib/gegl-0.4/vector-fill.so:    SONAME               vector-fill.so
usr/lib/libgegl-0.4.so.0.445.1:    SONAME               libgegl-0.4.so.0

now:
>>> Size difference for gegl: 7480 KiB -> 7956 KiB
--- filelist-gegl-old
+++ filelist-gegl-new
@@ -47,12 +47,13 @@
 usr/lib/gegl-0.4/tiff-load.so
 usr/lib/gegl-0.4/tiff-save.so
 usr/lib/gegl-0.4/transformops.so
+usr/lib/gegl-0.4/vector-fill.so
 usr/lib/gegl-0.4/vector-stroke.so
 usr/lib/gegl-0.4/webp-load.so
 usr/lib/gegl-0.4/webp-save.so
 usr/lib/girepository-1.0/
 usr/lib/girepository-1.0/Gegl-0.4.typelib
 usr/lib/libgegl-0.4.so.0
-usr/lib/libgegl-0.4.so.0.443.1
+usr/lib/libgegl-0.4.so.0.445.1
 usr/lib/libgegl-npd-0.4.so
 usr/lib/libgegl-sc-0.4.so
SODIFF:
+usr/lib/gegl-0.4/vector-fill.so:    SONAME               vector-fill.so
-usr/lib/libgegl-0.4.so.0.443.1:    SONAME               libgegl-0.4.so.0
+usr/lib/libgegl-0.4.so.0.445.1:    SONAME               libgegl-0.4.so.0

it also no longer relies on diffutils default output, utilising diff -U0 for comparison

there is also a slight optimisation wrt apk handling, previously it
would get decompressed twice for soname diff. now the intermediate is
stored
2023-06-26 03:17:31 +02:00
psykose 7c85598b7f ==== release 3.11.13 ==== 2023-06-22 22:41:17 +02:00
psykose 8e25f6d14a checkapk: undo broken parallel thing
this doesn't work for setting lvalues and *size= is never populated

todo: write tests.., or just port this to lua
2023-06-22 22:40:38 +02:00
psykose e3777a7259 checkapk: silence old-pkg gzip/tar errors
when apk fetch fails (a new package is added) these just say 'gzip invalid magic' or similar, as there is no old apk to compare to.

the || die is also never triggered, as it only triggers when the sort fails, since it won't trigger on earlier pipeline steps

this needs more cleaning up, but i'll leave that for the future when i write some tests.
2023-06-22 22:29:34 +02:00
psykose 1eb4ca5369 ==== release 3.11.12 ==== 2023-06-22 20:04:04 +02:00
psykose 3e5cbbee13 abuild: unset default_lang depends unless set
for consistency with every default split
2023-06-22 20:03:32 +02:00
psykose 9987e57a20 ==== release 3.11.11 ==== 2023-06-22 17:56:52 +02:00
Sören Tempel c9b4146aaa Revert "rootbld: run mkusers inside the chroot and don't affect host users"
We can't run mkusers inside the chroot because of bwrap peculiarities.
Presently, rootbld does therefore not work at all for APKBUILDs which
use $pkggroups/$pkguser. While not polluting the host is a noble goal
it isn't really useful if it causes rootbld to be incapable of building
certain packages (i.e. those using $pkggroups/$pkguser with groups
not existent on the host).

This commit therefore restores the original behavior for now. While at
it, I also added a comment to the mkusers invocation.

See: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10094

This reverts commit 84d7b7693d.
2023-06-22 21:53:46 +02:00
Cowington Post 7e82b6a34b
newapkbuild: do not expand $CTARGET 2023-06-22 07:13:25 -07:00
psykose fdbd71d816 checkapk: use pigz when available and run newsize/oldsize in parallel 2023-06-22 13:40:37 +02:00
psykose e995b9ec5b ==== release 3.11.10 ==== 2023-06-22 06:23:09 +02:00
Rodrigo Lourenço 1679651370 newapkbuild: fix generating wrong URL with new github urls
When giving GitHub URLs like

https://github.com/USER/REPO/archive/refs/tags/TAG.tar.gz

Strip away the /refs/tags part so a valid URL is generated.
Fixes #10034.
2023-06-22 06:10:54 +02:00
Jakub Panek c26043748e abuild: fix completions to vendor dir, warn on incorrect dir
Signed-off-by: Jakub Panek <me@panekj.dev>
2023-06-22 04:08:05 +00:00
psykose 38e84f9016 abuild: simplify et_dyn/et_exec check 2023-06-22 03:37:06 +00:00
Dimitry Andric 76ff15a7b1 abuild: unset option variables to prevent environment leaking in
In abuild's getopts loop, option variables such as "keep", "verbose",
etc are only set if the corresponding option is found. If such an option
is *not* found, any environment variable with the same name will leak
in, instead. Prevent this by explicitly unsetting almost all of them.
2023-06-22 03:35:46 +00:00
ptrcnull d27b635768 abuild: set cache directories to a temporary directory if MOVE_CACHES is set
this allows for isolating cache directories per package
2023-06-22 05:33:59 +02:00
Jakub Jirutka 8efe527ff3 sample.*: improve sample init script 2023-06-21 15:34:27 +02:00
psykose 6ef31d9e99 ==== release 3.11.9 ==== 2023-06-15 14:54:45 +02:00
psykose 8d11e9f410 abuild: refactor duplicate python detection to not use find(1)
the previous implementation used -regex, which is subtly different between busybox and findutils

[0-9]\+ matches on busybox, but doesn't match with gnu findutils
[0-9]+ matches with findutils, but doesn't match on busybox

this means python deps were subtly broken when findutils was installed
(sometimes pulled via makedeps) vs not
2023-06-15 12:54:00 +00:00
psykose 8f41a924e3 abuild: fix cmd: provides to not provide directory names
/usr/bin/somedirectory/ was providing cmd:somedirectory, because dirs
have +x.
2023-06-15 14:37:24 +02:00
psykose 5d4e763459 ==== release 3.11.8 ==== 2023-06-15 12:59:59 +02:00
Sören Tempel 4a2a0337d0 abuild: Scan for binaries with extra setcap(8) capabilities
Similar to suid binaries, abuild will now error out if the package
includes binaries with setcap(8) capabilities but doesn't have `setcap`
in `$options`. This eases identifying package which ship binaries
with extra capabilities.

Furthermore, if these binaries are executable by others a warning is
emitted. This warning could be changed to an error in the future.
The recommendation is to make such binaries only executable by owner
and group, thereby requiring the system administrator to explicitly
add users to a specific group in order to give them accesses to these
capabilities.

See: https://gitlab.alpinelinux.org/alpine/tsc/-/issues/45

Discussion: This change requires abuild to depend on the `libcap`
package for the `getcap` binary. It does not seem to be possible
at the moment to use scanelf(1) to identify these binaries.
2022-07-03 14:30:15 +02:00
Timo Teräs 8d6fb8b45f abuild-sudo: fix determining number of groups
Musl _SC_NGROUPS_MAX is fixed at 32. The kernel can support more.
Query the kernel for number of groups needed.
2023-06-07 12:42:00 +03:00
psykose 69d15d3225 ==== release 3.11.7 ==== 2023-06-07 07:30:58 +02:00