[packages/qemu] - create qemu user in post

adamg adamg at pld-linux.org
Wed Jan 2 17:21:17 CET 2013


commit c1d653f6ad79814499168517ad00f92dce365a63
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date:   Wed Jan 2 17:21:14 2013 +0100

    - create qemu user in post

 qemu.spec | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/qemu.spec b/qemu.spec
index 8775eb6..2f53a50 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -1,4 +1,5 @@
 # TODO:
+# - merge missing bits from qemu-kvm
 # - --enable-glusterfs when glusterfs 3.4 is out
 # - qemu-system-ppc -hda ac-ppc.img says:
 #   qemu: could not open disk image ac-ppc.img: error "Success"
@@ -550,6 +551,16 @@ cp -p roms/vgabios/VGABIOS-lgpl-latest.stdvga.bin $RPM_BUILD_ROOT%{_datadir}/%{n
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre common
+%groupadd -g 276 qemu
+%useradd -u 276 -g qemu -c "QEMU User" qemu
+
+%postun common
+if [ "$1" = "0" ]; then
+	%userremove qemu
+	%groupremove qemu
+fi
+
 %files
 %defattr(644,root,root,755)
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qemu.git/commitdiff/c1d653f6ad79814499168517ad00f92dce365a63



More information about the pld-cvs-commit mailing list