mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
Added tmpfiles.d for rgw: templated user and group.
tmpfiles.d are part of system.d and define how temporary directories are setup. rgw needs a socket directory. To do this we template tmpfiles.d user and group for rgw and fill in the values using autotools. Note1: Added to spec file. Note2: Name changed to rgw from radosgw as is preferred name by Sage. Note3: Adds configure options --with-rgw-user=UserName --with-rgw-group=GroupName Note4: Defaults set for debian Note5: spec file overrides defaults for redhat and suse Signed-off-by: Owen Synge <osynge@suse.com>
This commit is contained in:
parent
95db160da3
commit
61240190c7
1
.gitignore
vendored
1
.gitignore
vendored
@ -53,6 +53,7 @@ py-compile
|
||||
release
|
||||
stamp-h1
|
||||
systemd/ceph-osd@.service
|
||||
systemd/ceph-rgw.tmpfiles.d
|
||||
vgcore.*
|
||||
|
||||
# specific local dir files
|
||||
|
@ -494,9 +494,13 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
|
||||
--with-librocksdb-static=check \
|
||||
%if 0%{?rhel} || 0%{?fedora}
|
||||
--with-systemd-libexec-dir=/usr/libexec/ceph \
|
||||
--with-rgw-user=apache \
|
||||
--with-rgw-group=apache \
|
||||
%endif
|
||||
%if 0%{?opensuse} || 0%{?suse_version}
|
||||
--with-systemd-libexec-dir=/usr/lib/ceph/ \
|
||||
--with-rgw-user=wwwrun \
|
||||
--with-rgw-group=www \
|
||||
%endif
|
||||
$MY_CONF_OPT \
|
||||
%{?_with_ocf} \
|
||||
@ -534,6 +538,7 @@ install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap
|
||||
install -D src/rbdmap $RPM_BUILD_ROOT%{_sysconfdir}/ceph/rbdmap
|
||||
%if 0%{?_with_systemd}
|
||||
install -m 0644 -D systemd/ceph.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
|
||||
install -m 0644 -D systemd/ceph-rgw.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}-rgw.conf
|
||||
%endif
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
ln -sf ../../etc/init.d/ceph %{buildroot}/%{_sbindir}/rcceph
|
||||
@ -818,6 +823,9 @@ fi
|
||||
%config %{_sysconfdir}/bash_completion.d/radosgw-admin
|
||||
%dir %{_localstatedir}/log/radosgw/
|
||||
%dir %{_localstatedir}/lib/ceph/radosgw
|
||||
%if 0%{?_with_systemd}
|
||||
%{_tmpfilesdir}/%{name}-rgw.conf
|
||||
%endif
|
||||
|
||||
%post radosgw
|
||||
/sbin/ldconfig
|
||||
|
45
configure.ac
45
configure.ac
@ -1197,6 +1197,50 @@ AC_ARG_WITH(
|
||||
]
|
||||
)
|
||||
|
||||
dnl rgw-user
|
||||
AC_SUBST(user_rgw)
|
||||
AC_ARG_WITH(
|
||||
rgw-user,
|
||||
AS_HELP_STRING(
|
||||
[--with-rgw-user=USER],
|
||||
[systemd unit directory @<:@USER_RGW@:>@
|
||||
Defaults to "www-data"]
|
||||
),
|
||||
[
|
||||
user_rgw="$withval"
|
||||
],
|
||||
[
|
||||
if test "x$USER_RGW" = "x"; then
|
||||
user_rgw=www-data
|
||||
else
|
||||
user_rgw="$USER_RGW"
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
dnl rgw-group
|
||||
AC_SUBST(group_rgw)
|
||||
AC_ARG_WITH(
|
||||
rgw-group,
|
||||
AS_HELP_STRING(
|
||||
[--with-rgw-group=GROUP],
|
||||
[systemd unit directory @<:@GROUP_RGW@:>@
|
||||
Defaults to "www-data"]
|
||||
),
|
||||
[
|
||||
group_rgw="$withval"
|
||||
],
|
||||
[
|
||||
if test "x$GROUP_RGW" = "x"; then
|
||||
group_rgw=www-data
|
||||
else
|
||||
group_rgw="$GROUP_RGW"
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
#AC_HEADER_STDBOOL
|
||||
#AC_C_CONST
|
||||
@ -1260,5 +1304,6 @@ AC_CONFIG_FILES([Makefile
|
||||
man/Makefile
|
||||
doc/Makefile
|
||||
systemd/ceph-osd@.service
|
||||
systemd/ceph-rgw.tmpfiles.d
|
||||
ceph.spec])
|
||||
AC_OUTPUT
|
||||
|
2
systemd/ceph-rgw.tmpfiles.d.in
Normal file
2
systemd/ceph-rgw.tmpfiles.d.in
Normal file
@ -0,0 +1,2 @@
|
||||
# create rgw socket directory
|
||||
d /var/run/ceph-rgw 0755 @user_rgw@ @group_rgw@ - -
|
Loading…
Reference in New Issue
Block a user