1 Summary: Fast, dense and secure container management
6 Group: Applications/System
7 Source0: https://linuxcontainers.org/downloads/%{name}/%{name}-%{version}.tar.gz
8 # Source0-md5: 7990440b022e93f3e7036bcfd12970f2
9 Source1: %{name}.service
11 Source3: %{name}.sysconfig
12 URL: http://linuxcontainers.org
13 BuildRequires: golang >= 1.6
14 BuildRequires: rpmbuild(macros) >= 1.228
15 Requires(post,preun): /sbin/chkconfig
16 Requires(postun): /usr/sbin/groupdel
17 Requires(pre): /usr/bin/getgid
18 Requires(pre): /usr/sbin/groupadd
19 Requires: rc-scripts >= 0.4.0.10
21 Requires: uname(release) >= 4.1
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # binary stripped or something
26 %define _enable_debug_packages 0
29 LXD is a container "hypervisor" and a new user experience for LXC.
31 Specifically, it is made of three components:
32 - A system-wide daemon (lxd)
33 - A command line client (lxc)
34 - An OpenStack Nova plugin (nova-compute-lxd)
36 The daemon exports a REST API both locally and if enabled, over the
39 The command line tool is designed to be a very simple, yet very
40 powerful tool to manage all your containers. It can handle connect to
41 multiple container hosts and easily give you an overview of all the
42 containers on your network, let you create some more where you want
43 them and even move them around while they are running.
45 The OpenStack plugin then allows you to use your lxd hosts as compute
46 nodes, running workloads on containers rather than virtual machines.
52 export GOPATH=$(pwd)/dist
53 cd $GOPATH/src/github.com/lxc/lxd/
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man1,/etc/{rc.d/init.d,sysconfig},%{systemdunitdir}} \
60 $RPM_BUILD_ROOT/var/lib/%{name} \
61 $RPM_BUILD_ROOT/var/log/%{name}
63 install -p dist/bin/lxd $RPM_BUILD_ROOT%{_sbindir}/
64 install -p dist/bin/lxc $RPM_BUILD_ROOT%{_bindir}/
66 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}
67 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
68 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
71 %groupadd -g 297 %{name}
74 /sbin/chkconfig --add %{name}
75 %service -n %{name} restart
76 %systemd_post %{name}.service
79 if [ "$1" = "0" ]; then
80 %service -q %{name} stop
81 /sbin/chkconfig --del %{name}
83 %systemd_preun %{name}.service
86 if [ "$1" = "0" ]; then
92 rm -rf $RPM_BUILD_ROOT
95 %defattr(644,root,root,755)
96 %doc README.md CONTRIBUTING.md AUTHORS
97 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
98 %attr(754,root,root) /etc/rc.d/init.d/%{name}
99 %attr(755,root,root) %{_bindir}/lxc
100 %attr(755,root,root) %{_sbindir}/%{name}
101 %{systemdunitdir}/%{name}.service
102 %dir %attr(700,root,root) /var/lib/%{name}
103 %dir %attr(750,root,logs) /var/log/%{name}