Zhou Zheng Sheng has uploaded a new change for review. Change subject: Packageing: Move SystemD and SysVInit files to respective sub-dirs ......................................................................
Packageing: Move SystemD and SysVInit files to respective sub-dirs A new dir /init is created to place vdsm init files. /init for common init files. /init/systemd for SystemD related files. /init/sysvinit for SysV init related files. /init/upstart will be created in future for Upstart related files. Change-Id: I1368bb8dfec6e0db7e5d578bca8dcabd893e8849 Signed-off-by: Zhou Zheng Sheng <[email protected]> --- M .gitignore M Makefile.am M configure.ac A init/Makefile.am R init/daemonAdapter A init/systemd/Makefile.am R init/systemd/supervdsmd.service.in R init/systemd/vdsm-restore-net-config.service R init/systemd/vdsm-tmpfiles.d.conf.in R init/systemd/vdsmd.service.in A init/sysvinit/Makefile.am R init/sysvinit/respawn R init/sysvinit/supervdsmd.init.in R init/sysvinit/vdsm-restore-net-config.init.in R init/sysvinit/vdsmd.init.in R init/vdsmd_init_common.sh.in M vdsm.spec.in M vdsm/Makefile.am 18 files changed, 154 insertions(+), 35 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/18067/1 diff --git a/.gitignore b/.gitignore index 7802279..d1f6bb8 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,13 @@ config.status configure doc/build +init/systemd/supervdsmd.service +init/systemd/vdsm-tmpfiles.d.conf +init/systemd/vdsmd.service +init/sysvinit/supervdsmd.init +init/sysvinit/vdsm-restore-net-config.init +init/sysvinit/vdsmd.init +init/vdsmd_init_common.sh lib/vdsm/config.py lib/vdsm/constants.py lib/vdsm/tool/libvirt_configure.sh @@ -49,17 +56,10 @@ vdsm/vdscli.py vdsm/vdsm-gencerts.sh vdsm/vdsm-logrotate.conf -vdsm/vdsm-restore-net-config.init vdsm/vdsm-sosplugin.py vdsm/vdsm-store-net-config -vdsm/vdsm-tmpfiles.d.conf vdsm/vdsm.rwtab vdsm/vdsmd.8 -vdsm/vdsmd.init -vdsm/vdsmd.service -vdsm/vdsmd_init_common.sh -vdsm/supervdsmd.init -vdsm/supervdsmd.service vdsm_api/vdsm-api.html vdsm_hooks/openstacknet/sudoers vdsm_hooks/persist-vdsm-hooks diff --git a/Makefile.am b/Makefile.am index 2e9f4bb..195688f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,6 +20,7 @@ SUBDIRS = \ client \ + init \ lib \ vds_bootstrap \ vdsm \ diff --git a/configure.ac b/configure.ac index 0ccca95..61487f4 100644 --- a/configure.ac +++ b/configure.ac @@ -200,6 +200,9 @@ AC_OUTPUT([ Makefile client/Makefile + init/Makefile + init/systemd/Makefile + init/sysvinit/Makefile lib/Makefile lib/cpopen/Makefile lib/vdsm/Makefile diff --git a/init/Makefile.am b/init/Makefile.am new file mode 100644 index 0000000..71f5db8 --- /dev/null +++ b/init/Makefile.am @@ -0,0 +1,44 @@ +# +# Copyright 2013 IBM, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +SUBDIRS = systemd sysvinit + +include $(top_srcdir)/build-aux/Makefile.subs + +nodist_vdsmexec_SCRIPTS = \ + vdsmd_init_common.sh \ + $(NULL) + +dist_vdsm_SCRIPTS = \ + daemonAdapter \ + $(NULL) + +CLEANFILES = \ + config.log \ + $(nodist_vdsmexec_SCRIPTS) \ + $(NULL) + +EXTRA_DIST = \ + vdsmd_init_common.sh.in \ + $(NULL) + +all-local: \ + $(nodist_vdsm_SCRIPTS) \ + $(NULL) diff --git a/vdsm/daemonAdapter b/init/daemonAdapter similarity index 100% rename from vdsm/daemonAdapter rename to init/daemonAdapter diff --git a/init/systemd/Makefile.am b/init/systemd/Makefile.am new file mode 100644 index 0000000..cf86d8d --- /dev/null +++ b/init/systemd/Makefile.am @@ -0,0 +1,43 @@ +# +# Copyright 2008-2012 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +include $(top_srcdir)/build-aux/Makefile.subs + +nodist_noinst_DATA = \ + supervdsmd.service \ + vdsm-tmpfiles.d.conf \ + vdsmd.service \ + $(NULL) + +CLEANFILES = \ + config.log \ + $(nodist_noinst_DATA) \ + $(NULL) + +EXTRA_DIST = \ + supervdsmd.service.in \ + vdsm-restore-net-config.service \ + vdsm-tmpfiles.d.conf.in \ + vdsmd.service.in \ + $(NULL) + +all-local: \ + $(nodist_noinst_DATA) \ + $(NULL) diff --git a/vdsm/supervdsmd.service.in b/init/systemd/supervdsmd.service.in similarity index 100% rename from vdsm/supervdsmd.service.in rename to init/systemd/supervdsmd.service.in diff --git a/vdsm/vdsm-restore-net-config.service b/init/systemd/vdsm-restore-net-config.service similarity index 100% rename from vdsm/vdsm-restore-net-config.service rename to init/systemd/vdsm-restore-net-config.service diff --git a/vdsm/vdsm-tmpfiles.d.conf.in b/init/systemd/vdsm-tmpfiles.d.conf.in similarity index 100% rename from vdsm/vdsm-tmpfiles.d.conf.in rename to init/systemd/vdsm-tmpfiles.d.conf.in diff --git a/vdsm/vdsmd.service.in b/init/systemd/vdsmd.service.in similarity index 100% rename from vdsm/vdsmd.service.in rename to init/systemd/vdsmd.service.in diff --git a/init/sysvinit/Makefile.am b/init/sysvinit/Makefile.am new file mode 100644 index 0000000..03698e7 --- /dev/null +++ b/init/sysvinit/Makefile.am @@ -0,0 +1,46 @@ +# +# Copyright 2008-2012 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +include $(top_srcdir)/build-aux/Makefile.subs + +nodist_noinst_DATA = \ + supervdsmd.init \ + vdsm-restore-net-config.init \ + vdsmd.init \ + $(NULL) + +dist_vdsm_SCRIPTS = \ + respawn \ + $(NULL) + +CLEANFILES = \ + config.log \ + $(nodist_noinst_DATA) \ + $(NULL) + +EXTRA_DIST = \ + supervdsmd.init.in \ + vdsm-restore-net-config.init.in \ + vdsmd.init.in \ + $(NULL) + +all-local: \ + $(nodist_noinst_DATA) \ + $(NULL) diff --git a/vdsm/respawn b/init/sysvinit/respawn similarity index 100% rename from vdsm/respawn rename to init/sysvinit/respawn diff --git a/vdsm/supervdsmd.init.in b/init/sysvinit/supervdsmd.init.in similarity index 100% rename from vdsm/supervdsmd.init.in rename to init/sysvinit/supervdsmd.init.in diff --git a/vdsm/vdsm-restore-net-config.init.in b/init/sysvinit/vdsm-restore-net-config.init.in similarity index 100% rename from vdsm/vdsm-restore-net-config.init.in rename to init/sysvinit/vdsm-restore-net-config.init.in diff --git a/vdsm/vdsmd.init.in b/init/sysvinit/vdsmd.init.in similarity index 100% rename from vdsm/vdsmd.init.in rename to init/sysvinit/vdsmd.init.in diff --git a/vdsm/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in similarity index 100% rename from vdsm/vdsmd_init_common.sh.in rename to init/vdsmd_init_common.sh.in diff --git a/vdsm.spec.in b/vdsm.spec.in index 9887e23..d9e3aa5 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -551,7 +551,7 @@ make DESTDIR=%{buildroot} install # Install the respawn utility -install -Dm 0755 vdsm/respawn \ +install -Dm 0755 init/sysvinit/respawn \ %{buildroot}%{_datadir}/%{vdsm_name}/respawn # Install the lvm rules @@ -563,13 +563,12 @@ %if 0%{?with_systemd} # Install the systemd scripts -# vdsm systemd unit does not rely on systemd-vdsmd any more, but we keep it to -# retain backward compatibility with old ovirt-host-deploy. -install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd -install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service -install -Dm 0644 vdsm/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service +# old version of ovirt-host-deploy needs systemd-vdsmd to reconfigure libvirt +install -Dm 0755 init/vdsmd_init_common.sh %{buildroot}/lib/systemd/systemd-vdsmd +install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service +install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service -install -Dm 0644 vdsm/vdsm-restore-net-config.service \ +install -Dm 0644 init/systemd/vdsm-restore-net-config.service \ %{buildroot}%{_unitdir}/vdsm-restore-net-config.service install -Dm 0755 vdsm_reg/vdsm-reg.init \ %{buildroot}/lib/systemd/systemd-vdsm-reg @@ -579,16 +578,16 @@ %{buildroot}%{_sysconfdir}/modules-load.d/vdsm.conf %else # Install the SysV init scripts -install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd -install -Dm 0755 vdsm/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd +install -Dm 0755 init/sysvinit/vdsmd.init %{buildroot}%{_initrddir}/vdsmd +install -Dm 0755 init/sysvinit/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg -install -Dm 0755 vdsm/vdsm-restore-net-config.init \ +install -Dm 0755 init/sysvinit/vdsm-restore-net-config.init \ %{buildroot}%{_initrddir}/vdsm-restore-net-config %endif %if 0%{?with_tmpfiles_macro} -install -Dm 0644 vdsm/vdsm-tmpfiles.d.conf \ +install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \ %{buildroot}%{_tmpfilesdir}/%{vdsm_name}.conf %endif diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am index ba403da..cd78cd8 100644 --- a/vdsm/Makefile.am +++ b/vdsm/Makefile.am @@ -61,7 +61,6 @@ nodist_vdsmexec_SCRIPTS = \ vdsm-gencerts.sh \ - vdsmd_init_common.sh \ $(NULL) nodist_vdsm_PYTHON = \ @@ -76,23 +75,15 @@ logger.conf \ mom.conf \ sudoers.vdsm \ - supervdsmd.init \ - supervdsmd.service \ svdsm.logger.conf \ vdsm-logrotate.conf \ - vdsm-restore-net-config.init \ - vdsm-tmpfiles.d.conf \ vdsm.rwtab \ - vdsmd.init \ - vdsmd.service \ $(NULL) dist_vdsm_SCRIPTS = \ addNetwork \ - daemonAdapter \ delNetwork \ get-conf-item \ - respawn \ set-conf-item \ supervdsmServer \ vdsm \ @@ -125,8 +116,6 @@ mom.d/03-ksm.policy \ sourceRoute.sh \ sudoers.vdsm.in \ - supervdsmd.init.in \ - supervdsmd.service.in \ svdsm.logger.conf.in \ vdsm-gencerts.sh.in \ vdsm-libvirt-access.pkla \ @@ -135,16 +124,10 @@ vdsm-logrotate \ vdsm-logrotate.conf.in \ vdsm-modules-load.d.conf \ - vdsm-restore-net-config.init.in \ - vdsm-restore-net-config.service \ vdsm-store-net-config.in \ vdsm-sysctl.conf \ - vdsm-tmpfiles.d.conf.in \ vdsm.rwtab.in \ vdsmd.8.in \ - vdsmd.init.in \ - vdsmd.service.in \ - vdsmd_init_common.sh.in \ $(NULL) all-local: \ -- To view, visit http://gerrit.ovirt.org/18067 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1368bb8dfec6e0db7e5d578bca8dcabd893e8849 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Zhou Zheng Sheng <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
