Skip to contentSkip to conversation

Subversion package and related patches

PATCH New Thomas Petazzoni 3 participants 7 messages Aug 24, 2013 – Aug 27, 2013

lore
Share & tools
lore
#0 lore raw

cover Subversion package and related patches

Hello,

Here are three patches that add a package for Subversion. I don't need it myself, but it was a submission from Rico Bachmann that had been waiting since quite some time in our patchwork. I took it, tested it and made a few improvements. Some changes in the neon package were needed to make it work properly.

Thanks,

Thomas

Rico Bachmann (1):
subversion: new package

Thomas Petazzoni (2):
neon: replace 'choice' for XML library with two options
neon: factorize 'depends on BR2_PACKAGE_NEON'

 package/Config.in                |  1 +
 package/neon/Config.in           | 31 +++++++++----------------------
 package/rpm/Config.in            |  7 ++-----
 package/subversion/Config.in     | 11 +++++++++++
 package/subversion/subversion.mk | 28 ++++++++++++++++++++++++++++
 5 files changed, 51 insertions(+), 27 deletions(-)
 create mode 100644 package/subversion/Config.in
 create mode 100644 package/subversion/subversion.mk
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/3 neon: replace 'choice' for XML library with two options

The NEON library can either be compiled without XML support, with XML support provided by Expat, or with XML support provided by libxml2. Until now, to represent this, a Kconfig 'choice..endchoice' was used. Unfortunately, another package cannot 'select' one of the possible choices. So for example, a package such as 'rpm', or the to-be-added 'subversion' package could not select their dependencies, they had to do a 'depends on !BR2_PACKAGE_NEON_NOXML', which is not how Buildroot handles library dependencies in general.

So, this commit replaces the 'choice...endchoice' block with simply two configuration options that are mutually exclusive. The option names are not changed, so no Config.in.legacy addition is needed.

The rpm package is updated accordingly.

---
 package/neon/Config.in | 27 +++++++--------------------
 package/rpm/Config.in  |  7 ++-----
 2 files changed, 9 insertions(+), 25 deletions(-)
package/neon/Config.in +7 -20
index f972dbb..3f18665 100644
@@ -19,30 +19,17 @@ config BR2_PACKAGE_NEON_SSL
 	help
 	  build with SSL support
 
-choice
-	prompt "XML Support"
-	depends on BR2_PACKAGE_NEON
-	help
-	  Select which XML library to use...
-	  none       do not build with XML support
-	  expat      use expat
-	  libxml2    use libxml2
-
-config BR2_PACKAGE_NEON_NOXML
-	bool "none"
-	help
-	  none       do not build with XML support
-
 config BR2_PACKAGE_NEON_EXPAT
-	bool "expat"
+	bool "XML support with expat"
 	select BR2_PACKAGE_EXPAT
+	depends on BR2_PACKAGE_NEON
+	depends on !BR2_PACKAGE_NEON_LIBXML2
 	help
-	  expat      use expat, a library for parsing XML.
+	  Enable XML support in neon, using the Expat XML library.
 
 config BR2_PACKAGE_NEON_LIBXML2
-	bool "libxml2"
+	bool "XML support with libxml2"
 	select BR2_PACKAGE_LIBXML2
+	depends on BR2_PACKAGE_NEON
 	help
-	  libxml2    use libxml2, a library to read, modify and
-	             write XML and HTML files.
-endchoice
+	  Enable XML support in neon, using the libxml2 XML library.
package/rpm/Config.in +2 -5
index 14072c9..8faca95 100644
@@ -1,17 +1,14 @@
 comment "rpm requires a toolchain with thread support"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
 
-comment "rpm requires libneon with SSL, XML and ZLIB support"
-	depends on !BR2_PACKAGE_NEON || BR2_PACKAGE_NEON_NOXML && BR2_TOOLCHAIN_HAS_THREADS
-
 config BR2_PACKAGE_RPM
 	bool "rpm"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # beecrypt
 	select BR2_PACKAGE_BEECRYPT
 	select BR2_PACKAGE_POPT
 	select BR2_PACKAGE_OPENSSL
-	depends on BR2_PACKAGE_NEON
-	depends on !BR2_PACKAGE_NEON_NOXML
+	select BR2_PACKAGE_NEON
+	select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2
 	select BR2_PACKAGE_NEON_ZLIB
 	select BR2_PACKAGE_NEON_SSL
 	help
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 1/3 neon: replace 'choice' for XML library with two options

Quoted 38 lines · Thomas Petazzoni

The NEON library can either be compiled without XML support, with XML support provided by Expat, or with XML support provided by libxml2. Until now, to represent this, a Kconfig 'choice..endchoice' was used. Unfortunately, another package cannot 'select' one of the possible choices. So for example, a package such as 'rpm', or the to-be-added 'subversion' package could not select their dependencies, they had to do a 'depends on !BR2_PACKAGE_NEON_NOXML', which is not how Buildroot handles library dependencies in general.

So, this commit replaces the 'choice...endchoice' block with simply two configuration options that are mutually exclusive. The option names are not changed, so no Config.in.legacy addition is needed.

The rpm package is updated accordingly.

---
  package/neon/Config.in | 27 +++++++--------------------
  package/rpm/Config.in  |  7 ++-----
  2 files changed, 9 insertions(+), 25 deletions(-)
package/neon/Config.in +0 -9
index f972dbb..3f18665 100644
@@ -19,30 +19,17 @@ config BR2_PACKAGE_NEON_SSL
  	help
  	  build with SSL support
 
-choice
-	prompt "XML Support"
-	depends on BR2_PACKAGE_NEON
-	help
-	  Select which XML library to use...
-	  none       do not build with XML support
-	  expat      use expat
-	  libxml2    use libxml2
-

package/neon/Config.in config BR2_PACKAGE_NEON_SSL · line 25

Quoted 10 lines
package/neon/Config.in +2 -6
-config BR2_PACKAGE_NEON_NOXML
-	bool "none"
-	help
-	  none       do not build with XML support
-
  config BR2_PACKAGE_NEON_EXPAT
-	bool "expat"
+	bool "XML support with expat"
  	select BR2_PACKAGE_EXPAT
+	depends on BR2_PACKAGE_NEON

Can you use "if ... endif" instead of depends on?

Quoted 26 lines
package/neon/Config.in +5 -5
+	depends on !BR2_PACKAGE_NEON_LIBXML2
  	help
-	  expat      use expat, a library for parsing XML.
+	  Enable XML support in neon, using the Expat XML library.
 
  config BR2_PACKAGE_NEON_LIBXML2
-	bool "libxml2"
+	bool "XML support with libxml2"
  	select BR2_PACKAGE_LIBXML2
+	depends on BR2_PACKAGE_NEON
  	help
-	  libxml2    use libxml2, a library to read, modify and
-	             write XML and HTML files.
-endchoice
+	  Enable XML support in neon, using the libxml2 XML library.
package/rpm/Config.in +0 -3
index 14072c9..8faca95 100644
@@ -1,17 +1,14 @@
  comment "rpm requires a toolchain with thread support"
  	depends on !BR2_TOOLCHAIN_HAS_THREADS
 
-comment "rpm requires libneon with SSL, XML and ZLIB support"
-	depends on !BR2_PACKAGE_NEON || BR2_PACKAGE_NEON_NOXML && BR2_TOOLCHAIN_HAS_THREADS
-

package/rpm/Config.in line 11

Quoted 10 lines
package/rpm/Config.in +2 -2
  config BR2_PACKAGE_RPM
  	bool "rpm"
  	depends on BR2_TOOLCHAIN_HAS_THREADS # beecrypt
  	select BR2_PACKAGE_BEECRYPT
  	select BR2_PACKAGE_POPT
  	select BR2_PACKAGE_OPENSSL
-	depends on BR2_PACKAGE_NEON
-	depends on !BR2_PACKAGE_NEON_NOXML
+	select BR2_PACKAGE_NEON
+	select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2

Maybe it's cleaner to add a hidden symbol to neon:

config BR2_PACKAGE_NEON_XML
bool
select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2

Then in rpm, you only need to select BR2_PACKAGE_NEON_XML

(Since we're going to reuse this pattern in other places as well, I
think it's important to do it right).

Regards,
Arnout

Quoted 4 lines
package/rpm/Config.in +0 -0
  	select BR2_PACKAGE_NEON_ZLIB
  	select BR2_PACKAGE_NEON_SSL
  	help
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH 1/3 neon: replace 'choice' for XML library with two options

Dear Arnout Vandecappelle,

Quoted 7 lines · Arnout Vandecappelle

package/neon/Config.in config BR2_PACKAGE_NEON_SSL · line 25

Quoted 5 lines

config BR2_PACKAGE_NEON_EXPAT

package/neon/Config.in +2 -1
-	bool "expat"
+	bool "XML support with expat"
  	select BR2_PACKAGE_EXPAT
+	depends on BR2_PACKAGE_NEON

Can you use "if ... endif" instead of depends on?

See PATCH 2/3 in the series :)

Quoted 13 lines

package/rpm/Config.in line 11

Quoted 10 lines

config BR2_PACKAGE_RPM
bool "rpm"
depends on BR2_TOOLCHAIN_HAS_THREADS # beecrypt select BR2_PACKAGE_BEECRYPT
select BR2_PACKAGE_POPT
select BR2_PACKAGE_OPENSSL

package/rpm/Config.in +2 -2
-	depends on BR2_PACKAGE_NEON
-	depends on !BR2_PACKAGE_NEON_NOXML
+	select BR2_PACKAGE_NEON
+	select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2

Maybe it's cleaner to add a hidden symbol to neon:

Quoted 5 lines

config BR2_PACKAGE_NEON_XML
bool
select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2

Then in rpm, you only need to select BR2_PACKAGE_NEON_XML

Right, seems like a good idea, I'll try that.

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
#4 lore raw

PATCH 2/3 neon: factorize 'depends on BR2_PACKAGE_NEON'

In reply to Thomas Petazzoni
---
 package/neon/Config.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
package/neon/Config.in +4 -4
index 3f18665..72d9fd7 100644
@@ -5,16 +5,16 @@ config BR2_PACKAGE_NEON
 
 	  http://www.webdav.org/neon/
 
+if BR2_PACKAGE_NEON
+
 config BR2_PACKAGE_NEON_ZLIB
 	bool "ZLIB support"
-	depends on BR2_PACKAGE_NEON
 	select BR2_PACKAGE_ZLIB
 	help
 	  build with ZLIB support
 
 config BR2_PACKAGE_NEON_SSL
 	bool "SSL support"
-	depends on BR2_PACKAGE_NEON
 	select BR2_PACKAGE_OPENSSL
 	help
 	  build with SSL support
@@ -22,7 +22,6 @@ config BR2_PACKAGE_NEON_SSL
 config BR2_PACKAGE_NEON_EXPAT
 	bool "XML support with expat"
 	select BR2_PACKAGE_EXPAT
-	depends on BR2_PACKAGE_NEON
 	depends on !BR2_PACKAGE_NEON_LIBXML2
 	help
 	  Enable XML support in neon, using the Expat XML library.
@@ -30,6 +29,7 @@ config BR2_PACKAGE_NEON_EXPAT
 config BR2_PACKAGE_NEON_LIBXML2
 	bool "XML support with libxml2"
 	select BR2_PACKAGE_LIBXML2
-	depends on BR2_PACKAGE_NEON
 	help
 	  Enable XML support in neon, using the libxml2 XML library.
+
+endif
Signature · 1 line
1.8.1.2
#5 lore raw

PATCH 3/3 subversion: new package

In reply to Thomas Petazzoni

From: Rico Bachmann <[email protected]>

[Thomas: added license informations, fixed dependencies, and several cleanups.]

---
 package/Config.in                |  1 +
 package/subversion/Config.in     | 11 +++++++++++
 package/subversion/subversion.mk | 28 ++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 package/subversion/Config.in
 create mode 100644 package/subversion/subversion.mk
package/Config.in +1 -0
index 2347229..1ac26f7 100644
@@ -97,6 +97,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/sed/Config.in"
 endif
 source "package/sstrip/Config.in"
+source "package/subversion/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/tar/Config.in"
 endif
package/subversion/Config.in new file +11 -0
new file mode 100644
index 0000000..0704ef5
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_SUBVERSION
+	bool "subversion"
+	select BR2_PACKAGE_APR_UTIL
+	# apr really needs shared library support
+	depends on !BR2_PREFER_STATIC_LIB
+	select BR2_PACKAGE_NEON
+	select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2
+	help
+	  Subversion is an open source version control system
+
+	  http://subversion.apache.org/
package/subversion/subversion.mk new file +28 -0
new file mode 100644
index 0000000..de4db7c
@@ -0,0 +1,28 @@
+################################################################################
+#
+# subversion
+#
+################################################################################
+
+SUBVERSION_VERSION = 1.7.9
+SUBVERSION_SITE = http://archive.apache.org/dist/subversion
+SUBVERSION_LICENSE = Apache 2.0
+SUBVERSION_LICENSE_FILES = LICENSE
+
+SUBVERSION_DEPENDENCIES = apr apr-util expat neon zlib
+SUBVERSION_CONF_OPT = \
+	--with-expat=$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/lib: \
+	--with-apr=$(STAGING_DIR)/usr \
+	--with-apr-util=$(STAGING_DIR)/usr \
+	--with-zlib=$(STAGING_DIR)/usr \
+	--with-neon=$(STAGING_DIR)/usr \
+	--without-gssapi \
+	--without-serf \
+	--without-apxs \
+	--without-berkeyley-db \
+	--without-sasl \
+	--without-gnome-keyring \
+	--without-ssl \
+	--without-libmagic
+
+$(eval $(autotools-package))
Signature · 1 line
1.8.1.2
#6 lore raw

cover Subversion package and related patches

In reply to Thomas Petazzoni

Hi Thomas

Quoted 32 lines

-----Urspr?ngliche Nachricht-----
Von: Thomas Petazzoni [mailto:thomas.petazzoni at free-electrons.com]
Gesendet: Samstag, 24. August 2013 13:08
An: Buildroot List
Cc: Rico Bachmann
Betreff: [PATCH 0/3] Subversion package and related patches

Hello,

Here are three patches that add a package for Subversion. I don't need it myself, but it was a submission from Rico Bachmann that had been waiting since quite some time in our patchwork. I took it, tested it and made a few improvements. Some changes in the neon package were needed to make it work properly.

Thanks,

Thomas

Rico Bachmann (1):
subversion: new package

Thomas Petazzoni (2):
neon: replace 'choice' for XML library with two options
neon: factorize 'depends on BR2_PACKAGE_NEON'

 package/Config.in                |  1 +
 package/neon/Config.in           | 31 +++++++++----------------------
 package/rpm/Config.in            |  7 ++-----
 package/subversion/Config.in     | 11 +++++++++++
 package/subversion/subversion.mk | 28 ++++++++++++++++++++++++++++
 5 files changed, 51 insertions(+), 27 deletions(-)  create mode 100644
Quoted 5 lines

package/subversion/Config.in create mode 100644
package/subversion/subversion.mk

--
1.8.1.2

thanks a lot for fixing the subversion package. I could not find the time to finish it.

regards
Rico