Commit Graph

1615 Commits

Author SHA1 Message Date
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
psykose 49ebbd94e9 newapkbuild: update gpep517 template for new style 2023-06-07 07:30:38 +02:00
Haelwenn (lanodan) Monnier 446a2a66e3 abuild. Use date -u instead of date --utc 2023-06-04 20:10:22 +02:00
psykose 64b3901777 ==== release 3.11.6 ==== 2023-06-03 19:51:50 +02:00
psykose 4f7a2aff7b default.conf: define -fstack-clash-protection by default
see https://gitlab.alpinelinux.org/alpine/tsc/-/issues/64 discussion
2023-06-03 19:48:09 +02:00
psykose 4e4e005530 ==== release 3.11.5 ==== 2023-06-03 12:56:21 +02:00
Sören Tempel e2ab6219d3 abuild: Warn if -doc subpackage exceeds a certain threshold
In the warning, suggest splitting the -doc subpackage into additional
smaller packages (which are not pulled in by the `docs` meta package).

Fixes https://gitlab.alpinelinux.org/alpine/tsc/-/issues/16
2023-06-03 10:55:12 +00:00
psykose a787a9c9c1 ==== release 3.11.4 ==== 2023-06-01 09:32:00 +02:00
psykose 0e333003df abuild: downgrade binfmt-registration error to a warning
strictly speaking, it is possible for an x86_64 cpu to run 32-bit
userspace binaries without qemu emulation. it is also possible for an
aarch64 cpu to run armhf/armv7 binaries (as long as the cpu implements
it, most do). rather than check for every possible combination of when
this is allowed (host cpu + emulated target, does cpu support it, ...),
just downgrade this case to a warning, to permit non-emulated use.

ref https://gitlab.alpinelinux.org/alpine/abuild/-/merge_requests/117#note_255174
2023-06-01 09:29:59 +02:00
psykose fdf1a3a6fb ==== release 3.11.3 ==== 2023-06-01 06:15:46 +02:00
psykose 44c933da5d default.conf: enable _GLIBCXX_ASSERTIONS
these have a slight runtime hit (like fortify-source), but help find
bugs early, by making programs crash on invariants that would corrupt
memory and lead to hard to debug crashes/bugs later.
2023-06-01 04:14:58 +00:00
psykose 861e21fab2 default.conf: kill cppflags
these are mostly useless and redundant given the other flags. all they
do is spam more flags onto every invocation line- things don't "only"
pass cppflags for anything in the general case.
2023-06-01 04:14:58 +00:00
psykose 59caf9e11e checkapk: handle + in pkgname
the pkgname is passed to awk, and + matches in regex, so it fails to
match the actual package name.

closes #10077
2023-06-01 04:13:23 +00:00
psykose 72fa67ca7f abuild: do not use cache in rootbld when cross-building
ref https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10111
2023-06-01 06:11:43 +02:00
psykose eab5926d17 ==== release 3.11.2 ==== 2023-05-26 23:20:46 +02:00
psykose b99565a722 abuild: also set CARCH for rootbld root
otherwise it's set to the default host one, and things that use CARCH in rootbld see the wrong one
2023-05-26 23:19:28 +02:00
psykose fc2f1d628a newapkbuild: make cmake crossopts less aggressive 2023-05-26 00:14:23 +02:00
psykose 96cfde0e88 ==== release 3.11.1 ==== 2023-05-24 02:11:54 +02:00
Natanael Copa c39a988c1b functions: set sharedir properly
fixes loading of default.conf

(applied from aports)

closes #10108
2023-05-24 02:11:12 +02:00
psykose f1d8172827 newapkbuild: don't add python to depends by default
this is already traced by abuild python changes
2023-05-24 02:09:48 +02:00
Lauren N. Liberda bfb88aef29 newapkbuild: add documentation for -e (gpep517 flag) 2023-05-24 00:08:39 +00:00
Lauren N. Liberda a9e06de217 newapkbuild: add gpep517 buildtype 2023-05-24 00:08:39 +00:00
psykose 19d620e8b4 newapkbuild: use cargo-auditable for rust builds 2023-05-20 01:04:12 +02:00
Hugo Osvaldo Barrera 5f500be4c6 abuild.1: add new manpage
This is mostly based on the output of --help.
2023-05-15 18:02:11 +02:00
Hugo Osvaldo Barrera b2b87f8394 newapkbuild.1: fix indentation
There's some extra indentation on the first sections that doesn't match
other man pages and just looks misaligned with the rest of the page.

Example from man:

```
NAME
     man – display manual pages

SYNOPSIS
     man [-acfhklw] [-C file] [-M path] [-m path] [-S subsection]
         [[-s] section] name ...

DESCRIPTION
```

Example from newapkbuild before this patch:

```
NAME
           newapkbuild - generate a new APKBUILD

SYNOPSIS
           newapkbuild options... [pkgname[-pkgver] | source_url]

DESCRIPTION
```

Example for newapkbuild after this patch:

```
NAME
       newapkbuild - generate a new APKBUILD

SYNOPSIS
       newapkbuild options... [pkgname[-pkgver] | source_url]

DESCRIPTION
```
2023-05-15 18:00:52 +02:00
psykose 7bc993400f newapkbuild: fetch --target for rust
this fetches only things for the target triple, so it usually skips e.g.
all the windows crates.
we do this in aports already, in places where it doesn't work we just
unset it.
2023-05-10 15:01:07 +02:00
psykose f810a11cfb newapkbuild: improve default cmake
- -G Ninja because that is always preferred
- remove inferred trailing dot
- use =ON as that is what we usually use most of the time for true/false
- add samurai to makedeps for -G Ninja
- use flatter ctest invocation
2023-05-10 14:57:48 +02:00
Natanael Copa 6576698918 ==== release 3.11.0 ==== 2023-05-09 13:12:34 +00:00
Natanael Copa f2978eb33f abuild-keygen: add support for creating kernel signing key
We need to have a key that can be used to sign kernel modules and
specifically 3rd party kernel modules. Add support for creating this key
in abuild-keygen.

ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/14873
2023-05-05 13:39:47 +02:00
psykose b5c25f1b62 abuild: use $git in rootbld symbolic-ref
missed git call, compared to the others
2023-04-28 08:42:29 +00:00
psykose 9a61082d8d ==== release 3.11_rc13 ==== 2023-04-21 01:59:45 +02:00
psykose fa3e12f664 default.conf: drop int-conversion error for now
this is a good thing to have and we should reinstate it after 3.18,
however it requires fixing a million things, which is a bit too much for
a sudden release build.

i forgot the implications of this aside from fixing strerror_r and how
much work it was, so put this back after 3.18 branch.
2023-04-21 01:58:26 +02:00
psykose 2c8b0cd1ed newapkbuild: cleanup meson
the jobs are useless because SAMUFLAGS already reads the jobs.
we made a cross file in abuild-meson in aports too.
2023-04-20 18:44:59 +02:00
psykose 9624f202a8 ==== release 3.11_rc12 ==== 2023-04-19 15:28:08 +02:00
psykose 69b3e82296 abuild: .. but silence only errors, not output
fixes previous commit
2023-04-19 15:27:51 +02:00
psykose ff37770904 ==== release 3.11_rc11 ==== 2023-04-19 15:26:17 +02:00
psykose 633353b265 abuild: silence pycache postcheck
otherwise every package prints

 >>> gotosocial-openrc*: Running postcheck for gotosocial-openrc
 find: /builds/raspbeguy/aports/testing/gotosocial/pkg/gotosocial-openrc/usr/lib/python*: No such file or directory

the other postchecks already conditionalise on if [ -d, but we use a wildcard here

no actual package change
2023-04-19 15:26:05 +02:00
psykose 264be38ecd ==== release 3.11_rc10 ==== 2023-04-18 18:37:24 +02:00
psykose 91e6e0b542 abuild: set *-pyc as noarch
the files are noarch themselves
2023-04-18 18:36:23 +02:00
Natanael Copa 0daf4ae637 tests: unset CFLAGS
CFLAGS may be set in the running environment (eg in abuild check)
2023-04-18 15:53:11 +02:00
Natanael Copa 0a129755fd ==== release 3.11_rc9 ==== 2023-04-18 15:42:01 +02:00