Skip to contentSkip to conversation

Postgresql: Enable staging install for packages that need it to build

PATCH New Nathaniel Roach 2 participants 4 messages Jul 28, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Postgresql: Enable staging install for packages that need it to build

---
 package/postgresql/postgresql.mk | 2 ++
 1 file changed, 2 insertions(+)
package/postgresql/postgresql.mk +2 -0
index b331737..0fecbc7 100644
@@ -10,6 +10,8 @@ POSTGRESQL_SITE = http://ftp.postgresql.org/pub/source/v$(POSTGRESQL_VERSION)
 POSTGRESQL_LICENSE = PostgreSQL
 POSTGRESQL_LICENSE_FILES = COPYRIGHT
 
+POSTGRESQL_INSTALL_STAGING = YES
+
 ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 	POSTGRESQL_CONF_OPT += --disable-thread-safety
 endif
Signature · 1 line
2.0.1
#1 lore raw

PATCH 2/2 bandwidthd: new package

---
 package/Config.in                |  1 +
 package/bandwidthd/Config.in     | 39 +++++++++++++++++++++++++++++++++++++++
 package/bandwidthd/bandwidthd.mk | 25 +++++++++++++++++++++++++
 3 files changed, 65 insertions(+)
 create mode 100644 package/bandwidthd/Config.in
 create mode 100644 package/bandwidthd/bandwidthd.mk
package/Config.in +1 -0
index 559b895..04d666e 100644
@@ -937,6 +937,7 @@ menu "Networking applications"
 	source "package/autossh/Config.in"
 	source "package/avahi/Config.in"
 	source "package/axel/Config.in"
+	source "package/bandwidthd/Config.in"
 	source "package/bcusdk/Config.in"
 	source "package/bind/Config.in"
 	source "package/bluez_utils/Config.in"
package/bandwidthd/Config.in new file +39 -0
new file mode 100644
index 0000000..7305060
@@ -0,0 +1,39 @@
+config BR2_PACKAGE_BANDWIDTHD
+	bool "bandwidthd"
+	depends on BR2_USE_MMU # fork()
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_LIBPCAP
+	select BR2_PACKAGE_GD
+	help
+	  BandwidthD - Bandwidth monitoring
+
+	  Provides a method to measure the bandwidth that travels through the
+	  machine, grouped by subnet and IP. This information can be stored
+	  locally in /var/lib/bandwidthd and can be configured to generate
+	  static HTML pages which can be hosted by a web server.
+
+	  It is highly recommended that the target has some way of retaining the
+	  time between reboots. (e.g. NTP on boot or an RTC)
+	  
+	  It is suggested to install sqlite for logfile storage but works fine
+	  without, and can be completely ignored if the postgresql portion
+	  is used. 
+
+	  As upstream is no longer actively maintained, a fork is available
+	  on github that works on making BandwidthD's build process more
+	  compatible with buildroot's.
+
+	  Upstream: http://bandwidthd.sourceforge.net/
+	  Github fork: http://github.com/nroach44/bandwidthd
+
+if BR2_PACKAGE_BANDWIDTHD
+config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
+	bool "enable postgresql log target support"
+	select BR2_PACKAGE_POSTGRESQL
+	help
+	  Enable logging the bandwidthd data to a remote (or local) postgresql
+	  server. This can then be accessed through a php site. See 
+	  README in the source code (github.com/nroach44/bandwidthd) for more
+	  information.
+
+endif
package/bandwidthd/bandwidthd.mk new file +25 -0
new file mode 100644
index 0000000..e294af3
@@ -0,0 +1,25 @@
+################################################################################
+#
+# bandwidthd
+################################################################################
+
+BANDWIDTHD_VERSION = v2.0.1-auto-r03
+BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
+BANDWIDTHD_CONF_OPT = 
+BANDWIDTHD_CONF_ENV =
+BANDWIDTHD_LICENSE = GPL+
+
+BANDWIDTHD_DEPENDENCIES += gd
+BANDWIDTHD_DEPENDENCIES += libpng
+BANDWIDTHD_DEPENDENCIES += libpcap
+
+BANDWIDTHD_AUTORECONF = YES
+
+ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y)
+BANDWIDTHD_DEPENDENCIES += postgresql
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=true
+else
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=false
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
2.0.1
#2 lore raw

PATCH 2/2 bandwidthd: new package

Dear Nathaniel Roach,

package/bandwidthd/Config.in line 3

Quoted 9 lines · Nathaniel Roach
package/bandwidthd/Config.in new file +3 -0
new file mode 100644
index 0000000..7305060
@@ -0,0 +1,39 @@
+config BR2_PACKAGE_BANDWIDTHD
+	bool "bandwidthd"
+	depends on BR2_USE_MMU # fork()

No other toolchain dependency? Can you try building this package with the following base configuration:

http://autobuild.buildroot.org/toolchains/configs/br-arm-basic.config

package/bandwidthd/Config.in line 29

Quoted 1 line
package/bandwidthd/Config.in new file +1 -0
+if BR2_PACKAGE_BANDWIDTHD

Please add an empty new line here.

package/bandwidthd/Config.in line 32

Quoted 3 lines
package/bandwidthd/Config.in new file +3 -0
+config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL
+	bool "enable postgresql log target support"
+	select BR2_PACKAGE_POSTGRESQL

When selecting a package, you need to propagate its dependencies. Since postgresql depends on glibc, you need to propagate this dependency here:

depends on BR2_TOOLCHAIN_USES_GLIBC # postgresql

package/bandwidthd/bandwidthd.mk line 3

Quoted 9 lines
package/bandwidthd/bandwidthd.mk new file +3 -0
new file mode 100644
index 0000000..e294af3
@@ -0,0 +1,25 @@
+################################################################################
+#
+# bandwidthd

One new line needed here. See other packages for the format of the header.

package/bandwidthd/bandwidthd.mk line 9

Quoted 6 lines
package/bandwidthd/bandwidthd.mk new file +6 -0
+################################################################################
+
+BANDWIDTHD_VERSION = v2.0.1-auto-r03
+BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION))
+BANDWIDTHD_CONF_OPT = 
+BANDWIDTHD_CONF_ENV =

Empty variables not needed.

package/bandwidthd/bandwidthd.mk line 10

Quoted 1 line
package/bandwidthd/bandwidthd.mk new file +1 -0
+BANDWIDTHD_LICENSE = GPL+

It's rather unfortunate that they do not specify the version of the GPL. So, I don't think the "+" is in order here. Maybe just:

# GPL version unspecified by upstream authors
BANDWIDTHD_LICENSE = GPL

package/bandwidthd/bandwidthd.mk line 14

Quoted 3 lines
package/bandwidthd/bandwidthd.mk new file +3 -0
+BANDWIDTHD_DEPENDENCIES += gd
+BANDWIDTHD_DEPENDENCIES += libpng
+BANDWIDTHD_DEPENDENCIES += libpcap

Just one line:

BANDWIDTHD_DEPENDENCIES = gd libpng libpcap

package/bandwidthd/bandwidthd.mk line 25

Quoted 11 lines
package/bandwidthd/bandwidthd.mk new file +11 -0
+
+BANDWIDTHD_AUTORECONF = YES
+
+ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y)
+BANDWIDTHD_DEPENDENCIES += postgresql
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=true
+else
+BANDWIDTHD_CONF_OPT += --with-postgresql-logging=false
+endif
+
+$(eval $(autotools-package))

Other than that, looks good. Could you resubmit an updated version fixing those issues?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 Postgresql: Enable staging install for packages that need it to build

In reply to Nathaniel Roach

Dear Nathaniel Roach,

Quoted 4 lines · Nathaniel Roach
---
 package/postgresql/postgresql.mk | 2 ++
 1 file changed, 2 insertions(+)

Thanks, I've applied this patch after slightly tweaking the commit message (no capitalization on "postgresql", and smaller title, with the details in the body of the commit log).

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com