Skip to content

Commit 831a706

Browse files
committed
ARROW-7558: [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. Closes #6171 from kou/packaging-linux-keep-permission and squashes the following commits: 4104378 <Sutou Kouhei> Install LICENSE.txt with Meson 82d36be <Sutou Kouhei> Fix LICENSE.txt location 516500b <Sutou Kouhei> Install license files 7675977 <Sutou Kouhei> Include LICENSE.txt into archive 516f43e <Sutou Kouhei> Use the host owner and group for artifacts Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 123d9b1 commit 831a706

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

c_glib/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ EXTRA_DIST = \
3636

3737
arrow_glib_docdir = ${datarootdir}/doc/arrow-glib
3838
arrow_glib_doc_DATA = \
39-
LICENSE.txt \
39+
../LICENSE.txt \
4040
README.md

c_glib/meson.build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ if get_option('gtk_doc')
144144
endif
145145
endif
146146

147-
install_data('README.md',
147+
install_data('../LICENSE.txt',
148+
'README.md',
148149
install_dir: join_paths(data_dir, 'doc', meson.project_name()))
149150

150151
run_test = find_program('test/run-test.sh')

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: 2 additions & 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
@@ -211,6 +211,7 @@ This package contains the libraries for Apache Arrow C++.
211211
%files libs
212212
%defattr(-,root,root,-)
213213
%doc README.md LICENSE.txt NOTICE.txt
214+
%{_docdir}/arrow/
214215
%{_libdir}/libarrow.so.*
215216

216217
%package devel

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)