Skip to contentSkip to conversation

owncloud: new package

PATCH New Sylvain Raybaud 4 participants 4 messages Mar 17, 2016 – Jul 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 owncloud: new package

Add package owncloud 9.0.0: http://www.owncloud.org
Copy static files to /usr/lib/owncloud and dynamic files to /var/lib/owncloud.

owncloud needs php, mysql and a webserver. MySQL and the webserver can be provided by different packages therefore no specific dependency is set.

---
 package/Config.in              |  1 +
 package/owncloud/Config.in     |  9 +++++++++
 package/owncloud/owncloud.hash |  3 +++
 package/owncloud/owncloud.mk   | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+)
 create mode 100644 package/owncloud/Config.in
 create mode 100644 package/owncloud/owncloud.hash
 create mode 100644 package/owncloud/owncloud.mk
package/Config.in +1 -0
index 2401867..eeaa791 100644
@@ -1453,6 +1453,7 @@ endif
 	source "package/openssh/Config.in"
 	source "package/openswan/Config.in"
 	source "package/openvpn/Config.in"
+	source "package/owncloud/Config.in"
 	source "package/p910nd/Config.in"
 	source "package/phidgetwebservice/Config.in"
 	source "package/portmap/Config.in"
package/owncloud/Config.in new file +9 -0
new file mode 100644
index 0000000..8fe18de
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_OWNCLOUD
+	bool "owncloud"
+	depends on BR2_PACKAGE_PHP	 # runtime
+	help
+	  OwnCloud is a web app for accessing and sharing your files,
+	  calendars, contacts, mail and more.
+
+comment "OwnCloud needs PHP"
+    depends on !BR2_PACKAGE_PHP
package/owncloud/owncloud.hash new file +3 -0
new file mode 100644
index 0000000..c40c87f
@@ -0,0 +1,3 @@
+# Hashes from: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2.{md5,sha256}
+md5	 1f14d7f2faa0ba704901e062301854db					owncloud-9.0.0.tar.bz2
+sha256	 d16737510a77a81489f7c4d5e19b0756fa2ea1c5081ba174b0fec0f00da3a77c	owncloud-9.0.0.tar.bz2
package/owncloud/owncloud.mk new file +34 -0
new file mode 100644
index 0000000..ff9e105
@@ -0,0 +1,34 @@
+################################################################################
+#
+# owncloud
+#
+################################################################################
+
+OWNCLOUD_VERSION = 9.0.0
+OWNCLOUD_SOURCE = owncloud-$(OWNCLOUD_VERSION).tar.bz2
+OWNCLOUD_SITE = https://download.owncloud.org/community
+OWNCLOUD_DEPENDENCIES =
+OWNCLOUD_LICENSE = AGPL
+OWNCLOUD_LICENSE_FILES = COPYING-AGPL
+
+define OWNCLOUD_INSTALL_TARGET_CMDS
+	#install files /usr/lib
+	mkdir -p $(TARGET_DIR)/usr/lib
+	cp -a $(@D) $(TARGET_DIR)/usr/lib/owncloud
+	#move dynamic files in /var/lib and make symbolic links
+	mkdir -p $(TARGET_DIR)/var/lib/owncloud
+	mkdir -p $(TARGET_DIR)/var/lib/owncloud/data
+	mv $(TARGET_DIR)/usr/lib/owncloud/config $(TARGET_DIR)/var/lib/owncloud/
+	mv $(TARGET_DIR)/usr/lib/owncloud/apps $(TARGET_DIR)/var/lib/owncloud/
+	#use relative path so that permissions can be set by OWNCLOUD_PERMISSIONS hook
+	ln -s ../../../var/lib/owncloud/data $(TARGET_DIR)/usr/lib/owncloud/data
+	ln -s ../../../var/lib/owncloud/config $(TARGET_DIR)/usr/lib/owncloud/config
+	ln -s ../../../var/lib/owncloud/apps $(TARGET_DIR)/usr/lib/owncloud/apps
+endef
+
+define OWNCLOUD_PERMISSIONS
+	/usr/lib/owncloud r -1 root root - - - - -
+	/var/lib/owncloud r -1 www-data www-data - - - - -
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 owncloud: new package

Hi Sylvain, all,

Thank you for your patch, below are some comments. Your patch is marked as "Changes-Requested" in our patchwork, you need to fix your patch and resend.
Of course, we can discuss any of the comments below.

Quoted 37 lines · Sylvain Raybaud

Add package owncloud 9.0.0: http://www.owncloud.org
Copy static files to /usr/lib/owncloud and dynamic files to /var/lib/owncloud.

owncloud needs php, mysql and a webserver. MySQL and the webserver can be provided by different packages therefore no specific dependency is set.

---
 package/Config.in              |  1 +
 package/owncloud/Config.in     |  9 +++++++++
 package/owncloud/owncloud.hash |  3 +++
 package/owncloud/owncloud.mk   | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+)
 create mode 100644 package/owncloud/Config.in
 create mode 100644 package/owncloud/owncloud.hash
 create mode 100644 package/owncloud/owncloud.mk
package/Config.in +1 -0
index 2401867..eeaa791 100644
@@ -1453,6 +1453,7 @@ endif
        source "package/openssh/Config.in"
        source "package/openswan/Config.in"
        source "package/openvpn/Config.in"
+       source "package/owncloud/Config.in"
        source "package/p910nd/Config.in"
        source "package/phidgetwebservice/Config.in"
        source "package/portmap/Config.in"
package/owncloud/Config.in new file +0 -0
new file mode 100644
index 0000000..8fe18de

package/owncloud/Config.in line 3

Quoted 3 lines
package/owncloud/Config.in new file +3 -0
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_OWNCLOUD
+       bool "owncloud"
+       depends on BR2_PACKAGE_PHP       # runtime

It should be a select here, a user that wants to select owncloud shouldn't have to select PHP first, it should be done by KConfig. Shouldn't you select some basic PHP extensions, like GD ? Maybe offer some options for the most common extensions that are needed.

Quoted 22 lines
package/owncloud/Config.in new file +6 -0
+       help
+         OwnCloud is a web app for accessing and sharing your files,
+         calendars, contacts, mail and more.
+
+comment "OwnCloud needs PHP"
+    depends on !BR2_PACKAGE_PHP
package/owncloud/owncloud.hash new file +3 -0
new file mode 100644
index 0000000..c40c87f
@@ -0,0 +1,3 @@
+# Hashes from: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2.{md5,sha256}
+md5     1f14d7f2faa0ba704901e062301854db                                       owncloud-9.0.0.tar.bz2
+sha256  d16737510a77a81489f7c4d5e19b0756fa2ea1c5081ba174b0fec0f00da3a77c       owncloud-9.0.0.tar.bz2
package/owncloud/owncloud.mk new file +0 -0
new file mode 100644
index 0000000..ff9e105

package/owncloud/owncloud.mk line 7

Quoted 7 lines
package/owncloud/owncloud.mk new file +7 -0
@@ -0,0 +1,34 @@
+################################################################################
+#
+# owncloud
+#
+################################################################################
+
+OWNCLOUD_VERSION = 9.0.0

There's a newer version available.

package/owncloud/owncloud.mk line 10

Quoted 3 lines
package/owncloud/owncloud.mk new file +3 -0
+OWNCLOUD_SOURCE = owncloud-$(OWNCLOUD_VERSION).tar.bz2
+OWNCLOUD_SITE = https://download.owncloud.org/community
+OWNCLOUD_DEPENDENCIES =

You can remove this line since you don't have any build dependencies.

Quoted 31 lines
package/owncloud/owncloud.mk new file +24 -1
+OWNCLOUD_LICENSE = AGPL
+OWNCLOUD_LICENSE_FILES = COPYING-AGPL
+
+define OWNCLOUD_INSTALL_TARGET_CMDS
+       #install files /usr/lib
+       mkdir -p $(TARGET_DIR)/usr/lib
+       cp -a $(@D) $(TARGET_DIR)/usr/lib/owncloud
+       #move dynamic files in /var/lib and make symbolic links
+       mkdir -p $(TARGET_DIR)/var/lib/owncloud
+       mkdir -p $(TARGET_DIR)/var/lib/owncloud/data
+       mv $(TARGET_DIR)/usr/lib/owncloud/config $(TARGET_DIR)/var/lib/owncloud/
+       mv $(TARGET_DIR)/usr/lib/owncloud/apps $(TARGET_DIR)/var/lib/owncloud/
+       #use relative path so that permissions can be set by OWNCLOUD_PERMISSIONS hook
+       ln -s ../../../var/lib/owncloud/data $(TARGET_DIR)/usr/lib/owncloud/data
+       ln -s ../../../var/lib/owncloud/config $(TARGET_DIR)/usr/lib/owncloud/config
+       ln -s ../../../var/lib/owncloud/apps $(TARGET_DIR)/usr/lib/owncloud/apps
+endef
+
+define OWNCLOUD_PERMISSIONS
+       /usr/lib/owncloud r -1 root root - - - - -
+       /var/lib/owncloud r -1 www-data www-data - - - - -
+endef
+
+$(eval $(generic-package))
--

1.9.1

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

#2 lore raw

PATCH 1/1 owncloud: new package

Hi all,

(Sorry for this late reply...)

Quoted 5 lines

Hi Sylvain, all,

Thank you for your patch, below are some comments. Your patch is marked as "Changes-Requested" in our patchwork, you need to fix your patch and resend.

Just so you know, Sylvain, who submitted the original patches, has moved to another company and does not work anymore on packaging OwnCloud for Buildroot. Since this is too much of a work for us, we do not plan on maintaining these patches.

Sorry,

Signature · 8 lines
Thomas Claveirole <[email protected]>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160718/f513b4ac/attachment.asc>
#3 lore raw

PATCH 1/1 owncloud: new package

In reply to Sylvain Raybaud
Quoted 9 lines · Sylvain Raybaud

Add package owncloud 9.0.0: http://www.owncloud.org
Copy static files to /usr/lib/owncloud and dynamic files to /var/lib/owncloud.

owncloud needs php, mysql and a webserver. MySQL and the webserver can be provided by different packages therefore no specific dependency is set.

[snip]

package/owncloud/owncloud.hash line 3

Quoted 9 lines
package/owncloud/owncloud.hash new file +3 -0
new file mode 100644
index 0000000..c40c87f
@@ -0,0 +1,3 @@
+# Hashes from: https://download.owncloud.org/community/owncloud-9.0.0.tar.bz2.{md5,sha256}
+md5	 1f14d7f2faa0ba704901e062301854db					owncloud-9.0.0.tar.bz2
+sha256	 d16737510a77a81489f7c4d5e19b0756fa2ea1c5081ba174b0fec0f00da3a77c	owncloud-9.0.0.tar.bz2

If upstream provides a sha256, that one is sufficient. Of course, having both
doesn't hurt.

package/owncloud/owncloud.mk line 7

Quoted 13 lines
package/owncloud/owncloud.mk new file +7 -0
new file mode 100644
index 0000000..ff9e105
@@ -0,0 +1,34 @@
+################################################################################
+#
+# owncloud
+#
+################################################################################
+
+OWNCLOUD_VERSION = 9.0.0

Hm, I wonder how this is going to be used in practice when you want to upgrade.
In buildroot, the assumption is that upgrading is done by replacing the entire filesystem image. The data would then be kept in a separate partition. However, owncloud doesn't support this way of upgrading at all: you have to do the upgrade from the application itself, or you will most likely break your database...

package/owncloud/owncloud.mk line 11

Quoted 4 lines
package/owncloud/owncloud.mk new file +4 -0
+OWNCLOUD_SOURCE = owncloud-$(OWNCLOUD_VERSION).tar.bz2
+OWNCLOUD_SITE = https://download.owncloud.org/community
+OWNCLOUD_DEPENDENCIES =
+OWNCLOUD_LICENSE = AGPL

AGPLv3

package/owncloud/owncloud.mk line 15

Quoted 4 lines
package/owncloud/owncloud.mk new file +4 -0
+OWNCLOUD_LICENSE_FILES = COPYING-AGPL
+
+define OWNCLOUD_INSTALL_TARGET_CMDS
+	#install files /usr/lib

Comments are not needed here. They show up as commands on the output, which is
annoying. If you really want a comment, put it before the _CMDS definition.

package/owncloud/owncloud.mk line 20

Quoted 5 lines
package/owncloud/owncloud.mk new file +5 -0
+	mkdir -p $(TARGET_DIR)/usr/lib
+	cp -a $(@D) $(TARGET_DIR)/usr/lib/owncloud
+	#move dynamic files in /var/lib and make symbolic links
+	mkdir -p $(TARGET_DIR)/var/lib/owncloud
+	mkdir -p $(TARGET_DIR)/var/lib/owncloud/data

The second is is enough, it implies the first one.

Regards,
Arnout

Quoted 15 lines
package/owncloud/owncloud.mk new file +14 -0
+	mv $(TARGET_DIR)/usr/lib/owncloud/config $(TARGET_DIR)/var/lib/owncloud/
+	mv $(TARGET_DIR)/usr/lib/owncloud/apps $(TARGET_DIR)/var/lib/owncloud/
+	#use relative path so that permissions can be set by OWNCLOUD_PERMISSIONS hook
+	ln -s ../../../var/lib/owncloud/data $(TARGET_DIR)/usr/lib/owncloud/data
+	ln -s ../../../var/lib/owncloud/config $(TARGET_DIR)/usr/lib/owncloud/config
+	ln -s ../../../var/lib/owncloud/apps $(TARGET_DIR)/usr/lib/owncloud/apps
+endef
+
+define OWNCLOUD_PERMISSIONS
+	/usr/lib/owncloud r -1 root root - - - - -
+	/var/lib/owncloud r -1 www-data www-data - - - - -
+endef
+
+$(eval $(generic-package))
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF