Tagging module BootCD - BootCD-4.2-2
[bootcd.git] / bootcd.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define nodefamily %{pldistro}-%{_arch}
7
8 %define name bootcd-%{nodefamily}
9 %define version 4.2
10 %define taglevel 2
11
12 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
13
14 Vendor: PlanetLab
15 Packager: PlanetLab Central <support@planet-lab.org>
16 Distribution: PlanetLab %{plrelease}
17 URL: %(echo %{url} | cut -d ' ' -f 2)
18
19 Summary: Boot CD material for %{nodefamily}
20 Name: %{name}
21 Version: %{version}
22 Release: %{release}
23 License: BSD
24 Group: System Environment/Base
25 Source0: %{name}-%{version}.tar.gz
26 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
27 # other archs must be able to install this
28 BuildArch: noarch
29
30 Requires: dosfstools, mkisofs, gzip, mtools, syslinux
31
32 AutoReqProv: no
33 %define debug_package %{nil}
34
35 %description
36 The Boot CD securely boots PlanetLab nodes into an immutable
37 environment.
38
39 %prep
40 %setup -q
41
42 %build
43 pushd BootCD
44
45 # Build the reference image
46 ./prep.sh %{pldistro} %{nodefamily}
47
48 popd
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52
53 pushd  BootCD
54
55 # Install the reference image and build scripts
56 install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}
57 install -m 755 build.sh $RPM_BUILD_ROOT/%{_datadir}/%{name}/
58 tar cpf - \
59     build/isofs/bootcd.img \
60     build/isofs/kernel \
61     build/passwd \
62     build/version.txt \
63     build/nodefamily \
64     configurations | \
65     tar -C $RPM_BUILD_ROOT/%{_datadir}/%{name}/ -xpf -
66
67 popd
68     
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 # If run under sudo
73 if [ -n "$SUDO_USER" ] ; then
74     # Allow user to delete the build directory
75     chown -h -R $SUDO_USER .
76     # Some temporary cdroot files like /var/empty/sshd and
77     # /usr/bin/sudo get created with non-readable permissions.
78     find . -not -perm +0600 -exec chmod u+rw {} \;
79     # Allow user to delete the built RPM(s)
80     chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
81 fi
82
83 %files
84 %defattr(-,root,root,-)
85 %{_datadir}/%{name}
86
87 %post
88 [ -f /etc/planetlab/nodefamily ] || { mkdir -p /etc/planetlab ; echo %{nodefamily} > /etc/planetlab/nodefamily ; }
89
90 %changelog
91 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootCD-4.2-2
92 - change location of nodefamily in /etc/planetlab/
93
94 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootCD-4.2-1
95 - new name for the rpm, to allow simultaneous rpm-installs for several nodefamily (pldistro+arch)
96 - now installs in /usr/share/bootcd-<nodefamily> with a legacy symlink (requires MyPLC-4.2-7) 
97 - nodefamily exported under bootcd.img in /etc/nodefamily (for bm) and under build/nodefamily (for build.sh)
98
99 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootCD-3.4-4 BootCD-3.4-5
100 - kargs.txt for serial boot fixed: now properly exposed to bootmanager through the overlay image
101 - build.sh cleaned up in the process
102 - actual location of selected node config file displayed
103 - import pypci rather than pypciscan
104
105 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootcd-3.4-3 bootcd-3.4-4
106 - build.sh support for -s <console_spec> (recommended vs using type)
107 - build.sh cleanup - usage clearer wrt types - removed old code
108 - fixed modprobe with args in pl_hwinit
109
110 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootcd-3.4-2 bootcd-3.4-3
111 - load floppy with modprobe flags
112 - support for creating a usb partition
113 - removed obsolete files newbuild.sh, bootcustom.sh and cdcustom.sh
114
115 * Mon Jan 29 2006 Marc E. Fiuczynski <mef@cs.princeton.edu> - 
116 - added biginitrd usb image
117
118 * Fri Sep  2 2005 Mark Huang <mlhuang@cotton.CS.Princeton.EDU> - 
119 - Initial build.
120
121 %define module_current_branch 3.4