From e733b0545a632bea8536796f97ab3b266423aa16 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 10 Mar 2008 11:45:24 +0000 Subject: [PATCH] Second step towards multiarch myplc https://svn.planet-lab.org/ticket/214 -- design * new notion of a 'nodefamily' - that for now is - * standard rpm repository is now named /var/www/html/install-rpms/ a legacy symlink install-rpms/planetlab is created my myplc packaging * bootstrafs rpm name is now bootstrapfs- so that several instances from various builds can be installed in the same myplc * noderepo rpm (named noderepo-) built as part of the planetlab distro this is for installing /var/www/html/intall-rpms/ from another build -- other changes * extensive cleanup of mkfedora: ** obsolete options -p -g -x removed ** option -p removed, pkgsfile is a mandatory argument ** option -k removed, use kexclude: in the pkgs file instead * also cleaned up pl_root_* functions - no wrapper to pl_root_mkfedora anymore -- status * not tested at all - likely to break * next step planned for storing nodefamily and pass it to yum.php.conf (impacted would be bootmanager, nodemanager and nodeconfig) * a final cleanup in mkfedora would be to define mirrors in a separate .pkgs-like file * kupdate.sh, as well as possibly other convenience scripts, might be impacted --- bootstrapfs.spec | 2 +- build.sh | 8 ++++---- noderepo.spec | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bootstrapfs.spec b/bootstrapfs.spec index 06ebe12..4efaea9 100644 --- a/bootstrapfs.spec +++ b/bootstrapfs.spec @@ -40,7 +40,7 @@ BootManager to instantiate a node with a new filesystem. %build pushd BootstrapFS -./build.sh %{distroname} %{pldistro} +./build.sh %{pldistro} popd BootstrapFS %install diff --git a/build.sh b/build.sh index 068e381..4c2ea6e 100755 --- a/build.sh +++ b/build.sh @@ -38,8 +38,8 @@ shiftcount=$? shift $shiftcount # expecting fcdistro and pldistro on the command line -fcdistro=$1; shift pldistro=$1; shift +fcdistro=${pl_DISTRO_NAME} # Do not tolerate errors set -e @@ -58,7 +58,7 @@ pl_root_makedevs $vref pkgsfile=$(pl_locateDistroFile ../build/ ${pldistro} bootstrapfs.pkgs) # -k = exclude kernel* packages -pl_root_mkfedora -k -f $pkgsfile ${vref} +pl_root_mkfedora ${vref} ${pldistro} $pkgsfile # optionally invoke a post processing script after packages from # $pkgsfile have been installed @@ -75,8 +75,8 @@ pkgs_count=$(ls ../build/config.${pldistro}/bootstrapfs-*.pkgs 2> /dev/null | wc echo "--------START BUILDING bootstrapfs-${NAME}: $(date)" # "Parse" out the packages and groups for yum - packages=$(pl_getPackages ${pl_DISTRO_NAME} $pkgs) - groups=$(pl_getGroups ${pl_DISTRO_NAME} $pkgs) + packages=$(pl_getPackages $fcdistro $pldistro $pkgs) + groups=$(pl_getGroups $fcdistro $pldistro $pkgs) echo "${NAME} has the following packages : ${packages}" echo "${NAME} has the following groups : ${groups}" diff --git a/noderepo.spec b/noderepo.spec index 3fca34e..eea6ac9 100644 --- a/noderepo.spec +++ b/noderepo.spec @@ -8,9 +8,9 @@ # %{distrorelease} : e.g. 8 # %{node_rpms_plus} : as a +++ separated list of rpms from the build dir -%define nodetype %{pldistro}-%{_arch} +%define nodefamily %{pldistro}-%{_arch} -%define name noderepo-%{nodetype} +%define name noderepo-%{nodefamily} %define version 0.1 %define taglevel 2 @@ -50,7 +50,7 @@ echo nothing to do at build time for noderepo %install rm -rf $RPM_BUILD_ROOT -repo=%{nodetype} +repo=%{nodefamily} install -d -m 755 $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo rpms=$(echo %{node_rpms_plus} | sed -e 's,+++, ,g') for rpm in $rpms; do rsync %{_topdir}/$rpm $RPM_BUILD_ROOT/var/www/html/install-rpms/$repo/ ; done @@ -67,7 +67,7 @@ service plc start packages %files %defattr(-,root,root,-) -/var/www/html/install-rpms/%{nodetype} +/var/www/html/install-rpms/%{nodefamily} %changelog * Tue Mar 4 2008 Thierry Parmentelat - -- 2.43.0