From: Michal Sojka Date: Fri, 16 Oct 2015 22:33:59 +0000 (+0200) Subject: database: Use unix socket to avoid the need for db login credentials X-Git-Url: https://rtime.felk.cvut.cz/gitweb/linux-conf-perf.git/commitdiff_plain/7ffc2965caf376ac2aac3b58b16deeccd721f590 database: Use unix socket to avoid the need for db login credentials --- diff --git a/conf.py b/conf.py index b8ee986..4c4ed8f 100644 --- a/conf.py +++ b/conf.py @@ -39,18 +39,19 @@ picosat_args = [] # db_database # Database in PostgreSQL to be used for this tools db_database = 'linux-conf-perf' -# db_user -# Define PostgreSQL user -db_user = 'user' -# db_password -# Define PostrgreSQL user password -db_password = 'password' -# db_host -# Address of PostgreSQL database server -db_host = 'localhost' -# db_port -# Port of PotgreSQL database server -db_port = 5432 + +# # db_user +# # Define PostgreSQL user +# db_user = 'user' +# # db_password +# # Define PostrgreSQL user password +# db_password = 'password' +# # db_host +# # Address of PostgreSQL database server +# db_host = 'localhost' +# # db_port +# # Port of PotgreSQL database server +# db_port = 5432 # multithread # Define if measurement and kernel build should be executed in parallel. diff --git a/scripts/database.py b/scripts/database.py index 27c6a92..a41d703 100644 --- a/scripts/database.py +++ b/scripts/database.py @@ -26,11 +26,8 @@ class database: "Class used for accessing PostgreSQL project database." def __init__(self): self.db = postgresql.open(database = conf.db_database, - user = conf.db_user, - password = conf.db_password, - host = conf.db_host, - port = conf.db_port - ) + unix='/var/run/postgresql/.s.PGSQL.5432', + password='') # check if tables are present tables = ('toolsgit', 'configurations', 'measure') for tab in tables: diff --git a/targets/bbb/conf.py b/targets/bbb/conf.py index 187d3f4..7612aa8 100644 --- a/targets/bbb/conf.py +++ b/targets/bbb/conf.py @@ -7,9 +7,6 @@ kernel_env = {'SRCARCH': kernel_arch, 'ARCH': kernel_arch, 'KERNELVERSION': kern boot_command = ['targets/bbb/boot/boot'] parse_command = ['tests/cyclictest/parse'] -db_user = 'kocikare' -db_password = 'ohNg3Ien' - multithread = False diff --git a/targets/ryuglab/conf.py b/targets/ryuglab/conf.py index 8ab26ac..e7f503d 100644 --- a/targets/ryuglab/conf.py +++ b/targets/ryuglab/conf.py @@ -8,9 +8,6 @@ build_command = ['make', 'uImage'] boot_command = ['targets/ryuglab/boot/boot'] parse_command = ['tests/cyclictest/parse'] -db_user = 'kocikare' -db_password = 'ohNg3Ien' - multithread = False