test/filesystem.spec
author J. Ali Harlow <ali@juiblex.co.uk>
Thu Feb 09 20:45:27 2012 +0000 (2012-02-09)
changeset 418 33b825d3128d
parent 393 d16ac3fb05fa
permissions -rw-r--r--
Add transaction barriers
These allow packages to be installed and removed which have scripts
that depend on each other when atomic transactions are involved.
Note that yum supports pre, but not other requires flags. post will
need similar support to the post scripts themselves pulling in the
requires flags from the rpms. Likewise preun and postun will need
similar handling to those scrips since the requires flags will need
to be stored in the razor database.
     1 %define _source_payload w9.gzdio
     2 %define _binary_payload w9.gzdio
     3 
     4 Name:      filesystem
     5 Summary:   Test package
     6 Group:     Test
     7 License:   GPL
     8 Version:   1
     9 Release:   1
    10 BuildArch: noarch
    11 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
    12 
    13 %description
    14 Test package
    15 
    16 %prep
    17 
    18 %build
    19 
    20 %install
    21 mkdir -p %{buildroot}
    22 mkdir -p %{buildroot}%{_sysconfdir}
    23 mkdir -p %{buildroot}/{%{_bindir},%{_prefix}/lib,%{_includedir}}
    24 mkdir -p %{buildroot}/media
    25 
    26 %clean
    27 rm -rf %{buildroot}
    28 
    29 %post -p <lua>
    30 function mkdir_missing(dir)
    31     if posix.stat(dir) == nil then
    32         posix.mkdir(dir)
    33     end
    34 end
    35 mkdir_missing("/media/cdrom")
    36 
    37 %files
    38 %defattr(0755,root,root)
    39 /etc
    40 %{_prefix}
    41 %dir /media