Browse Source

upgrading package: hydra 20160612 -> 20160613

Ralf S. Engelschall 9 years ago
parent
commit
eb2775c531
3 changed files with 26 additions and 5 deletions
  1. 8 3
      hydra/hydra.spec
  2. 15 0
      hydra/hydra.yaml
  3. 3 2
      hydra/rc.hydra

+ 8 - 3
hydra/hydra.spec

@@ -22,8 +22,8 @@
 ##
 
 #   package version
-%define       V_hydra_base 20160612
-%define       V_hydra_snap 20160612
+%define       V_hydra_base 20160613
+%define       V_hydra_snap 20160613
 
 #   package information
 Name:         hydra
@@ -36,11 +36,12 @@ Class:        EVAL
 Group:        Network
 License:      Apache
 Version:      %{V_hydra_base}
-Release:      20160612
+Release:      20160613
 
 #   list of sources
 Source0:      http://download.openpkg.org/components/versioned/hydra/hydra-%{V_hydra_snap}.tar.xz
 Source1:      rc.hydra
+Source2:      hydra.yaml
 
 #   build information
 BuildPreReq:  OpenPKG, openpkg >= 20160101, go
@@ -90,6 +91,10 @@ PreReq:       OpenPKG, openpkg >= 20160101
     %{l_shtool} install -c -m 755 %{l_value -s -a} \
         %{SOURCE rc.hydra} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
 
+    #   install default configuration
+    %{l_shtool} install -c -m 644 %{l_value -s -a} \
+        %{SOURCE hydra.yaml} $RPM_BUILD_ROOT%{l_prefix}/etc/hydra/
+
     #   determine installation files
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \

+ 15 - 0
hydra/hydra.yaml

@@ -0,0 +1,15 @@
+##
+##  hydra.yaml -- Hydra Server Configuration
+##
+
+host:                 127.0.0.1
+port:                 4444
+issuer:               example
+system_secret:        [ 42 ]
+
+#database_url:         ""
+#consent_url:          ""
+#client_id:            example
+#client_secret:        secret
+#foolishly_force_http: true
+

+ 3 - 2
hydra/rc.hydra

@@ -13,7 +13,7 @@
     hydra_log_complevel="9"
 
 %common
-    hydra_datdir="@l_prefix@/var/hydra/db"
+    hydra_cfgfile="@l_prefix@/etc/hydra/hydra.yaml"
     hydra_pidfile="@l_prefix@/var/hydra/run/hydra.pid"
     hydra_logfile="@l_prefix@/var/hydra/log/hydra.log"
     hydra_signal () {
@@ -34,7 +34,8 @@
     rcService hydra active yes && exit 0
     (   GOMAXPROCS=32
         export GOMAXPROCS
-        nohup @l_prefix@/bin/hydra \
+        nohup @l_prefix@/bin/hydra host \
+            --config $hydra_cfgfile \
             $hydra_flags \
         </dev/null >>$hydra_logfile 2>&1 &
         echo $! >$hydra_pidfile