Skip to contentSkip to conversation

Git/Svn downloaders

Buildroot In review Maxime Petazzoni 5 participants 29 messages Sep 2, 2010 – Sep 7, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

Now that Buildroot 2010.08 is out (nice work on the release by the way!), I've rebased my patchset for Git and Subversion downloaders on the latest HEAD.

I've also renamed SPIDER_MODE to DL_MODE, which better represents what this variable is for (per Thomas' recommendation).

Regards,
- Maxime

#1 lore raw

PATCH 1/8 Remove the spider feature

In preparation for the re-work of the DOWNLOAD helper to support multiple download methods and protocols, the spider feature used with wget is removed for now until it is re-implemented on top of the new download methods.

---
 Makefile                    |    7 +++----
 package/Makefile.package.in |   10 ----------
 package/mpfr/mpfr.mk        |    2 --
 3 files changed, 3 insertions(+), 16 deletions(-)
Makefile +3 -4
index 462d974..203e26a 100644
@@ -245,7 +245,7 @@ ifeq ($(ARCH),xtensa)
 ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
 endif
 
-WGET:=$(call qstrip,$(BR2_WGET)) $(SPIDER) $(QUIET)
+WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
 SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
 SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
 BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
@@ -438,11 +438,10 @@ endif
 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 _source-check:
-	$(MAKE) $(EXTRAMAKEARGS) SPIDER=--spider source
+	@echo "TODO $@"
 
 external-deps:
-	@$(MAKE) -Bs BR2_WGET=$(TOPDIR)/toolchain/wget-show-external-deps.sh \
-		$(EXTRAMAKEARGS) SPIDER=--spider source
+	@echo "TODO $@"
 
 show-targets:
 	@echo $(TARGETS)
package/Makefile.package.in +0 -10
index d76b791..ba0fd84 100644
@@ -81,16 +81,11 @@ TERM_RESET := $(shell tput rmso)
 # $(call DOWNLOAD,$(FOO_SITE),$(FOO_SOURCE))
 ################################################################################
 
-# support make source-check/external-deps
-ifneq ($(SPIDER),)
-DOWNLOAD=$(WGET) -P $(DL_DIR) $(1)/$(2)
-else
 define DOWNLOAD
 	$(Q)test -e $(DL_DIR)/$(2) || \
 	for site in $(call qstrip,$(BR2_PRIMARY_SITE)) $(1) $(call qstrip,$(BR2_BACKUP_SITE)); \
 	do $(WGET) -P $(DL_DIR) $$site/$(2) && exit; done
 endef
-endif
 
 # Utility programs used to build packages
 TAR ?= tar
@@ -117,19 +112,14 @@ endef
 
 # Retrieve the archive
 $(BUILD_DIR)/%/.stamp_downloaded:
-# support make source-check/external-deps
-ifeq ($(SPIDER),)
 # Only show the download message if it isn't already downloaded
 	$(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \
 		(test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \
 		$(call MESSAGE,"Downloading")
-endif
 	$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_SOURCE))
 	$(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE),$($(PKG)_PATCH)))
-ifeq ($(SPIDER),)
 	$(Q)mkdir -p $(@D)
 	$(Q)touch $@
-endif
 
 # Unpack the archive
 $(BUILD_DIR)/%/.stamp_extracted:
package/mpfr/mpfr.mk +0 -2
index a7834dd..b7b80a5 100644
@@ -21,10 +21,8 @@ MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
 
 $(MPFR_PATCH_SOURCE):
 	$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
-ifeq ($(SPIDER),) # this breaks source-check/external-deps
 	mv $(DL_DIR)/$(MPFR_PATCH) $@
 endif
-endif
 
 $(DL_DIR)/$(MPFR_SOURCE):
 	 $(call DOWNLOAD,$(MPFR_SITE),$(MPFR_SOURCE))
Signature · 1 line
1.6.3.3.346.g8a41d
#2 lore raw

PATCH 2/8 Cleanup the VCS commands configuration

In reply to Maxime Petazzoni

It's not really necessary to differenciate the commands for checking out or updating a repository. Only the path to the binary and eventual top-level flags are useful to configure.

---
 Config.in |   24 ++++++++----------------
 Makefile  |    6 ++----
 2 files changed, 10 insertions(+), 20 deletions(-)
Config.in +8 -16
index 4d7e585..9d01b28 100644
@@ -21,25 +21,17 @@ config BR2_WGET
 	string "Wget command"
 	default "wget --passive-ftp -nd"
 
-config BR2_SVN_CO
-	string "Subversion (svn) command to download source tree"
-	default "svn co"
+config BR2_SVN
+	string "Subversion (svn) command"
+	default "svn"
 
-config BR2_SVN_UP
-	string "Subversion (svn) command to update source tree"
-	default "svn up"
-
-config BR2_BZR_CO
-	string "Bazaar (bzr) command to download source tree"
-	default "bzr co"
-
-config BR2_BZR_UP
-	string "Bazaar (bzr) command to update source tree"
-	default "bzr up"
+config BR2_BZR
+	string "Bazaar (bzr) command"
+	default "bzr"
 
 config BR2_GIT
-	string "Git command to download source tree"
-	default "git clone"
+	string "Git command"
+	default "git"
 
 config BR2_ZCAT
 	string "zcat command"
Makefile +2 -4
index 203e26a..0d3c6d6 100644
@@ -246,10 +246,8 @@ ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
 endif
 
 WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
-SVN_CO:=$(call qstrip,$(BR2_SVN_CO)) $(QUIET)
-SVN_UP:=$(call qstrip,$(BR2_SVN_UP)) $(QUIET)
-BZR_CO:=$(call qstrip,$(BR2_BZR_CO)) $(QUIET)
-BZR_UP:=$(call qstrip,$(BR2_BZR_UP)) $(QUIET)
+SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
+BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
 GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
 ZCAT:=$(call qstrip,$(BR2_ZCAT))
 BZCAT:=$(call qstrip,$(BR2_BZCAT))
Signature · 1 line
1.6.3.3.346.g8a41d
#3 lore raw

PATCH 3/8 Update defconfigs with new VCS config options

In reply to Maxime Petazzoni
---
 configs/arm_toolchain_defconfig           |    5 ++---
 configs/at91rm9200df_defconfig            |    5 ++---
 configs/at91rm9200df_ext_bare_defconfig   |    5 ++---
 configs/at91rm9200df_ext_defconfig        |    5 ++---
 configs/at91sam9260dfc_defconfig          |    5 ++---
 configs/at91sam9260dfc_ext_bare_defconfig |    5 ++---
 configs/at91sam9260dfc_ext_defconfig      |    5 ++---
 configs/at91sam9261ek_defconfig           |    5 ++---
 configs/at91sam9261ek_ext_bare_defconfig  |    5 ++---
 configs/at91sam9261ek_ext_defconfig       |    5 ++---
 configs/at91sam9263ek_defconfig           |    5 ++---
 configs/at91sam9263ek_ext_bare_defconfig  |    5 ++---
 configs/at91sam9263ek_ext_defconfig       |    5 ++---
 configs/at91sam9g20dfc_defconfig          |    5 ++---
 configs/at91sam9g20dfc_ext_bare_defconfig |    5 ++---
 configs/at91sam9g20dfc_ext_defconfig      |    5 ++---
 configs/atngw100-base_defconfig           |    5 ++---
 configs/atngw100_defconfig                |    5 ++---
 configs/atstk1005_defconfig               |    5 ++---
 configs/atstk100x_defconfig               |    5 ++---
 configs/i386_defconfig                    |    5 ++---
 configs/i686_defconfig                    |    5 ++---
 configs/integrator926_defconfig           |    5 ++---
 configs/integrator926_huge_defconfig      |    5 ++---
 configs/kb9202_defconfig                  |    5 ++---
 configs/v100sc2_defconfig                 |    5 ++---
 26 files changed, 52 insertions(+), 78 deletions(-)
configs/arm_toolchain_defconfig +2 -3
index bd6f3e2..632906b 100644
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91rm9200df_defconfig +2 -3
index 727a6ea..b7e1260 100644
@@ -136,9 +136,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91rm9200df_ext_bare_defconfig +2 -3
index fec2c04..20eb6a7 100644
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91rm9200df_ext_defconfig +2 -3
index c73e372..7383a53 100644
@@ -142,9 +142,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9260dfc_defconfig +2 -3
index de002c4..715f070 100644
@@ -149,9 +149,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9260dfc_ext_bare_defconfig +2 -3
index 540eef6..f3c17ed 100644
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9260dfc_ext_defconfig +2 -3
index 91cdedd..6dc741a 100644
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9261ek_defconfig +2 -3
index 0a1fc51..64b50c8 100644
@@ -152,9 +152,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9261ek_ext_bare_defconfig +2 -3
index ab8851f..b83e0a7 100644
@@ -134,9 +134,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9261ek_ext_defconfig +2 -3
index 6ebe9fd..de01e49 100644
@@ -153,9 +153,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9263ek_defconfig +2 -3
index d293108..41795d0 100644
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9263ek_ext_bare_defconfig +2 -3
index 2578b95..40f0fe5 100644
@@ -133,9 +133,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9263ek_ext_defconfig +2 -3
index 843b0fb..f537e9f 100644
@@ -152,9 +152,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9g20dfc_defconfig +2 -3
index a9347a8..0bae9ba 100644
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9g20dfc_ext_bare_defconfig +2 -3
index 49a5124..ab0b725 100644
@@ -131,9 +131,8 @@ BR2_AT91_LINUXPATCH_SITE="http://maxim.org.za/AT91RM9200/2.6"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/at91sam9g20dfc_ext_defconfig +2 -3
index bd96723..aeb8973 100644
@@ -150,9 +150,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-arm/kernel-patches-$(BR2_KER
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/atngw100-base_defconfig +2 -3
index 116f671..0c85ea8 100644
@@ -84,9 +84,8 @@ BR2_TARGET_AVR32_ATNGW100_BASE=y
 # Build options
 #
 BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="zcat"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/atngw100_defconfig +2 -3
index 50c376b..d1c43ba 100644
@@ -69,11 +69,10 @@ BR2_TARGET_AVR32_ATNGW100=y
 # Commands
 #
 BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
+BR2_SVN="svn"
 BR2_BZR_CO="bzr co"
 BR2_BZR_UP="bzr up"
-BR2_GIT="git clone"
+BR2_GIT="git"
 BR2_ZCAT="zcat"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/atstk1005_defconfig +2 -3
index d95b666..16af8ba 100644
@@ -82,9 +82,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-avr32/kernel-patches-$(BR2_K
 # Build options
 #
 BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="zcat"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/atstk100x_defconfig +2 -3
index 3069f6a..8bb771d 100644
@@ -83,9 +83,8 @@ BR2_KERNEL_ARCH_PATCH_DIR="target/device/Atmel/arch-avr32/kernel-patches-$(BR2_K
 # Build options
 #
 BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="zcat"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/i386_defconfig +2 -3
index e30ec3f..fb03076 100644
@@ -85,9 +85,8 @@ BR2_TARGET_I686=y
 # Build options
 #
 BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/i686_defconfig +2 -3
index 916454d..1a657db 100644
@@ -85,9 +85,8 @@ BR2_TARGET_I686=y
 # Build options
 #
 BR2_WGET="wget --passive-ftp"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/integrator926_defconfig +2 -3
index 3d82ba2..0b4c219 100644
@@ -81,9 +81,8 @@ BR2_BOARD_PATH="target/device/ARMLTD/$(BR2_BOARD_NAME)"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/integrator926_huge_defconfig +2 -3
index ca13339..2d5c352 100644
@@ -81,9 +81,8 @@ BR2_BOARD_PATH="target/device/ARMLTD/$(BR2_BOARD_NAME)"
 # Build options
 #
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/kb9202_defconfig +2 -3
index 4f392ab..1e1fcc8 100644
@@ -92,9 +92,8 @@ BR2_TARGET_ARM=y
 #
 BR2_PRIMARY_SITE=""
 BR2_WGET="wget --passive-ftp -nd"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="gzip -d -c"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
configs/v100sc2_defconfig +2 -3
index c82e7d7..8e9f96e 100644
@@ -63,9 +63,8 @@ BR2_TARGET_VALKA_V100SC2=y
 #
 BR2_PRIMARY_SITE=""
 BR2_WGET="wget --passive-ftp --retry-connrefused --waitretry=10"
-BR2_SVN_CO="svn co"
-BR2_SVN_UP="svn up"
-BR2_GIT="git clone"
+BR2_SVN="svn"
+BR2_GIT="git"
 BR2_ZCAT="zcat"
 BR2_BZCAT="bzcat"
 BR2_TAR_OPTIONS=""
Signature · 1 line
1.6.3.3.346.g8a41d
#4 lore raw

PATCH 4/8 Implement basic non-wget download methods

In reply to Maxime Petazzoni

Packages can now be sourced from Git and Subversion repositories. The download method will be autodetected from the URI (git://, svn://, etc). If the repository is accessed through http(s), you can force the download method by setting a _SITE_METHOD variable to either 'git' or 'svn', respectively and without the quotes.

The package's _VERSION variable defines which commit, revision, tag or branch should be checked out. For Git, it can be HEAD, a commit ID, a tag name or branch name (anything that can be checked out with git checkout). For Subversion, it must be a revision number, or HEAD.

---
 package/Makefile.package.in |   68 ++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 64 insertions(+), 4 deletions(-)
package/Makefile.package.in +64 -4
index ba0fd84..5444472 100644
@@ -69,6 +69,35 @@ TERM_BOLD := $(shell tput smso)
 TERM_RESET := $(shell tput rmso)
 
 ################################################################################
+# The DOWNLOAD_{GIT,SVN} helpers are in charge of getting a working copy of
+# the source repository for their corresponding SCM, checking out the requested
+# version / commit / tag, and create an archive out of it.
+################################################################################
+
+define DOWNLOAD_GIT
+	pushd $(DL_DIR) > /dev/null && \
+	$(GIT) clone $($(PKG)_SITE) $($(PKG)_BASE_NAME) && \
+	pushd $($(PKG)_BASE_NAME) > /dev/null && \
+	$(GIT) archive --format=tar --prefix=$($(PKG)_BASE_NAME)/ $($(PKG)_DL_VERSION) | \
+		gzip -c > $(DL_DIR)/$($(PKG)_SOURCE) && \
+	popd > /dev/null && \
+	rm -rf $($(PKG)_DL_DIR) && \
+	popd > /dev/null
+endef
+
+define DOWNLOAD_SVN
+	pushd $(DL_DIR) > /dev/null && \
+	$(SVN) export -r $($(PKG)_DL_VERSION) $($(PKG)_SITE) $($(PKG)_DL_DIR) && \
+	$(TAR) czf $($(PKG)_SOURCE) $($(PKG)_BASE_NAME)/ && \
+	rm -rf $($(PKG)_DL_DIR) && \
+	popd > /dev/null
+endef
+
+define DOWNLOAD_WGET
+	$(WGET) -P $(DL_DIR) $(call qstrip,$(1))/$(2)
+endef
+
+################################################################################
 # DOWNLOAD -- Download helper. Will try to download source from:
 # 1) BR2_PRIMARY_SITE if enabled
 # 2) Download site
@@ -83,8 +112,20 @@ TERM_RESET := $(shell tput rmso)
 
 define DOWNLOAD
 	$(Q)test -e $(DL_DIR)/$(2) || \
-	for site in $(call qstrip,$(BR2_PRIMARY_SITE)) $(1) $(call qstrip,$(BR2_BACKUP_SITE)); \
-	do $(WGET) -P $(DL_DIR) $$site/$(2) && exit; done
+	(if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
+		$(call DOWNLOAD_WGET,$(BR2_PRIMARY_SITE),$(2)) && exit ; \
+	fi ; \
+	if test -n "$(1)" ; then \
+		case "$($(PKG)_SITE_METHOD)" in \
+			git) $(DOWNLOAD_GIT) && exit ;; \
+			svn) $(DOWNLOAD_SVN) && exit ;; \
+			*) $(call DOWNLOAD_WGET,$(1),$(2)) && exit ;; \
+		esac ; \
+	fi ; \
+	if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \
+		$(call DOWNLOAD_WGET,$(BR2_BACKUP_SITE),$(2)) && exit ; \
+	fi ; \
+	exit 1)
 endef
 
 # Utility programs used to build packages
@@ -244,13 +285,23 @@ ifndef $(2)_VERSION
  endif
 endif
 
-$(2)_DIR			=  $$(BUILD_DIR)/$(1)-$$($(2)_VERSION)
+# Keep the package version that may contain forward slashes in the _DL_VERSION
+# variable, then replace all forward slashes ('/') by underscores ('_') to
+# sanitize the package version that is used in paths, directory and file names.
+# Forward slashes may appear in the package's version when pointing to a
+# version control system branch or tag, for example remotes/origin/1_10_stable.
+$(2)_DL_VERSION	= $($(2)_VERSION)
+$(2)_VERSION = $(subst /,_,$($(2)_VERSION))
+
+$(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
+$(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
+$(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
 
 ifndef $(2)_SOURCE
  ifdef $(3)_SOURCE
   $(2)_SOURCE = $($(3)_SOURCE)
  else
-  $(2)_SOURCE			?= $(1)-$$($(2)_VERSION).tar.gz
+  $(2)_SOURCE			?= $$($(2)_BASE_NAME).tar.gz
  endif
 endif
 
@@ -269,6 +320,15 @@ ifndef $(2)_SITE
  endif
 endif
 
+ifndef $(2)_SITE_METHOD
+ ifdef $(3)_SITE_METHOD
+  $(2)_SITE_METHOD = $($(3)_SITE_METHOD)
+ else
+	# Try automatic detection using the scheme part of the URI
+	$(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call qstrip,$($(2)_SITE))))
+ endif
+endif
+
 $(2)_DEPENDENCIES		?=
 $(2)_INSTALL_STAGING		?= NO
 $(2)_INSTALL_TARGET		?= YES
Signature · 1 line
1.6.3.3.346.g8a41d
#5 lore raw

PATCH 4/8 Implement basic non-wget download methods

Quoted 6 lines · Maxime Petazzoni

Packages can now be sourced from Git and Subversion repositories. The download method will be autodetected from the URI (git://, svn://, etc). If the repository is accessed through http(s), you can force the download method by setting a _SITE_METHOD variable to either 'git' or 'svn', respectively and without the quotes.

For the cases where the protocol scheme does not appear in the URI that the user would input (such as private repository access via ssl) -

Will that _SITE_METHOD variable be able to override the autodetection?

Hmm... In case any reader hasn't encountered this private repository access method. . . .

Both git and hg (Mercurial) can use ssl/ssh to identify users with access to a repository. I do not know about svn, never studied or used it that much.
In the case of git, the following is the _only_ way to identify private users:
(Since git does not accept a ssh:// scheme in its command parse.)

The user, in their, ~/.ssh/config file, establishes an identity shortcut, similar to:

# Service user - access to private, access controlled repositories of user hgadm host hguser
user hgadm
hostname hg.minimodding.com
port 22
IdentitiesOnly yes
IdentityFile ~/.ssh/hg.minimod/hgusr_id_rsa

Where the entry for IdentityFile is the path and file name to the user's private key that matches the user's remote public key on file with the repository access control system.

As usee by a person or by a script, the "hguser" appears instead of the scheme and authority fields of the URI.
Hence, there is no scheme for a script to parse and control any "autodetect" process.

The GIT add-on package, Gitolite, does private repository authentication this way;
http://progit.org/book/ch4-8.html

The Mercurial access control package I am working on myself uses a similar authentication process. Other private repository access controls will work in a similar manner due to the structure of operation of remote ssh.

The reader can find additional information on private hg repository access, starting at:
http://hg.minimodding.com/repos/lua/luahg.hg/
Navigate to the /doc directory;
Select the example_install.pdf file;
Click "raw" in the listing header to grab the current pdf file in your pdf viewer; See section 2.2.6 - Client Authority Shortcuts.

Sorry for the handsprings but the project isn't yet completed and published other than as above.

Mike

Quoted 6 lines

The package's _VERSION variable defines which commit, revision, tag or branch should be checked out. For Git, it can be HEAD, a commit ID, a tag name or branch name (anything that can be checked out with git checkout). For Subversion, it must be a revision number, or HEAD.

#6 lore raw

PATCH 4/8 Implement basic non-wget download methods

Quoted 5 lines · On Thu, 2 Sep 2010 07:37:43 -0500 "Michael S. Zick" <[email protected]>…

For the cases where the protocol scheme does not appear in the URI that the user would input (such as private repository access via ssl) -

Will that _SITE_METHOD variable be able to override the autodetection?

Yes :

+ifndef $(2)_SITE_METHOD
+ ifdef $(3)_SITE_METHOD
+ $(2)_SITE_METHOD = $($(3)_SITE_METHOD)
+ else
+ # Try automatic detection using the scheme part of the URI
+ $(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call
qstrip,$($(2)_SITE))))
+ endif
+endif

So, if FOOBAR_SITE_METHOD is already defined, nothing happens. What this thing does is :

1. Define HOST_FOOBAR_SITE_METHOD to FOOBAR_SITE_METHOD if FOOBAR_SITE_METHOD is defined but not HOST_FOOBAR_SITE_METHOD

2. Define (HOST_)FOOBAR_SITE_METHOD to an autodected scheme is (HOST_)FOOBAR_SITE_METHOD is not defined.

So whenever FOOBAR_SITE_METHOD is defined, it will take precedence over the autodetection.

Quoted 5 lines

Both git and hg (Mercurial) can use ssl/ssh to identify users with access to a repository. I do not know about svn, never studied or used it that much. In the case of git, the following is the _only_ way to identify private users: (Since git does not accept a ssh:// scheme in its command parse.)

I must be missing something: I'm using ssh://uclibc.org/home/tpetazzoni/git/buildroot.git as a Git URL to push things to my private Buildroot repository hosted at uclibc.org.

As far as I see, Gitolite introduces per-branch or per-tag permissions, but plain Git already allows per-repository permissions. No ?

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

PATCH 4/8 Implement basic non-wget download methods

Quoted 33 lines · Thomas Petazzoni
Quoted 5 lines · On Thu, 2 Sep 2010 07:37:43 -0500 "Michael S. Zick" <[email protected]>…

For the cases where the protocol scheme does not appear in the URI that the user would input (such as private repository access via ssl) -

Will that _SITE_METHOD variable be able to override the autodetection?

Yes :

package/Makefile.package.in +6 -0
+ifndef $(2)_SITE_METHOD
+ ifdef $(3)_SITE_METHOD
+  $(2)_SITE_METHOD = $($(3)_SITE_METHOD)
+ else
+	# Try automatic detection using the scheme part of the URI
+	$(2)_SITE_METHOD = $(firstword $(subst ://, ,$(call

qstrip,$($(2)_SITE))))
+ endif
+endif

So, if FOOBAR_SITE_METHOD is already defined, nothing happens. What this thing does is :

1. Define HOST_FOOBAR_SITE_METHOD to FOOBAR_SITE_METHOD if FOOBAR_SITE_METHOD is defined but not HOST_FOOBAR_SITE_METHOD

2. Define (HOST_)FOOBAR_SITE_METHOD to an autodected scheme is (HOST_)FOOBAR_SITE_METHOD is not defined.

So whenever FOOBAR_SITE_METHOD is defined, it will take precedence over the autodetection.

Quoted 8 lines
Quoted 5 lines

Both git and hg (Mercurial) can use ssl/ssh to identify users with access to a repository. I do not know about svn, never studied or used it that much. In the case of git, the following is the _only_ way to identify private users: (Since git does not accept a ssh:// scheme in its command parse.)

I must be missing something:

Yup.
Please supply git version number(s).
Any additional patches or local changes / customizations to your git client?

Mike

Quoted 10 lines

I'm using
ssh://uclibc.org/home/tpetazzoni/git/buildroot.git as a Git URL to push things to my private Buildroot repository hosted at uclibc.org.

As far as I see, Gitolite introduces per-branch or per-tag permissions, but plain Git already allows per-repository permissions. No ?

Regards,

Thomas

#8 lore raw

[Buildroot] About Git through SSH

Hello,

Quoted 2 lines · On Fri, 3 Sep 2010 07:30:54 -0500 "Michael S. Zick" <[email protected]>…

Yup.
Please supply git version number(s).

Just the normal Git from the latest Ubuntu, i.e:

$ git --version
git version 1.7.0.4
Quoted 2 lines

Any additional patches or local changes / customizations to your git client?

No, nothing. I think as soon as your user has write access to the remote location through SSH, git just works.

Quoted 3 lines · as I
Quoted 3 lines

As far as I see, Gitolite introduces per-branch or per-tag permissions, but plain Git already allows per-repository permissions. No ?

Maybe that's what you're looking for and which is not supported by standard git.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

[Buildroot] About Git through SSH

Quoted 5 lines · Thomas Petazzoni

Hello,

On Fri, 3 Sep 2010 07:30:54 -0500
"Michael S. Zick" <[email protected]> wrote:

Quoted 8 lines
Quoted 2 lines

Yup.
Please supply git version number(s).

Just the normal Git from the latest Ubuntu, i.e:

$ git --version
git version 1.7.0.4

Ah, so, there is the difference - Apples and Oranges

I support users back to the oldest, commonly used, git versions - Where I define that as the version in the current Debian stable release.

So the commentary in the gitolite release still applies to older git versions.
http://packages.debian.org/lenny/git-core

Somewhere between v1.5 and v1.7 they must have added parsing "ssh://" to the git client.

You might want to add a comment in the "Minimum Software Requirements" of Buildroot, to go along with the addition of the user specified scheme feature for the case of
"git xxx ssh://..."
style URIs

Might cut down on the end-user puzzlement of: "Why doesn't this work for me?"

Note: I think the change happened at v1.6 but I haven't checked to be certain.

Mike

Quoted 18 lines
Quoted 2 lines

Any additional patches or local changes / customizations to your git client?

No, nothing. I think as soon as your user has write access to the remote location through SSH, git just works.

Quoted 3 lines · as I
Quoted 3 lines

As far as I see, Gitolite introduces per-branch or per-tag permissions, but plain Git already allows per-repository permissions. No ?

Maybe that's what you're looking for and which is not supported by standard git.

Regards,

Thomas

#10 lore raw

[Buildroot] About Git through SSH

Quoted 15 lines · On Fri, 3 Sep 2010 09:37:29 -0500 "Michael S. Zick" <[email protected]>…

I support users back to the oldest, commonly used, git versions - Where I define that as the version in the current Debian stable release.

So the commentary in the gitolite release still applies to older git versions. http://packages.debian.org/lenny/git-core

Somewhere between v1.5 and v1.7 they must have added parsing "ssh://" to the git client.

You might want to add a comment in the "Minimum Software Requirements" of Buildroot, to go along with the addition of the user specified scheme feature for the case of "git xxx ssh://..." style URIs

Quoted 5 lines

Might cut down on the end-user puzzlement of: "Why doesn't this work for me?"

Note: I think the change happened at v1.6 but I haven't checked to be certain.

In Buildroot, I think only publicly-available Git trees will be used as the source URL for packages, and such trees usually use the git:// or
http:// schemes rather than ssh://, which is usually used for a private, read-write access to a repo.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#11 lore raw

[Buildroot] About Git through SSH

Quoted 21 lines · Thomas Petazzoni
Quoted 18 lines · On Fri, 3 Sep 2010 09:37:29 -0500 "Michael S. Zick" <[email protected]>…

I support users back to the oldest, commonly used, git versions - Where I define that as the version in the current Debian stable release.

So the commentary in the gitolite release still applies to older git versions. http://packages.debian.org/lenny/git-core

Somewhere between v1.5 and v1.7 they must have added parsing "ssh://" to the git client.

You might want to add a comment in the "Minimum Software Requirements" of Buildroot, to go along with the addition of the user specified scheme feature for the case of "git xxx ssh://..." style URIs

Might cut down on the end-user puzzlement of: "Why doesn't this work for me?"

Quoted 8 lines
Quoted 2 lines

Note: I think the change happened at v1.6 but I haven't checked to be certain.

In Buildroot, I think only publicly-available Git trees will be used as the source URL for packages, and such trees usually use the git:// or
http:// schemes rather than ssh://, which is usually used for a private, read-write access to a repo.

I only suggested that you add a comment to the software requirements for using the new end-user specified repository field in the case of git.

Mike

Quoted 3 lines

Regards,

Thomas

#12 lore raw

[Buildroot] About Git through SSH

In reply to Thomas Petazzoni
Quoted 8 lines

-----Original Message-----
From: buildroot-bounces at busybox.net [mailto:buildroot- bounces at busybox.net] On Behalf Of Thomas Petazzoni
Sent: Saturday, 4 September 2010 1:03 AM
To: buildroot at busybox.net
Subject: Re: [Buildroot] About Git through SSH

Quoted 1 line
Quoted 7 lines
Quoted 5 lines

Might cut down on the end-user puzzlement of: "Why doesn't this work for me?"

Note: I think the change happened at v1.6 but I haven't checked to be certain.

In Buildroot, I think only publicly-available Git trees will be used as

the source

Quoted 2 lines

URL for packages, and such trees usually use the git:// or http:// schemes rather than ssh://, which is usually used for a private, read-write access

to a

Quoted 1 line

repo.

Well I'm already using buildroot with a private git tree, but I don't use ssh.

By the way, why does the source get converted to a tar.gz after the git tree is cloned? It's quite annoying because to rebuild the package you have to delete the tar.gz file as well as the build directory to force downloading of the latest source.

Paul.

#13 lore raw

[Buildroot] About Git through SSH

Quoted 4 lines · On Sat, 4 Sep 2010 11:25:15 +1000 "Paul Jones" <[email protected]> wrote:

By the way, why does the source get converted to a tar.gz after the git tree is cloned? It's quite annoying because to rebuild the package you have to delete the tar.gz file as well as the build directory to force downloading of the latest source.

I agree that this is not optimal, but this is the solution that best follows the way Buildroot works currently. If we don't do this, where should Buildroot do the clone ? In the $(BUILD_DIR) which gets deleted by make clean ? Or in $(DL_DIR) in a directory form and then we need to do a "cp" to the $(BUILD_DIR) when doing the build ?

In a second step, it'd be nice to be able to tell Buildroot that for this or that package, instead of being responsible for downloading/extracting it, it should just grab it from a given location. This is, IMHO, a change needed to make Buildroot more usable during the development phase, but it needs quite a bit of reflection and discussion.

Cheers,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw

[Buildroot] About Git through SSH

Quoted 10 lines

-----Original Message-----
From: buildroot-bounces at busybox.net [mailto:buildroot- bounces at busybox.net] On Behalf Of Thomas Petazzoni
Sent: Sunday, 5 September 2010 2:59 AM
To: buildroot at busybox.net
Subject: Re: [Buildroot] About Git through SSH

On Sat, 4 Sep 2010 11:25:15 +1000
"Paul Jones" <[email protected]> wrote:

Quoted 6 lines
Quoted 4 lines

By the way, why does the source get converted to a tar.gz after the git tree is cloned? It's quite annoying because to rebuild the package you have to delete the tar.gz file as well as the build directory to force downloading of the latest source.

I agree that this is not optimal, but this is the solution that best

follows the

Quoted 1 line

way Buildroot works currently. If we don't do this, where should Buildroot

do

Quoted 3 lines

the clone ? In the $(BUILD_DIR) which gets deleted by make clean ? Or in $(DL_DIR) in a directory form and then we need to do a "cp" to the $(BUILD_DIR) when doing the build ?

I was just thinking clone it to $(BUILD_DIR), but on further thought I can imagine that also would be annoying if your source was rather large. Perhaps we could put an option in the makefile to force a clone everytime the package is rebuilt?

Quoted 1 line

In a second step, it'd be nice to be able to tell Buildroot that for this

or that

Quoted 1 line

package, instead of being responsible for downloading/extracting it, it

should

Quoted 3 lines

just grab it from a given location. This is, IMHO, a change needed to make Buildroot more usable during the development phase, but it needs quite a bit of reflection and discussion.

That would be great.

#15 lore raw

[Buildroot] About Git through SSH

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 15 lines · Paul Jones
Quoted 15 lines

-----Original Message-----
From: buildroot-bounces at busybox.net [mailto:buildroot- bounces at busybox.net] On Behalf Of Thomas Petazzoni
Sent: Sunday, 5 September 2010 2:59 AM
To: buildroot at busybox.net
Subject: Re: [Buildroot] About Git through SSH

Quoted 4 lines · On Sat, 4 Sep 2010 11:25:15 +1000 "Paul Jones" <[email protected]> wrote:

By the way, why does the source get converted to a tar.gz after the git tree is cloned? It's quite annoying because to rebuild the package you have to delete the tar.gz file as well as the build directory to force downloading of the latest source.

Quoted 7 lines
Quoted 1 line

I agree that this is not optimal, but this is the solution that best

follows the

Quoted 1 line

way Buildroot works currently. If we don't do this, where should Buildroot

do

Quoted 3 lines

the clone ? In the $(BUILD_DIR) which gets deleted by make clean ? Or in $(DL_DIR) in a directory form and then we need to do a "cp" to the $(BUILD_DIR) when doing the build ?

I believe git should clone into the DL_DIR once, and only once (unless of course you delete it from DL_DIR.) I say this because it is source regardless of the particular tool used to keep track of it. Then, just soft link to it's location in the DL_DIR from the build dir. (see also below)

Quoted 5 lines

I was just thinking clone it to $(BUILD_DIR), but on further thought I can imagine that also would be annoying if your source was rather large. Perhaps we could put an option in the makefile to force a clone everytime the package is rebuilt?

Why would you want to do that? You wouldn't keep downloading a tarball once it is downloaded. Once you've cloned a repository you don't need to do it again unless you really screw things up. What would be nice in my opinion is if there was an option for which commit to use with one option being "latest" which would 'git pull' first to build the latest version.

Quoted 9 lines
Quoted 2 lines

In a second step, it'd be nice to be able to tell Buildroot that for this

or that

Quoted 1 line

package, instead of being responsible for downloading/extracting it, it

should

Quoted 3 lines

just grab it from a given location. This is, IMHO, a change needed to make Buildroot more usable during the development phase, but it needs quite a bit of reflection and discussion.

Quoted 7 lines

That would be great.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMgwjaAAoJECSpOhdQESq6xEUH+waOsX/nWQcTTAZZZ94PPSaq EfLvodE0O+JCSAZ1rsXsjZmOBfgtGk6eE/peK+z9+5ZmG3QHGJ4yWq5nD3jFwPAG Kasrz/8qTefXDYe2RbpgwX9yBOoUWnB4ZKMaXvRHyf+VCbXS3dUj0W8XTSmEuEcf HEiSJ80MjUusO60uZ+0ojf9pZquWAWf5qi/qgdfmqT7T56BRDWabnoIpdFpUJXBl J9mDSBNmHklYYU5P85QCMrPEHeuQ5wo9z0D08U0w998icg54rIX/gDPOUh5KmEYA ZgPqhpmFh/K5QvDeIvN8tIN+jvIzEUSa9rzO4O8neI/CLV4+rgDVOehkPRLeuTE= =g/uI
-----END PGP SIGNATURE-----

#16 lore raw

[Buildroot] About Git through SSH

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/04/2010 11:05 PM, James J. Dines wrote:
<snip>

Quoted 7 lines

I believe git should clone into the DL_DIR once, and only once (unless of course you delete it from DL_DIR.) I say this because it is source regardless of the particular tool used to keep track of it. Then, just soft link to it's location in the DL_DIR from the build dir. (see also below)

Sorry for the reply to my own post. I forgot to mention that if buildroot does softlink to the git repository the clean needs to be careful not to delete it. If that is too much trouble then a cp of the tree in its current state to build dir could be done. In order to avoid copying the whole repository and wasting space the .git dir in the cloned tree should not be copied of course :-)

Anyway, I'm just brainstorming here. Hopefully it helps, but apologies if not!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMgwp/AAoJECSpOhdQESq6oIYH/iB/V6BvG0zf3P5vW5KHP1u1 MhX1rf5KvT3c5IoVEZxjaAfZo46mDHtmmrxCO2zwufYXhpCXZLeCNuhRfrpBRmqf my1RC0kj5voSVj9le99UXty8/epCN30T8s4engBlu837mYZb+BkcqkTBUpgoSaJk dHs3jM0hq9JmIanKgAFK4WBzawLmHPxRhtBz8amUsqotgRNLslF12Sda9cdPrXgE mLWEX3+lEbVATSu1MpH0I3+KzQVy0ZsGg1Q7hPH590+T56Gjxy6e8vr+u6AAKlTQ eDjLcsgMupqCZEQ3VZ2/9338o0rAUOWKz0t79jZ3Z3tHZps56RE7anjOe2CvObc= =ZpuI
-----END PGP SIGNATURE-----

#17 lore raw

PATCH 5/8 Use the normal download method for Tremor

In reply to Maxime Petazzoni

Now that the generic download method supports Subversion, fall back to the normal usage of AUTOTARGETS for Tremor.

---
 package/multimedia/tremor/tremor.mk |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
package/multimedia/tremor/tremor.mk +2 -10
index 74fd725..654a403 100644
@@ -5,19 +5,11 @@
 ############################################################
 
 TREMOR_SITE:=http://svn.xiph.org/trunk/Tremor/
+TREMOR_SITE_METHOD:=svn
 TREMOR_VERSION:=16259
-TREMOR_SVNDIR = Tremor-svn-r$(TREMOR_VERSION)
-TREMOR_SOURCE:= $(TREMOR_SVNDIR).tar.bz2
+
 TREMOR_AUTORECONF = YES
 TREMOR_INSTALL_STAGING = YES
 TREMOR_INSTALL_TARGET = YES
 
-$(DL_DIR)/$(TREMOR_SOURCE):
-	$(SVN_CO) -r $(TREMOR_VERSION) $(TREMOR_SITE) $(BUILD_DIR)/$(TREMOR_SVNDIR)
-	tar -cv -C $(BUILD_DIR) $(TREMOR_SVNDIR) | bzip2 - -c > $@
-	rm -rf $(BUILD_DIR)/$(TREMOR_SVNDIR)
-
-# use custom download step
-TREMOR_TARGET_SOURCE := $(DL_DIR)/$(TREMOR_SOURCE)
-
 $(eval $(call AUTOTARGETS,package/multimedia,tremor))
Signature · 1 line
1.6.3.3.346.g8a41d
#18 lore raw

PATCH 6/8 Use the normal download method for libsvgtiny

In reply to Maxime Petazzoni

Now that the generic download method supports Subversion, fall back to the normal usage of AUTOTARGETS for libsvgtiny.

---
 package/libsvgtiny/libsvgtiny.mk |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
package/libsvgtiny/libsvgtiny.mk +1 -10
index b559e52..d9ac41b 100644
@@ -6,20 +6,11 @@
 
 LIBSVGTINY_SITE = svn://svn.netsurf-browser.org/trunk/libsvgtiny
 LIBSVGTINY_VERSION = 9800
-LIBSVGTINY_SVNDIR = libsvgtiny-svn-r$(LIBSVGTINY_VERSION)
-LIBSVGTINY_SOURCE = $(LIBSVGTINY_SVNDIR).tar.bz2
+
 LIBSVGTINY_INSTALL_STAGING = YES
 LIBSVGTINY_INSTALL_TARGET = YES
 LIBSVGTINY_DEPENDENCIES = libxml2 host-gperf host-pkg-config
 
-$(DL_DIR)/$(LIBSVGTINY_SOURCE):
-	$(SVN_CO) -r $(LIBSVGTINY_VERSION) $(LIBSVGTINY_SITE) $(BUILD_DIR)/$(LIBSVGTINY_SVNDIR)
-	tar -cv -C $(BUILD_DIR) $(LIBSVGTINY_SVNDIR) | bzip2 - -c > $@
-	rm -rf $(BUILD_DIR)/$(LIBSVGTINY_SVNDIR)
-
-# use custom download step
-LIBSVGTINY_TARGET_SOURCE := $(DL_DIR)/$(LIBSVGTINY_SOURCE)
-
 define LIBSVGTINY_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr
 endef
Signature · 1 line
1.6.3.3.346.g8a41d
#19 lore raw

PATCH 7/8 Re-implement the source-check and external-deps targets

In reply to Maxime Petazzoni

The new DL_MODE variable dispatches between the various download implementations of each method (Git, Subversion, Wget) to deal with the normal download (default mode, 'DOWNLOAD'), the source-check ('SOURCE_CHECK') and to show the external dependencies for external-deps ('SHOW_EXTERNAL_DEPS').

For the latter, the legacy script wget-show-external-deps.sh is no longer required as $(WGET) isn't called directly anymore but always through the DOWNLOAD helper.

---
 Makefile                             |   13 +----
 package/Makefile.package.in          |   86 ++++++++++++++++++++++++++++-----
 package/mpfr/mpfr.mk                 |    2 +
 toolchain/wget-show-external-deps.sh |    6 --
 4 files changed, 77 insertions(+), 30 deletions(-)
 delete mode 100755 toolchain/wget-show-external-deps.sh
Makefile +2 -11
index 0d3c6d6..f243a4a 100644
@@ -245,19 +245,10 @@ ifeq ($(ARCH),xtensa)
 ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
 endif
 
-WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
-SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
-BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
 ZCAT:=$(call qstrip,$(BR2_ZCAT))
 BZCAT:=$(call qstrip,$(BR2_BZCAT))
 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
 STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
@@ -436,10 +427,10 @@ endif
 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 _source-check:
-	@echo "TODO $@"
+	$(MAKE) DL_MODE=SOURCE_CHECK source
 
 external-deps:
-	@echo "TODO $@"
+	@$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS source
 
 show-targets:
 	@echo $(TARGETS)
package/Makefile.package.in +73 -13

143 lines not on this page · raw message

package/mpfr/mpfr.mk +2 -0
index b7b80a5..f0d08ea 100644
@@ -21,8 +21,10 @@ MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
 
 $(MPFR_PATCH_SOURCE):
 	$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
+ifeq ($(SPIDER_MODE),DOWNLOAD)
 	mv $(DL_DIR)/$(MPFR_PATCH) $@
 endif
+endif
 
 $(DL_DIR)/$(MPFR_SOURCE):
 	 $(call DOWNLOAD,$(MPFR_SITE),$(MPFR_SOURCE))
toolchain/wget-show-external-deps.sh deleted +0 -6
deleted file mode 100755
index 20071c0..0000000
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# replacement for wget (see BR2_WGET) which simply shows the file name to be
-# downloaded. Used by the external-deps make target.
-
-exec basename ${!#}
\ No newline at end of file
Signature · 1 line
1.6.3.3.346.g8a41d
#20 lore raw

[Buildroot] Missed a bug

I let a bug through in this patch, I forgot to rename SPIDER_MODE to DL_MODE in mpfr.mk. Here's the updated 7th patch.

- Maxime

#21 lore raw

PATCH 7/8 Re-implement the source-check and external-deps targets

In reply to Maxime Petazzoni

The new DL_MODE variable dispatches between the various download implementations of each method (Git, Subversion, Wget) to deal with the normal download (default mode, 'DOWNLOAD'), the source-check ('SOURCE_CHECK') and to show the external dependencies for external-deps ('SHOW_EXTERNAL_DEPS').

For the latter, the legacy script wget-show-external-deps.sh is no longer required as $(WGET) isn't called directly anymore but always through the DOWNLOAD helper.

---
 Makefile                             |   13 +----
 package/Makefile.package.in          |   86 ++++++++++++++++++++++++++++-----
 package/mpfr/mpfr.mk                 |    2 +
 toolchain/wget-show-external-deps.sh |    6 --
 4 files changed, 77 insertions(+), 30 deletions(-)
 delete mode 100755 toolchain/wget-show-external-deps.sh
Makefile +2 -11
index 0d3c6d6..f243a4a 100644
@@ -245,19 +245,10 @@ ifeq ($(ARCH),xtensa)
 ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
 endif
 
-WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
-SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
-BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
 ZCAT:=$(call qstrip,$(BR2_ZCAT))
 BZCAT:=$(call qstrip,$(BR2_BZCAT))
 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
 STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
@@ -436,10 +427,10 @@ endif
 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 _source-check:
-	@echo "TODO $@"
+	$(MAKE) DL_MODE=SOURCE_CHECK source
 
 external-deps:
-	@echo "TODO $@"
+	@$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS source
 
 show-targets:
 	@echo $(TARGETS)
package/Makefile.package.in +73 -13

143 lines not on this page · raw message

package/mpfr/mpfr.mk +2 -0
index b7b80a5..6979a9f 100644
@@ -21,8 +21,10 @@ MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
 
 $(MPFR_PATCH_SOURCE):
 	$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
+ifeq ($(DL_MODE),DOWNLOAD)
 	mv $(DL_DIR)/$(MPFR_PATCH) $@
 endif
+endif
 
 $(DL_DIR)/$(MPFR_SOURCE):
 	 $(call DOWNLOAD,$(MPFR_SITE),$(MPFR_SOURCE))
toolchain/wget-show-external-deps.sh deleted +0 -6
deleted file mode 100755
index 20071c0..0000000
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# replacement for wget (see BR2_WGET) which simply shows the file name to be
-# downloaded. Used by the external-deps make target.
-
-exec basename ${!#}
\ No newline at end of file
Signature · 1 line
1.6.3.3.346.g8a41d
#22 lore raw

PATCH 7/8 Re-implement the source-check and external-deps targets

In reply to Maxime Petazzoni

Hello,

Makefile endif · line 430

Quoted 1 line
Makefile +1 -0
+	$(MAKE) DL_MODE=SOURCE_CHECK source

You lost $(EXTRAMAKEARGS) here.

Makefile endif · line 433

Quoted 1 line
Makefile +1 -0
+	@$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS source

and here.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#23 lore raw

PATCH 7/8 Re-implement the source-check and external-deps targets

The new DL_MODE variable dispatches between the various download implementations of each method (Git, Subversion, Wget) to deal with the normal download (default mode, 'DOWNLOAD'), the source-check ('SOURCE_CHECK') and to show the external dependencies for external-deps ('SHOW_EXTERNAL_DEPS').

For the latter, the legacy script wget-show-external-deps.sh is no longer required as $(WGET) isn't called directly anymore but always through the DOWNLOAD helper.

---
 Makefile                             |   13 +----
 package/Makefile.package.in          |   86 ++++++++++++++++++++++++++++-----
 package/mpfr/mpfr.mk                 |    2 +
 toolchain/wget-show-external-deps.sh |    6 --
 4 files changed, 77 insertions(+), 30 deletions(-)
 delete mode 100755 toolchain/wget-show-external-deps.sh
Makefile +2 -11
index 0d3c6d6..ef1057b 100644
@@ -245,19 +245,10 @@ ifeq ($(ARCH),xtensa)
 ARCH:=$(ARCH)_$(call qstrip,$(BR2_xtensa_core_name))
 endif
 
-WGET:=$(call qstrip,$(BR2_WGET)) $(QUIET)
-SVN:=$(call qstrip,$(BR2_SVN)) $(QUIET)
-BZR:=$(call qstrip,$(BR2_BZR)) $(QUIET)
-GIT:=$(call qstrip,$(BR2_GIT)) $(QUIET)
 ZCAT:=$(call qstrip,$(BR2_ZCAT))
 BZCAT:=$(call qstrip,$(BR2_BZCAT))
 TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf
 
-DL_DIR=$(call qstrip,$(BR2_DL_DIR))
-ifeq ($(DL_DIR),)
-DL_DIR:=$(TOPDIR)/dl
-endif
-
 GNU_TARGET_SUFFIX:=-$(call qstrip,$(BR2_GNU_TARGET_SUFFIX))
 
 STAGING_DIR:=$(call qstrip,$(BR2_STAGING_DIR))
@@ -436,10 +427,10 @@ endif
 source: $(TARGETS_SOURCE) $(HOST_SOURCE)
 
 _source-check:
-	@echo "TODO $@"
+	$(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
 
 external-deps:
-	@echo "TODO $@"
+	@$(MAKE) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source
 
 show-targets:
 	@echo $(TARGETS)
package/Makefile.package.in +73 -13

143 lines not on this page · raw message

package/mpfr/mpfr.mk +2 -0
index b7b80a5..6979a9f 100644
@@ -21,8 +21,10 @@ MPFR_PATCH_SOURCE:=$(DL_DIR)/$(MPFR_PATCH_FILE)
 
 $(MPFR_PATCH_SOURCE):
 	$(call DOWNLOAD,$(MPFR_SITE),$(MPFR_PATCH))
+ifeq ($(DL_MODE),DOWNLOAD)
 	mv $(DL_DIR)/$(MPFR_PATCH) $@
 endif
+endif
 
 $(DL_DIR)/$(MPFR_SOURCE):
 	 $(call DOWNLOAD,$(MPFR_SITE),$(MPFR_SOURCE))
toolchain/wget-show-external-deps.sh deleted +0 -6
deleted file mode 100755
index 20071c0..0000000
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# replacement for wget (see BR2_WGET) which simply shows the file name to be
-# downloaded. Used by the external-deps make target.
-
-exec basename ${!#}
\ No newline at end of file
Signature · 1 line
1.6.3.3.346.g8a41d
#24 lore raw

PATCH 8/8 Revert "Makefile.package.in: allow packages to override download step"

In reply to Maxime Petazzoni

This reverts commit 48cf66f1a2e2c501abeee98b7a2268b0d6d2010d.

---
 package/Makefile.package.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/Makefile.package.in +1 -1
index 6f584a7..58b417b 100644
@@ -402,7 +402,7 @@ $(2)_TARGET_BUILD =		$$($(2)_DIR)/.stamp_built
 $(2)_TARGET_CONFIGURE =		$$($(2)_DIR)/.stamp_configured
 $(2)_TARGET_PATCH =		$$($(2)_DIR)/.stamp_patched
 $(2)_TARGET_EXTRACT =		$$($(2)_DIR)/.stamp_extracted
-$(2)_TARGET_SOURCE ?=		$$($(2)_DIR)/.stamp_downloaded
+$(2)_TARGET_SOURCE =		$$($(2)_DIR)/.stamp_downloaded
 $(2)_TARGET_UNINSTALL =		$$($(2)_DIR)/.stamp_uninstalled
 $(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
Signature · 1 line
1.6.3.3.346.g8a41d
#25 lore raw

PATCH 8/8 Revert "Makefile.package.in: allow packages to override download step"

Quoted 1 line · On Thu, 2 Sep 2010 12:09:51 +0200 Maxime Petazzoni…

This reverts commit 48cf66f1a2e2c501abeee98b7a2268b0d6d2010d.

Please resend with your SoB line. Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#26 lore raw

PATCH 8/8 Revert "Makefile.package.in: allow packages to override download step"

This reverts commit 48cf66f1a2e2c501abeee98b7a2268b0d6d2010d.

---
 package/Makefile.package.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/Makefile.package.in +1 -1
index 6f584a7..58b417b 100644
@@ -402,7 +402,7 @@ $(2)_TARGET_BUILD =		$$($(2)_DIR)/.stamp_built
 $(2)_TARGET_CONFIGURE =		$$($(2)_DIR)/.stamp_configured
 $(2)_TARGET_PATCH =		$$($(2)_DIR)/.stamp_patched
 $(2)_TARGET_EXTRACT =		$$($(2)_DIR)/.stamp_extracted
-$(2)_TARGET_SOURCE ?=		$$($(2)_DIR)/.stamp_downloaded
+$(2)_TARGET_SOURCE =		$$($(2)_DIR)/.stamp_downloaded
 $(2)_TARGET_UNINSTALL =		$$($(2)_DIR)/.stamp_uninstalled
 $(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
Signature · 1 line
1.6.3.3.346.g8a41d
#27 lore raw
In reply to Maxime Petazzoni

Hello,

Quoted 6 lines · On Thu, 2 Sep 2010 12:09:43 +0200 Maxime Petazzoni…

Now that Buildroot 2010.08 is out (nice work on the release by the way!), I've rebased my patchset for Git and Subversion downloaders on the latest HEAD.

I've also renamed SPIDER_MODE to DL_MODE, which better represents what this variable is for (per Thomas' recommendation).

FWIW, I've pushed this patch set at:

http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=for-2010.11/download-rework

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#28 lore raw
Quoted 3 lines · Thomas Petazzoni

FWIW, I've pushed this patch set at:

http://git.buildroot.net/~tpetazzoni/git/buildroot/log/?h=for-2010.11/download-rework

Thanks!

- Maxime

Signature · 10 lines
Maxime Petazzoni <http://www.bulix.org>
 ``One by one, the penguins took away my sanity.''
Linux kernel and software developer at MontaVista Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100907/4ed0ccff/attachment.pgp>