Package util-vserver: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | %def_disable dietlibc %def_without beecrypt %def_enable shared %def_disable static %def_without doc %def_without python %define _libexecdir %prefix/libexec %define confdir %_sysconfdir/vservers %define confdefaultdir %confdir/.defaults %define vrootdir %_localstatedir/vservers Name: util-vserver Summary: Linux-VServer utilities Version: 0.30.216 %define pre -pre3062 Release: alt0.6 License: GPLv2+ Group: System/Base URL: http://savannah.nongnu.org/projects/%name/ Source0: http://people.linux-vserver.org/~dhozac/t/uv-testing/%name-%version%pre.tar Source1: tmpfiles.conf #Patch1: util-vserver-0.30.216-lsb.patch AutoReq: yes,nosymlinks BuildRequires: libe2fs-devel BuildRequires: /bin/mount /sbin/fsck BuildRequires: %_bindir/nohup %_bindir/ionice BuildRequires: %_bindir/file %_bindir/strace /bin/find BuildRequires: /sbin/ip /sbin/iptables /sbin/nameif %_bindir/vconfig BuildRequires: /sbin/modprobe /sbin/rmmod BuildRequires: %_bindir/wget %_bindir/rsync BuildRequires: /bin/gzip /bin/bzip2 /bin/cpio /sbin/restore %if_with beecrypt BuildRequires: libbeecrypt-devel %else BuildRequires: libnss-devel %endif %{?_with_doc:BuildRequires: %_bindir/doxygen %_bindir/xsltproc} %{?_with_python:BuildRequires: ctags python-devel} %{?_enable_dietlibc:BuildRequires: dietlibc >= 0.25} %description util-vserver provides the components and a framework to setup Linux-VServers. A virtual server runs inside a linux server. It is nevertheless highly independent. As such, you can run various services with normal configuration. The various vservers can't interact with each other and can't interact with services in the main server. %prep %setup -q -n %name-%version%pre #patch -p1 %build %configure \ --with-initrddir=%_initrddir \ %{subst_enable shared} \ %{subst_enable static} \ %{subst_enable dietlibc} \ %if_with beecrypt --with-crypto-api=beecrypt \ %else --with-crypto-api=nss \ %endif --with-initscripts=sysv \ --with-vrootdir=%vrootdir \ --enable-release %make_build all %{?_with_doc:doc} gzip -9c ChangeLog > ChangeLog.gz %install %makeinstall_std install-distribution install -d -m 0755 %buildroot%vrootdir/.{hash,pkg} install -pD -m 0644 %SOURCE1 %buildroot/lib/tmpfiles.d/%name.conf install -d -m 0755 %buildroot{%_cachedir/vservers,%_runtimedir/vservers.rev} install -d -m 0755 %buildroot%_sysconfdir/{default,sysconfig} :> %buildroot%_sysconfdir/default/vservers-default :> %buildroot%_sysconfdir/sysconfig/vservers-default # add symlink for mageia support ln -s redhat %buildroot%_datadir/%name/distributions/mageia # add symlink for altlinux support ln -s redhat %buildroot%_datadir/%name/distributions/altlinux %if "%vrootdir" != "/srv/vservers" install -d -m 0755 %buildroot/srv ln -sf %vrootdir %buildroot/srv/ %if "%vrootdir" != "%_var/vservers" ln -sf %vrootdir %buildroot%_var/ %endif %endif rm -f %buildroot%_libdir/*.la rm -rf %buildroot%_datadir/%name/distributions/{centos4,etch,{f,rh,suse9}*} rm -rf %buildroot%_datadir/%name/distributions/legacy rm -rf %buildroot%_libexecdir/%name/legacy rm -f %buildroot{%_initddir/*-legacy,%_sysconfdir/vservers.conf} rm -rf %buildroot%_sysconfdir/vservers/.distributions %add_findreq_skiplist %_datadir/%name/distributions/* %_datadir/%name/vserver-init.functions %check %make_build check %post /sbin/systemd-tmpfiles --create %name.conf [ -e %confdefaultdir/vdirbase ] || ln -s %vrootdir %confdefaultdir/vdirbase [ -e %confdefaultdir/run.rev ] || ln -s %_runtimedir/vservers.rev %confdefaultdir/run.rev [ -e %confdefaultdir/cachebase ] || ln -s %_cachedir/vservers %confdefaultdir/cachebase %_sbindir/setattr --barrier %vrootdir %vrootdir/.pkg ||: %if "%vrootdir" != "/srv/vservers" [ -e /srv/vservers ] || ln -s "%vrootdir" /srv/ %if "%vrootdir" != "%_var/vservers" [ -e %_var/vservers ] || ln -s "%vrootdir" %_var/ %endif %endif %preun [ "$1" != 0 ] || rm -rf %_localstatedir/cache/vservers/* 2>/dev/null ||: %postun %if "%vrootdir" != "/srv/vservers" if [ -h /srv/vservers ]; then rm -f /srv/vservers fi %if "%vrootdir" != "%_var/vservers" if [ -h %_var/vservers ]; then rm -f %_var/vservers fi %endif %endif %files %doc AUTHORS ChangeLog.* NEWS README THANKS %_initddir/* /sbin/* %_sbindir/* %_libdir/*.so.* %_libdir/%name %_libexecdir/%name %_datadir/%name %_man8dir/* %attr(0000,root,root) %dir %vrootdir %attr(0755,root,root) %dir %vrootdir/.pkg %attr(0700,root,root) %dir %vrootdir/.hash %if "%vrootdir" != "/srv/vservers" #/srv/* %if "%vrootdir" != "%_var/vservers" #%_var/vservers %endif %endif /lib/tmpfiles.d/* %dir %confdir %dir %confdefaultdir %config(noreplace) %_sysconfdir/default/* %config(noreplace) %_sysconfdir/sysconfig/* %dir %_cachedir/vservers %ghost %dir %_runtimedir/vservers.rev %ghost %confdefaultdir/cachebase %ghost %confdefaultdir/vdirbase %ghost %confdefaultdir/run.rev %exclude %_includedir/* %exclude %_libdir/*.so %exclude %_pkgconfigdir/* %changelog * Thu May 15 2014 Led <led@altlinux.ru> 0.30.216-alt0.6 - 0.30.216-pre3062 * Wed Apr 09 2014 Led <led@altlinux.ru> 0.30.216-alt0.5 - 0.30.216-pre3060 * Tue Nov 26 2013 Led <led@altlinux.ru> 0.30.216-alt0.4 - 0.30.216-pre3054 * Mon Oct 21 2013 Led <led@altlinux.ru> 0.30.216-alt0.3 - move %%vrootdir to %%_localstatedir/vservers * Mon Oct 21 2013 Led <led@altlinux.ru> 0.30.216-alt0.2 - don't package dirs in /srv/ (sisyphus_check hate suchlike) * Tue Sep 24 2013 Led <led@altlinux.ru> 0.30.216-alt0.1 - 0.30.216-pre3038 |