apk-tools issueshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues2020-01-03T11:25:30Zhttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/9621Fix compilation on PLD Linux2020-01-03T11:25:30ZElan RuusamäeFix compilation on PLD LinuxI’ve made some compile fixes, now I want to publish them.
So, attaching as git format match.
To apply:
```
git am 0001-fix-strncpy-bounds-errors.patch
git am 0002-include-sys-sysmacros.h-for-makedev-definition.patch
```
*(from r...I’ve made some compile fixes, now I want to publish them.
So, attaching as git format match.
To apply:
```
git am 0001-fix-strncpy-bounds-errors.patch
git am 0002-include-sys-sysmacros.h-for-makedev-definition.patch
```
*(from redmine: issue id 9621, created on 2018-11-03, closed on 2019-05-03)*
* Uploads:
* [0001-fix-strncpy-bounds-errors.patch](/uploads/5cbde551a5f6d6bbe8d50b1dd54cf3c7/0001-fix-strncpy-bounds-errors.patch) fix strncpy bounds errors
* [0002-include-sys-sysmacros.h-for-makedev-definition.patch](/uploads/4dc71e8a0e7d357bfc8201b555e7f985/0002-include-sys-sysmacros.h-for-makedev-definition.patch) include sys/sysmacros.h for makedev definitionhttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10219apk add --quiet is not quiet2020-01-17T01:54:18Zalgitbotapk add --quiet is not quiet-q/—quiet is supposed to make apk quite
script
docker run —rm -it python:3.7.3-alpine3.9 apk add —quiet bash
Results in following output captured in typescript:
\`\`\`
<sup>\[8</sup>\[\[0K<sup>\[7\ 62%\ ██████████████████████████...-q/—quiet is supposed to make apk quite
script
docker run —rm -it python:3.7.3-alpine3.9 apk add —quiet bash
Results in following output captured in typescript:
\`\`\`
<sup>\[8</sup>\[\[0K<sup>\[7\ 62%\ █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
63%
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 65%\ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
66%
█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 68%\ ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
69%
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 70%\ █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
72%
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 73%\ ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
75%
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 76%\ ██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
78%
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 79%\ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
81%
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 82%\ ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
83%
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 85%\ █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
86%
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 88%\ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
89%
█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 91%\ ███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
92%
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 93%\ █████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7
95%
██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
<sup>\[8</sup>\[\[0K<sup>\[7\ 96%\ ████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</sup>\[8<sup>\[\[0K</sup>\[7100%
████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████<sup>\[8</sup>\[\[0K
\`\`\`
Tested with:
apk-tools 2.10.3, compiled for x86\_64.
*(from redmine: issue id 10219, created on 2019-04-09)*https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/8360Update for Lua 5.32020-01-29T17:55:01ZJakub JirutkaUpdate for Lua 5.3apk’s Lua module is currently built for Lua 5.2.
I think that it doesn’t make much sense to keep maintaining Lua 5.2, I’d
like to remove it and keep just Lua 5.3 and LuaJIT.
*(from redmine: issue id 8360, created on 2017-12-29)*apk’s Lua module is currently built for Lua 5.2.
I think that it doesn’t make much sense to keep maintaining Lua 5.2, I’d
like to remove it and keep just Lua 5.3 and LuaJIT.
*(from redmine: issue id 8360, created on 2017-12-29)*https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10674apk refuses to install seamonkey along with firefox-esr2020-02-21T14:21:36Zalgitbotapk refuses to install seamonkey along with firefox-esrIt seems that apk refuses to install packages that have libraries with
same name even if they are going to install different paths.
```
ERROR: unsatisfiable constraints:
firefox-esr-52.6.0-r1:
conflicts: seamonkey-2.48-r1[so:liblg...It seems that apk refuses to install packages that have libraries with
same name even if they are going to install different paths.
```
ERROR: unsatisfiable constraints:
firefox-esr-52.6.0-r1:
conflicts: seamonkey-2.48-r1[so:liblgpllibs.so=0] seamonkey-2.48-r1[so:libxul.so=0]
satisfies: world[firefox-esr]
seamonkey-2.48-r1:
conflicts: firefox-esr-52.6.0-r1[so:liblgpllibs.so=0] firefox-esr-52.6.0-r1[so:libxul.so=0]
satisfies: world[seamonkey]
```
*(from redmine: issue id 8648, created on 2018-03-15)*https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/4906Documentation2020-02-25T11:38:05ZSören TempelDocumentationIt would be nice to have proper documentation for apk-tools in the form
of man pages.
The only documentation that currently exists is some articles on the
wiki and the *—help*
output.
*(from redmine: issue id 4906, created on 2015-...It would be nice to have proper documentation for apk-tools in the form
of man pages.
The only documentation that currently exists is some articles on the
wiki and the *—help*
output.
*(from redmine: issue id 4906, created on 2015-11-30)*https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/1072apk add fails when not install via repository2021-03-29T07:38:34ZFrancesco Colistaapk add fails when not install via repositoryInstalling a new package with:
apk add /path/of/$package.apk —allow-untrusted
apk returns: ERROR: /path/of/$package.apk: BAD signature
*(from redmine: issue id 1072, created on 2012-04-03, closed on 2012-04-26)*
* Changesets:
* Re...Installing a new package with:
apk add /path/of/$package.apk —allow-untrusted
apk returns: ERROR: /path/of/$package.apk: BAD signature
*(from redmine: issue id 1072, created on 2012-04-03, closed on 2012-04-26)*
* Changesets:
* Revision a3280c30611c4db8a65a920850bfe0a8aeb09d23 by Timo Teräs on 2012-04-03T10:16:49Z:
```
pkg: honor --allow-untrusted when installing non-repository packages
fixes #1072
```https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10688APK re-inserts basic auth info across domains when following redirects2021-04-11T11:27:49ZMorgan HeinAPK re-inserts basic auth info across domains when following redirectsThe code related to this bug:
https://github.com/alpinelinux/apk-tools/blob/master/libfetch/http.c\#L1081
Summary:
- add basic auth info to a repository in /etc/apk/repositories
- request an apk update
- server handling request r...The code related to this bug:
https://github.com/alpinelinux/apk-tools/blob/master/libfetch/http.c\#L1081
Summary:
- add basic auth info to a repository in /etc/apk/repositories
- request an apk update
- server handling request returns a 302 redirect to provide the
APKINDEX.tar.gz file
- apk follows redirect, re-injects basic auth, and makes request
This is done regardless of domain boundaries. In our case, this is
non-standard behavior that is causing issues. This ticket is not meant
as a judgement call that the current behavior is wrong, but that it
would, at the very least, be nice to be able to disable this behavior.
Furthermore, DNF, YUM, and APT do not have this behavior, so APK is
special in this case. This may be a feature request, if not considered a
bug.
Here’s a cleaned up excerpt of a conversation from the irc channel that
explains this bug in more detail:
<johnnyfive> my issue is this: I have a private repo stored on S3, which
is served behind a gateway with basic auth. The gateway creates signed
S3 urls, and redirects them to apk. apk handles the redirection just
fine, but the issue is it ‘re-issues’ or re-injects the original basic
auth info into the redirect, which causes s3 to break.
<johnnyfive> \[to further\] let me explain. So we have an s3 bucket that
we don’t want direct access to (the logging on s3 natively is not
granular enough to give us the information we need)
<johnnyfive> so, instead we have a mildly altered http gateway, that
restricts access via basic auth
<johnnyfive> which, when a file is requested, creates a signed url to
the s3 bucket, and returns a redirect to that file
<AinNero> actually, if gateway and s3 url are on different domain, and
the auth data is passed, its an bug in apk
<johnnyfive> it is a different domain
<johnnyfive> the redirect is a 302
<AinNero> johnnyfive:
https://github.com/alpinelinux/apk-tools/blob/master/libfetch/http.c\#L1081
<AinNero> apk is passing the auth data when following redirects, so the
question is, if thats valid or not
<johnnyfive> yep, no idea what the ‘correct’ behavior is, but I will
mention that yum+dnf+apt do not have this behavior
*(from redmine: issue id 9490, created on 2018-09-28)*Timo TeräsTimo Teräshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/1241lbu does not store permissions on base directories that are entered with 'lbu...2021-04-14T21:32:03Zaa latchmlbu does not store permissions on base directories that are entered with 'lbu include'Since
http://git.alpinelinux.org/cgit/alpine-conf/commit/?id=4e857d18684667e7d9df3a0256e0b6e446284641,
lbu provides the included file list from
`apk audit --backup --quiet --recursive`, rather than a shell variable.
However, `apk audit ...Since
http://git.alpinelinux.org/cgit/alpine-conf/commit/?id=4e857d18684667e7d9df3a0256e0b6e446284641,
lbu provides the included file list from
`apk audit --backup --quiet --recursive`, rather than a shell variable.
However, `apk audit --backup --quiet --recursive` seems not to list the
base directories contained in lbu.list. In my case it only lists the
contents of those directories. As a result, lbu does not include the
base directory in the apkovl. This causes the boot procedure to apply
the apkovl and create the directory with the default owner and umask
(root:root mode 755 on this system) whereas the service requires
otherwise: (postgresql requires postgres:postgres mode 700).
I suggest that `apk audit --backup` output the base directories from
/etc/apk/protected\_paths/lbu.list and not just the contents, so that
the user can specify directories that need permissions stored. This will
match previous behavior of lbu.
*(from redmine: issue id 1241, created on 2012-07-04, closed on 2012-07-17)*
* Changesets:
* Revision 5aa69984595c8f63899a39cbeae8c86913bfb2d2 by Timo Teräs on 2012-07-09T11:59:40Z:
```
audit: get right protection mask for base directories in the lists
Use the paths' protection mask where available instead of the parent
paths'. ref #1241
```
* Revision ea5b08d1d574ae90ad6347a4d2f0a69bb656c7af by Timo Teräs on 2012-07-16T11:44:15Z:
```
audit: fix protection mask of non-db directories
If a directory has protection mask, but does not exist in db, we
do not handle it right unless we calculate the protection mask by
hand, or create temporary db dir entry for it. For simplicity create
always the db dir entry -- depending on audit type we likely need
to create it anyway. This commit also caches the db dir entry in the
audit tree context to avoid duplicate lookups. ref #1241.
```
* Revision 3882d7fb0dc347b5f9880b48fcd1b47175cc4260 by Natanael Copa on 2012-07-17T07:17:52Z:
```
main/apk-tools: upgrade to 2.3.2
ref #1241
```
* Revision 1e86290662203830e0c32ef673c230a2e82c8576 by Natanael Copa on 2012-07-17T11:03:00Z:
```
main/alpine-conf: check permissions when generating apkovl
ref #1241
```
* Revision 451f2026b9908506ff879bb5bae989ea1a699dcc by Natanael Copa on 2012-07-17T13:09:30Z:
```
main/alpine-conf: check permissions when generating apkovl
ref #1241
(cherry picked from commit 1e86290662203830e0c32ef673c230a2e82c8576)
```
* Revision f38fb0a22170382f18a44eb1520fcdb3b53d5ad0 by Natanael Copa on 2012-07-17T13:10:16Z:
```
main/apk-tools: upgrade to 2.3.2
fixes #1241
(cherry picked from commit 3882d7fb0dc347b5f9880b48fcd1b47175cc4260)
```Natanael CopaNatanael Copahttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/2113apk audit --system does not detect deleted files2021-06-07T18:26:31ZNatanael Copaapk audit --system does not detect deleted filesapk thinks that /sbin/badblocks is installed with e2fsprogs:
ncopa-desktop:~$ apk info -L e2fsprogs | grep badblocks
sbin/badblocks
But it was removed:
ncopa-desktop:~$ ls -l /sbin/badblocks
ls: /sbin/badblocks: No such file or di...apk thinks that /sbin/badblocks is installed with e2fsprogs:
ncopa-desktop:~$ apk info -L e2fsprogs | grep badblocks
sbin/badblocks
But it was removed:
ncopa-desktop:~$ ls -l /sbin/badblocks
ls: /sbin/badblocks: No such file or directory
apk audit —system should detect it, but it does not:
ncopa-desktop:~$ apk audit —system /sbin | grep badblocks
ncopa-desktop:~$
*(from redmine: issue id 2113, created on 2013-06-21, closed on 2014-03-17)*
* Changesets:
* Revision c39dacf21b67460709385c4ee742198d6bb00b5c by Timo Teräs on 2014-03-12T13:59:49Z:
```
audit: report missing files in system mode
fixes #2113
```https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/6591APK is executing scripts inside /var/cache, and it prevents normal operation2022-02-24T12:39:57ZJakub SkrzypnikAPK is executing scripts inside /var/cache, and it prevents normal operationHello,
I was trying complex ZFS pools, so I added the /var/cache as separate
ZFS volume.
As security mesaure, I’ve disabled execution on it, to reduce attack
surface.
And it broke APK:
ERROR: packagename }}-{{packageversion : s...Hello,
I was trying complex ZFS pools, so I added the /var/cache as separate
ZFS volume.
As security mesaure, I’ve disabled execution on it, to reduce attack
surface.
And it broke APK:
ERROR: packagename }}-{{packageversion : script exited with error 1
From some debugging I’ve figured out that APK executes post/pre-install
scripts inside /var/cache directly after unpacking .apk files.
PROPOSED SOLUTION: Move the unpacking and processing phase into /tmp,
remove files after processing
*(from redmine: issue id 6591, created on 2016-12-27)*
* Relations:
* relates #129Timo TeräsTimo Teräshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/607apk-tools should have "protected" files to be configurable2022-03-29T08:45:15Ziilluzion _apk-tools should have "protected" files to be configurableIt would be nice to configure what paths are protected, for example it
might be needed to save some changes in roundcubemail skin, which is
part of original package. It might be configuration parameter
PROTECTED\_PATH in apk.conf
*(fro...It would be nice to configure what paths are protected, for example it
might be needed to save some changes in roundcubemail skin, which is
part of original package. It might be configuration parameter
PROTECTED\_PATH in apk.conf
*(from redmine: issue id 607, created on 2011-04-28, closed on 2012-04-26)*
* Changesets:
* Revision ba3ee3f86396f05123f732da7c7879c8ed016c9d by Timo Teräs on 2012-02-23T13:05:06Z:
```
audit, db: add etc/apk/protected_files.d and new audit features
fixes #607.
audit is now mostly rewritten for the new functionality. And
has new features like --check-permissions, --recursive and
--packages.
$ROOT/etc/apk/protected_files.d/*.list can now contain additional
protected paths, one path per line:
+etc
@etc/init.d
-tmp
+ will include the directory as protected configuration directory.
@ considers the directory protected, but will backup only symlinks.
- removes any protection
lbu should be modified to put include and exclude paths in
etc/apk/protected_files.d/lbu.list. Additionally, some packages
might provide their own listings.
E.g. ssh might want to provide ssh.list with something like:
+root/.ssh
+home/*/.ssh
```Timo TeräsTimo Teräshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/7104[subset of #7103] Extract manifest of pax checksum headers vs. files for apks...2022-12-21T19:47:14ZChris Giorgi[subset of #7103] Extract manifest of pax checksum headers vs. files for apks to stdout.This particular portion of Feature \#7103 is needed immediately to
improve user experience in upcoming Alpine 3.6 release.
In order to verify integrity of files extracted from apks and uniquely
identify specific versions of a file, the ...This particular portion of Feature \#7103 is needed immediately to
improve user experience in upcoming Alpine 3.6 release.
In order to verify integrity of files extracted from apks and uniquely
identify specific versions of a file, the checksum stored in the pax
header
68 APK-TOOLS.checksum.SHA1=
needs to be retrieved for each file in the apk tar archive. No standard
tar tool can extract this information, and using an awk script results
in unreasonably long runtimes for large packages such as ‘linux-grsec’,
‘linux-firmware’, etc.
apk already reads these headers, but there is currently no way to expose
that information.
Proposed functionality is export of a manifest to stdout (or optionally
file) containing one line per file (with optional comments), and each
line having information to uniquely identify a file by arch, package
name, and full package version.
Format currently in use in kerneltool/mkimage project is
printf 'apk:%s/%s-%s\t%s:$s\t%s' $arch $pkgname $pkgver $sumtype $sum $filename
where $sumtype is the lowercase name of the checksum function, such as
‘sha1’, ‘sha512’, or ‘md5’, which, when prepended to ‘sum’, yields the
appropriate command to verify the sum (i.e. ‘sha1’ ->sha1sum)
*(from redmine: issue id 7104, created on 2017-04-08)*https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/9634apk symbolic link handling2022-12-21T20:00:16ZTony Garnock-Jonesapk symbolic link handlingI suspect there is a bug in \`apk add\`’s handling of symlinks when
using \`—root\` pointing to an area of the file system not on the same
mount as the running root directory, when the symlink is to end up in
the root directory.
I...I suspect there is a bug in \`apk add\`’s handling of symlinks when
using \`—root\` pointing to an area of the file system not on the same
mount as the running root directory, when the symlink is to end up in
the root directory.
I had an APKBUILD with with a \`package()\` routine that included:
…
ln -s /media/data “$pkgdir”/data
ln -s /etc/crontabs “$pkgdir”/var/spool/cron/crontabs
ln -s /proc/mounts “$pkgdir”/etc/mtab
…
When installing the package using
apk —root targetroot —initdb add …(many packages)…
where \`targetroot\` was a **mount point** for the file system under
construction, it produced an error in apk’s \`src/database.c\`
\[here\](https://github.com/alpinelinux/apk-tools/blob/8fa193ecda2a71de3ff5f826205351b185d15054/src/database.c\#L2731-L2736),
/\* Overwrite the old file \*/
if (renameat(db->root\_fd, tmpname,
db->root\_fd, name) != 0) {
apk\_error(PKG\_VER\_FMT“: failed to rename %s to %s.”,
PKG\_VER\_PRINTF(ipkg->pkg), tmpname, name);
ipkg->broken\_files = 1;
}
Adding a \`perror(“renameat”)\` before the \`apk\_error\` showed that
the
cause of the failure was \`EXDEV\`:
EXDEV oldpath and newpath are not on the same mounted filesystem.
(Linux permits a filesystem to be mounted at multiple points,
but rename() does not work across different mount points, even
if the same filesystem is mounted on both.)
Changing the APKBUILD to omit the **first** symlink (\`/data\`),
leaving
the other two alone (\`/var/spool/cron/crontabs\` and \`/etc/mtab\`),
let
the installation complete successfully!
I suspect that the problem is in \`format\_tmpname\` in
\`src/database.c\`.
Specifically, I think that the tmpname is built like
the/target/directory + /.apk. + somerandomstuff
So for examples like the \`/etc/mtab\` symlink, the tmpname will be
etc + /.apk. + somerandomstuff
i.e. a relative path, BUT in the case where the target directory is
the ROOT directory, the tmpname will be
/.apk. + somerandomstuff
i.e. it will be an ABSOLUTE path.
Now, renameat(2) ignores \`db->root\_fd\` if \`tmpname\` is an
absolute
path, and so it will attempt to move a file from the actual root to
somewhere in the \`—root\` folder, leading to EXDEV.
I believe the fix COULD involve changing \`format\_tmpname\` to treat
an
empty \`f<s><span
style="text-align:right;">diri</span></s>>dir->name\` specially,
resulting in a relative tmpname,
but I am not 100% certain.
For now, I am working around the issue by removing the
ln -s /media/data “$pkgdir”/data
line from APKBUILD’s \`package()\`, and instead adding \`ln -s
/media/data /data\` to the \`pre-install\` script.
*(from redmine: issue id 9634, created on 2018-11-09)*https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/7531APK add --upgrade flag non-transient2022-12-25T13:01:38ZTed TraskAPK add --upgrade flag non-transientWhen ‘apk add —upgrade’ is run, the ‘—repository’ option is ignored. I
would think this is a logical operation to attempt - “I would like to
upgrade this package from this particular repository”. Instead, the
upgrade does not happen.
Pr...When ‘apk add —upgrade’ is run, the ‘—repository’ option is ignored. I
would think this is a logical operation to attempt - “I would like to
upgrade this package from this particular repository”. Instead, the
upgrade does not happen.
Preliminary steps:
1) Boot alpine-standard-3.6.2-x86\_64.iso
2) Run setup-alpine to get network access, but do not add a web
repository
localhost:~\# cat /etc/apk/repositories
/media/cdrom/apks
localhost:~\# apk add —upgrade —repository
http://dl-3.alpinelinux.org/alpine/v3.6/main musl
OK: 11 MiB in 23 packages
localhost:~\# cat >>/etc/apk/repositories
http://dl-3.alpinelinux.org/alpine/v3.6/main
^C
localhost:~\# cat /etc/apk/repositories
/media/cdrom/apks
http://dl-3.alpinelinux.org/alpine/v3.6/main
localhost:~\# apk upgrade -U
fetch
http://dl-3.alpinelinux.org/alpine/v3.6/main/x86\_64/APKINDEX.tar.gz
Upgrading critical system libraries and apk-tools:
(1/1) Upgrading apk-tools (2.7.1-r1 ->2.7.2-r0)
Executing busybox-1.26.2-r5.trigger
Continuing the upgrade transaction with new apk-tools:
fetch
http://dl-3.alpinelinux.org/alpine/v3.6/main/x86\_64/APKINDEX.tar.gz
(1/2) Upgrading musl (1.1.16-r9 ->1.1.16-r13)
(2/2) Upgrading musl-utils (1.1.16-r9 ->1.1.16-r13)
Executing busybox-1.26.2-r5.trigger
OK: 11 MiB in 23 packages
localhost:~\#
*(from redmine: issue id 7531, created on 2017-07-16)*Timo TeräsTimo Teräshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/5369Add support for LZ42024-02-19T15:48:48ZCarlo LandmeterAdd support for LZ4According to the author on: https://github.com/Cyan4973/lz4 lz4
decompresses almost by a factor 7 compared to zlib while keeping
compression at similar level.
Would this be an possible candidate to replace zlib in apk?
*(from redmine...According to the author on: https://github.com/Cyan4973/lz4 lz4
decompresses almost by a factor 7 compared to zlib while keeping
compression at similar level.
Would this be an possible candidate to replace zlib in apk?
*(from redmine: issue id 5369, created on 2016-04-05)*v3.1Timo TeräsTimo Teräshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10533Support "epoch" in APKBUILD, like it works in PKGBUILD2024-03-14T14:25:39ZOliver SmithSupport "epoch" in APKBUILD, like it works in PKGBUILDSometimes software needs to follow a new versioning scheme, which would
make newer releases appear to have a smaller version than older
releases.
Arch Linux has the “epoch” field in their PKGBUILDs:
https://wiki.archlinux.org/index.ph...Sometimes software needs to follow a new versioning scheme, which would
make newer releases appear to have a smaller version than older
releases.
Arch Linux has the “epoch” field in their PKGBUILDs:
https://wiki.archlinux.org/index.php/PKGBUILD#epoch
It would be nice to have this in Alpine too (abuild is makepkg light
after all ;)).
(This does not have any priority to me right now, otherwise I would work
towards implementing this in apk-tools, if it is desired.)
*(from redmine: issue id 10533, created on 2019-06-01)*backloghttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/5073Priority for directory permissions2024-03-19T12:58:43ZKaarle RitvanenPriority for directory permissionsCurrently, apk uses a specific algorithm to combine the directory mode
and owner information from all installed packages. In some cases,
rendering the desired permissions in the file system requires adjusting
the APKBUILD file of all pac...Currently, apk uses a specific algorithm to combine the directory mode
and owner information from all installed packages. In some cases,
rendering the desired permissions in the file system requires adjusting
the APKBUILD file of all packages containing the directory.
The suggested solution is to allow setting a directory permission
priority on per package basis. This attribute would control which
package takes precedence in determining the permissions, similar to how
‘replaces\_priority’ affects file permissions and content. If the
highest priority would be claimed by multiple packages, apk would revert
to the current behavior, taking only the highest-priority packages into
account.
*(from redmine: issue id 5073, created on 2016-02-04)*v3.1