mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-06 23:00:13 +00:00
abuild: remove host uid/gid from pkg
Closes https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10127
This commit is contained in:
parent
0a91a31e47
commit
d85ea24eca
11
abuild.in
11
abuild.in
@ -1763,7 +1763,7 @@ human_size() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create_apks() {
|
create_apks() {
|
||||||
local file= dir= name= ver= apk= datadir= size=
|
local file= dir= name= ver= apk= datadir= size= i=
|
||||||
local gzip=$(command -v pigz || echo gzip)
|
local gzip=$(command -v pigz || echo gzip)
|
||||||
if ! options_has "keepdirs"; then
|
if ! options_has "keepdirs"; then
|
||||||
rmdir "$pkgdir"/usr/lib \
|
rmdir "$pkgdir"/usr/lib \
|
||||||
@ -1788,6 +1788,13 @@ create_apks() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for i in root $pkgusers; do
|
||||||
|
printf '%s %s:0\n' "$i" "$i"
|
||||||
|
done > "$pkgbasedir"/.owner-map
|
||||||
|
for i in root $pkggroups; do
|
||||||
|
printf '%s %s:0\n' "$i" "$i"
|
||||||
|
done > "$pkgbasedir"/.group-map
|
||||||
|
|
||||||
for file in "$pkgbasedir"/.control.*/.PKGINFO; do
|
for file in "$pkgbasedir"/.control.*/.PKGINFO; do
|
||||||
local dir="${file%/.PKGINFO}"
|
local dir="${file%/.PKGINFO}"
|
||||||
local name=$(pkginfo_val pkgname "$file")
|
local name=$(pkginfo_val pkgname "$file")
|
||||||
@ -1824,6 +1831,8 @@ create_apks() {
|
|||||||
--format=posix \
|
--format=posix \
|
||||||
--pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,ctime:=0 \
|
--pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,ctime:=0 \
|
||||||
--mtime="@${SOURCE_DATE_EPOCH}" \
|
--mtime="@${SOURCE_DATE_EPOCH}" \
|
||||||
|
--owner-map="$pkgbasedir"/.owner-map \
|
||||||
|
--group-map="$pkgbasedir"/.group-map \
|
||||||
--no-recursion --null -T - \
|
--no-recursion --null -T - \
|
||||||
-f - -c | abuild-tar --hash | $gzip -n -9 >"$dir"/data.tar.gz
|
-f - -c | abuild-tar --hash | $gzip -n -9 >"$dir"/data.tar.gz
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user