Skip to contentSkip to conversation

Add recipe for ajenti

PATCH New Paul Eggleton 1 participant 3 messages Feb 11, 2013

lore
Share & tools
lore
#0 lore raw

cover Add recipe for ajenti

This recipe was originally created for integration with the Baryon NAS project, however functionality isn't quite there for that yet. In the mean time it may be useful as a generic web admin application.

Note that this also requires the meta-oe python library additions series I sent recently.

The following changes since commit 61911b23099c2658186179504ded318c987b5276:

ttf: introduce update-fonts bbclass and change all ttf recipes to use it (2013-02-06 15:16:01 +0100)

are available in the git repository at:

git://git.openembedded.org/meta-openembedded-contrib paule/ajenti
http://cgit.openembedded.org/cgit.cgi/meta-openembedded-contrib/log/?h=paule/ajenti

Paul Eggleton (2):
ajenti: add new recipe
README: extend for meta-webadmin addition

 meta-webserver/README                              |   17 +++
 .../0001-setup.py-remove-extra-data-files.patch    |   33 ++++++
 ...stat-fix-disk-usage-check-to-work-with-bu.patch |   29 +++++
 ...-plugins-sysload-fix-to-work-with-busybox.patch |   47 ++++++++
 .../ajenti/0005-plugins-power-fix-shutdown.patch   |   31 +++++
 ...ervices-add-basic-sysvinit-implementation.patch |  119 ++++++++++++++++++++
 ...vices-replace-s_upstart-with-s_init-in-MO.patch |   23 ++++
 .../ajenti/distributor-logo-openembedded.png       |  Bin 0 -> 2165 bytes
 .../ajenti/distro-detection-openembedded.patch     |   42 +++++++
 .../recipes-webadmin/ajenti/ajenti_git.bb          |   80 +++++++++++++
 10 files changed, 421 insertions(+)
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0001-setup.py-remove-extra-data-files.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0002-plugins-hddstat-fix-disk-usage-check-to-work-with-bu.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0003-plugins-sysload-fix-to-work-with-busybox.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0005-plugins-power-fix-shutdown.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0007-plugins-services-replace-s_upstart-with-s_init-in-MO.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/distributor-logo-openembedded.png
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/distro-detection-openembedded.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti_git.bb
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 ajenti: add new recipe

Add new recipe for the Ajenti web administration interface.

This was developed and tested with assistance from Kevin Strasser <[email protected]>

---
 .../0001-setup.py-remove-extra-data-files.patch    |   33 ++++++
 ...stat-fix-disk-usage-check-to-work-with-bu.patch |   29 +++++
 ...-plugins-sysload-fix-to-work-with-busybox.patch |   47 ++++++++
 .../ajenti/0005-plugins-power-fix-shutdown.patch   |   31 +++++
 ...ervices-add-basic-sysvinit-implementation.patch |  119 ++++++++++++++++++++
 ...vices-replace-s_upstart-with-s_init-in-MO.patch |   23 ++++
 .../ajenti/distributor-logo-openembedded.png       |  Bin 0 -> 2165 bytes
 .../ajenti/distro-detection-openembedded.patch     |   42 +++++++
 .../recipes-webadmin/ajenti/ajenti_git.bb          |   80 +++++++++++++
 9 files changed, 404 insertions(+)
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0001-setup.py-remove-extra-data-files.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0002-plugins-hddstat-fix-disk-usage-check-to-work-with-bu.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0003-plugins-sysload-fix-to-work-with-busybox.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0005-plugins-power-fix-shutdown.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/0007-plugins-services-replace-s_upstart-with-s_init-in-MO.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/distributor-logo-openembedded.png
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti/distro-detection-openembedded.patch
 create mode 100644 meta-webserver/recipes-webadmin/ajenti/ajenti_git.bb
meta-webserver/recipes-webadmin/ajenti/ajenti/0001-setup.py-remove-extra-data-files.patch new file +33 -0
new file mode 100644
index 0000000..11d7a92
@@ -0,0 +1,33 @@
+From 37bf4c471f23140e00fe87dde6f7c3cf38933c22 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <[email protected]>
+Date: Mon, 12 Mar 2012 02:01:48 +0000
+Subject: [PATCH] setup.py: remove extra data files
+
+Don't install files using setup.py, since this fails due to absolute
+paths and we can easily install these within the recipe instead.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Paul Eggleton <[email protected]>
+---
+ setup.py |    6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 8daea4c..11e3acb 100755
+--- a/setup.py
++++ b/setup.py
+@@ -18,10 +18,4 @@ setup(
+     packages = find_packages(),
+     package_data={'': ['files/*.*', 'files/*/*.*', 'files/*/*/*.*', 'templates/*.*', 'widgets/*.*', 'layout/*.*']},
+     scripts=['ajenti-panel', 'ajenti-pkg'],
+-    data_files=[
+-        ('/etc/ajenti', ['packaging/files/ajenti.conf']),
+-        ('/etc/ajenti/users', ['packaging/files/admin.conf']),
+-        ('/etc/init.d', ['packaging/files/ajenti']),
+-        ('/var/lib/ajenti/plugins', ['packaging/files/.placeholder']),
+-    ],
+ )
+-- 
+1.7.5.4
+
meta-webserver/recipes-webadmin/ajenti/ajenti/0002-plugins-hddstat-fix-disk-usage-check-to-work-with-bu.patch new file +29 -0
new file mode 100644
index 0000000..48c255d
@@ -0,0 +1,29 @@
+From cde811cfffba48c148b60fb1083fe8fd409b8b24 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <[email protected]>
+Date: Tue, 13 Mar 2012 01:52:34 +0000
+Subject: [PATCH 1/2] plugins/hddstat: fix disk usage check to work with
+ busybox
+
+busybox df does not have --total, so fake it using awk.
+
+Signed-off-by: Paul Eggleton <[email protected]>
+---
+ plugins/hddstat/usage.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/plugins/hddstat/usage.py b/plugins/hddstat/usage.py
+index 3c84181..cf5f037 100644
+--- a/plugins/hddstat/usage.py
++++ b/plugins/hddstat/usage.py
+@@ -7,7 +7,7 @@ class DiskUsageMeter(LinearMeter):
+     transform = 'percent'
+     
+     def get_usage(self):
+-        u = int(shell('df --total | grep total').split().pop().strip('%'))
++        u = int(round(float(shell("df -P | awk 'NR > 1 {total+=$3+$4 ; used+=$3} END { print used/total*100}'").strip())))
+         return u
+     
+     def get_value(self):
+-- 
+1.7.4.4
+
meta-webserver/recipes-webadmin/ajenti/ajenti/0003-plugins-sysload-fix-to-work-with-busybox.patch new file +47 -0

47 lines not on this page · raw message

meta-webserver/recipes-webadmin/ajenti/ajenti/0005-plugins-power-fix-shutdown.patch new file +31 -0
new file mode 100644
index 0000000..2934385
@@ -0,0 +1,31 @@
+From acd997cf610f8e9b0dbea00d2f1184d256d1b85b Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <[email protected]>
+Date: Sat, 17 Mar 2012 23:50:48 +0000
+Subject: [PATCH] plugins/power: fix shutdown
+
+Fix shutdown to use the -h option together with -P (which is required
+for sysvinit shutdown.)
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+---
+ plugins/power/main.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/plugins/power/main.py b/plugins/power/main.py
+index 0ab6337..069bde7 100755
+--- a/plugins/power/main.py
++++ b/plugins/power/main.py
+@@ -57,7 +57,7 @@ class PowerPlugin(CategoryPlugin):
+     @event('button/click')
+     def on_aclick(self, event, params, vars=None):
+         if params[0] == 'shutdown':
+-            shell('shutdown -P now')
++            shell('shutdown -h -P now')
+         if params[0] == 'reboot':
+             shell('reboot')
+ 
+-- 
+1.7.5.4
+
meta-webserver/recipes-webadmin/ajenti/ajenti/0006-plugins-services-add-basic-sysvinit-implementation.patch new file +119 -0

119 lines not on this page · raw message

meta-webserver/recipes-webadmin/ajenti/ajenti/0007-plugins-services-replace-s_upstart-with-s_init-in-MO.patch new file +23 -0
new file mode 100644
index 0000000..7623e3f
@@ -0,0 +1,23 @@
+From 75b5109ceb4874c967daf6c1e8434e6093b1df79 Mon Sep 17 00:00:00 2001
+From: Kevin Strasser <[email protected]>
+Date: Mon, 29 Oct 2012 01:44:10 -0700
+Subject: [PATCH] plugins/services: replace s_upstart with s_init in MODULES
+
+Signed-off-by: Kevin Strasser <[email protected]>
+---
+ plugins/services/__init__.py |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/services/__init__.py b/plugins/services/__init__.py
+index 6cf58e5..ced3300 100755
+--- a/plugins/services/__init__.py
++++ b/plugins/services/__init__.py
+@@ -1,4 +1,4 @@
+-MODULES = ['api', 'main', 'meter', 'widget', 's_upstart', 's_arch', 's_bsd', 's_centos', 's_gentoo']
++MODULES = ['api', 'main', 'meter', 'widget', 's_init', 's_arch', 's_bsd', 's_centos', 's_gentoo']
+ 
+ DEPS =  [
+     (['centos', 'fedora'],
+-- 
+1.7.9.5
+
meta-webserver/recipes-webadmin/ajenti/ajenti/distributor-logo-openembedded.png new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..0aad9df90c26bb63e6eec88f0f1bf2d1ca1188bf
GIT binary patch
meta-webserver/recipes-webadmin/ajenti/ajenti/distro-detection-openembedded.patch new file +42 -0

42 lines not on this page · raw message

meta-webserver/recipes-webadmin/ajenti/ajenti_git.bb new file +80 -0

80 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 README: extend for meta-webadmin addition

In reply to Paul Eggleton

* Add directory layour info
* Add meta-oe dependency for some recipes

---
 meta-webserver/README |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
meta-webserver/README +17 -0
index 47136fb..89deecc 100644
@@ -12,9 +12,26 @@ Dependencies
 This layer depends on:
 
 URI: git://git.openembedded.org/openembedded-core
+subdirectory: meta
 branch: master
 revision: HEAD
 
+For some recipes, the meta-oe layer is required:
+
+URI: git://git.openembedded.org/meta-openembedded
+subdirectory: meta-oe
+branch: master
+revision: HEAD
+
+
+
+Layout
+------
+
+recipes-httpd/      Web servers
+recipes-php/        PHP and PHP applications
+recipes-webadmin/   Standalone web administration interfaces
+
 
 
 Maintenance
Signature · 1 line
1.7.10.4