[9815] | 1 | %{!?python3_sitearch: %define python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} |
---|
| 2 | |
---|
| 3 | %global with_python3 1 |
---|
[9811] | 4 | %global with_systemd 0 |
---|
| 5 | |
---|
| 6 | %global luaver 5.1 |
---|
| 7 | %global lualibdir %{_libdir}/lua/%{luaver} |
---|
| 8 | %global luapkgdir %{_datadir}/lua/%{luaver} |
---|
| 9 | |
---|
[3720] | 10 | Name: lxc |
---|
[9815] | 11 | Version: 1.1.5 |
---|
| 12 | Release: 2%{?_dist_release} |
---|
[3720] | 13 | Summary: Linux Resource Containers |
---|
| 14 | Summary(ja): Linux リソースコンテナ |
---|
| 15 | Group: Applications/System |
---|
[9811] | 16 | License: LGPLv2+ and GPLv2 |
---|
| 17 | URL: http://linuxcontainers.org |
---|
[6027] | 18 | |
---|
[9811] | 19 | Source0: http://linuxcontainers.org/downloads/%{name}-%{version}.tar.gz |
---|
| 20 | Source10: lxc-vinelinux |
---|
[9815] | 21 | Source11: vinelinux.common.conf |
---|
| 22 | Source12: vinelinux.userns.conf |
---|
[3720] | 23 | |
---|
[9811] | 24 | Patch0: lxc-1.1.0-fix-init.patch |
---|
[9815] | 25 | Patch1: lxc-1.1.5-disable-setproctitle-error.patch |
---|
[9811] | 26 | |
---|
[3720] | 27 | BuildRequires: docbook-utils |
---|
[9811] | 28 | Buildrequires: docbook2X |
---|
| 29 | Buildrequires: doxygen |
---|
[3720] | 30 | BuildRequires: kernel-headers |
---|
| 31 | BuildRequires: libcap-devel |
---|
| 32 | BuildRequires: libtool |
---|
[9811] | 33 | BuildRequires: lua-devel |
---|
| 34 | BuildRequires: perl-XML-SAX |
---|
| 35 | %if 0%{?with_python3} |
---|
| 36 | BuildRequires: python3-devel >= 3.2 |
---|
| 37 | %endif # with_python3 |
---|
| 38 | %if 0%{?with_systemd} |
---|
| 39 | BuildRequires: systemd |
---|
| 40 | %endif # with_systemd |
---|
| 41 | # for lxc-top |
---|
| 42 | Requires: lua-%{name}%{?_isa} = %{version}-%{release} |
---|
| 43 | Requires: lua-alt-getopt |
---|
[3720] | 44 | |
---|
[9811] | 45 | %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} |
---|
[3720] | 46 | |
---|
| 47 | %description |
---|
| 48 | Linux Resource Containers provide process and resource isolation without the |
---|
| 49 | overhead of full virtualization. |
---|
| 50 | |
---|
[9811] | 51 | |
---|
[3720] | 52 | %package libs |
---|
| 53 | Summary: Runtime library files for %{name} |
---|
[9811] | 54 | Summary(ja): %{name}のランタイムライブラリ |
---|
[3720] | 55 | Group: System Environment/Libraries |
---|
[9811] | 56 | %if 0%{?with_systemd} |
---|
| 57 | Requires(post): systemd |
---|
| 58 | Requires(preun): systemd |
---|
| 59 | Requires(postun): systemd |
---|
| 60 | %else |
---|
| 61 | Requires(post): chkconfig |
---|
| 62 | Requires(preun): initscripts, chkconfig |
---|
| 63 | Requires(postun): initscripts |
---|
| 64 | %endif # with_systemd |
---|
[3720] | 65 | |
---|
[9811] | 66 | |
---|
[3720] | 67 | %description libs |
---|
| 68 | Linux Resource Containers provide process and resource isolation without the |
---|
| 69 | overhead of full virtualization. |
---|
| 70 | |
---|
| 71 | The %{name}-libs package contains libraries for running %{name} applications. |
---|
| 72 | |
---|
[9811] | 73 | |
---|
| 74 | %if 0%{?with_python3} |
---|
| 75 | %package -n python3-%{name} |
---|
| 76 | Summary: Python binding for %{name} |
---|
| 77 | Summary(ja): %{name} の Python バインディング |
---|
| 78 | Group: System Environment/Libraries |
---|
| 79 | |
---|
| 80 | %description -n python3-%{name} |
---|
| 81 | Linux Resource Containers provide process and resource isolation without the |
---|
| 82 | overhead of full virtualization. |
---|
| 83 | |
---|
| 84 | The python3-%{name} package contains the Python3 binding for %{name}. |
---|
| 85 | |
---|
| 86 | %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}_lxc\\..*\\.so |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | %package extra |
---|
| 90 | Summary: Extra tools for %{name} |
---|
| 91 | Summary(ja): %{name} の追加ツール |
---|
| 92 | Group: Applications/System |
---|
[9815] | 93 | Requires: python3-%{name} = %{version}-%{release} |
---|
[9811] | 94 | |
---|
| 95 | %description extra |
---|
| 96 | Linux Resource Containers provide process and resource isolation without the |
---|
| 97 | overhead of full virtualization. |
---|
| 98 | |
---|
| 99 | This package contains tools needing the Python3 bindings. |
---|
| 100 | %endif # with_python3 |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | %package -n lua-%{name} |
---|
| 104 | Summary: Lua binding for %{name} |
---|
| 105 | Summary(ja): %{name} の Lua バインディング |
---|
| 106 | Group: System Environment/Libraries |
---|
| 107 | |
---|
| 108 | %description -n lua-%{name} |
---|
| 109 | Linux Resource Containers provide process and resource isolation without the |
---|
| 110 | overhead of full virtualization. |
---|
| 111 | |
---|
| 112 | The lua-%{name} package contains the Lua binding for %{name}. |
---|
| 113 | |
---|
| 114 | %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}core\\.so\\.0 |
---|
| 115 | |
---|
| 116 | |
---|
[3720] | 117 | %package templates |
---|
| 118 | Summary: Templates for %{name} |
---|
[9811] | 119 | Summary(ja): %{name} のテンプレート |
---|
[3720] | 120 | Group: System Environment/Libraries |
---|
[9811] | 121 | Requires: %{name}-libs%{?_isa} = %{version}-%{release} |
---|
| 122 | # Note: Requirements for the template scripts (busybox, dpkg, |
---|
| 123 | # debootstrap, vbootstrap, rsync, openssh-server, dhclient, apt, pacman, zypper, |
---|
| 124 | # ubuntu-cloudimg-query etc...) are not explicitly mentioned here: |
---|
| 125 | # their presence varies wildly on supported Fedora/EPEL releases and |
---|
| 126 | # archs, and they are in most cases needed for a single template |
---|
| 127 | # only. Also, the templates normally fail graciously when such a tool |
---|
| 128 | # is missing. Moving each template to its own subpackage on the other |
---|
| 129 | # hand would be overkill. |
---|
[3720] | 130 | |
---|
[9811] | 131 | |
---|
[3720] | 132 | %description templates |
---|
| 133 | Linux Resource Containers provide process and resource isolation without the |
---|
| 134 | overhead of full virtualization. |
---|
| 135 | |
---|
[9811] | 136 | The %{name}-templates package contains templates for creating containers. |
---|
[3720] | 137 | |
---|
[9811] | 138 | |
---|
[3720] | 139 | %package devel |
---|
| 140 | Summary: Development files for %{name} |
---|
[9811] | 141 | Summary(ja): %{name}の開発ファイル |
---|
[3720] | 142 | Group: Development/Libraries |
---|
[9811] | 143 | Requires: %{name}-libs%{?_isa} = %{version}-%{release} |
---|
[3720] | 144 | Requires: pkgconfig |
---|
| 145 | |
---|
| 146 | %description devel |
---|
| 147 | Linux Resource Containers provide process and resource isolation without the |
---|
| 148 | overhead of full virtualization. |
---|
| 149 | |
---|
| 150 | The %{name}-devel package contains libraries and header files for |
---|
| 151 | developing applications that use %{name}. |
---|
| 152 | |
---|
[9811] | 153 | |
---|
[3720] | 154 | %package doc |
---|
| 155 | Summary: Documentation for %{name} |
---|
| 156 | Summary(ja): %{name} のドキュメント |
---|
| 157 | Group: Documentation |
---|
[9811] | 158 | BuildArch: noarch |
---|
[3720] | 159 | |
---|
| 160 | %description doc |
---|
| 161 | This package contains documentation for %{name}. |
---|
| 162 | |
---|
[9811] | 163 | |
---|
[3720] | 164 | %prep |
---|
[7134] | 165 | %setup -q -n %{name}-%{version} |
---|
[9811] | 166 | %patch0 -p1 |
---|
| 167 | %patch1 -p1 |
---|
[3720] | 168 | |
---|
[9811] | 169 | |
---|
[3720] | 170 | %build |
---|
[9811] | 171 | %configure --with-distro=centos \ |
---|
| 172 | --enable-doc \ |
---|
| 173 | --enable-api-docs \ |
---|
| 174 | --disable-silent-rules \ |
---|
| 175 | --docdir=%{_pkgdocdir} \ |
---|
| 176 | --disable-rpath \ |
---|
| 177 | --disable-apparmor \ |
---|
| 178 | --disable-cgmanager \ |
---|
| 179 | --disable-selinux \ |
---|
| 180 | --enable-capabilities \ |
---|
| 181 | --enable-examples \ |
---|
| 182 | --enable-bash \ |
---|
| 183 | --enable-lua \ |
---|
| 184 | %if 0%{?with_python3} |
---|
| 185 | --enable-python \ |
---|
| 186 | %endif # with_python3 |
---|
| 187 | %if 0%{?with_systemd} |
---|
| 188 | --with-init-script=systemd \ |
---|
| 189 | %else |
---|
| 190 | --with-init-script=sysvinit \ |
---|
| 191 | %endif # with_systemd |
---|
| 192 | # intentionally blank line |
---|
| 193 | make %{?_smp_mflags} |
---|
[3720] | 194 | |
---|
| 195 | |
---|
| 196 | %install |
---|
[9811] | 197 | %{make_install} |
---|
| 198 | make DESTDIR=%{buildroot} install |
---|
| 199 | mkdir -p %{buildroot}%{_sharedstatedir}/%{name} |
---|
| 200 | chmod -x %{buildroot}%{luapkgdir}/lxc.lua |
---|
[3720] | 201 | |
---|
[9811] | 202 | mkdir -p %{buildroot}%{_pkgdocdir} |
---|
| 203 | cp -a AUTHORS COPYING README %{buildroot}%{_pkgdocdir} |
---|
| 204 | mkdir -p %{buildroot}%{_pkgdocdir}/api |
---|
| 205 | cp -a doc/api/html/* %{buildroot}%{_pkgdocdir}/api/ |
---|
[3720] | 206 | |
---|
[9811] | 207 | # cache dir |
---|
| 208 | mkdir -p %{buildroot}%{_localstatedir}/cache/%{name} |
---|
[3720] | 209 | |
---|
[9811] | 210 | rm -rf %{buildroot}%{_datadir}/lxc/selinux |
---|
[3720] | 211 | |
---|
[9811] | 212 | # install vinelinux template |
---|
| 213 | install -m775 %{SOURCE10} %{buildroot}%{_datadir}/lxc/templates/ |
---|
[9815] | 214 | install -m775 %{SOURCE11} %{buildroot}%{_datadir}/lxc/config/ |
---|
| 215 | install -m775 %{SOURCE12} %{buildroot}%{_datadir}/lxc/config/ |
---|
[9811] | 216 | |
---|
| 217 | |
---|
| 218 | %check |
---|
| 219 | make check |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | %post libs |
---|
| 223 | /sbin/ldconfig |
---|
| 224 | %if 0%{?with_systemd} |
---|
| 225 | %systemd_post %{name}.service |
---|
| 226 | %else |
---|
| 227 | /sbin/chkconfig --add %{name} |
---|
| 228 | %endif # with_systemd |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | %preun libs |
---|
| 232 | %if 0%{?with_systemd} |
---|
| 233 | %systemd_preun %{name}.service |
---|
| 234 | %else |
---|
| 235 | if [ $1 -eq 0 ]; then |
---|
| 236 | /sbin/service %{name} stop > /dev/null 2>&1 |
---|
| 237 | /sbin/chkconfig --del %{name} |
---|
| 238 | fi |
---|
| 239 | %endif # with_systemd |
---|
| 240 | |
---|
| 241 | |
---|
| 242 | %postun libs |
---|
| 243 | /sbin/ldconfig |
---|
| 244 | %if 0%{?with_systemd} |
---|
| 245 | %systemd_postun %{name}.service |
---|
| 246 | %else |
---|
| 247 | if [ $1 -ge 1 ]; then |
---|
| 248 | /sbin/service %{name} condrestart > /dev/null 2>&1 || : |
---|
| 249 | fi |
---|
| 250 | %endif # with_systemd |
---|
| 251 | |
---|
| 252 | |
---|
[3720] | 253 | %files |
---|
| 254 | %{_bindir}/%{name}-* |
---|
[9811] | 255 | %{_mandir}/man1/%{name}* |
---|
| 256 | %{_mandir}/*/man1/%{name}* |
---|
| 257 | # in lxc-libs: |
---|
| 258 | %exclude %{_bindir}/%{name}-autostart |
---|
| 259 | %exclude %{_mandir}/man1/%{name}-autostart* |
---|
| 260 | %exclude %{_mandir}/*/man1/%{name}-autostart* |
---|
| 261 | %exclude %{_mandir}/man1/%{name}-user-nic* |
---|
| 262 | %exclude %{_mandir}/*/man1/%{name}-user-nic* |
---|
| 263 | %{_datadir}/%{name}/%{name}.functions |
---|
| 264 | %if 0%{?with_python3} |
---|
| 265 | %exclude %{_bindir}/%{name}-device |
---|
| 266 | %exclude %{_bindir}/%{name}-ls |
---|
| 267 | %exclude %{_bindir}/%{name}-start-ephemeral |
---|
| 268 | %exclude %{_mandir}/man1/%{name}-device* |
---|
| 269 | %exclude %{_mandir}/man1/%{name}-ls* |
---|
| 270 | %exclude %{_mandir}/man1/%{name}-start-ephemeral* |
---|
| 271 | %exclude %{_mandir}/*/man1/%{name}-device* |
---|
| 272 | %exclude %{_mandir}/*/man1/%{name}-ls* |
---|
| 273 | %exclude %{_mandir}/*/man1/%{name}-start-ephemeral* |
---|
| 274 | %endif |
---|
| 275 | %dir %{_sysconfdir}/bash_completion.d/ |
---|
| 276 | %{_sysconfdir}/bash_completion.d/%{name} |
---|
[3720] | 277 | |
---|
[9811] | 278 | |
---|
[3720] | 279 | %files libs |
---|
[9811] | 280 | %dir %{_datadir}/%{name} |
---|
| 281 | %dir %{_datadir}/%{name}/templates |
---|
| 282 | %dir %{_datadir}/%{name}/config |
---|
| 283 | %{_datadir}/%{name}/hooks |
---|
| 284 | %{_datadir}/%{name}/%{name}-patch.py* |
---|
[3720] | 285 | %{_libdir}/liblxc.so.* |
---|
[9811] | 286 | %{_libdir}/%{name} |
---|
| 287 | %{_libexecdir}/%{name} |
---|
| 288 | # fixme: should be in libexecdir? |
---|
| 289 | %{_sbindir}/init.%{name} |
---|
| 290 | %{_bindir}/%{name}-autostart |
---|
| 291 | %{_sharedstatedir}/%{name} |
---|
| 292 | %dir %{_sysconfdir}/%{name} |
---|
| 293 | %config(noreplace) %{_sysconfdir}/%{name}/default.conf |
---|
| 294 | %config(noreplace) %{_sysconfdir}/sysconfig/%{name} |
---|
| 295 | %{_mandir}/man1/%{name}-autostart* |
---|
| 296 | %{_mandir}/*/man1/%{name}-autostart* |
---|
| 297 | %{_mandir}/man1/%{name}-user-nic* |
---|
| 298 | %{_mandir}/*/man1/%{name}-user-nic* |
---|
| 299 | %{_mandir}/man5/%{name}* |
---|
| 300 | %{_mandir}/man7/%{name}* |
---|
| 301 | %{_mandir}/*/man5/%{name}* |
---|
| 302 | %{_mandir}/*/man7/%{name}* |
---|
| 303 | %dir %{_pkgdocdir} |
---|
| 304 | %{_pkgdocdir}/AUTHORS |
---|
| 305 | %{_pkgdocdir}/COPYING |
---|
| 306 | %{_pkgdocdir}/README |
---|
| 307 | %if 0%{?with_systemd} |
---|
| 308 | %{_unitdir}/%{name}.service |
---|
| 309 | %else |
---|
| 310 | %{_sysconfdir}/rc.d/init.d/%{name} |
---|
| 311 | %{_sysconfdir}/rc.d/init.d/%{name}-net |
---|
| 312 | %endif # with_systemd |
---|
| 313 | %dir %{_localstatedir}/cache/%{name} |
---|
[3720] | 314 | |
---|
[9811] | 315 | |
---|
| 316 | %if 0%{?with_python3} |
---|
| 317 | %files -n python3-%{name} |
---|
| 318 | %{python3_sitearch}/* |
---|
| 319 | |
---|
| 320 | |
---|
| 321 | %files extra |
---|
| 322 | %{_bindir}/%{name}-device |
---|
| 323 | %{_bindir}/%{name}-ls |
---|
| 324 | %{_bindir}/%{name}-start-ephemeral |
---|
| 325 | %{_mandir}/man1/%{name}-device* |
---|
| 326 | %{_mandir}/man1/%{name}-ls* |
---|
| 327 | %{_mandir}/man1/%{name}-start-ephemeral* |
---|
| 328 | %{_mandir}/*/man1/%{name}-device* |
---|
| 329 | %{_mandir}/*/man1/%{name}-ls* |
---|
| 330 | %{_mandir}/*/man1/%{name}-start-ephemeral* |
---|
| 331 | %endif # with_python3 |
---|
| 332 | |
---|
| 333 | |
---|
| 334 | %files -n lua-%{name} |
---|
| 335 | %{lualibdir}/%{name} |
---|
| 336 | %{luapkgdir}/%{name}.lua |
---|
| 337 | |
---|
| 338 | |
---|
[3720] | 339 | %files templates |
---|
[9811] | 340 | %{_datadir}/%{name}/templates/lxc-* |
---|
| 341 | %{_datadir}/%{name}/config/* |
---|
[3720] | 342 | |
---|
[9811] | 343 | |
---|
[3720] | 344 | %files devel |
---|
[7134] | 345 | %{_libdir}/pkgconfig/%{name}.pc |
---|
[9811] | 346 | %{_includedir}/lxc |
---|
[3720] | 347 | %{_libdir}/liblxc.so |
---|
| 348 | |
---|
[9811] | 349 | |
---|
[3720] | 350 | %files doc |
---|
[9811] | 351 | %dir %{_pkgdocdir} |
---|
| 352 | # README, AUTHORS and COPYING intentionally duplicated because -doc |
---|
| 353 | # can be installed on its own. |
---|
| 354 | %{_pkgdocdir}/* |
---|
[3720] | 355 | |
---|
[9811] | 356 | |
---|
[3720] | 357 | %changelog |
---|
[9815] | 358 | * Tue Nov 17 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 1.1.5-2 |
---|
| 359 | - enable python3 support by default |
---|
| 360 | |
---|
| 361 | * Sun Nov 15 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 1.1.5-1 |
---|
| 362 | - update vinelinux template |
---|
| 363 | - add vinelinux.{common,userns}.conf |
---|
| 364 | - add patch1 to disable setproctitle error message, |
---|
| 365 | cherry picked from upstream git. |
---|
| 366 | |
---|
[9811] | 367 | * Sun Nov 15 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 1.1.4-1 |
---|
| 368 | - update to 1.1.4-1 |
---|
| 369 | - add vinelinux template |
---|
| 370 | |
---|
| 371 | * Wed Apr 10 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-3 |
---|
| 372 | - add patch10 to not fail on failure to link kmsg |
---|
| 373 | |
---|
[7134] | 374 | * Wed Nov 21 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-2 |
---|
| 375 | - update to 0.8.0 release |
---|
| 376 | |
---|
[6231] | 377 | * Fri May 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-1.20120525 |
---|
| 378 | - update to git master |
---|
| 379 | |
---|
[6027] | 380 | * Wed Apr 25 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.0-0.rc1 |
---|
| 381 | - new upstream release |
---|
| 382 | |
---|
[5495] | 383 | * Thu Jan 26 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.5-1.20120105 |
---|
| 384 | - update to git current (20120105) |
---|
| 385 | |
---|
[4061] | 386 | * Mon Jun 06 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.2-1 |
---|
| 387 | - update to 0.7.4.2 |
---|
| 388 | |
---|
[3720] | 389 | * Thu Apr 28 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.1-2 |
---|
| 390 | - include all templates |
---|
| 391 | |
---|
| 392 | * Wed Apr 27 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4.1-1 |
---|
| 393 | - initial build for Vine Linux |
---|
| 394 | |
---|
| 395 | * Fri Mar 25 2011 Silas Sewell <silas@sewell.ch> - 0.7.4.1-1 |
---|
| 396 | - Update to 0.7.4.1 |
---|
| 397 | |
---|
| 398 | * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-2 |
---|
| 399 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
| 400 | |
---|
| 401 | * Mon Jul 26 2010 Silas Sewell <silas@sewell.ch> - 0.7.2-1 |
---|
| 402 | - Update to 0.7.2 |
---|
| 403 | - Remove templates |
---|
| 404 | |
---|
| 405 | * Tue Jul 06 2010 Silas Sewell <silas@sewell.ch> - 0.7.1-1 |
---|
| 406 | - Update to 0.7.1 |
---|
| 407 | |
---|
| 408 | * Wed Feb 17 2010 Silas Sewell <silas@sewell.ch> - 0.6.5-1 |
---|
| 409 | - Update to latest release |
---|
| 410 | - Add /var/lib/lxc directory |
---|
| 411 | - Patch for sys/stat.h |
---|
| 412 | |
---|
| 413 | * Fri Nov 27 2009 Silas Sewell <silas@sewell.ch> - 0.6.4-1 |
---|
| 414 | - Update to latest release |
---|
| 415 | - Add documentation sub-package |
---|
| 416 | |
---|
| 417 | * Mon Jul 27 2009 Silas Sewell <silas@sewell.ch> - 0.6.3-2 |
---|
| 418 | - Apply patch for rawhide kernel |
---|
| 419 | |
---|
| 420 | * Sat Jul 25 2009 Silas Sewell <silas@sewell.ch> - 0.6.3-1 |
---|
| 421 | - Initial package |
---|