obsoletes useles -RPMBUILD
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 25 Jan 2011 12:15:55 +0000 (13:15 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 25 Jan 2011 12:15:55 +0000 (13:15 +0100)
Makefile
coblitz.mk
onelab.mk
planetbridge.mk
planetlab.mk
trellis.mk

index 788205c..d943441 100644 (file)
--- a/Makefile
+++ b/Makefile
 # 
 # (*) packages are named upon the RPM name; they are mostly lowercase
 #     Add a package to ALL if you want it built as part of the default set.
-# (*) modules are named after the subversion tree; as of this writing their names 
-#     are mostly mixed case like MyPLC or VserverReference
-#     (this is something we'll fix while moving to git)
+# (*) modules are named after the subversion or git tree; we would wish to keep
+#     these names lowercase as far as possible
 # (*) rpms are named in the spec files. A package typically defines several rpms;
 #     rpms are used for defining DEPEND-DEVEL-RPMS. See also package.rpmnames
 # 
+# in simple cases, one package uses one module (in which case using the same name sounds right)
+# but others might need several modules (e.g. image-creation packages like bootstrapfs need 
+# bootstrapfs and build); in this case the FIRST ONE is used for locating the specfile 
+#
 #################### packages
-# basics: how to build a package - you need/may define the following variables
+# basics: how to build a package - you need to define the following variables
 # 
 # (*) package-MODULES
-#     a package needs one or several modules to build. 
-#     to this end, define 
+#     a package needs one or several modules to build; the first one is used for 
+#     some special purposes, like locating the specfile
 # (*) package-SPEC
 #     the package's specfile; this is relative to the FIRST module in package-MODULES
 #
 # Optional:
 #
-# (*) package-SPECVARS
-#     space-separated list of spec variable definitions, where you can reference make variable that relate to 
-#     packages defined BEFORE the current one (note: you should use = - as opposed to := - to define these)
-#     e.g. mydriver-SPECVARS = foo=$(kernel-rpm-release) 
-#     would let you use the %release from the kernel's package when rpmbuild'ing mydriver - see automatic below
 # (*) package-DEPEND-PACKAGES
-#     a set of *packages* that this package depends on
+#     a set of (obviously local) *packages* that this package depends on, e.g.
+#     bootstrapfs-DEPEND-PACKAGES += kernel
+#     this impacts the order of the build
+# (*) package-DEVEL-RPMS
+#     a set of stock rpms that this package needs at build-time
+#     this can also be set in config.<distro>/devel.pkgs or config.planetlab/devel.pkgs as appropriate
+# (*) package-EXCLUDE-DEVEL-RPMS
+#     a set of stock *rpms* that the build will rpm-uninstall before building <package>
+#     this is intended to denote stock rpms, and the build will attempt to yum-install them
+#     back after the package is rebuilt
+#     This feature is not used at the moment and kept only just in case
 # (*) package-DEPEND-DEVEL-RPMS
-#     a set of *rpms* that the build will rpm-install before building <package>
+#     a set of local *rpms* that the build will rpm-install before building <package>
 #     the build will attempt to uninstall those once the package is built, this is not fatal though
 #     this is intended to denote local rpms, i.e. ones that are results of our own build
-#     stock rpms should be mentioned in config.planetlab/devel.pkgs
+#     stock rpms should be mentioned in DEVEL-RPMS or in devel.pkgs as described above
 # (*) package-DEPEND-FILES
 #     a set of files that the package depends on - and that make needs to know about
 #     if this contains RPMS/yumgroups.xml, then the toplevel RPMS's index 
 #     is refreshed with createrepo prior to running rpmbuild
-# (*) package-EXCLUDE-DEVEL-RPMS
-#     a set of *rpms* that the build will rpm-uninstall before building <package>
-#     this is intended to denote stock rpms, and the build will attempt to yum-install them
-#     back after the package is rebuilt
+# (*) package-SPECVARS
+#     space-separated list of spec variable definitions, where you can reference make variables that 
+#     belong to packages defined BEFORE the current one 
+#     note: you should use = to define these (as opposed to :=)
+#     e.g. mydriver-SPECVARS = foo=$(kernel-rpm-release) 
+#     would let you use the %release from the kernel's package when rpmbuild'ing mydriver 
+#     see automatic below
 # (*) package-RPMFLAGS: Miscellaneous RPM flags
-# (*) package-RPMBUILD: If not rpmbuild - mostly used for sudo'ing rpmbuild
-# (*) package-BUILD-FROM-SRPM: set this to any non-empty value, if your package is able to produce 
-#     a source rpms by running 'make srpm'
+#     this is passed to rpmbuild, as well as to spec2make for "exporting" various rpm variable
+#     to make; beware that some features, like --with=debug or --define 'foo bar' are not
+#     well handled by spec2make as of this writing, which can cause issues.
+#     hopefully this will be fixed...
+# (*) package-BUILD-FROM-SRPM: set this to any non-empty value, 
+#     if your package is able to produce a source rpm. 
+#     In this case the build will first invoke 'make srpm', and then rebuild binaries from that 
 # (*) package-RPMDATE: set this to any non-empty value to get the rpm package's release field hold the current date
 #     this is useful for container packages, like e.g. bootstrapfs or vserver, that contains much more than the
 #     correspondng module
 #################### automatic variables
 #
 # the build defines some make variables that are extracted from spec files
-# see for example
+# to inspect those, see for example
 # (*)  $ make ulogd-pkginfo
 #        to see the list f variables attached to a given package
 # (*)  $ make kernel-devel-rpminfo
@@ -442,7 +457,7 @@ all: savedpldistro
 
 define stage2_variables
 ### devel dependencies
-$(1).rpmbuild = $(if $($(1)-RPMBUILD),$($(1)-RPMBUILD),$(RPMBUILD)) $($(1)-RPMFLAGS)
+$(1).rpmbuild = $(RPMBUILD) $($(1)-RPMFLAGS)
 $(1).all-devel-rpm-paths := $(foreach rpm,$($(1)-DEPEND-DEVEL-RPMS),$($(rpm).rpm-path))
 $(1).depend-devel-packages := $(sort $(foreach rpm,$($(1)-DEPEND-DEVEL-RPMS),$($(rpm).package)))
 ALL-DEVEL-RPMS += $($(1)-DEPEND-DEVEL-RPMS)
index 5dc69a2..cb2336e 100644 (file)
@@ -146,7 +146,6 @@ IN_BOOTSTRAPFS += sshd
 #
 codemux-MODULES := codemux
 codemux-SPEC   := codemux.spec
-codemux-RPMBUILD := sudo bash ./rpmbuild.sh
 #ALL += codemux
 #IN_BOOTSTRAPFS += codemux
 
@@ -346,7 +345,6 @@ IN_BOOTCD += pyplnet
 #
 bootcd-MODULES := bootcd build
 bootcd-SPEC := bootcd.spec
-bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
 bootcd-RPMDATE := yes
@@ -369,7 +367,6 @@ IN_BOOTSTRAPFS += vserver
 #
 bootstrapfs-MODULES := bootstrapfs build
 bootstrapfs-SPEC := bootstrapfs.spec
-bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
 bootstrapfs-RPMDATE := yes
@@ -387,7 +384,6 @@ NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
 
 noderepo-MODULES := bootstrapfs 
 noderepo-SPEC := noderepo.spec
-noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
 # package requires all regular packages
 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
index 45df395..24b7261 100644 (file)
--- a/onelab.mk
+++ b/onelab.mk
@@ -205,7 +205,6 @@ IN_BOOTSTRAPFS += sshd
 #
 codemux-MODULES := codemux
 codemux-SPEC   := codemux.spec
-#codemux-RPMBUILD := bash ./rpmbuild.sh
 ALL += codemux
 IN_BOOTSTRAPFS += codemux
 
@@ -450,7 +449,6 @@ ALL += omf-expctl
 #
 bootcd-MODULES := bootcd build
 bootcd-SPEC := bootcd.spec
-bootcd-RPMBUILD := bash ./rpmbuild.sh
 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
 bootcd-RPMDATE := yes
@@ -473,7 +471,6 @@ IN_BOOTSTRAPFS += vserver
 #
 bootstrapfs-MODULES := bootstrapfs build
 bootstrapfs-SPEC := bootstrapfs.spec
-bootstrapfs-RPMBUILD := bash ./rpmbuild.sh
 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
 bootstrapfs-RPMDATE := yes
@@ -491,7 +488,6 @@ NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
 
 noderepo-MODULES := bootstrapfs
 noderepo-SPEC := noderepo.spec
-noderepo-RPMBUILD := bash ./rpmbuild.sh
 # package requires all embedded packages
 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
@@ -512,7 +508,6 @@ SLICEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(SLICEREPO_RPMS))
 
 slicerepo-MODULES := bootstrapfs
 slicerepo-SPEC := slicerepo.spec
-slicerepo-RPMBUILD := bash ./rpmbuild.sh
 # package requires all embedded packages
 slicerepo-DEPEND-PACKAGES := $(IN_VSERVER)
 slicerepo-DEPEND-FILES := RPMS/yumgroups.xml
index 6d30494..576252e 100644 (file)
@@ -131,7 +131,6 @@ IN_BOOTSTRAPFS += sshd
 #
 codemux-MODULES := CoDemux
 codemux-SPEC   := codemux.spec
-codemux-RPMBUILD := sudo bash ./rpmbuild.sh
 ALL += codemux
 IN_BOOTSTRAPFS += codemux
 
@@ -331,7 +330,6 @@ IN_BOOTCD += pyplnet
 #
 bootcd-MODULES := BootCD build
 bootcd-SPEC := bootcd.spec
-bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
 bootcd-RPMDATE := yes
@@ -354,7 +352,6 @@ IN_BOOTSTRAPFS += vserver
 #
 bootstrapfs-MODULES := BootstrapFS build
 bootstrapfs-SPEC := bootstrapfs.spec
-bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
 bootstrapfs-RPMDATE := yes
@@ -372,7 +369,6 @@ NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
 
 noderepo-MODULES := BootstrapFS 
 noderepo-SPEC := noderepo.spec
-noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
 # package requires all regular packages
 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
index a0fc8e8..d4ac7f0 100644 (file)
@@ -148,7 +148,6 @@ IN_BOOTSTRAPFS += sshd
 #
 codemux-MODULES := codemux
 codemux-SPEC   := codemux.spec
-codemux-RPMBUILD := sudo bash ./rpmbuild.sh
 ALL += codemux
 IN_BOOTSTRAPFS += codemux
 
@@ -411,7 +410,6 @@ ALL += omf-expctl
 #
 bootcd-MODULES := bootcd build
 bootcd-SPEC := bootcd.spec
-bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
 bootcd-RPMDATE := yes
@@ -434,7 +432,6 @@ IN_BOOTSTRAPFS += vserver
 #
 bootstrapfs-MODULES := bootstrapfs build
 bootstrapfs-SPEC := bootstrapfs.spec
-bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
 bootstrapfs-RPMDATE := yes
@@ -452,7 +449,6 @@ NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
 
 noderepo-MODULES := bootstrapfs
 noderepo-SPEC := noderepo.spec
-noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
 # package requires all regular packages
 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_NODEREPO) $(IN_VSERVER)
 noderepo-DEPEND-FILES := RPMS/yumgroups.xml
index 90f3601..71dfdcf 100644 (file)
@@ -129,7 +129,6 @@ IN_BOOTSTRAPFS += sshd
 #
 codemux-MODULES := CoDemux
 codemux-SPEC   := codemux.spec
-codemux-RPMBUILD := sudo bash ./rpmbuild.sh
 ALL += codemux
 IN_BOOTSTRAPFS += codemux
 
@@ -329,7 +328,6 @@ IN_BOOTCD += pyplnet
 #
 bootcd-MODULES := BootCD build
 bootcd-SPEC := bootcd.spec
-bootcd-RPMBUILD := sudo bash ./rpmbuild.sh
 bootcd-DEPEND-PACKAGES := $(IN_BOOTCD)
 bootcd-DEPEND-FILES := RPMS/yumgroups.xml
 bootcd-RPMDATE := yes
@@ -352,7 +350,6 @@ IN_BOOTSTRAPFS += vserver
 #
 bootstrapfs-MODULES := BootstrapFS build
 bootstrapfs-SPEC := bootstrapfs.spec
-bootstrapfs-RPMBUILD := sudo bash ./rpmbuild.sh
 bootstrapfs-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS)
 bootstrapfs-DEPEND-FILES := RPMS/yumgroups.xml
 bootstrapfs-RPMDATE := yes
@@ -370,7 +367,6 @@ NODEREPO_RPMS_3PLUS = $(subst $(SPACE),+++,$(NODEREPO_RPMS))
 
 noderepo-MODULES := BootstrapFS 
 noderepo-SPEC := noderepo.spec
-noderepo-RPMBUILD := sudo bash ./rpmbuild.sh
 # package requires all regular packages
 noderepo-DEPEND-PACKAGES := $(IN_BOOTSTRAPFS) $(IN_VSERVER)
 noderepo-DEPEND-FILES := RPMS/yumgroups.xml