[aur-dev] [PATCH v2] Restructure scripts
Lukas Fleischer
lfleischer at archlinux.org
Tue Jun 2 08:51:57 UTC 2015
* Move scripts/git-integration/ to git-interface/.
* Move scripts/aurblup/aurblup.py to scripts/aurblup.py.
Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
INSTALL | 4 ++--
conf/config.proto | 8 ++++----
{scripts/git-integration => git-interface}/aurinfo.py | 0
{scripts/git-integration => git-interface}/git-auth.py | 2 +-
git-interface/git-auth.sh | 3 +++
{scripts/git-integration => git-interface}/git-serve.py | 2 +-
{scripts/git-integration => git-interface}/git-update.py | 2 +-
scripts/{aurblup => }/aurblup.py | 0
scripts/git-integration/git-auth.sh | 3 ---
9 files changed, 12 insertions(+), 12 deletions(-)
rename {scripts/git-integration => git-interface}/aurinfo.py (100%)
rename {scripts/git-integration => git-interface}/git-auth.py (93%)
create mode 100755 git-interface/git-auth.sh
rename {scripts/git-integration => git-interface}/git-serve.py (98%)
rename {scripts/git-integration => git-interface}/git-update.py (99%)
rename scripts/{aurblup => }/aurblup.py (100%)
delete mode 100755 scripts/git-integration/git-auth.sh
diff --git a/INSTALL b/INSTALL
index 026d4b9..3aad515 100644
--- a/INSTALL
+++ b/INSTALL
@@ -28,12 +28,12 @@ Setup on Arch Linux
# mkdir /srv/http/aurweb/aur.git/
# cd /srv/http/aurweb/aur.git/
# git init --bare
- # ln -s ../../scripts/git-integration/git-update.py hooks/update
+ # ln -s ../../git-interface/git-update.py hooks/update
# chown -R aur .
7) Install the git-auth wrapper script:
- # cd /srv/http/aurweb/scripts/git-integration/
+ # cd /srv/http/aurweb/git-interface/
# cp git-auth.sh /usr/local/bin/aur-git-auth
# chmod 755 /usr/local/bin/aur-git-auth
diff --git a/conf/config.proto b/conf/config.proto
index 90b5bd5..7c56a2b 100644
--- a/conf/config.proto
+++ b/conf/config.proto
@@ -30,18 +30,18 @@ auto_delete_age = 86400
[auth]
valid-keytypes = ssh-rsa ssh-dss ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 ssh-ed25519
username-regex = [a-zA-Z0-9]+[.\-_]?[a-zA-Z0-9]+$
-git-serve-cmd = /srv/http/aurweb/scripts/git-integration/git-serve.py
+git-serve-cmd = /srv/http/aurweb/git-interface/git-serve.py
ssh-options = no-port-forwarding,no-X11-forwarding,no-pty
[serve]
repo-path = /srv/http/aurweb/aur.git/
repo-regex = [a-z0-9][a-z0-9.+_-]*$
-template-path = /srv/http/aurweb/scripts/git-integration/templates/
-git-update-hook = /srv/http/aurweb/scripts/git-integration/git-update.py
+template-path = /srv/http/aurweb/git-interface/templates/
+git-update-hook = /srv/http/aurweb/git-interface/git-update.py
git-shell-cmd = /usr/bin/git-shell
ssh-cmdline = ssh aur at aur.archlinux.org
[aurblup]
-db-path = /srv/http/aurweb/scripts/aurblup/
+db-path = /srv/http/aurweb/aurblup/
sync-dbs = core extra community multilib testing community-testing
servers = ftp://mirrors.kernel.org/archlinux/%s/os/x86_64
diff --git a/scripts/git-integration/aurinfo.py b/git-interface/aurinfo.py
similarity index 100%
rename from scripts/git-integration/aurinfo.py
rename to git-interface/aurinfo.py
diff --git a/scripts/git-integration/git-auth.py b/git-interface/git-auth.py
similarity index 93%
rename from scripts/git-integration/git-auth.py
rename to git-interface/git-auth.py
index 09dadec..c9e1f01 100755
--- a/scripts/git-integration/git-auth.py
+++ b/git-interface/git-auth.py
@@ -7,7 +7,7 @@ import re
import sys
config = configparser.RawConfigParser()
-config.read(os.path.dirname(os.path.realpath(__file__)) + "/../../conf/config")
+config.read(os.path.dirname(os.path.realpath(__file__)) + "/../conf/config")
aur_db_host = config.get('database', 'host')
aur_db_name = config.get('database', 'name')
diff --git a/git-interface/git-auth.sh b/git-interface/git-auth.sh
new file mode 100755
index 0000000..a5caeec
--- /dev/null
+++ b/git-interface/git-auth.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/srv/http/aurweb/git-interface/git-auth.py "$1" "$2"
diff --git a/scripts/git-integration/git-serve.py b/git-interface/git-serve.py
similarity index 98%
rename from scripts/git-integration/git-serve.py
rename to git-interface/git-serve.py
index 81222e8..eebb087 100755
--- a/scripts/git-integration/git-serve.py
+++ b/git-interface/git-serve.py
@@ -9,7 +9,7 @@ import shlex
import sys
config = configparser.RawConfigParser()
-config.read(os.path.dirname(os.path.realpath(__file__)) + "/../../conf/config")
+config.read(os.path.dirname(os.path.realpath(__file__)) + "/../conf/config")
aur_db_host = config.get('database', 'host')
aur_db_name = config.get('database', 'name')
diff --git a/scripts/git-integration/git-update.py b/git-interface/git-update.py
similarity index 99%
rename from scripts/git-integration/git-update.py
rename to git-interface/git-update.py
index c7d64df..b7eaa14 100755
--- a/scripts/git-integration/git-update.py
+++ b/git-interface/git-update.py
@@ -11,7 +11,7 @@ import sys
import aurinfo
config = configparser.RawConfigParser()
-config.read(os.path.dirname(os.path.realpath(__file__)) + "/../../conf/config")
+config.read(os.path.dirname(os.path.realpath(__file__)) + "/../conf/config")
aur_db_host = config.get('database', 'host')
aur_db_name = config.get('database', 'name')
diff --git a/scripts/aurblup/aurblup.py b/scripts/aurblup.py
similarity index 100%
rename from scripts/aurblup/aurblup.py
rename to scripts/aurblup.py
diff --git a/scripts/git-integration/git-auth.sh b/scripts/git-integration/git-auth.sh
deleted file mode 100755
index c6a5401..0000000
--- a/scripts/git-integration/git-auth.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-/srv/http/aurweb/scripts/git-integration/git-auth.py "$1" "$2"
--
2.4.2
More information about the aur-dev
mailing list