Skip to content

Commit 516f43e

Browse files
committed
[Packaging][deb][RPM] Use the host owner and group for artifacts
If we don't this, artifacts are owned by root. Because we use root user in Docker.
1 parent 5f6b552 commit 516f43e

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

dev/tasks/linux-packages/apache-arrow-release/yum/apache-arrow-release.spec.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- rpm -*-
1+
# -*- sh-shell: rpm -*-
22
#
33
# Licensed to the Apache Software Foundation (ASF) under one
44
# or more contributor license agreements. See the NOTICE file

dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- rpm -*-
1+
# -*- sh-shell: rpm -*-
22
#
33
# Licensed to the Apache Software Foundation (ASF) under one
44
# or more contributor license agreements. See the NOTICE file

dev/tasks/linux-packages/apt/build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ else
7777
fi
7878
run cd -
7979

80+
repositories="/host/repositories"
8081
package_initial=$(echo "${PACKAGE}" | sed -e 's/\(.\).*/\1/')
81-
pool_dir="/host/repositories/${distribution}/pool/${code_name}/${component}/${package_initial}/${PACKAGE}"
82+
pool_dir="${repositories}/${distribution}/pool/${code_name}/${component}/${package_initial}/${PACKAGE}"
8283
run mkdir -p "${pool_dir}/"
8384
run cp *.tar.* *.dsc *.deb "${pool_dir}/"
85+
86+
run chown -R "$(stat --format "%u:%g" "${repositories}")" "${repositories}"

dev/tasks/linux-packages/yum/build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ EOM
6262
run mkdir -p ~/rpmbuild/SRPMS
6363
fi
6464

65-
repository="/host/repositories/${distribution}/${distribution_version}"
65+
repositories="/host/repositories"
66+
repository="${repositories}/${distribution}/${distribution_version}"
6667
rpm_dir="${repository}/${architecture}/Packages"
6768
srpm_dir="${repository}/source/SRPMS"
6869
run mkdir -p "${rpm_dir}" "${srpm_dir}"
@@ -129,3 +130,5 @@ fi
129130

130131
run mv rpmbuild/RPMS/*/* "${rpm_dir}/"
131132
run mv rpmbuild/SRPMS/* "${srpm_dir}/"
133+
134+
run chown -R "$(stat --format "%u:%g" "${repositories}")" "${repositories}"

0 commit comments

Comments
 (0)