X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=captive.spec.in;h=84d9af5eb3424e4c5cc470b3089a240eeea31d4f;hb=c9e8068c3f0fd6bbf097f1703f5ea7adb7332fa9;hp=23f83c71bdf07e855ada99c1478a8c7a10e7c8c8;hpb=b78f9c89a5c69c17f99a614f10238d10c3c29627;p=captive.git diff --git a/captive.spec.in b/captive.spec.in index 23f83c7..84d9af5 100644 --- a/captive.spec.in +++ b/captive.spec.in @@ -68,6 +68,7 @@ BuildRequires: readline-devel Requires: readline %endif BuildRequires: gcc >= 3.0 +Obsoletes: gnome-vfs-httpcaptive %if %{static} BuildRequires: fuse-devel BuildRequires: ntfsprogs-devel >= 1.8.0 @@ -75,7 +76,6 @@ BuildRequires: libgnomeui-devel Obsoletes: @PACKAGE@ Obsoletes: @PACKAGE@-lufs Obsoletes: @PACKAGE@-install -Obsoletes: gnome-vfs-httpcaptive # FIXME: ?: ntfsprogs-gnomevfs < 1.1 %else Conflicts: @PACKAGE@-static @@ -174,6 +174,7 @@ NTFS disks will become mount(8)able at directories: /mnt/captive-VOLUME_NAME --disable-standalone \ --disable-standalone-fonts \ %endif + --disable-standalone-yum \ --with-readline \ --disable-bug-replay \ --disable-lufs \ @@ -189,6 +190,8 @@ NTFS disks will become mount(8)able at directories: /mnt/captive-VOLUME_NAME --disable-gtk-doc \ --with-orbit-line=link +# --enable-standalone-yum=%{_sysconfdir}/yum.repos.d + make %if %{static} ./build-static link @@ -200,11 +203,22 @@ make DESTDIR=$RPM_BUILD_ROOT install-strip %clean rm -rf $RPM_BUILD_ROOT +%pre + +%if ! %{static} +%pre fuse +%endif +%if %{static} +/usr/sbin/groupadd -r fuse 2>/dev/null || \ + /usr/sbin/groupadd fuse 2>/dev/null || \ + true +%endif + %post /sbin/ldconfig /usr/sbin/groupadd -r captive 2>/dev/null || \ /usr/sbin/groupadd captive 2>/dev/null || \ - true + true /usr/sbin/useradd -r -c "Captive Sandbox" -s /sbin/nologin -g captive -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || \ /usr/sbin/useradd -c "Captive Sandbox" -s /sbin/nologin -g captive -d %{_var}/lib/@PACKAGE@ captive 2>/dev/null || \ true @@ -227,21 +241,30 @@ touch %{_var}/lock/subsys/@PACKAGE@ %if ! %{static} %preun fuse %endif -/usr/lib/lsb/remove_initd @PACKAGE@ 2>/dev/null || \ - /sbin/chkconfig --del @PACKAGE@ -%{_initrddir}/@PACKAGE@ stop -rm -f %{_var}/lock/subsys/@PACKAGE@ +# Only on real erase, not on upgrade: +if [ $1 = 0 ];then + /usr/lib/lsb/remove_initd @PACKAGE@ 2>/dev/null || \ + /sbin/chkconfig --del @PACKAGE@ + %{_initrddir}/@PACKAGE@ stop + rm -f %{_var}/lock/subsys/@PACKAGE@ +fi %if ! %{static} %preun install %endif -%{_sbindir}/captive-install-fstab --remove +# Only on real erase, not on upgrade: +if [ $1 = 0 ];then + %{_sbindir}/captive-install-fstab --remove +fi %postun /sbin/ldconfig -# Remove stale sandbox chroot directories owned by 'captive.captive': -rm -rf %{_var}/lib/@PACKAGE@/s-* -rm -rf %{_var}/lib/@PACKAGE@/tmp/* +# Only on real erase, not on upgrade: +if [ $1 = 0 ];then + # Remove stale sandbox chroot directories owned by 'captive.captive': + rm -rf %{_var}/lib/@PACKAGE@/s-* + rm -rf %{_var}/lib/@PACKAGE@/tmp/* +fi %files %defattr(-,root,root) @@ -256,7 +279,11 @@ rm -rf %{_var}/lib/@PACKAGE@/tmp/* %attr(644,root,root) %{_mandir}/man?/@PACKAGE@-cmdline.* %attr(4755,root,root) %{_libexecdir}/@PACKAGE@-sandbox-server %attr(644,root,root) %{_mandir}/man?/@PACKAGE@-sandbox-server.* +%config %{_sysconfdir}/w32-mod-id.captivemodid.xml +%if ! %{static} %config %{_sysconfdir}/gnome-vfs-2.0/modules/@PACKAGE@.conf +%endif +# %config %{_sysconfdir}/yum.repos.d/* %{_datadir}/locale/*/LC_MESSAGES/@PACKAGE@.mo %{_var}/lib/@PACKAGE@ @@ -268,12 +295,14 @@ rm -rf %{_var}/lib/@PACKAGE@/tmp/* /sbin/mount.@PACKAGE@ /sbin/mount.@PACKAGE@-* %attr(644,root,root) %{_mandir}/man?/mount.@PACKAGE@.* +%if %{static} +%attr(4754,root,fuse) %{_libexecdir}/@PACKAGE@-fusermount +%endif %if ! %{static} %files install %endif %defattr(-,root,root) -%config %{_sysconfdir}/w32-mod-id.captivemodid.xml %{_sbindir}/captive-install-fstab %attr(644,root,root) %{_mandir}/man?/captive-install-fstab.* %{_sbindir}/captive-install-acquire