Explorar el Código

correct config strings, improve database initialization script, and begin RIPE NCC snapshot import logic (unfortunately the data is too large so this logic will consist of comment messages)

Michael Schloh von Bennewitz hace 22 años
padre
commit
2bb5f86489
Se han modificado 2 ficheros con 23 adiciones y 9 borrados
  1. 1 1
      ripe-dbase/rc.ripe-dbase
  2. 22 8
      ripe-dbase/ripe-dbase.spec

+ 1 - 1
ripe-dbase/rc.ripe-dbase

@@ -25,7 +25,7 @@
 %start -u @l_susr@
     rcService ripe_dbase enable yes || exit 0
     rcService ripe_dbase active yes && exit 0
-    nohup @l_prefix@/bin/whois_rip -p ${ripe_dbase_pidfile} -c ${ripe_dbase_cfgfile}
+    nohup @l_prefix@/bin/whois_rip -p ${ripe_dbase_pidfile} -c ${ripe_dbase_cfgfile} &
 
 %stop -u @l_susr@
     rcService ripe_dbase enable yes || exit 0

+ 22 - 8
ripe-dbase/ripe-dbase.spec

@@ -23,8 +23,7 @@
 ##  SUCH DAMAGE.
 ##
 
-#   FIXME: rse: run-command script must be debugged
-#   FIXME: rse: whois database data initial loading from RIPE NCC ftp service snapshots?
+#   FIXME: rse: debug whois database data initial loading from RIPE NCC
 #   FIXME: rse: whois database data periodic updating from RIPE NCC
 
 #   package information
@@ -37,7 +36,7 @@ Distribution: OpenPKG [JUNK]
 Group:        Database
 License:      RIPE NCC
 Version:      3.2.0
-Release:      20031217
+Release:      20031219
 
 #   list of sources
 Source0:      ftp://ftp.ripe.net/ripe/dbase/software/ripe-dbase-%{version}.tar.gz
@@ -69,13 +68,14 @@ AutoReqProv:  no
     %{l_shtool} subst \
         -e 's;^RIPADMIN sqlhost,3306,dbuser,dbpsw,RIPADMIN;RIPADMIN localhost,3306,root,pwd,RIPADMIN;' \
         -e 's;^UPDSOURCE SAMPLE sqlhost,3306,dbuser,dbpsw,SAMPLEDB whois.mydb.net,43001,43004;UPDSOURCE SAMPLE localhost,3306,root,pwd,RIPEDB whois.mydb.net,43001,43004;' \
-        conf/rip.conf.sample.in
+        conf/rip.config.sample.in
     %{l_shtool} subst \
         -e 's;^\(DATABASE.*\)SAMPLEDB;\1RIPEDB;' \
+        -e 's;^\(database.*\)SAMPLEDB;\1RIPEDB;' \
         -e 's;^\(host:.*\)sqlhost;\1localhost;' \
         -e 's;^\(user:.*\)dbuser;\1root;' \
         -e 's;^\(password:.*\)dbpsw;\1pwd;' \
-        conf/sources.config.sample.in
+        conf/sources.config.sample
 
 %build
     CC="%{l_cc}" \
@@ -101,7 +101,8 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT
     %{l_shtool} mkdir -f -p -m 755 \
         $RPM_BUILD_ROOT%{l_prefix}/sbin \
-        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
+        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
+        $RPM_BUILD_ROOT%{l_prefix}/var/ripe-dbase/tmp/load/RIPE
     %{l_shtool} subst \
         -e "s;^\\([^=]* *= *\\)%{l_prefix};\\1$RPM_BUILD_ROOT%{l_prefix};" \
         Makefile
@@ -126,11 +127,24 @@ AutoReqProv:  no
     if [ $1 -eq 1 ]; then
         #   display final hints on initial installation
         ( echo "1. To complete this installation of the RIPE Whois server,"
-          echo "    please start MySQL and initialize the database like this:"
+          echo "   please start MySQL and initialize the database like this:"
           echo "     \$ $RPM_INSTALL_PREFIX/etc/rc mysql start"
           echo "     \$ $RPM_INSTALL_PREFIX/sbin/ripe-dbase-setup"
           echo ""
-          echo "2. After initializing the database, start the server by running"
+          echo "2. Although the RIPE Whois server is ready to run, it has no"
+          echo "   data to serve yet. As an optional step, download this data"
+          echo "   from RIPE and integrate it into the database:"
+          echo "     \$ cd $RPM_INSTALL_PREFIX/var/ripe-dbase/tmp/load/RIPE"
+          echo "     \$ ftp ftp.ripe.net"
+          echo "     \$ get ripe/dbase/ripe.db.gz"
+          echo "     \$ get ripe/dbase/RIPE.CURRENTSERIAL"
+          echo "     \$ quit
+          echo "     \$ gzip -d ripe.db.gz"
+          echo "     \$ $RPM_INSTALL_PREFIX/libexec/ripe-dbase/make_db \\"
+          echo "          -c $RPM_INSTALL_PREFIX/etc/ripe-dbase/rip.config.sample \\"
+          echo "          -s $RPM_INSTALL_PREFIX/var/ripe-dbase/tmp/load/RIPE/ripe.db -1"
+          echo ""
+          echo "3. Start the server by running:"
           echo "     \$ $RPM_INSTALL_PREFIX/etc/rc ripe-dbase start"
         ) | %{l_rpmtool} msg -b -t notice
     fi