OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   17-Mar-2004 18:41:20
  Branch: HEAD                             Handle: 2004031717411900

  Added files:
    openpkg-src/ripe-dbase  ripe-dbase-modify.sh
  Modified files:
    openpkg-src/ripe-dbase  ripe-dbase.spec

  Log:
    integrate Arnd's SQL modifications, to install and suggest
    conditionally with_extobjs

  Summary:
    Revision    Changes     Path
    1.1         +85 -0      openpkg-src/ripe-dbase/ripe-dbase-modify.sh
    1.22        +16 -2      openpkg-src/ripe-dbase/ripe-dbase.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/ripe-dbase/ripe-dbase-modify.sh
  ============================================================================
  $ cvs diff -u -r0 -r1.1 ripe-dbase-modify.sh
  --- /dev/null 2004-03-17 18:41:20.000000000 +0100
  +++ ripe-dbase-modify.sh      2004-03-17 18:41:20.000000000 +0100
  @@ -0,0 +1,85 @@
  +#!/bin/sh
  +##
  +##  ripedb-setup
  +##
  +
  +#   determine MySQL root password
  +password=`grep "^password" @l_prefix@/etc/mysql/my.pwd |\
  +          sed -e 's;^password[^=]*= *;;' -e 's; *$;;'`
  +
  [EMAIL PROTECTED]@/bin/mysql --user=root --password=$password RIPEDB <<EOF
  +CREATE TABLE reg_id (
  +  thread_id int(11)     DEFAULT '0' NOT NULL,
  +  object_id int(10)     unsigned DEFAULT '0' NOT NULL,
  +  reg_id    varchar(30) NOT NULL,
  +  reg_window varchar(3) NOT NULL,
  +  PRIMARY KEY (object_id)
  +);
  +CREATE TABLE reg_ref (
  +  thread_id int(11) DEFAULT '0' NOT NULL,
  +  object_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  reg_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  object_type tinyint(3) unsigned DEFAULT '0' NOT NULL,
  +  PRIMARY KEY (object_id,reg_id)
  +);
  +CREATE TABLE as_ref (
  +  thread_id int(11) DEFAULT '0' NOT NULL,
  +  object_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  as_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  object_type tinyint(3) unsigned DEFAULT '0' NOT NULL,
  +  PRIMARY KEY (object_id,as_id)
  +);
  +CREATE TABLE pop (
  +  thread_id int(11)  DEFAULT '0' NOT NULL,
  +  object_id int(10)  unsigned DEFAULT '0' NOT NULL,
  +  pop       varchar(80)      NOT NULL,
  +  remedyref varchar(80)      NOT NULL,
  +  PRIMARY KEY (object_id)
  +);
  +CREATE TABLE pop_ref (
  +  thread_id int(11) DEFAULT '0' NOT NULL,
  +  object_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  pop_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  object_type tinyint(3) unsigned DEFAULT '0' NOT NULL,
  +  PRIMARY KEY (object_id,pop_id)
  +);
  +CREATE TABLE ticket (
  +  thread_id int(11)     DEFAULT '0' NOT NULL,
  +  object_id int(10)     unsigned DEFAULT '0' NOT NULL,
  +  ticket    varchar(80) NOT NULL,
  +  netname   varchar(80) NOT NULL,
  +  PRIMARY KEY (object_id)
  +);
  +CREATE TABLE purpose (
  +  thread_id int(11)  DEFAULT '0' NOT NULL,
  +  object_id int(10)  unsigned DEFAULT '0' NOT NULL,
  +  purpose varchar(80)        NOT NULL,
  +  remedyref varchar(80)      NOT NULL,
  +  PRIMARY KEY (object_id)
  +);
  +CREATE TABLE purp_ref (
  +  thread_id int(11) DEFAULT '0' NOT NULL,
  +  object_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  purp_id int(10) unsigned DEFAULT '0' NOT NULL,
  +  object_type tinyint(3) unsigned DEFAULT '0' NOT NULL,
  +  PRIMARY KEY (object_id,purp_id)
  +);
  +CREATE TABLE range (
  +  thread_id   int(11)   DEFAULT '0' NOT NULL,
  +  object_id   int(10)   unsigned DEFAULT '0' NOT NULL,
  +  begin_in    int(10)   unsigned DEFAULT '0' NOT NULL,
  +  end_in      int(10)   unsigned DEFAULT '0' NOT NULL,
  +  netname varchar(80)   NOT NULL default '',
  +  PRIMARY KEY (object_id)
  +);
  +alter table range add index (netname(8));
  +alter table range add index begin_in (begin_in);
  +alter table range add index end_in (end_in);
  +alter table range add index (thread_id);
  +INSERT INTO object_order VALUES (18,24);
  +INSERT INTO object_order VALUES (19,25);
  +INSERT INTO object_order VALUES (20,26);
  +INSERT INTO object_order VALUES (21,27);
  +INSERT INTO object_order VALUES (22,28);
  +EOF
  +
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/ripe-dbase/ripe-dbase.spec
  ============================================================================
  $ cvs diff -u -r1.21 -r1.22 ripe-dbase.spec
  --- openpkg-src/ripe-dbase/ripe-dbase.spec    15 Mar 2004 13:19:08 -0000      1.21
  +++ openpkg-src/ripe-dbase/ripe-dbase.spec    17 Mar 2004 17:41:19 -0000      1.22
  @@ -36,7 +36,7 @@
   Group:        Database
   License:      RIPE NCC
   Version:      3.2.0
  -Release:      20040315
  +Release:      20040317
   
   #   package options
   %option       with_extobjs  no
  @@ -44,7 +44,8 @@
   #   list of sources
   Source0:      ftp://ftp.ripe.net/ripe/dbase/software/ripe-dbase-%{version}.tar.gz
   Source1:      ripe-dbase-setup.sh
  -Source2:      rc.ripe-dbase
  +Source2:      ripe-dbase-modify.sh
  +Source3:      rc.ripe-dbase
   Patch0:       ripe-dbase.patch
   Patch1:       ripe-dbase.patch.extobjs
   
  @@ -140,6 +141,11 @@
       %{l_shtool} install -c -m 755 %{l_value -s -a} \
           %{SOURCE ripe-dbase-setup.sh} \
           $RPM_BUILD_ROOT%{l_prefix}/sbin/ripe-dbase-setup
  +%if "%{with_extobjs}" == "yes"
  +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
  +        %{SOURCE ripe-dbase-modify.sh} \
  +        $RPM_BUILD_ROOT%{l_prefix}/sbin/ripe-dbase-modify
  +%endif
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
           %{l_files_std} \
           '%config %{l_prefix}/etc/ripe-dbase/*' \
  @@ -183,8 +189,16 @@
             echo "          -c $RPM_INSTALL_PREFIX/etc/ripe-dbase/rip.config.sample 
\\"
             echo "          -s RIPE -1"
             echo ""
  +%if "%{with_extobjs}" == "yes"
  +          echo "4. Modify the native RIPE datastructures to accommodate the"
  +          echo "   extra objects (which you selected by using with_extobjs):"
  +          echo "      \$ $RPM_INSTALL_PREFIX/sbin/ripe-dbase-modify"
  +          echo "5. Finally start the WHOIS server by running:"
  +          echo "     \$ $RPM_INSTALL_PREFIX/etc/rc ripe-dbase start"
  +%else
             echo "4. Finally start the WHOIS server by running:"
             echo "     \$ $RPM_INSTALL_PREFIX/etc/rc ripe-dbase start"
  +%endif
           ) | %{l_rpmtool} msg -b -t notice
       fi
       if [ $1 -eq 2 ]; then
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to