From: Thierry Parmentelat Date: Fri, 7 Dec 2007 09:55:58 +0000 (+0000) Subject: (*) review myplc-release for vserver builds X-Git-Tag: 4.2-rc2~357 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d587bd7707db0bc709a3dcee41ee1aee63b97f49;p=build.git (*) review myplc-release for vserver builds (*) comfort on macos for local tests --- diff --git a/Makefile b/Makefile index d60edadf..3e8f6eae 100644 --- a/Makefile +++ b/Makefile @@ -190,14 +190,18 @@ endif #################### # gather build information for the 'About' page +# uses INIT_CWD to try and guess the vserver location myplc-release: @echo 'Creating myplc-release' rm -f $@ (echo -n 'Build bdate: ' ; date '+%Y.%m.%d') >> $@ (echo -n 'Build btime: ' ; date '+%H:%M') >> $@ - (echo -n 'Build hostname: ' ; hostname) >> $@ - (echo -n 'Build location: ' ; pwd) >> $@ + (echo -n 'Build bhostname: ' ; hostname) >> $@ + (echo "Build blocation: $(INIT_CWD)") >> $@ (echo -n 'Build tags file: ' ; fgrep '$$''Id' $(PLDISTROTAGS)) >> $@ + (echo "Build tarch: $(HOSTARCH)") >> $@ + (echo "Build tdistro: $(DISTRO)") >> $@ + (echo "Build trelease: $(RELEASE)") >> $@ echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx modules versions info" >> $@ $(MAKE) --no-print-directory versions >> $@ @@ -578,9 +582,6 @@ distclean: distclean1 distclean2 develclean: $(RPM-UNINSTALL-DEVEL) $(ALL-DEVEL-RPMS) -# xxx tmp - I cannot use this on my mac for local testing -ISMACOS=$(findstring Darwin,$(shell uname)) -ifneq "$(ISMACOS)" "" #################### produce reliable version information # for a given module VFORMAT="%30s := %s\n" @@ -599,10 +600,6 @@ ALL-MODULES:=$(sort $(ALL-MODULES)) $(foreach module,$(ALL-MODULES), $(eval $(call print_version,$(module)))) versions: $(foreach module, $(ALL-MODULES), $(module)-version) -else -versions: - @echo "warning : the 'versions' target is not supported on macos" -endif #################### include install Makefile # the default is to use the distro-dependent install file diff --git a/build.common b/build.common index d9cfd683..8ff69da2 100644 --- a/build.common +++ b/build.common @@ -76,8 +76,8 @@ function pl_getReleaseName () { # figure out which redhat distro we are using (fedora, centos, redhat) pl_DISTRO=$(pl_getDistro) -# select basearch of the host devel environment -pl_DISTRO_ARCH=$(uname -i) +# select basearch of the host devel environment - protected for macos for local tests +pl_DISTRO_ARCH=$(uname -i 2>/dev/null|| echo unknownarch)) # let mkfedora select one of its mirrors pl_DISTRO_URL="" @@ -124,6 +124,7 @@ function pl_process_fedora_options () { return $shiftcount } +######################################## handling a root image function pl_makedevs() { vroot=$1 # Clean ${vroot}/dev, but only when ${vroot}!="" @@ -177,9 +178,8 @@ function pl_mkfedora() { } function pl_setup_chroot() { - root=$1 - shift - options=$@ + root=$1; shift + options="$@" pl_mkfedora $root $options @@ -295,10 +295,6 @@ function pl_parsePkgs () { function pl_getPackages() { fcdistro=$1; shift ; pl_parsePkgs package $fcdistro "$@" ; } function pl_getGroups() { fcdistro=$1; shift ; pl_parsePkgs group $fcdistro "$@" ; } -### # add -p before each package for mkfedora -### function pl_getPackagesOptions2 () { pl_getPackages2 "$@" | awk '{for (i=1;i<=NF;i++) {print "-p " $i}}' ; } -### # add -g before each group for mkfedora -### function pl_getGroupsOptions2 () { pl_getGroups2 "$@" | awk '{for (i=1;i<=NF;i++) {print "-g " $i}}' ; } # locates a pldistro-dependant file # tries first in build//, then in build/planetlab/