abuild issueshttps://gitlab.alpinelinux.org/alpine/abuild/-/issues2024-03-13T15:20:12Zhttps://gitlab.alpinelinux.org/alpine/abuild/-/issues/10130apk update index error2024-03-13T15:20:12Zdebiansidapk update index errori was trying to update my own apk index.it show error like this
```
alpine:~/packages/main/x86_64$ apk index -vU -o APKINDEX.tar.gz *.apk
WARNING: No provider for the dependencies:
/bin/sh bash bison elfutils-dev flex gmp-dev initramfs...i was trying to update my own apk index.it show error like this
```
alpine:~/packages/main/x86_64$ apk index -vU -o APKINDEX.tar.gz *.apk
WARNING: No provider for the dependencies:
/bin/sh bash bison elfutils-dev flex gmp-dev initramfs-generator linux-firmware-any mpc1-dev
mpfr-dev pc:libmnl perl pkgconfig python3 so:libc.musl-x86_64.so.1 so:libcrypto.so.3
so:libelf.so.1 so:libgmp.so.10 so:libjansson.so.4 so:libmnl.so.0 so:libreadline.so.8
so:libstdc++.so.6 so:libz.so.1 zstd
WARNING: Total of 24 unsatisfiable package names. Your repository may be broken.
Index has 0 packages (of which 22 are new)
```https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10129apkbuild-cpan: put _pkgreal and its comment below pkgrel2024-02-02T14:32:43Zomniomni+alpine@hack.orgapkbuild-cpan: put _pkgreal and its comment below pkgrelLike so:
```
# Automatically generated by apkbuild-cpan, template 4711
# Contributor:
# Maintainer:
pkgname=
pkgver=
pkgrel=
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal
pkgdesc=
```
This would make it a bit m...Like so:
```
# Automatically generated by apkbuild-cpan, template 4711
# Contributor:
# Maintainer:
pkgname=
pkgver=
pkgrel=
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal
pkgdesc=
```
This would make it a bit more ergonomical for those of us who review a lot of MRs as an unexpanded diff will show three lines above and below the changes and the maintainer responsible for the aport can be immediately spotted if it looks like this.https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10128changed SRCDEST not available in rootbld2024-03-06T10:41:22ZSertonixchanged SRCDEST not available in rootbldI have `SRCDEST` set to `$HOME/.cache/abuild` in `/etc/abuild.conf`.
When I run `abuild rootbld` for a package without the `net` option but with a remote `source` the previously found source is not available. It tries to download it agai...I have `SRCDEST` set to `$HOME/.cache/abuild` in `/etc/abuild.conf`.
When I run `abuild rootbld` for a package without the `net` option but with a remote `source` the previously found source is not available. It tries to download it again but fails since bubblewrap wasn't configured to allow downloading.
I think that `SRCDEST` needs to be bind mounted too.
My `$HOME/.cache/` is symlinked to `/tmp/user/*/cache/`. I don't know if that might be a problem.https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10126apkbuild-cpan recreate for perl-cpan-sqlite2024-02-02T02:44:22ZSertonixapkbuild-cpan recreate for perl-cpan-sqliteWhen running `apkbuild-cpan recreate` for [perl-cpan-sqlite](https://gitlab.alpinelinux.org/alpine/aports/-/blob/28f99fc2c785df09b50251bbcda2317582f49404/community/perl-cpan-sqlite/APKBUILD) the depends variables included multiple lines ...When running `apkbuild-cpan recreate` for [perl-cpan-sqlite](https://gitlab.alpinelinux.org/alpine/aports/-/blob/28f99fc2c785df09b50251bbcda2317582f49404/community/perl-cpan-sqlite/APKBUILD) the depends variables included multiple lines with only a tab character.
I think this might be fixed by changing the regular expression in `format_depends` from `s/ {2,}/ /g` to `s/\s{2,}/ /g`.
```patch
diff --git a/community/perl-cpan-sqlite/APKBUILD b/community/perl-cpan-sqlite/APKBUILD
index e785caf2dd4..7b4f7fde65f 100644
--- a/community/perl-cpan-sqlite/APKBUILD
+++ b/community/perl-cpan-sqlite/APKBUILD
@@ -5,28 +5,24 @@ pkgname=perl-cpan-sqlite
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
_pkgreal=CPAN-SQLite
pkgver=0.220
-pkgrel=0
-pkgdesc="Maintain and search a minimal CPAN database"
+pkgrel=1
+pkgdesc="maintain and search a minimal CPAN database"
url="https://metacpan.org/release/CPAN-SQLite/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
-depends="
- perl
- perl-cpan-distnameinfo
- perl-dbd-sqlite
- perl-dbi
- perl-file-homedir
- "
-checkdepends="
- perl-libwww
- perl-lwp-protocol-https
- perl-test-memory-cycle
- "
-options="net" # tests need to access cpan.org
+depends="perl perl-cpan-distnameinfo perl-dbi perl-file-homedir
+
+
+
+
+"
+makedepends="perl-dev"
+checkdepends="perl-dbd-sqlite
+
+
+"
subpackages="$pkgname-doc"
-source="https://cpan.metacpan.org/authors/id/S/ST/STRO/CPAN-SQLite-$pkgver.tar.gz
- use-https-for-cpan.patch
- "
+source="https://cpan.metacpan.org/authors/id/S/ST/STRO/CPAN-SQLite-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
build() {
@@ -47,5 +43,4 @@ package() {
sha512sums="
9ca3aa60378bee8863bbc8be327434260bff33001e5ff8a46151f843ad0b72fc4f735bbccde3d3a741e9030044867275586c649d6fd176f89a5b48613925cff2 CPAN-SQLite-0.220.tar.gz
-74fae5778b9f8d2660ba7b95e0c9a78c738ce81d412c65de14b2f153a3b8253fa946f0e8d187ff1b578140c4fa3527a7f765771374d85004e9274d958d3616d3 use-https-for-cpan.patch
"
```https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10125BusyBox inetd: why removed from Alpine Linux distribution?2023-11-26T16:03:31ZJencir LeeBusyBox inetd: why removed from Alpine Linux distribution?Why the `inetd` command has been removed from the Alpine Linux build?Why the `inetd` command has been removed from the Alpine Linux build?https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10120bareudp is not working (not enabling from kernel)2023-10-03T08:59:02Zne-vlezay80bareudp is not working (not enabling from kernel)```
/home/user/ethudp # ip link add dev udp0 up type bareudp dstport 16000 ethertype ipv4
Error: Unknown device type.
```
```
/home/user/ethudp # cat /boot/config-virt|grep BARE
# CONFIG_BAREUDP is not set
```
Please enable bareudp kern...```
/home/user/ethudp # ip link add dev udp0 up type bareudp dstport 16000 ethertype ipv4
Error: Unknown device type.
```
```
/home/user/ethudp # cat /boot/config-virt|grep BARE
# CONFIG_BAREUDP is not set
```
Please enable bareudp kernel module from linux kernel.https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10118Enhancement: Remove ashisms - pattern substitution2023-07-20T14:18:02ZBharatvaj HemanthEnhancement: Remove ashisms - pattern substitutionI've been trying abuild in Ubuntu buster and since it has `/bin/sh` symlinked to dash, I tried changing the shebang line `/bin/ash` to /bin/sh.
But after changing the shebang line, I'm getting error,
`/root/bin/abuild: 2314: /root/bin/...I've been trying abuild in Ubuntu buster and since it has `/bin/sh` symlinked to dash, I tried changing the shebang line `/bin/ash` to /bin/sh.
But after changing the shebang line, I'm getting error,
`/root/bin/abuild: 2314: /root/bin/abuild: Bad substitution`
The responsible part being, `${pkgarch/noarch/$CARCH} `
Line 2314 uses this pattern substitution which is not implemented by the dash shell and not a part of POSIX.
Even though I compiled latest ash in Ubuntu and solved my original problem, using a polyfill like `_subst` eases logistics for people like who are trying to adapt abuild in other systems.
It also would be great to use the interpreter as /bin/sh instead of /bin/ash.
I tried implementing it in this patch, [abuild_pattern_subst.patch](/uploads/f55c7e353d1599ad155599f0b3b4e69d/abuild_pattern_subst.patch)https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10116mesa-vdpau-gallium : VA-API dont work on qualcomm adreno2023-06-28T16:36:47Zexkcmesa-vdpau-gallium : VA-API dont work on qualcomm adreno
vainfo log :
````
Trying display: wayland
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/dri/msm_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exi...
vainfo log :
````
Trying display: wayland
libva info: VA-API version 1.18.0
libva info: Trying to open /usr/lib/dri/msm_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
````
mesa-vdpau-gallium did not package qualcomm adreno harware encodeing driverhttps://gitlab.alpinelinux.org/alpine/abuild/-/issues/10115pinentry-gnome has --disable-fallback-curses2023-06-15T13:40:31ZRafael Avila de Espindolapinentry-gnome has --disable-fallback-cursesProbably because pinentry-ui and pinentry are two different source packages, pinentry-gnome is built without support for fallback to curses. This is inconvenient for a machine that I sometimes uses with a GUI, sometimes via ssh.Probably because pinentry-ui and pinentry are two different source packages, pinentry-gnome is built without support for fallback to curses. This is inconvenient for a machine that I sometimes uses with a GUI, sometimes via ssh.https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10112LuaTeX vulnerability issue This issue affects TeX Live 2017–2022 and the orig...2023-05-27T06:27:57ZCarlos eLuaTeX vulnerability issue This issue affects TeX Live 2017–2022 and the original release of TeX Live 2023Hello list
I'm not currently running the prepackaged TeXLive but thought of mentioning it after checking
https://git.alpinelinux.org/aports/commit/community/texlive?id=e24d7c64eca0b98834fdd5cfacad0a6a0ce5f59a
> Affected Configurations...Hello list
I'm not currently running the prepackaged TeXLive but thought of mentioning it after checking
https://git.alpinelinux.org/aports/commit/community/texlive?id=e24d7c64eca0b98834fdd5cfacad0a6a0ce5f59a
> Affected Configurations
> LuaTeX
> LuaTeX versions 1.04–1.16.1 are affected by this vulnerability.
>
> LuaTeX versions 1.17.0 (2023-04-29) and newer are not affected by this vulnerability. LuaTeX versions prior to and including 1.03 (2017-02-16) are also not affected.
>
> If you have an unversioned LuaTeX built from source, commit 4d8b815d introduced the issue on 2017-03-01, and commits 5650c067 and b8b71a25 resolved the issue on 2023-04-24.
>
> This vulnerability affects all 4 LuaTeX engines: LuaTeX, LuaHBTeX, LuaJITTeX, and LuaJITHBTeX.
>
> Distributions
> This issue affects TeX Live 2017–2022 and the original release of TeX Live 2023. Beginning on 2023-05-02, TeX Live 2023 distributed the latest version of LuaTeX that is not vulnerable to this issue.
>
> This issue also affects MiKTeX 2.9.6300–23.4. On 2023-05-05, MiKTeX 23.5 distributed the latest version of LuaTeX that is not vulnerable to this issue.
>
> Other unnamed distributions are also affected. To check if your specific installation is affected, check luatex --version or test the exploit code.
You can read more about it at
https://tug.org/~mseven/luatex.htmlhttps://gitlab.alpinelinux.org/alpine/abuild/-/issues/10110abuild-tar: zstd support for parallel compression2023-05-23T23:15:21ZAlex Denesabuild-tar: zstd support for parallel compressionCross-compiling for different architecture also results in the packaging step being run in the rootbld. gzip is single-threaded and cannot parallelize packaging, resulting in slow packaging.Cross-compiling for different architecture also results in the packaging step being run in the rootbld. gzip is single-threaded and cannot parallelize packaging, resulting in slow packaging.https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10108sharedir is not read correctly2023-05-24T00:11:27ZGhost Usersharedir is not read correctlywe had this patched in abuild, the patch was removed in https://gitlab.alpinelinux.org/alpine/aports/-/commit/4e70e96f224f7bbe55b4d44e13cdfc96f013dacf but the issue was not fixed, so this broke abuild for a bunch of packages that built s...we had this patched in abuild, the patch was removed in https://gitlab.alpinelinux.org/alpine/aports/-/commit/4e70e96f224f7bbe55b4d44e13cdfc96f013dacf but the issue was not fixed, so this broke abuild for a bunch of packages that built since thenhttps://gitlab.alpinelinux.org/alpine/abuild/-/issues/10106Compatibility with golang 1.20 via libc6-compat2023-04-28T23:17:02ZNuruCompatibility with golang 1.20 via libc6-compatPrior to the release of `go` v1.20, Alpine could run dynamically linked binaries produced by `go` for `GOOS=linux` if `libc6-compat` was installed. This has been broken in `go` v1.20 by a change in their build support. The response of th...Prior to the release of `go` v1.20, Alpine could run dynamically linked binaries produced by `go` for `GOOS=linux` if `libc6-compat` was installed. This has been broken in `go` v1.20 by a change in their build support. The response of the maintainers is that if people want to use tools written in `go` on Alpine, they should build them themselves and link against `musl`. While this is, of course, an option, it would be simpler and more convenient if `libc6-compat` were enhanced to supply `libresolv.so`. See references for more details.
## References
- https://github.com/golang/go/issues/59305
- https://github.com/kubernetes/minikube/issues/16228https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10102a few scan-build linter warnings2023-10-18T08:54:59ZGhost Usera few scan-build linter warnings```
abuild-sudo.c:128:2: warning: The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges [security.insecureAPI.UncheckedReturn]
setuid...```
abuild-sudo.c:128:2: warning: The return value from the call to 'setuid' is not checked. If an error occurs in 'setuid', the following code may execute with unexpected privileges [security.insecureAPI.UncheckedReturn]
setuid(0);
^~~~~~
abuild-sudo.c:130:2: warning: The return value from the call to 'setgid' is not checked. If an error occurs in 'setgid', the following code may execute with unexpected privileges [security.insecureAPI.UncheckedReturn]
setgid(0);
^~~~~~
2 warnings generated.
```
```
abuild-tar.c:266:20: warning: Array access (via field 'ptr') results in a null pointer dereference [core.NullDereference]
b->ptr[b->size++] = '\n';
~~~ ^
1 warning generated.
```
fixing that
```
abuild-tar.c:224:2: warning: Null pointer passed as 1st argument to memory set function [unix.cstring.NullArg]
memset(b->ptr + oldsize, 0, newsize - oldsize);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10101weird failing abuild-tar tests2023-04-17T11:16:05ZGhost Userweird failing abuild-tar testssuddenly failed with no reason
```
===> tests/abuild_tar_test:abuild_tar_invalid_opt
Result: failed: atf-check failed; see the output of the test for details
Start time: 2023-04-14T12:44:51.630852Z
End time: 2023-04-14T12:44:51.64...suddenly failed with no reason
```
===> tests/abuild_tar_test:abuild_tar_invalid_opt
Result: failed: atf-check failed; see the output of the test for details
Start time: 2023-04-14T12:44:51.630852Z
End time: 2023-04-14T12:44:51.640380Z
Duration: 0.010s
Metadata:
allowed_architectures is empty
allowed_platforms is empty
description is empty
has_cleanup = false
is_exclusive = false
required_configs is empty
required_disk_space = 0
required_files is empty
required_memory = 0
required_programs is empty
required_user is empty
timeout = 300
Standard output:
Executing command [ abuild-tar --invalid ]
Standard error:
Fail: regexp usage: not in stderr
abuild-tar: unrecognized option: invalid
===> Failed tests
tests/abuild_tar_test:abuild_tar_invalid_opt -> failed: atf-check failed; see the output of the test for details [0.010s]
```
not sure how this happens. manual abuild-tar correctly outputs usage to stderr..https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10099rootbld: qemu binfmt registration wrong for x862023-04-14T08:56:04ZGhost Userrootbld: qemu binfmt registration wrong for x86for x86, apk --print-arch is `x86`, but the qemu registration is `qemu-i386`. so, you get:
```
>>> ERROR: pkg: rootbld: binfmt registration missing for x86 binaries
```
for CBUILD=x86, because it doesn't check for qemu-i386for x86, apk --print-arch is `x86`, but the qemu registration is `qemu-i386`. so, you get:
```
>>> ERROR: pkg: rootbld: binfmt registration missing for x86 binaries
```
for CBUILD=x86, because it doesn't check for qemu-i386https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10080abuild: maintainer field check is not RFC822-compliant2022-12-02T15:49:33ZPatrycja Rosaalpine@ptrcnull.meabuild: maintainer field check is not RFC822-compliant[`*[A-Za-z0-9]*\ \<*@*.*\>` glob][1] doesn't match the [RFC][2]:
```
mailbox = addr-spec ; simple address
/ phrase route-addr ; name & addr-spec
phrase = 1*word ...[`*[A-Za-z0-9]*\ \<*@*.*\>` glob][1] doesn't match the [RFC][2]:
```
mailbox = addr-spec ; simple address
/ phrase route-addr ; name & addr-spec
phrase = 1*word ; Sequence of words
word = atom / quoted-string
atom = 1*<any CHAR except specials, SPACE and CTLs>
```
(sections hand-picked to show the issue)
in our case, `phrase` is defined as `[A-Za-z0-9]`, which doesn't allow for `atom` from the RFC and causes errors on valid emails like such:
```
# Maintainer: Jeremy O'Brien <neutral@fastmail.com>
```
[1]: https://gitlab.alpinelinux.org/alpine/abuild/-/blob/5c542377a8f0/abuild.in#L984
[2]: https://datatracker.ietf.org/doc/html/rfc822#section-6.1https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10077checkapk: cannot diff names with regex characters in them2023-06-01T04:14:14ZGhost Usercheckapk: cannot diff names with regex characters in themnotably:
```console
>>> Size difference for libstdc++: 2356 KiB ->
```
this is because of the awk match:
```console
awk "/^$pkg/ { found = 1 } /^[0-9]+/ { if (found) { print \$0; exit } }"
```
where the $pkg is the pkgname and s...notably:
```console
>>> Size difference for libstdc++: 2356 KiB ->
```
this is because of the awk match:
```console
awk "/^$pkg/ { found = 1 } /^[0-9]+/ { if (found) { print \$0; exit } }"
```
where the $pkg is the pkgname and so it has a ++ in it and then fails to match. the name would have to be escaped to work herehttps://gitlab.alpinelinux.org/alpine/abuild/-/issues/10075Don't require checksums for local sources2022-12-02T15:54:38ZNewbyteDon't require checksums for local sourcesCurrently, abuild requires checksums regardless of where the data being checked comes from. While it makes perfect sense to checksum remotely downloaded files to ensure that they haven't sneakily been modified, this makes less sense for ...Currently, abuild requires checksums regardless of where the data being checked comes from. While it makes perfect sense to checksum remotely downloaded files to ensure that they haven't sneakily been modified, this makes less sense for local files given that if an attacker can change the local file, they can presumably also change the APKBUILD that refers to it. Requiring local files to be checksumed adds an extra unnecessary step whenever you want to make changes to them and can be confusing for new contributors.
With that said, if I'm missing something here, I would be happy to hear.https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10071rootbld does not use local packages from other repos2023-04-14T09:02:12ZGhost Userrootbld does not use local packages from other reposif you bump pkgrel on something in main/, then rootbld some other thing in main/, it will use the thing with the new larger version. if you then rootbld something in community/, it will not pull in the local package, using the old versio...if you bump pkgrel on something in main/, then rootbld some other thing in main/, it will use the thing with the new larger version. if you then rootbld something in community/, it will not pull in the local package, using the old version from 'real' repositories
probably required for actually using rootbld on the builders since they use local repos only