1 # build is expected to export the following rpm variables
2 # %{distroname} : e.g. Fedora
3 # %{distrorelease} : e.g. 8
4 # %{slice_rpms_plus} : as a +++ separated list of rpms from the build dir
6 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
7 %define obsolete_nodefamily %{pldistro}-%{_arch}
9 %define name slicerepo-%{nodefamily}
13 # pldistro already in the rpm name
14 #%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
15 %define release %{taglevel}%{?date:.%{date}}
17 # we don't really need the standard postinstall process from rpm that
18 # strips files and byte-compiles python files. all files in this
19 # package are comming from other rpm files and they've already went
20 # through this post install processing. - baris
21 %define __os_install_post %{nil}
24 Packager: PlanetLab Europe <build@onelab.eu>
25 Distribution: PlanetLab %{plrelease}
28 Summary: The yum repository for slices, to be installed on the myplc-side
33 Group: System Environment/Base
34 Source0: %{name}-%{version}.tar.gz
35 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
36 # other archs must be able to install this
42 %define debug_package %{nil}
45 This rpm contains all the rpms that might ship on a sliver image
46 they come organized into a yum repository
52 echo nothing to do at build time for slicerepo
55 rm -rf $RPM_BUILD_ROOT
57 repo=slice-%{nodefamily}
58 install -d -m 755 $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
59 rpms=$(echo %{slice_rpms_plus} | sed -e 's,+++, ,g')
60 for rpm in $rpms; do rsync %{_topdir}/$rpm $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/ ; done
62 install -D -m 644 %{_topdir}/RPMS/yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/yumgroups.xml
63 # do not do this yet, as plc.d/packages will do it anyway
64 #createrepo -g yumgroups.xml $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo
67 rm -rf $RPM_BUILD_ROOT
70 if [ ! -e /bin/systemctl ] ; then
71 echo "Systemd is not there. Just starting PLC to handle packages (may fail of PLC is not configured) ..."
72 service plc start packages
73 elif /bin/systemctl status plc >/dev/null ; then
74 echo "Restarting PLC to handle packages ..."
75 service plc restart packages
77 echo "The PLC is not running. Skipping a restart ..."
81 %defattr(-,root,root,-)
82 /var/www/html/install-rpms/slice-%{nodefamily}
83 # don't overwrite yumgroups.xml if exists
84 %config(noreplace) /var/www/html/install-rpms/slice-%{nodefamily}/yumgroups.xml
87 * Mon Jan 07 2019 Thierry <Parmentelat> - nodeimage-5.2-9
91 * Sun Jul 16 2017 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-8
92 - fix the fedora and fedora-updates repo definitions for f25
93 - add /etc/plc.d/packages index
95 * Sun Jul 10 2016 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-7
96 - yum config ; deprecates old fedora releases, add support for f23/f24
98 * Fri Nov 13 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-6
99 - fix for f22 and dnf.conf
101 * Fri Jun 26 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-5
102 - the yum config for nodes on f21 and f22
103 - define a new config_file for /etc/dnf/dnf.conf so that /etc/yum.myplc.d
104 - is taken into account on f22
106 * Wed Feb 18 2015 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-4
107 - minor change; start plc packages only at run-time, not build-time
108 - only available on systems that have systemctl
110 * Tue Jul 22 2014 Thomas Dreibholz <dreibh@simula.no> - nodeimage-5.2-4
111 - Post-install fix: trying to start PLC only when it is running, in order to avoid false-positive error message during build.
113 * Fri Mar 21 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-3
114 - template for f20 yum config
116 * Sun Jul 14 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-2
117 - more timestamps during build
119 * Thu Mar 07 2013 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-5.2-1
120 - add support for f18 yum config
122 * Mon Feb 11 2013 Stephen Soltesz <soltesz@opentechinstitute.org> - nodeimage-2.1-4
124 * Mon Nov 26 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-2.1-3
125 - fix /etc/plc.d/packages for empty install dirs
127 * Fri Sep 28 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-2.1-2
128 - exclude slice repos when running plc.d/packages start
130 * Fri Apr 13 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodeimage-2.1-1
131 - renamed as nodeimage - works on both mainline and lxc
133 * Thu Feb 16 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-14
134 - changes needed for build with yumexcludes defined in a separate pkgs file
136 * Wed Aug 31 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-13
137 - plc.d/packages: rewrote comments about some corner cases where it fails
138 - plc.d/packages: marginally more robust
140 * Fri Jun 10 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-12
141 - minor tweak in plc.d/packages
143 * Mon Jun 06 2011 Baris Metin <bmetin@verivue.com> - bootstrapfs-2.0-11
146 * Thu Feb 17 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-10
147 - bugfix for multi-flavour deployments
149 * Fri Feb 04 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-9
150 - for multi-flavours : 'packages' step in plc.d now handles vserver links and related hacks in yumgroups
152 * Thu Jan 27 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-8
153 - no semantic change - attempt to speed up build
155 * Sun Jan 23 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootstrapfs-2.0-7
156 - yum repo template for f14 nodes
157 - tweaks the way /etc/plc.d/packages works
159 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-6
161 - module name changes
163 * Tue Apr 27 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - BootstrapFS-2.0-5
164 - support different flavours of vservers on nodes
166 * Mon Apr 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-4
167 - fix unmatched $ in URL svn keywords
169 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-3
170 - choice between various pldistros is not made at build time, but at run time
171 - relies on GetNodeFlavour to expose the node's fcdistro - requires PLCAPI-5.0-5
172 - in addition, the baseurl for the myplc repo is http:// and not https:// anymore
173 - the https method does not work on fedora 12, and GPG is used below anyway
175 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - BootstrapFS-2.0-2
176 - new slicerepo package for exposing stuff to slivers