* [Buildroot] [RFC] Support for "distributions" in buildroot
@ 2007-07-20 12:30 Ulf Samuelsson
2007-07-20 14:04 ` Steven J. Hill
0 siblings, 1 reply; 7+ messages in thread
From: Ulf Samuelsson @ 2007-07-20 12:30 UTC (permalink / raw)
To: buildroot
There is an inherent problem in buildroot, that things
are downloaded from a volatile Internet.
When packages disappear from Internet,
the build breaks for new users.
If we then update the package/<package>/<package>.mk
without testing too much, this might break someones
stable build, which is undesirable.
By introducing "distributions" defined in a separate
file containing lines like:
MYPKG_VERSION:=1.2.3
MYPKG_SITE:=http://www.old-site.org/
and then in the package/mypkg/mypkg.mk we have
ifeq ($(MYPKG_VERSION),)
MYPKG_VERSION:=1.2.4
endif
ifeq ($(MYPKG_SITE),)
MYPKG_SITE:=http://www.new-site.org/
endif
it will become possible for users to use whatever versions
they like, even if the mainstream buildroot changes.
It will become easier to update the package/<package>/<package>.mk
since other users will should not notice this.
The patch shoudl allow the user to create a new file
with the latest versions and then compare this with
his/her own version numbers.
The patch includes some example packages modified
to handle the patch (ruby, curl,portage)
Comments?
Index: project/config/uclibc.distrib
===================================================================
--- project/config/uclibc.distrib (revision 0)
+++ project/config/uclibc.distrib (revision 0)
@@ -0,0 +1,25 @@
+# This file contains overrides for
+# package versions for the uclibc project.
+#
+# If you want to lock a package version for the package "mypkg"
+# you could write it in the following way in this file:
+#
+# MYPKG_VERSION:=2.6-stable
+# MYPKG_SITE:= http://www.new-site.org/
+#
+# If the SITE has not changed, then it is enough to define the VERSION.
+#
+# The package makefile fragment must contain the following code:
+#
+# -----------------------------------------------------
+# ifeq ($(MYPKG_VERSION),)
+# MYPKG_VERSION:=2.7-latest
+# endif
+# ifeq ($(MYPKG_SITE),)
+# MYPKG_VERSION:=http://www.old-site.org/
+# endif
+# -----------------------------------------------------
+#
+# for the distribution support to work
+PORTAGE_VERSION:=2.0.51.22
+SANDBOX_VERSION:=1.2.13
Index: project/config/distrib_header
===================================================================
--- project/config/distrib_header (revision 0)
+++ project/config/distrib_header (revision 0)
@@ -0,0 +1,21 @@
+#
+# If you want to lock a package version for the package "mypkg"
+# you could write it in the following way in this file:
+#
+# MYPKG_VERSION:=2.6-stable
+# MYPKG_SITE:= http://www.new-site.org/
+#
+# If the SITE has not changed, then it is enough to define the VERSION.
+#
+# The package makefile fragment must contain the following code:
+#
+# -----------------------------------------------------
+# ifeq ($(MYPKG_VERSION),)
+# MYPKG_VERSION:=2.7-latest
+# endif
+# ifeq ($(MYPKG_SITE),)
+# MYPKG_VERSION:=http://www.old-site.org/
+# endif
+# -----------------------------------------------------
+#
+# for the distribution support to work
Index: project/config/def_distrib
===================================================================
--- project/config/def_distrib (revision 0)
+++ project/config/def_distrib (revision 0)
@@ -0,0 +1,26 @@
+# This file contains the stable package versions
+#
+# If you want to lock a package version for the package "mypkg"
+# you could write it in the following way in this file:
+#
+# MYPKG_VERSION:=2.6-stable
+# MYPKG_SITE:= http://www.new-site.org/
+#
+# If the SITE has not changed, then it is enough to define the VERSION.
+#
+# The package makefile fragment must contain the following code:
+#
+# -----------------------------------------------------
+# ifeq ($(MYPKG_VERSION),)
+# MYPKG_VERSION:=2.7-latest
+# endif
+# ifeq ($(MYPKG_SITE),)
+# MYPKG_VERSION:=http://www.old-site.org/
+# endif
+# -----------------------------------------------------
+#
+# for the distribution support to work
+CURL_VERSION:=7.13.1
+PORTAGE_VERSION:=2.0.51.22
+SANDBOX_VERSION:=1.2.13
+RUBY_VERSION:=1.8.2
Index: project/config/empty_distrib
===================================================================
--- project/config/empty_distrib (revision 0)
+++ project/config/empty_distrib (revision 0)
@@ -0,0 +1,3 @@
+# This file should be empty
+# This results in package versions inside
package/<package>/<package>.mk beeing used
+
Index: project/Config.in
===================================================================
--- project/Config.in (revision 19171)
+++ project/Config.in (arbetskopia)
@@ -23,4 +23,56 @@
help
The banner string is stored in "/etc/issue"
+choice
+ prompt "Buildroot Distribution"
+ default BR2_DISTRIBUTION_STABLE
+ help
+ The distribution file contains definitions of
+ package version numbers, which overrides the
+ default version number in package/<package>/<package>.mk
+ The distribution file is stored in "project/config"
+ If empty, a default distribution is used.
+
+config BR2_DISTRIBUTION_LATEST
+ bool "Use the latest package version"
+ help
+ Use an empty distribution file,which
+ results in using the versions defined in
+ the package/<package>.mk
+
+config BR2_DISTRIBUTION_STABLE
+ bool "Use the latest stable package version"
+ help
+ Use a distribution file containing tested
+ versions. Note that this may cause more problems
+ when downloading the source, since the stable
+ package tarballs may have been removed from
+ their download site.
+
+config BR2_DISTRIBUTION_PROJECT
+ bool "Use $(PROJECT).distrib"
+ help
+ Use package versions defined in the project distribution file
+ It is located in "project/config"
+
+config BR2_DISTRIBUTION_CUSTOM
+ bool "Use your own distibution file"
+ help
+ Use package versions defined in a custom distribution file
+ Provide your own distribution file with full path
+
+endchoice
+
+config BR2_DISTRIBUTION_NAME
+ string "Provide your own distribution file"
+ depends on BR2_DISTRIBUTION_CUSTOM
+ default ""
+
+config BR2_DISTRIBUTION
+ string
+ default "project/config/empty_distrib" if BR2_DISTRIBUTION_LATEST
+ default "project/config/def_distrib" if BR2_DISTRIBUTION_STABLE
+ default "project/config/$(PROJECT).distrib" if
BR2_DISTRIBUTION_PROJECT
+ default "$(BR2_DISTRIBUTION_NAME)" if BR2_DISTRIBUTION_CUSTOM
+
endmenu
Index: package/ruby/ruby.mk
===================================================================
--- package/ruby/ruby.mk (revision 19171)
+++ package/ruby/ruby.mk (arbetskopia)
@@ -3,7 +3,9 @@
# ruby
#
#############################################################
-RUBY_VERSION:=1.8.2
+ifeq ($(RUBY_VERSION),)
+RUBY_VERSION:=1.8.7
+endif
RUBY_SOURCE:=ruby-$(RUBY_VERSION).tar.gz
RUBY_SITE:=ftp://ftp.ruby-lang.org/pub/ruby/1.8
RUBY_DIR:=$(BUILD_DIR)/ruby-$(RUBY_VERSION)
@@ -62,6 +64,9 @@
ruby-dirclean:
rm -rf $(RUBY_DIR)
+ruby-version:
+ echo RUBY_VERSION:=$(RUBY_VERSION) >> $(DISTRIB)
+
#############################################################
#
# Toplevel Makefile options
Index: package/curl/curl.mk
===================================================================
--- package/curl/curl.mk (revision 19171)
+++ package/curl/curl.mk (arbetskopia)
@@ -3,7 +3,9 @@
# curl
#
#############################################################
-CURL_VERSION:=7.13.1
+ifeq ($(CURL_VERSION),)
+CURL_VERSION:=7.16.4
+endif
CURL_SOURCE:=curl-$(CURL_VERSION).tar.bz2
CURL_SITE:=http://curl.haxx.se/download/
CURL_CAT:=$(BZCAT)
@@ -69,6 +71,9 @@
curl-dirclean:
rm -rf $(CURL_DIR)
+curl-version:
+ echo CURL_VERSION:=$(CURL_VERSION) >> $(DISTRIB)
+
#############################################################
#
# Toplevel Makefile options
Index: package/Makefile.in
===================================================================
--- package/Makefile.in (revision 19171)
+++ package/Makefile.in (arbetskopia)
@@ -81,8 +81,8 @@
PROJECT_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)project_build_
$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(PROJECT)
BINARIES_DIR:=$(BASE_DIR)/binaries/$(PROJECT)
TARGET_DIR:=$(PROJECT_BUILD_DIR)/root
+DISTRIB:=.distrib
-
GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
#"))
Index: package/portage/portage.mk
===================================================================
--- package/portage/portage.mk (revision 19171)
+++ package/portage/portage.mk (arbetskopia)
@@ -3,7 +3,9 @@
# portage
#
#############################################################
+ifeq ($(PORTAGE_VERSION),)
PORTAGE_VERSION:=2.0.51.22
+endif
PORTAGE_SOURCE:=portage-$(PORTAGE_VERSION).tar.bz2
PORTAGE_SITE:=http://gentoo.osuosl.org/distfiles
PORTAGE_CAT:=$(BZCAT)
@@ -11,7 +13,9 @@
PORTAGE_TARGET_DIR:=$(TARGET_DIR)/usr/lib/portage
PORTAGE_TARGET_BINARY:=usr/bin/emerge
-SANDBOX_VERSION:=1.2.13
+ifeq ($(SANDBOX_VERSION),)
+SANDBOX_VERSION:=1.2.18.1
+endif
SANDBOX_SOURCE:=sandbox-$(SANDBOX_VERSION).tar.bz2
SANDBOX_SITE:=$(PORTAGE_SITE)
SANDBOX_CAT:=$(PORTAGE_CAT)
@@ -120,6 +124,13 @@
rm -rf $(PORTAGE_DIR)
sandbox-dirclean:
rm -rf $(SANDBOX_DIR)
+
+portage-version:
+ echo PORTAGE_VERSION:=$(PORTAGE_VERSION) >> $(DISTRIB)
+
+sandbox-version:
+ echo SANDBOX_VERSION:=$(SANDBOX_VERSION) >> $(DISTRIB)
+
#############################################################
#
# Toplevel Makefile options
Index: Makefile
===================================================================
--- Makefile (revision 19171)
+++ Makefile (arbetskopia)
@@ -166,8 +166,17 @@
#"))
BANNER:=$(strip $(subst ",,$(BR2_BANNER)))
#"))
+DISTRIBUTION:=$(strip $(subst ",,$(BR2_DISTRIBUTION)))
+#"))
+DISTRIBUTION_EXISTS:=$(strip $(subst ",,$(shell ls $(DISTRIBUTION) |
grep -FzZ $(DISTRIBUTION))))
+#))
+ifneq ($(DISTRIBUTION_EXISTS),)
+include $(DISTRIBUTION)
+
+endif
+
include toolchain/Makefile.in
include package/Makefile.in
@@ -198,6 +207,7 @@
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
+TARGETS_VERSION:=$(patsubst %,%-version,$(TARGETS))
world: $(DL_DIR) $(BUILD_DIR) $(PROJECT_BUILD_DIR) \
$(BINARIES_DIR) $(STAGING_DIR) $(TARGET_DIR) bsp $(TARGETS)
@@ -205,6 +215,7 @@
.PHONY: all world dirs clean dirclean distclean source bsp $(TARGETS) \
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
+ $(TARGETS_VERSION) \
$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR) \
$(PROJECT_BUILD_DIR) $(BINARIES_DIR)
@@ -257,6 +268,40 @@
#############################################################
#
+# Support "distributions"
+#
+#############################################################
+
+project/config/$(PROJECT).distrib:
+ touch project/config/$(PROJECT).distrib
+ echo "# This file contains overrides for " > $(DISTRIB)
+ echo "# package versions for the $(PROJECT) project.">> $(DISTRIB)
+ cat project/config/distrib_header >> $(DISTRIB)
+
+distrib-core: $(TARGETS_VERSION)
+
+distrib: distrib-clean project/config/$(PROJECT).distrib
+ cp .config $(PROJECT).config.tmp
+ make allyesconfig
+ make distrib-core
+ mv $(DISTRIB) project/config/$(PROJECT).distrib
+ mv $(PROJECT).config.tmp .config
+
+stable:
+ echo "# This file contains the stable package versions" > $(DISTRIB)
+ cat project/config/distrib_header >> $(DISTRIB)
+ make allyesconfig
+ make distrib-core
+ mv .distrib project/config/def_distrib
+
+distrib-clean:
+ rm -f project/config/$(PROJECT).distrib
+ rm -f .distrib
+
+.PHONY: distrib-core distrib stable distrib-clean
+
+#############################################################
+#
# Cleanup and misc junk
#
#############################################################
@@ -368,7 +413,7 @@
rm -rf sources/*
endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
-
+#############################################################
%_defconfig: $(CONFIG)/conf
cp $(shell find ./target/ -name $@) .config
@$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
Index: project/config/uclibc.distrib
===================================================================
--- project/config/uclibc.distrib (revision 0)
+++ project/config/uclibc.distrib (revision 0)
@@ -0,0 +1,27 @@
+gedit # This file contains overrides for
+# package versions for the uclibc project.
+#
+# If you want to lock a package version for the package "mypkg"
+# you could write it in the following way in this file:
+#
+# MYPKG_VERSION:=2.6-stable
+# MYPKG_SITE:= http://www.new-site.org/
+#
+# If the SITE has not changed, then it is enough to define the VERSION.
+#
+# The package makefile fragment must contain the following code:
+#
+# -----------------------------------------------------
+# ifeq ($(MYPKG_VERSION),)
+# MYPKG_VERSION:=2.7-latest
+# endif
+# ifeq ($(MYPKG_SITE),)
+# MYPKG_VERSION:=http://www.old-site.org/
+# endif
+# -----------------------------------------------------
+#
+# for the distribution support to work
+CURL_VERSION:=7.13.1
+PORTAGE_VERSION:=2.0.51.22
+SANDBOX_VERSION:=1.2.13
+RUBY_VERSION:=1.8.2
Index: project/config/distrib_header
===================================================================
--- project/config/distrib_header (revision 0)
+++ project/config/distrib_header (revision 0)
@@ -0,0 +1,21 @@
+#
+# If you want to lock a package version for the package "mypkg"
+# you could write it in the following way in this file:
+#
+# MYPKG_VERSION:=2.6-stable
+# MYPKG_SITE:= http://www.new-site.org/
+#
+# If the SITE has not changed, then it is enough to define the VERSION.
+#
+# The package makefile fragment must contain the following code:
+#
+# -----------------------------------------------------
+# ifeq ($(MYPKG_VERSION),)
+# MYPKG_VERSION:=2.7-latest
+# endif
+# ifeq ($(MYPKG_SITE),)
+# MYPKG_VERSION:=http://www.old-site.org/
+# endif
+# -----------------------------------------------------
+#
+# for the distribution support to work
Index: project/config/def_distrib
===================================================================
--- project/config/def_distrib (revision 0)
+++ project/config/def_distrib (revision 0)
@@ -0,0 +1,26 @@
+# This file contains the stable package versions
+#
+# If you want to lock a package version for the package "mypkg"
+# you could write it in the following way in this file:
+#
+# MYPKG_VERSION:=2.6-stable
+# MYPKG_SITE:= http://www.new-site.org/
+#
+# If the SITE has not changed, then it is enough to define the VERSION.
+#
+# The package makefile fragment must contain the following code:
+#
+# -----------------------------------------------------
+# ifeq ($(MYPKG_VERSION),)
+# MYPKG_VERSION:=2.7-latest
+# endif
+# ifeq ($(MYPKG_SITE),)
+# MYPKG_VERSION:=http://www.old-site.org/
+# endif
+# -----------------------------------------------------
+#
+# for the distribution support to work
+CURL_VERSION:=7.13.1
+PORTAGE_VERSION:=2.0.51.22
+SANDBOX_VERSION:=1.2.13
+RUBY_VERSION:=1.8.2
Index: project/config/empty_distrib
===================================================================
--- project/config/empty_distrib (revision 0)
+++ project/config/empty_distrib (revision 0)
@@ -0,0 +1,3 @@
+# This file should be empty
+# This results in package versions inside
package/<package>/<package>.mk beeing used
+
Index: project/Config.in
===================================================================
--- project/Config.in (revision 19171)
+++ project/Config.in (arbetskopia)
@@ -23,4 +23,56 @@
help
The banner string is stored in "/etc/issue"
+choice
+ prompt "Buildroot Distribution"
+ default BR2_DISTRIBUTION_STABLE
+ help
+ The distribution file contains definitions of
+ package version numbers, which overrides the
+ default version number in package/<package>/<package>.mk
+ The distribution file is stored in "project/config"
+ If empty, a default distribution is used.
+
+config BR2_DISTRIBUTION_LATEST
+ bool "Use the latest package version"
+ help
+ Use an empty distribution file,which
+ results in using the versions defined in
+ the package/<package>.mk
+
+config BR2_DISTRIBUTION_STABLE
+ bool "Use the latest stable package version"
+ help
+ Use a distribution file containing tested
+ versions. Note that this may cause more problems
+ when downloading the source, since the stable
+ package tarballs may have been removed from
+ their download site.
+
+config BR2_DISTRIBUTION_PROJECT
+ bool "Use $(PROJECT).distrib"
+ help
+ Use package versions defined in the project distribution file
+ It is located in "project/config"
+
+config BR2_DISTRIBUTION_CUSTOM
+ bool "Use your own distibution file"
+ help
+ Use package versions defined in a custom distribution file
+ Provide your own distribution file with full path
+
+endchoice
+
+config BR2_DISTRIBUTION_NAME
+ string "Provide your own distribution file"
+ depends on BR2_DISTRIBUTION_CUSTOM
+ default ""
+
+config BR2_DISTRIBUTION
+ string
+ default "project/config/empty_distrib" if BR2_DISTRIBUTION_LATEST
+ default "project/config/def_distrib" if BR2_DISTRIBUTION_STABLE
+ default "project/config/$(PROJECT).distrib" if
BR2_DISTRIBUTION_PROJECT
+ default "$(BR2_DISTRIBUTION_NAME)" if BR2_DISTRIBUTION_CUSTOM
+
endmenu
Index: package/ruby/ruby.mk
===================================================================
--- package/ruby/ruby.mk (revision 19171)
+++ package/ruby/ruby.mk (arbetskopia)
@@ -3,7 +3,9 @@
# ruby
#
#############################################################
-RUBY_VERSION:=1.8.2
+ifeq ($(RUBY_VERSION),)
+RUBY_VERSION:=1.8.7
+endif
RUBY_SOURCE:=ruby-$(RUBY_VERSION).tar.gz
RUBY_SITE:=ftp://ftp.ruby-lang.org/pub/ruby/1.8
RUBY_DIR:=$(BUILD_DIR)/ruby-$(RUBY_VERSION)
@@ -62,6 +64,9 @@
ruby-dirclean:
rm -rf $(RUBY_DIR)
+ruby-version:
+ echo RUBY_VERSION:=$(RUBY_VERSION) >> $(DISTRIB)
+
#############################################################
#
# Toplevel Makefile options
Index: package/curl/curl.mk
===================================================================
--- package/curl/curl.mk (revision 19171)
+++ package/curl/curl.mk (arbetskopia)
@@ -3,7 +3,9 @@
# curl
#
#############################################################
-CURL_VERSION:=7.13.1
+ifeq ($(CURL_VERSION),)
+CURL_VERSION:=7.16.4
+endif
CURL_SOURCE:=curl-$(CURL_VERSION).tar.bz2
CURL_SITE:=http://curl.haxx.se/download/
CURL_CAT:=$(BZCAT)
@@ -69,6 +71,9 @@
curl-dirclean:
rm -rf $(CURL_DIR)
+curl-version:
+ echo CURL_VERSION:=$(CURL_VERSION) >> $(DISTRIB)
+
#############################################################
#
# Toplevel Makefile options
Index: package/Makefile.in
===================================================================
--- package/Makefile.in (revision 19171)
+++ package/Makefile.in (arbetskopia)
@@ -81,8 +81,8 @@
PROJECT_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)project_build_
$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(PROJECT)
BINARIES_DIR:=$(BASE_DIR)/binaries/$(PROJECT)
TARGET_DIR:=$(PROJECT_BUILD_DIR)/root
+DISTRIB:=.distrib
-
GNU_TARGET_SUFFIX:=-$(strip $(subst ",, $(BR2_GNU_TARGET_SUFFIX)))
#"))
Index: package/portage/portage.mk
===================================================================
--- package/portage/portage.mk (revision 19171)
+++ package/portage/portage.mk (arbetskopia)
@@ -3,7 +3,9 @@
# portage
#
#############################################################
+ifeq ($(PORTAGE_VERSION),)
PORTAGE_VERSION:=2.0.51.22
+endif
PORTAGE_SOURCE:=portage-$(PORTAGE_VERSION).tar.bz2
PORTAGE_SITE:=http://gentoo.osuosl.org/distfiles
PORTAGE_CAT:=$(BZCAT)
@@ -11,7 +13,9 @@
PORTAGE_TARGET_DIR:=$(TARGET_DIR)/usr/lib/portage
PORTAGE_TARGET_BINARY:=usr/bin/emerge
-SANDBOX_VERSION:=1.2.13
+ifeq ($(SANDBOX_VERSION),)
+SANDBOX_VERSION:=1.2.18.1
+endif
SANDBOX_SOURCE:=sandbox-$(SANDBOX_VERSION).tar.bz2
SANDBOX_SITE:=$(PORTAGE_SITE)
SANDBOX_CAT:=$(PORTAGE_CAT)
@@ -120,6 +124,13 @@
rm -rf $(PORTAGE_DIR)
sandbox-dirclean:
rm -rf $(SANDBOX_DIR)
+
+portage-version:
+ echo PORTAGE_VERSION:=$(PORTAGE_VERSION) >> $(DISTRIB)
+
+sandbox-version:
+ echo SANDBOX_VERSION:=$(SANDBOX_VERSION) >> $(DISTRIB)
+
#############################################################
#
# Toplevel Makefile options
Index: Makefile
===================================================================
--- Makefile (revision 19171)
+++ Makefile (arbetskopia)
@@ -166,8 +166,17 @@
#"))
BANNER:=$(strip $(subst ",,$(BR2_BANNER)))
#"))
+DISTRIBUTION:=$(strip $(subst ",,$(BR2_DISTRIBUTION)))
+#"))
+DISTRIBUTION_EXISTS:=$(strip $(subst ",,$(shell ls $(DISTRIBUTION) |
grep -FzZ $(DISTRIBUTION))))
+#))
+ifneq ($(DISTRIBUTION_EXISTS),)
+include $(DISTRIBUTION)
+
+endif
+
include toolchain/Makefile.in
include package/Makefile.in
@@ -198,6 +207,7 @@
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
+TARGETS_VERSION:=$(patsubst %,%-version,$(TARGETS))
world: $(DL_DIR) $(BUILD_DIR) $(PROJECT_BUILD_DIR) \
$(BINARIES_DIR) $(STAGING_DIR) $(TARGET_DIR) bsp $(TARGETS)
@@ -205,6 +215,7 @@
.PHONY: all world dirs clean dirclean distclean source bsp $(TARGETS) \
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
+ $(TARGETS_VERSION) \
$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR) \
$(PROJECT_BUILD_DIR) $(BINARIES_DIR)
@@ -257,6 +268,40 @@
#############################################################
#
+# Support "distributions"
+#
+#############################################################
+
+project/config/$(PROJECT).distrib:
+ touch project/config/$(PROJECT).distrib
+ echo "# This file contains overrides for " > $(DISTRIB)
+ echo "# package versions for the $(PROJECT) project.">> $(DISTRIB)
+ cat project/config/distrib_header >> $(DISTRIB)
+
+distrib-core: $(TARGETS_VERSION)
+
+distrib: distrib-clean project/config/$(PROJECT).distrib
+ cp .config $(PROJECT).config.tmp
+ make allyesconfig
+ make distrib-core
+ mv $(DISTRIB) project/config/$(PROJECT).distrib
+ mv $(PROJECT).config.tmp .config
+
+stable:
+ echo "# This file contains the stable package versions" > $(DISTRIB)
+ cat project/config/distrib_header >> $(DISTRIB)
+ make allyesconfig
+ make distrib-core
+ mv .distrib project/config/def_distrib
+
+distrib-clean:
+ rm -f project/config/$(PROJECT).distrib
+ rm -f .distrib
+
+.PHONY: distrib-core distrib stable distrib-clean
+
+#############################################################
+#
# Cleanup and misc junk
#
#############################################################
@@ -368,7 +413,7 @@
rm -rf sources/*
endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
-
+#############################################################
%_defconfig: $(CONFIG)/conf
cp $(shell find ./target/ -name $@) .config
@$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
Best Regards
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [RFC] Support for "distributions" in buildroot
2007-07-20 12:30 [Buildroot] [RFC] Support for "distributions" in buildroot Ulf Samuelsson
@ 2007-07-20 14:04 ` Steven J. Hill
2007-07-20 22:34 ` Ulf Samuelsson
0 siblings, 1 reply; 7+ messages in thread
From: Steven J. Hill @ 2007-07-20 14:04 UTC (permalink / raw)
To: buildroot
On Fri, Jul 20, 2007 at 02:30:49PM +0200, Ulf Samuelsson wrote:
> There is an inherent problem in buildroot, that things
> are downloaded from a volatile Internet.
> When packages disappear from Internet,
> the build breaks for new users.
> If we then update the package/<package>/<package>.mk
> without testing too much, this might break someones
> stable build, which is undesirable.
>
> By introducing "distributions" defined in a separate
> file containing lines like:
>
Sorry to keep saying "No", but "No". If people want to stay with older
versions, then they should download the source they need and keep it
with their current buildroot system.
-Steve
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [RFC] Support for "distributions" in buildroot
2007-07-20 14:04 ` Steven J. Hill
@ 2007-07-20 22:34 ` Ulf Samuelsson
2007-07-21 18:42 ` Thomas Lundquist
0 siblings, 1 reply; 7+ messages in thread
From: Ulf Samuelsson @ 2007-07-20 22:34 UTC (permalink / raw)
To: buildroot
----- Original Message -----
From: "Steven J. Hill" <sjhill@realitydiluted.com>
To: "Ulf Samuelsson" <ulf@atmel.com>
Cc: "buildroot" <buildroot@uclibc.org>
Sent: Friday, July 20, 2007 4:04 PM
Subject: Re: [Buildroot] [RFC] Support for "distributions" in buildroot
> On Fri, Jul 20, 2007 at 02:30:49PM +0200, Ulf Samuelsson wrote:
>> There is an inherent problem in buildroot, that things
>> are downloaded from a volatile Internet.
>> When packages disappear from Internet,
>> the build breaks for new users.
>> If we then update the package/<package>/<package>.mk
>> without testing too much, this might break someones
>> stable build, which is undesirable.
>>
>> By introducing "distributions" defined in a separate
>> file containing lines like:
>>
> Sorry to keep saying "No", but "No". If people want to stay with older
> versions, then they should download the source they need and keep it
> with their current buildroot system.
>
> -Steve
>
I think maybe it is worthwhile to explain why I think this is neccessary.
If you are a semiconductor company like Atmel, then you spend time
on creating example applications/rootfs/kernel combinations which
you test extensively.
You are not interested in having other people breaking the build
by forcing the use of a new version of a package which is incompatible
with the rest of the build.
You want to give a few simple instructions that allow people to
get a running system *WITHOUT PHONING IN ASKING QUESTIONS*
Once they get a hang of things, then they should be able to
upgrade to the latest packages easily.
Your suggestions means that either the end customer will get
a buildroot frozen at a certain time, or that the maintenance
effort to keep buildroot up to date has to be duplicated.
To me, buildroot is a mere toy if it does not allow the professional
user some amount of control over the configuration.
Let me give you an example:
Assume that you have VERSION-X.Y.Z of a certain package.
After testing, it is shown that it is broken on the ARM architecture,
but works on the PowerPC.
VERSION-X.Y.W becomes available and works for ARM, but
is broken for the PowerPC.
The current buildroot only supports having one package.
If you do not like the proposed approach, then I think you need
to explain how to solve that specific problem in an acceptable way.
I have seen comments that maybe we should not update mtd
because it is "working". Well, it isn't...
AT45 dataflash support is severly broken, and I expect that
the development in NAND flash could also affect the usability
of the current
According to your proposal, people that wants to keep
the 2005 version then needs to freeze their buildroot
because the svn trunk will not maintain that anymore.
Seen similar comments about udev, which is no longer downloadable.
If your approach stands, then people should not expect to have
the current udev available in the main trunk.
Really, I do not think there is a workable solution to the problem
except allowing each user to select which version they should use.
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [RFC] Support for "distributions" in buildroot
2007-07-20 22:34 ` Ulf Samuelsson
@ 2007-07-21 18:42 ` Thomas Lundquist
2007-07-22 7:08 ` Ulf Samuelsson
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Lundquist @ 2007-07-21 18:42 UTC (permalink / raw)
To: buildroot
On Sat, Jul 21, 2007 at 12:34:36AM +0200, Ulf Samuelsson wrote:
>
> Your suggestions means that either the end customer will get
> a buildroot frozen at a certain time, or that the maintenance
> effort to keep buildroot up to date has to be duplicated.
I believe in frozen snapshots instead of specifying source versions.
The rest of buildroot are also in so much flux that only being able to
specify source package versions is just a small part to the solution.
Patches are added, build system changed and so on.
Thomas.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [RFC] Support for "distributions" in buildroot
2007-07-21 18:42 ` Thomas Lundquist
@ 2007-07-22 7:08 ` Ulf Samuelsson
2007-07-22 14:51 ` Thomas Lundquist
0 siblings, 1 reply; 7+ messages in thread
From: Ulf Samuelsson @ 2007-07-22 7:08 UTC (permalink / raw)
To: buildroot
Subject: Re: [Buildroot] [RFC] Support for "distributions" in buildroot
> On Sat, Jul 21, 2007 at 12:34:36AM +0200, Ulf Samuelsson wrote:
>>
>> Your suggestions means that either the end customer will get
>> a buildroot frozen at a certain time, or that the maintenance
>> effort to keep buildroot up to date has to be duplicated.
>
> I believe in frozen snapshots instead of specifying source versions.
>
"frozen snapshots" is still an alternative, even if the patch is applied.
I see buildroot as a promising tool to allow newbies to get running
with embedded linux, and the goal of most of my efforts are to
reduce the obstacles for the user.
The typical first requirement is to be able to build a first image
which simply works. For this the snapshot is OK.
When the newbie wants to start developing a product
then ideally it is good to use the latest version of packages,
but if that fails, then having a distribution where at least the
packages have been known to cooperate is a good thing.
> The rest of buildroot are also in so much flux that only being able to
> specify source package versions is just a small part to the solution.
>
Rome wasn't built in a day...
> Patches are added, build system changed and so on.
>
The patch system of today, is obviously not good at handling
several versions of the same package.
Instead of just applying "*.patch", I much prefer that the makefile fragment
use a file with a list of patches which should be applied to the tarball.
Each supported package version then only needs its list of files ("series"?).
If a new version with new patches is added, then that needs a separate "series" file.
Adding a new patch for a new version will then not cause a problem,
since the "series" file for the old version is not updated.
Patches can be shared between different versions, something which is not
possible if we use the current method "<package>-$(version)-<name>.patch".
It would also be good if there were a structured way to have some patches
downloaded from internet, instead of the ad-hoc methods used today.
If you want to upgrade your snapshot, then you can easily
rebuild the snapshot using the latest svn , but with original versions.
It will be much much easier to pinpoint the reasons for any flaws
instead of having to start from scratch using all new packages.
The question I posed before:
- What happens if one architecture needs version 'A', and another architecture needs version 'B'?
still remains to be answered.
------------------
Really, Isn't is completely illogical that it is possible for users
to override some package versions (i.e. Linux) but not override the rootfs packages?
If the "latest" package is selected as default, then then the behaviour *after*
the patch is the same as the behaviour *before* the patch, so I fail
to see why there should be *any* objections to the patch.
It is using constructs which are already in use in other parts of buildroot
so I think that is not really valid to claim that it has high complexity.
Just because some people like to do it in a certain way, does not mean
that everyone will want to do it in the same way, so why block other people?
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 7+ messages in thread* [Buildroot] [RFC] Support for "distributions" in buildroot
2007-07-22 7:08 ` Ulf Samuelsson
@ 2007-07-22 14:51 ` Thomas Lundquist
2007-07-22 15:03 ` Ulf Samuelsson
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Lundquist @ 2007-07-22 14:51 UTC (permalink / raw)
To: buildroot
On Sun, Jul 22, 2007 at 09:08:50AM +0200, Ulf Samuelsson wrote:
>
> I see buildroot as a promising tool to allow newbies to get running
> with embedded linux, and the goal of most of my efforts are to
> reduce the obstacles for the user.
I also think this is a nice goal.
> When the newbie wants to start developing a product
> then ideally it is good to use the latest version of packages,
> but if that fails, then having a distribution where at least the
> packages have been known to cooperate is a good thing.
which is where he'd better use the snapshot anyway.
the downside is that it will be an easier path for the user to fork and
work on his own snapshot.
> Instead of just applying "*.patch", I much prefer that the makefile fragment
> use a file with a list of patches which should be applied to the tarball.
>
> Each supported package version then only needs its list of files ("series"?).
> If a new version with new patches is added, then that needs
> a separate "series" file.
I'd rather have a separate patch directory for each version instead of
files. then the user can just drop his own patch in that directory
without having to edit a file that is in svn.
> Adding a new patch for a new version will then not cause a problem,
> since the "series" file for the old version is not updated.
> Patches can be shared between different versions, something which is not
> possible if we use the current method "<package>-$(version)-<name>.patch".
svn handles softlinks..
> It would also be good if there were a structured way to have some patches
> downloaded from internet, instead of the ad-hoc methods used today.
as you already have said, downloading from the internet can be annoying
because the patches or source tarballs can disappear.
> - What happens if one architecture needs version 'A',
> and another architecture needs version 'B'?
it is a good question indeed.
Thomas.
^ permalink raw reply [flat|nested] 7+ messages in thread* [Buildroot] [RFC] Support for "distributions" in buildroot
2007-07-22 14:51 ` Thomas Lundquist
@ 2007-07-22 15:03 ` Ulf Samuelsson
0 siblings, 0 replies; 7+ messages in thread
From: Ulf Samuelsson @ 2007-07-22 15:03 UTC (permalink / raw)
To: buildroot
> On Sun, Jul 22, 2007 at 09:08:50AM +0200, Ulf Samuelsson wrote:
>>
>> I see buildroot as a promising tool to allow newbies to get running
>> with embedded linux, and the goal of most of my efforts are to
>> reduce the obstacles for the user.
>
> I also think this is a nice goal.
>
>> When the newbie wants to start developing a product
>> then ideally it is good to use the latest version of packages,
>> but if that fails, then having a distribution where at least the
>> packages have been known to cooperate is a good thing.
>
> which is where he'd better use the snapshot anyway.
At one stage, it is likely that the user wants to swap from the snapshot
to the current svn.
>
> the downside is that it will be an easier path for the user to fork and
> work on his own snapshot.
>
According to Stephen, forking is a preferred method...
Personally, I want to avoid forking!
>> Instead of just applying "*.patch", I much prefer that the makefile fragment
>> use a file with a list of patches which should be applied to the tarball.
>>
>> Each supported package version then only needs its list of files ("series"?).
>> If a new version with new patches is added, then that needs
>> a separate "series" file.
>
> I'd rather have a separate patch directory for each version instead of
> files. then the user can just drop his own patch in that directory
> without having to edit a file that is in svn.
>
It is not mutually exclusive. I do like having a separate directory as well.
Sometime patches has to be applied in a certain order,
and then you need either to name it in directory order (which I don't like)
or you have a list of patches in the correct order.
>> Adding a new patch for a new version will then not cause a problem,
>> since the "series" file for the old version is not updated.
>> Patches can be shared between different versions, something which is not
>> possible if we use the current method "<package>-$(version)-<name>.patch".
>
> svn handles softlinks..
>
>> It would also be good if there were a structured way to have some patches
>> downloaded from internet, instead of the ad-hoc methods used today.
>
> as you already have said, downloading from the internet can be annoying
> because the patches or source tarballs can disappear.
>
>> - What happens if one architecture needs version 'A',
>> and another architecture needs version 'B'?
>
> it is a good question indeed.
>
>
Which needs to be answered by those not ack'ing the distribution patch!
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-07-22 15:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-20 12:30 [Buildroot] [RFC] Support for "distributions" in buildroot Ulf Samuelsson
2007-07-20 14:04 ` Steven J. Hill
2007-07-20 22:34 ` Ulf Samuelsson
2007-07-21 18:42 ` Thomas Lundquist
2007-07-22 7:08 ` Ulf Samuelsson
2007-07-22 14:51 ` Thomas Lundquist
2007-07-22 15:03 ` Ulf Samuelsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox