summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpappy2018-07-02 16:02:31 +0300
committerpappy2018-07-02 16:08:33 +0300
commitf079a52d858fe29c46f07f0696c3ab8723808e0c (patch)
treed6dd1e6e4c9c58e2d9458fc00687f34c2baa9678
parentf206041cbe147802ac094ef201078746a5c8a6aa (diff)
downloadaur-f079a52d858fe29c46f07f0696c3ab8723808e0c.tar.gz
fixed log file path, etc...
-rw-r--r--.SRCINFO5
-rw-r--r--0010-paths.patch48
-rw-r--r--PKGBUILD11
-rwxr-xr-xlxdui.install25
-rw-r--r--lxdui.tmpfiles4
5 files changed, 80 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 50c866d46c6e..ccbf2c5ae60c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -19,6 +19,7 @@ pkgbase = lxdui-git
depends = python-terminado
depends = python-tornado
provides = lxdui
+ conflicts = lxdui
backup = etc/lxdui/lxdui.conf
backup = etc/lxdui/log.conf
backup = etc/lxdui/auth.conf
@@ -31,9 +32,9 @@ pkgbase = lxdui-git
sha256sums = SKIP
sha256sums = e419e1ecb8bec84fd676e7a729d91b48065a3a7616956bc5356e64e6d8286eac
sha256sums = b149cf164d32659b95802d0e4e455e98736de0d0ece519c48eae2eb846c35f3c
- sha256sums = ba3e1a27e38e63e283ea595480be375a70d5f24879ba4c2c4f3fe4dc28fbdee4
+ sha256sums = 0f1eca29cbdfc2aeceeb37ece9d6cdfce19503307bd2de3803cf8de2b8139a2c
sha256sums = 7487a9b77522a23b1be4c02961f46917d48b9c617d669843bbf26c4fd285d75d
- sha256sums = bf8ecd2b10b70d90b8b7b9dd2d5b35a69cb2ed6fa6d7a7c310cc0648fa19e723
+ sha256sums = 929c933ed0085d74972fd20c14f07b01ad4aaaff93c84897527868424447ef1f
pkgname = lxdui-git
diff --git a/0010-paths.patch b/0010-paths.patch
index 3e9ca0350161..bd4ed499de31 100644
--- a/0010-paths.patch
+++ b/0010-paths.patch
@@ -1,6 +1,6 @@
diff -rNc lxdui-2.1.1-orig/app/api/core.py lxdui-2.1.1/app/api/core.py
*** lxdui-2.1.1-orig/app/api/core.py 2018-06-18 22:36:37.000000000 +0300
---- lxdui-2.1.1/app/api/core.py 2018-06-29 17:26:55.789621966 +0300
+--- lxdui-2.1.1/app/api/core.py 2018-07-02 15:35:41.889414434 +0300
***************
*** 14,20 ****
Log(__name__)
@@ -32,7 +32,7 @@ diff -rNc lxdui-2.1.1-orig/app/api/core.py lxdui-2.1.1/app/api/core.py
! # app.run(debug=debug, host='0.0.0.0', port=port)
diff -rNc lxdui-2.1.1-orig/app/__metadata__.py lxdui-2.1.1/app/__metadata__.py
*** lxdui-2.1.1-orig/app/__metadata__.py 2018-06-18 22:36:37.000000000 +0300
---- lxdui-2.1.1/app/__metadata__.py 2018-06-29 17:25:26.097793995 +0300
+--- lxdui-2.1.1/app/__metadata__.py 2018-07-02 15:35:41.889414434 +0300
***************
*** 26,37 ****
lxdui.jwt.secret.key = AC8d83&21Almnis710sds
@@ -60,3 +60,47 @@ diff -rNc lxdui-2.1.1-orig/app/__metadata__.py lxdui-2.1.1/app/__metadata__.py
lxdui.log.file = ${lxdui.log.dir}/lxdui.log
lxdui.log.conf = ${lxdui.conf.dir}/log.conf
#lxdui.log.rotate = true
+diff -rNc lxdui-2.1.1-orig/conf/log.conf lxdui-2.1.1/conf/log.conf
+*** lxdui-2.1.1-orig/conf/log.conf 2018-06-18 22:36:37.000000000 +0300
+--- lxdui-2.1.1/conf/log.conf 2018-07-02 15:36:02.086508796 +0300
+***************
+*** 22,34 ****
+ "class": "logging.FileHandler",
+ "level": "DEBUG",
+ "formatter": "default",
+! "filename": "logs/lxdui.log"
+ },
+ "file": {
+ "class": "logging.FileHandler",
+ "level": "DEBUG",
+ "formatter": "default",
+! "filename": "logs/lxdui.log",
+ "mode": "w",
+ "encoding": "utf-8"
+ }
+--- 22,34 ----
+ "class": "logging.FileHandler",
+ "level": "DEBUG",
+ "formatter": "default",
+! "filename": "/var/log/lxdui/lxdui.log"
+ },
+ "file": {
+ "class": "logging.FileHandler",
+ "level": "DEBUG",
+ "formatter": "default",
+! "filename": "/var/log/lxdui/lxdui.log",
+ "mode": "w",
+ "encoding": "utf-8"
+ }
+***************
+*** 46,49 ****
+ "requests.packages.urllib3.connectionpool":{
+ "level":"ERROR"
+ }
+! }
+\ No newline at end of file
+--- 46,49 ----
+ "requests.packages.urllib3.connectionpool":{
+ "level":"ERROR"
+ }
+! }
diff --git a/PKGBUILD b/PKGBUILD
index 802f14dcd9bc..3518cce08c4a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=lxdui
pkgname=$_pkgname-git
-pkgver=2.1.1.0.636.c477657
+pkgver=0
pkgrel=1
srcver() {
@@ -35,6 +35,7 @@ depends=(lxd
)
makedepends=('python-virtualenv')
provides=(lxdui)
+conflicts=(lxdui)
install=lxdui.install
backup=(etc/lxdui/lxdui.conf
etc/lxdui/log.conf
@@ -51,9 +52,9 @@ source=($pkgname::git+https://github.com/AdaptiveScale/$_pkgname
sha256sums=('SKIP'
'e419e1ecb8bec84fd676e7a729d91b48065a3a7616956bc5356e64e6d8286eac'
'b149cf164d32659b95802d0e4e455e98736de0d0ece519c48eae2eb846c35f3c'
- 'ba3e1a27e38e63e283ea595480be375a70d5f24879ba4c2c4f3fe4dc28fbdee4'
+ '0f1eca29cbdfc2aeceeb37ece9d6cdfce19503307bd2de3803cf8de2b8139a2c'
'7487a9b77522a23b1be4c02961f46917d48b9c617d669843bbf26c4fd285d75d'
- 'bf8ecd2b10b70d90b8b7b9dd2d5b35a69cb2ed6fa6d7a7c310cc0648fa19e723')
+ '929c933ed0085d74972fd20c14f07b01ad4aaaff93c84897527868424447ef1f')
prepare()
{
@@ -80,11 +81,15 @@ package() {
find $pkgdir/usr/lib/$_pkgname/bin -type f -exec grep -q $pkgdir {} \; -exec sed -i "s:$pkgdir::g" {} \;
find $pkgdir/usr/lib/$_pkgname/lib -type d \( -name testsuite -o -name tests \) -exec rm -rf {} \; 2>/dev/null || true
+ install -dm755 $pkgdir/usr/bin
+ ln -s ../lib/$_pkgname/bin/lxdui $pkgdir/usr/bin/lxdui
+
install -Dm644 $_pkgname.conf $pkgdir/etc/$_pkgname/$_pkgname.conf
install -Dm644 $_pkgname.sysusers $pkgdir/usr/lib/sysusers.d/$_pkgname.conf
install -Dm644 $_pkgname.service $pkgdir/usr/lib/systemd/system/$_pkgname.service
install -Dm644 $_pkgname.tmpfiles $pkgdir/usr/lib/tmpfiles.d/$_pkgname.conf
mv $pkgdir/usr/lib/$_pkgname/lib/python3.6/site-packages/LXDUI-$(srcver)-py3.6.egg/conf/* $pkgdir/etc/$_pkgname
+ chmod 600 $pkgdir/etc/$_pkgname/auth.conf
}
diff --git a/lxdui.install b/lxdui.install
index b10e6c8dd288..652f3ff593f8 100755
--- a/lxdui.install
+++ b/lxdui.install
@@ -2,14 +2,31 @@ post_install()
{
systemd-sysusers
- echo ""
- echo "To start LXDUI, run: systemctl start lxdui"
- echo "To enable LXDUI at boot, run: systemctl enable lxdui"
- echo ""
+ chmod 600 /etc/lxdui/auth.conf
+ chown lxdui:lxdui /etc/lxdui/auth.conf
+
+ cat <<EOF
+
+To change the default admin password run
+
+ lxdui user update -u admin [-p password]
+
+To start LXDUI, run
+
+ systemctl start lxdui
+
+To enable LXDUI at boot, run
+
+ systemctl enable lxdui
+
+EOF
}
post_upgrade()
{
+ chmod 600 /etc/lxdui/auth.conf
+ chown lxdui:lxdui /etc/lxdui/auth.conf
+
systemctl daemon-reload
}
diff --git a/lxdui.tmpfiles b/lxdui.tmpfiles
index c634e654dc14..02117ac138e6 100644
--- a/lxdui.tmpfiles
+++ b/lxdui.tmpfiles
@@ -1,2 +1,2 @@
-d /var/log/lxdui 0755 lxdui lxdui -
-d /run/lxdui 0755 lxdui lxdui -
+d /var/log/lxdui 0750 lxdui lxdui -
+d /run/lxdui 0750 lxdui lxdui -